by Cynthia Lee

Learning to code is just like learning to dance


Many moons ago, I was a dancer. A contemporary dancer, to be exact.

And no, contemporary dance isn’t always a group of barefooted people pretending to be trees swaying in the wind. On one occasion, I danced the part of a ghost.

Now that I’m more than six months into my coding journey, I am noticing the similarities between learning how to code, and learning how to dance.

1. Focus on the basics

Photo by Gez Xavier Mansfield on Unsplash

Learning correct technique is fundamental in dance, regardless of genre. Basic tendu and degagge combinations seem simple, and might not feel as exciting as leaping across the room in some So You Think You Can Dance-esque routine. However, focusing on basic skills will allow you to develop the right muscles and general body awareness that would help you advance technically.

In the land of coding, it is easy for newbies to be overwhelmed by the staggering amount of languages / frameworks / tools out there. Which is the best language to learn? A lot of people end up jumping between languages like JavaScript, Ruby, Go, and Python in the beginning.

It’s true that most software developers are proficient in more than one language. In fact, some aim to learn one new language per year. For a beginner, however, I think it’s more beneficial if you focus on one language, and really try to master the fundamentals of programming.

These include:

  • Data structures (e.g. binary trees, linked lists)
  • Algorithms (and time complexity)
  • Architectural design (e.g. Object oriented programming, functional programming)

2. Strive to be well-rounded

Photo by Saksham Gangwar on Unsplash

While my main focus was contemporary dance, I also dabbled in Bhratanatyam, lyrical jazz, and traditional Malay dance styles. I felt like it gave me more insight into what my body was capable of. I learned new techniques and movements, which opened my eyes to different possibilities in terms of choreography.

Image from Andy Shora

I feel like the same concept applies to programming. Do you consider yourself a front-end developer? It wouldn’t hurt to understand some skills on on the other end of the stack. Learn how the internet works by reading up on Domain Name Servers (DNS) and how they work. Or learn the basics of Nginx, and set up a Node server.

If you’re a back-end developer, you could challenge yourself by creating a simple website from scratch using HTML, CSS, and JavaScript. Or maybe learn a framework like React or Vue.js, which your front-end colleagues keep going on about.

By gaining some knowledge in an area of the stack that you aren’t familiar with, you will become a better developer, because you’ll begin to understand the workflow and pain points on the other side.

3. Collaboration is crucial for improvement

“Two women in dresses arching back while holding each other hands in a green meadow” by Julia Caesar on Unsplash

In between weekly technique classes, my dance troupe would get together to practice drills. We would observe and critique each other’s technique, and work on our identified weaknesses. For the most part, we managed to avoid getting yelled at by our dancer teacher in the subsequent lesson.

Code reviews are similar, but instead of trying to spot weak technique, you try to find bugs, and improve the overall quality of the software. Code reviews are great for sharing knowledge, ensuring consistency in software design, and improving team cohesion.

Pair programming is another collaboration technique that is beneficial. A driver writes the code according to the navigator’s instructions. This is useful because the navigator will have to think about, and explain, why they have chosen a particular solution to a problem. There is also the advantage of checking for errors in real-time. In addition, it’s an effective way to pick up best practices and techniques from more advanced programmers.

4. Step back and look at the Big Picture


Sometimes you’re just a tree in the dance production. Sometimes your code is a small part of the code base. And that is perfectly fine.

If you’re a tree, aim to be a tree that adds value to the story that is being told. Embrace your moment on the stage. In the same vein, make sure you are pushing quality code that is robust and readable into the code base.

Thanks for reading my article, and clap if you liked it! Check out my other articles like How I built my Pomodoro Clock app, and the lessons I learned along the way, and Let’s demystify JavaScript’s ‘new’ keyword.