Us humans are a funny bunch. We will wake up one day and have an amazing idea. A new exciting hobby to try or adventure to embark on. We will dedicate our waking hours to this exciting new thing, and all of a sudden, we come to a complete halt. Maybe it's because we got bored, maybe it's because we accomplished what we set out to achieve. More often than not, it's due to burnout.

As a software developer I've experienced by fair share of burnout over the past 5 years. It's an easy trap to fall into and it happens to more people than you think.  If you want to avoid burnout, keep your motivation, and continue to reach your goals, here's some advice.

It's a marathon, not a sprint

If you're learning JavaScript, Python, or trying to become a Web Design pro, it's important to realise that it won't happen overnight. It will take many months (or even years) of learning and practicing before you feel like you "know it".  

If you wake up every morning and think, "Ok, I must learn these 17491 web development technologies and I must learn them today!", there's only one place you'll end up - burnout city.

So the trick here is to focus on the long game. Instead of trying to rush, tell yourself "I will spend the next X amount of time learning React.js. It'll take me as long as it takes, and there's no rush to learn it today".

I see a lot of aspiring developers make this mistake. So remember, take your time and enjoy the journey.

There's always tomorrow

We've all been there - we are in the zone, cranking out code like there's no tomorrow. Lunchtime comes and goes, and we think 'meh, I'll skip lunch and have a bigger dinner'. Hours tick by and all of a sudden - a bug appears. Determined, we power through and vow not to give up before it's fixed. After Hours of debugging and a few hundred console.log() statements later, the bug is fixed. Mission accomplished. This victory is bitter sweet, as it's 2am, and we're tired and exhausted, thinking 'I hate code' as we fall into bed.

Let's take a step back and think. Did I need to do that? Did I need to stay up late and get that code working, making myself tired and stressed in the process? Could it have waited until the morning?

The answer to the last question is more than likely yes.

It's important to understand that work is a never ending process. There will always be a task to complete or something new to learn. So learn to switch off and tell yourself "theres always tomorrow".

Take breaks

This is why regular breaks are important. Taking a break every 30-60 minutes allows you to well, have a break. Powering down your brain for even 10 minutes allows your mind to reset. You'll find that you'll come back feeling fresh, and see the problems you're facing with more clarity.

Similarly, if you have been going hard at it for a few weeks/months in a row, now may be a good time to have a week or 2 off from coding. Go on holiday, binge watch Netflix, read a book - anything that is easy on your mind.

Think of it as a race car going round a track. At some point the car will become low on fuel, and the tyres will become worn out. Sure, the driver can keep going, trundling around the track, or they can come in for a pit stop - get some fresh tyres, more fuel, and come out on track faster than before.

Focus on one thing at a time

Learning to code is hard. Really hard. How many technologies are there? Loads. You might feel like you have to learn them all at once. You might start by learning some React.js, then some Node.js, then REST API's, then Python…

There's only one thing you'll achieve by trying to learn to much to quickly - yep, burnout town. Don't fret my friend - the easy remedy for this is to simply focus on one thing at a time, and remember not to rush. Learn at your own pace and let the knowledge sink in.

For example, if your goal is to become a full stack developer, you could begin by creating simple React.js (or whatever frontend framework you choose) apps, without worrying about server side code, databases or REST API's. When you feel comfortable (which may happen after weeks/months) you can move onto the next thing, which might be creating an API using Node.js. Your next step might be connecting to a database.

You get the idea. By splitting things up and focusing on one thing at time, you'll avoid becoming overwhelmed, and you might find you actually learn stuff faster.

Have other Hobbies

Learning to code might be your hobby (I know it was my only hobby for a while) but it's a good idea to have other hobbies that you enjoy. It helps to relieve stress, and is a good for your mental health - provided your hobby doesn't add more stress to your life!

You could take up jogging or swimming. Maybe take the dog for a walk more often (if you don't have a dog, you could get one). Join a cookery class, photography class, or learn another language (I don't mean a coding language!).

When's the last time you hung out properly with your friends or family?