DEV Community

Cover image for 5 Tips for Overcoming Coder's Block
Osinachi Chukwujama
Osinachi Chukwujama

Posted on

5 Tips for Overcoming Coder's Block


  1. Use a sandbox
  2. Get a cheat-sheet
  3. Take a quickstart
  4. Break down the problem
  5. Mix 'em up


Usually, developers experience a block. During the block period, they don't write any useful, reasonable code. This block may be due to tiredness. You may have been coding for days without breaks. But when you can't code because you have no idea on how to approach the problem, then these tips are for you.

1. Use a sandbox

Sandboxes are great because they help you immediately flesh out some code. Most times, they are separate from your project. This means your old code doesn't weigh you down. Some great sandbox environments are:

  1. Codesandbox
  2. Codepen
  3. Repl
  4. Glitch

The ability to download your modules and packages in no time is a big plus.

2. Get a cheat-sheet

When using new technology, you may need a general overview, but are too lazy to watch a crash course (it happens). You need to read a cheat sheet.
Google "{insert technology name} cheat sheet filetype:pdf". You don't have to include the filetype:pdf if you don't need the cheat-sheet in pdf format.

A cheatsheet would show you the big picture. No crash course can beat that (my opinion).

3. Take a quick start

Consider using a quick start if your first instinct is to consume an intro video. You should experiment once in a while. Go to the docs of the technology and check up the quick start. Most modern, well-documented projects have a quick start. A quick start would get your hands dirty in the shortest time while referring you to links in the docs. If the docs are terrible you can stick with whatever method suits you 🙂.

4. Break down the problem

How can you ever solve a problem without breaking it down? This is a fundamental part of problem-solving.

Say you want to add state management to an app with several levels of state. You can begin by sketching the state-flow among the key components.

Another way is to create a new markdown file with title how to implement feature-x. This is pseudo-coding. It is a great way to think about logic before syntax. Your brain would be more prepared to face the problem at hand.

I recently discovered that has a VsCode extension. You can use right from your favourite editor. If you are a visual-oriented thinker, this extension is for you. If you aren't, still consider diagrams of state-flow and logic. Using flowcharts doesn't mean you're a noob.

5. Mix 'em up

So, you have these four tips and still not sure how to start? Mix them up. You could start with tip 4, then tip 2. it all depends on your use case. Don't slack like a potato when you have the power not to.

A worthy mention is rubber ducking which is talking to a rubber duck about your logic or bug. Note: The object you talk to doesn't have to be a rubber duck. It could be your coffee mug.

Thanks for reading.

Top comments (0)