|
Programming

How to practice coding without burning out

Coding for ten hours on Sunday and nothing for two weeks is not discipline. It is a cycle. The people who last are the ones who practise in small, repeatable blocks.

How to practice coding without burning out

In 2021 I coded for fourteen hours a day for three weeks. I was building a product, sleeping at 3am, and telling everyone I had never been more productive. On the first day of the fourth week I opened my laptop, looked at the editor, and closed it. I did not write a line for a month.

That is burnout. A body and brain running on adrenaline, finally sending a bill.

More hours is not the same as more progress

After about four hours of focused work, my code gets worse. I miss semicolons, I rename things badly, I introduce bugs I would have caught in the morning. The sixth hour feels productive and usually creates work for the next day.

Beginners are told to grind. Grind is a bad teacher. It rewards hours instead of understanding, and it turns learning into a test of endurance. You are not training for a marathon. You are trying to still be coding in three years.

The ninety minute block

Ninety minutes, one task, phone face down in another room. A timer. When it rings, stand up, even if you are in the middle of something. Especially if you are in the middle, because that is when you will be tempted to push through and lose the next two hours.

Two blocks a day is a serious practice. Three is a full day. One block after work is enough to keep moving. The block is short enough that you can start on a bad day, which is the whole point.

Decide the task before the block starts. "Work on my project" is not a task. "Add validation to the signup form" is. A clear task means you spend the ninety minutes typing, not deciding.

Rest is part of the schedule

Take one full day off every week. Not a day where you watch tutorials and call it rest. A day with no screen, no course, no "quick fix". Go to church, play football, visit family, sleep. Your brain consolidates what you learned while you are not looking at it.

I resisted this for years because it felt like falling behind. The opposite happened. The Monday after a real rest day was always my best coding day.

Short breaks inside the block matter too. Five minutes every forty minutes, away from the screen.

Track hours, not streaks

Streak apps are addictive and slightly dishonest. A streak rewards you for opening the app, not for learning. I have seen people write one line at 11:58pm to keep a 60 day streak and learn nothing for a week.

Track hours per week instead. A simple note is enough: date, minutes, what you worked on. At the end of the week, add it up. Twelve honest hours beats a 90 day streak of five minute sessions.

The log also shows you patterns. Maybe you never code on Wednesdays because of traffic. Plan around the truth instead of the fantasy.

NEPA is not a personal failure

Power cuts are part of the schedule in Nigeria, not an exception. Build around them. Charge the laptop whenever there is light, even at 80 percent. Keep a power bank for the router or use your phone hotspot. Download docs and videos so a dead network does not end the session.

When the light goes, stop. Do not sit in the dark frustrated. Read a printed page, review your notes on your phone, or take the rest. The session is gone, but the habit is not.

The same goes for data. If you have 2GB left, do not start a four hour video course. Read documentation, work on local code, or write. Match the task to the resources you have.

Stop comparing your chapter one

Twitter and LinkedIn show you the ending. Someone announces a job at a company you applied to, and you do not see the two years of failed interviews. Someone posts a project that looks impossible, and you do not see the tutorial they followed.

I am not saying those people are faking. I am saying the feed is a highlight reel, and comparing your daily reality to someone's edited summary will make you quit. Mute the accounts that make you feel behind. Follow people who show the process, not the finished result.

The only useful comparison is you last month. Can you build something now that you could not build then? If yes, you are moving. The pace is yours.

When motivation disappears

It will. Usually around month three, when the beginner excitement is gone and the job is not here yet. That middle stretch is where most people stop, and it has nothing to do with talent.

The fix is to lower the bar, not raise it. Do one of these, then stop:

  • Open the editor for twenty minutes and read your own code.
  • Read one page of documentation and write down one thing you learned.
  • Fix one small bug, even a spacing issue.

Do not try to recover a lost week in one heroic session. Just touch the work, and let tomorrow be another twenty minutes.

If you have been forcing it for weeks and feel dread when you open the laptop, take a full week off. A real week, not a guilty one. Most people come back sharper. If you do not, that is information too.

What I do now

I work in two blocks, morning and early afternoon. I stop at 4pm. I take Sunday off. I keep a paper log of hours and a short note about what I learned. When I feel the old urge to push through the night, I remember the month I could not open the editor, and I close the laptop.

None of this is discipline in the way people usually mean it. It is maintenance. The developers I admire are not the ones who worked the hardest for six months. They are the ones who are still here after ten years.

What to do this week

Put two ninety minute blocks in your calendar. Choose the task for each one in advance. Take one day completely off. Write down the hours at the end of the week, without judging them. That is the whole system. Start with one week before you decide it does not work.

If you are stuck on what to practise, read how long it really takes to learn to code and 10 Python projects for your portfolio. The Software development for absolute beginners course is built in short lessons for exactly this reason.

Dave Partner

Dave teaches digital skills at Braintem and has helped thousands of Nigerians move from watching tutorials to charging for real work. He writes about the parts nobody puts in the course trailer.