DEV Community

Nandini S Hinduja
Nandini S Hinduja

Posted on

How to get un-stuck while coding?

Here are some things which I do to get un-stuck:

  • Keep the current task (which got you stuck in the first place) on hold and start another easier task. This way your active brain is working on the easier task whereas the passive brain keeps working on the hard task in the background and in no time you will have a solution.
  • Use websites like StackOverflow and Github to solve your errors.
  • You can also use YouTube to find solutions to the errors that you are facing.
  • Go for a walk so that the passive brain can solve the problem that the active problem is unable to solve.
  • You can also take a nap or shower.
  • Use AI tools like ChatGPT or Bard.
  • Get help from your peers or colleagues, sometimes just explaining the problem to someone else will give you the solution.

What do you do to get un-stuck while coding? Let us know in the comments!

Top comments (6)

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Well said! Momentum is key. Do something that you can get working quicly, then go back to the things that don't. There are often another 20 things to do, do one of them, you shouldn't hit the hard problems until you're doing 120 mph... See them tumble when you are running at top speed...

Collapse
 
nandinishinduja profile image
Nandini S Hinduja

exactly!

Collapse
 
artxe2 profile image
Yeom suyun

I solve problems through trial and error.

Collapse
 
nandinishinduja profile image
Nandini S Hinduja

yes, that's another amazing strategy! brute force!

Collapse
 
nathanb profile image
Nathan Bridgewater • Edited

Depending on what I'm working on, drawing diagrams can be good too. I find it really helps you to understand the problem you're trying to solve.

Collapse
 
nandinishinduja profile image
Nandini S Hinduja

absolutely!