DEV Community

Cover image for Solving Rubik's Cube is the best exercise for Computer Science students and Junior Developers
Robert Mion
Robert Mion

Posted on

Solving Rubik's Cube is the best exercise for Computer Science students and Junior Developers

Solving Rubik's Cube seems near-impossible...

...unless you use algorithms

The official guide calls their solution 'a layered approach'

It turns out this approach has two official names

  • CFOP Method
  • Fridrich Method

The guide walks readers through eight steps after an initial primer on the language used to solve the Cube

Labels include:

  • Layers: top, middle, bottom
  • Faces
  • Centers
  • Edges
  • Corners Diagram from the official guide

Faces are assigned single-letter keys, each with notation that identifies which way to turn that face as part of the larger algorithm

Diagram from official guide

The guide even refers to a series of moves as algorithms

Diagram from the official guide

Solving Rubik's Cube will teach you Computer Science

  • Learn abstract terms and notation necessary to understand and reproduce each algorithm
  • Learn several algorithms that are particularly useful for placing the desired piece in the appropriate place
  • Practice the first few steps before attempting later ones, building your muscle memory
  • Feel the rewarding sensation each time you solve the Cube

Writing code will present many of the same challenges and rewards.

If you love solving Rubik's Cube, you are likely to excel at and enjoy a career in Computer Science

Buy a 2x2 and 3x3 Cube. There are guides to solve both. Try not to get frustrated. After a few solves, start timing yourself!

Top comments (0)