Home » The Archive » Recreational Coding

Recreational Coding

It's a question that people often want to know the answer to, but don't often have the time to ask: How do you keep programming fun?

When it's your job, day in and day out, to apply these concepts in rigid ways to achieve business goals ... that can sometimes suck the fun out of things. So how can you avoid that?

I have a lot of tactics for avoiding that sort of burnout (including a pantheon of half-finished hobby programming projects, and many non-programming interests), but I think that the easiest one is simply playing with code.

Find little problems that you can solve with code in a short amount of time.

They don't have to be original problems, they can be ones you've solved before, or new ones that other people have happened to solve and you just want to try a new style of programming to solve it anew.

A number of people gave me some great ideas and links when I asked about this on Twitter recently:

In addition to some great DMs, there were plenty of resource recommendations:

(HackerRank is located at https://hackerrank.com and they have a "30 Days of Coding" tutorial that can be useful for learning new things.)

My favourite response, incidentally, was this:

Another great thing to look into is called Object Calisthenics. It can help you learn improved ways of building Object-Oriented code. In fact, just playing around within a language you're familiar with is a great way to uncover fun new subjects. Most languages have dark corners where day-to-day users might fear to venture; becoming the Lara Croft or Indiana Jones of your language is a matter of grabbing a torch and taking the first few steps into darkness.

Even during the work day, these sorts of tiny exercises can be stimulating. When confronted by perplexing code or behaviour, I sometimes open the 3v4l.org web-based PHP version comparison service in a separate tab and play with the logic using the Preview feature.

There are some great resources out there for finding "coding prompts" that will help you keep programming fun and build your skill level by learning new things. In fact, I just discovered an entire sub-reddit dedicated to the idea, inspired by Writing Prompts that are designed to trigger an author's creativity.

Go Forth and Code. :-)

Update: Here's a fun programming challenge courtesy of NPR.

Published: July 28, 2017

Categories: coding, ideas

Tags: coding, development, dev, php, opinion, links, fun, javascript, js

Related Posts