A Passion for Cubes, a Path to Leadership
For many people, solving a Rubik’s Cube can take a long time. For Hamza Hafeez, a fourth-year computer engineering student at the University of California, Davis, it takes as little as 6.2 seconds.
After discovering cubing at the age of 8, Hafeez turned a childhood interest into a passion that extends far beyond solving puzzles. He now competes in World Cube Association-sanctioned competitions, is the president of the Davis Cube Club and has explored research opportunities in web-based applications for greenhouse technology.
More Than a Puzzle
Hafeez first learned to solve a Rubik’s Cube through YouTube tutorials. Once he figured it out, it sparked a larger curiosity: he began timing himself and learning new techniques to improve his speed. Today, Hafeez’s official best single solve is 6.2 seconds, and he averages around 9 seconds.
“Once I solved it for the first time, I wanted to see if I could do it faster,” Hafeez said.
Hafeez joined the Davis Cube Club in the fall quarter of 2023, finding a community of like-minded people.
Now, as president of the club, Hafeez has helped organize speedcubing competitions at UC Davis, which typically have around 120 participants. His responsibilities include securing university approvals, reserving rooms, setting up equipment and creating a schedule.
In addition to the standard 3-by-3 Rubik’s Cube, competitors take on solving cubes up to 7-by-7. Other puzzles include a 12-sided dodecahedron puzzle called Megaminx and Rubik’s Clock, a two-sided puzzle with nine clocks that all need to be set to 12 o’clock.
Hafeez’s favorite events are 3-by-3, 4-by-4 cubes and one-handed solving. One-handed solving provides him with an opportunity to practice and refine his finger tricks. The 4-by-4 has become one of the club’s regular practice events ever since Yuki Nomura, a Japanese exchange student who holds Japan’s national record, helped members learn to solve it.
He also serves as a World Cube Association delegate, a role in which he ensures competitions follow official regulations. He has gained expertise in organizing events and collaborating with volunteers and delegates off campus.
“It’s a good way to practice these professional skills in a low-stakes area,” Hafeez said.
Thinking Outside the Cube
Hafeez’s approach to a recent research project was not unlike his analytical approach to speedcubing. Working with Shamim Ahamed, an associate professor of biological and agricultural engineering, Hafeez was asked to convert a spreadsheet used for greenhouse energy calculations into a web-based application. The two connected through the BE-STARSE program, an NSF-funded initiative that provides students with hands-on learning opportunities in emerging technologies.
Although he had some experience in software development, Hafeez was unfamiliar with agricultural engineering concepts, so he first needed to understand the engineering principles behind the spreadsheet calculations.
To make sense of the material, Hafeez turned to Ahamed and graduate students for insight into the agricultural engineering principles behind the calculations. However, he had considerable freedom to determine the application’s design and programming language, which he then had to explain to the agricultural engineers with whom he was working.
“It taught me how to communicate with people who have a different background than you and are working in a different field,” Hafeez said.
Through the project, Hafeez helped transform a complex spreadsheet into a user-friendly web application for Ahamed and his students. He also developed online documentation to help the team understand and update the application.
Finding His People
Hafeez sees a connection between his two passions, engineering and speedcubing, both of which require a willingness to look past what’s right in front of him. In his research project, he set default values in the greenhouse application so students could view results immediately and adjust individual settings. He applied the same approach to speedcubing competitions, creating a raffle system that rewards competitors for setting up personal records and volunteering.
“You have to make sure you look into every aspect of a problem and try to analyze it and see where you can improve. Beyond the obvious things in which you could improve, you have to look a bit deeper,” Hafeez said.
Hafeez considers the Davis Cube Club the most influential part of his UC Davis experience, providing him with opportunities to lead, build friendships and connect with others who share his interests.
He encourages other students to explore different clubs, discover what genuinely interests them and commit to becoming involved. For Hafeez, Cube Club has provided a welcome balance to his academic responsibilities.
“It should be something that gives you energy and keeps you motivated and refreshed,” he said.