What to Do When Writing Code Gets Boring


Unfortunately, coding isn’t always breakthroughs and fun prototypes

Writing code can be tedious, frustrating, and sometimes downright mind-numbing. It’s OK if you feel like shutting your laptop, going outside, and seeing the sun. It’s OK if you don’t want to refactor that 200-line function you wrote a year ago (why is it 200 lines?).

Sometimes programming gets boring. Things slow down and don’t feel as exciting as they used to. The joy of learning how a language works is slowly replaced with apathy and indifference. You get comfortable and maybe a little jaded over time.

“Great, more strings to manipulate …”

I’ve thought this before when solving for the same types of problems over and over again:

  • Get some data
  • Manipulate it
  • Send it somewhere else

Work can feel like work. That’s normal. What isn’t normal is letting it destroy your original love of engineering.

When you’re faced with a situation like this, one of the best things to do is start learning again. Reset your apathy by fostering a beginner’s mind with programming. Find a new language, a new project, or a totally new framework you haven’t used before.

Here are some ideas to bring back the joy of programming.

 

Learn a New Language

There’s no better feeling than learning a shiny, brand new programming language. You’re already used to one or more languages, so learning another should be less daunting than when you were first starting out.

When you start learning a new language, you get to see how other languages implement some of the same patterns. You’ll learn how to manipulate data in a similar fashion, but the code will be different — it might look strange at first.

The first language I learned was Ruby. I love Ruby and spent a lot of time working with it. It always seemed like the best language for most applications. Over time, I had to learn other languages like Python. Initially, I hated the way Python looked. The syntax was just foreign enough to be frustrating. The style looked ugly to me, and I didn’t enjoy relying on indentation.

This changed very quickly. I realized it made more sense to do some things in Python vs. Ruby. I got used to the syntax, and it started to become more familiar. It was like relearning Ruby, but everything was slightly different.

Learning a new language let’s you unlock that “I’m making progress!” feeling again. You get to make fast, rewarding progress towards learning goals as opposed to slower, dull progress toward fixing another bug.

 

Automate Tasks You Do Frequently

This one can be really fun to do, and the added benefit is the finished product makes your life easier.

If you have some task or set of tasks you repeatedly have to do, like backing up files or even changing some text in a file, this is the perfect project. This project impacts you on a personal level because its something you use frequently outside of work.

Some ideas for this might be:

  • Set up a home-automation system with smart lights, plugs, etc. and build a small application leveraging the systems API to turn things on and off (the Philips Hue API is a great example)
  • Set up a Plex server on Linux for streaming media, and configure scripts to keep things up to date and running smoothly
  • Do you regularly back your files up? If not, you should. Set up a scripted file backup and restore process to ensure you don’t lose precious data.

 

Make a Game

Now, I know what you’re thinking:

“This is a huge project! I don’t know C++! Ahhhhhh!”

No, it doesn’t have to be that involved. You don’t need 3D models or rendering. Just make a simple game.

This can be a browser-based game that’s built entirely in JavaScript or a text-based game built to run on the command line.

If you’re looking for a platform to build your browser game, check out this great list of JS frameworks geared toward games.

I won’t be prescriptive about language here, as you can build just about anything with just about any language. The choice is yours! This is the best part — you get to be creative.

The logic, art (or lack thereof), and style are all up to you.

 

Conclusion

Get out there, and make something fun. Don’t worry about writing the most beautiful code you’ve ever seen. Write what works. You don’t have any deadlines, project managers, or documentation to drag you down. Write what seems fun and effective.

Thanks for reading! I hope you’ve found a project idea that re-energizes your love for coding.

Author: Tate Galbraith
Source: https://betterprogramming.pub/what-to-do-when-writing-code-gets-boring-7563257ef300


Write A Comment
  • Hassan Kareem 1 year ago
    for me i listen music

    Write A Reply