DEV Community

Discussion on: 5 things I do when I'm stuck coding

Collapse
 
bbessa profile image
Bernardo Bessa

Focusing on the bullets themselves, I'd say:

  1. Look for the development tools that suite your needs (e.g IDE). It is really cool to develop over notepads or basic text editors - it might shows how skilful you are -, but there are so many tools that can let you focus on the big problems. Don't let braces, commas or any basic language syntax consume too much of your time!

  2. Rethink about your problem solving approach. If you are changing the order of the lines on your code, you may are not understanding what problem you are really trying to solve. Design a solution can help you to implement it in a more understandable way.

  3. That is a major practical vs theoretical question: logging is not necessarily debugging. While logging is for definition a cross-cutting concern - which means it is a feature that is applied to all of your application, for a ton of different reasons e.g. communication between applications, error handling, auditing, debugging -, debugging is a method to test your application in runtime - which allows you a lot of features to control your test flows a lot better. Have a look on this blog post (focused on Javascript): thedevelobear.com/post/logging-and....

  4. and 5. You are definitely on the right path! First of all, any time you are stuck, it is fundamental to understand which kind of problem you have in front of you: business or technical. Do you really understand what you are developing? Or is it some technical issue that you are finding ahead (e.g algorithm effectiveness, data structure usage, data manipulation, etc.)?


To finish, I'd like to introduce you a concept that I've studied a few months ago and it was really eye-opening about being stuck: Strategic Procrastination. Take a look (it is quite contextualised on software design, but the concept is clearly explained): dev.to/remojansen/strategic-procra....