DEV Community

Joshua Swift
Joshua Swift

Posted on

Coding Warmups ๐Ÿ‘Ÿ

Man stretching before exercise

Warming up before doing physical exercise is essential. Even if the exercise isn't intense, injuries can be caused by not preparing correctly which can sideline you for weeks or months.

While not quite the same, I have had similar experiences with coding, where a particularly tough bug or problem has put me off opening my editor for fear of hours of banging my head against a wall with no sign of a breakthrough. Sometimes this feeling drags on for days or weeks at a time, and my progress suffers greatly.

In reality, once I do start coding I find it thoroughly enjoyable and the challenge actually keeps me interested and engaged. Even with this knowledge, my lizard brain still often dreads the thought of coding if the task ahead of me isn't a walk in the park.

To combat this, I have started "warming up" when I anticipate the coding session being particularly difficult or strenuous. This can take different forms but it usually involves a light, easy activity which doesn't stress or tax the brain too much, but still engages me and gets me in the mood to code. This has the effect of tricking the brain out of fearing the task ahead, and instead makes me excited to get started!

Once I feel sufficiently warmed up (10-15 minutes usually suffices), I switch to the task I had originally planned and usually find myself looking at my watch hours later and wondering where the time has gone.

Warmup Examples

Tutorials ๐Ÿซ๐ŸŽ’

Following along with tutorials may not be the best way of absorbing knowledge, however they are a good way of getting started with a new technology or language without the usual resistance that comes with staring at an empty code editor.

With this in mind, I've found them useful for warming up before getting started on a project which will help me learn more in the long run.

Recommended Resources:

โ€ข Scotch.io
โ€ข Kirupa
โ€ข Net Ninja

Flexbox Zombies (or other coding-related game) ๐ŸŽฎ๐Ÿ‘พ

If you've yet to dive into Flexbox (like me up until a couple of months ago) then Flexbox Zombies is the perfect way to get up to speed.

A fun, interactive way of learning which also acts as a great warm-up for tougher challenges. Best of all, it's free!

There are loads of other coding-related games out there which accomplish the same thing, so if you're looking for a fun way of warming up before a challenge, it's always worth having a search to see if there's a game relating to a technology you're currently trying to learn.

Recommended Resources:

โ€ข Codingame
โ€ข Untrusted
โ€ข CheckiO

Previously completed algorithm challenges ๐Ÿ’ป

Algorithm challenges are the bane of many a developer (myself included), so in preparation for a particularly tough algorithm which is daunting and causing you grief, why not try warming up with a challenge you've completed previously?

In my experience, going back to tackle a challenge which originally caused you significant problems and completing it in a much shorter time frame can put the wind in your sails to tackle the tougher challenge with less resistance.

Recommended Resources:

โ€ข HackerRank
โ€ข Code Wars
โ€ข freeCodeCamp Algorithm Challenges

Coding videos ๐Ÿ“น

Similar to tutorials, a good way of getting the brain in gear before coding is watching videos with coding-related content. This could be in the form of tutorials, streams of people coding, conference talks or any other video which gets you engaged.

Recommended Resources:

โ€ข Fun, fun, function
โ€ข Twitch
โ€ข freeCodeCamp YouTube channel
โ€ข Search "thing you want to learn about" + "conference talk" on YouTube = success!

Any coding activity which excites/relaxes you ๐Ÿ›€

The sky is really the limit when it comes to activities you could use to warm up, anything which doesn't make you want to immediately close your laptop out of fear and browse social media instead.

If you're anything like me, once you've got some momentum you'll find the challenge much more approachable, and you'll look back and laugh at how ridiculous it was to dread coding! Until the next tough challenge comes along of course.......

Comment below with your ideas for warm up activities!

Top comments (3)

Collapse
 
jess profile image
Jess Lee

I love this recommendation -- thanks for sharing the resources. I've never played a coding game before and they seem like a lot of fun!

Collapse
 
joshuaswift profile image
Joshua Swift

Even if you're a Flexbox master I would say Flexbox Zombies is worth playing just for fun. It's so well made and I can't believe it's free!

Collapse
 
hithamyosri profile image
Abo Kareem

thanks, :) very useful links and advices