How can you better solve complex coding problems? Here are a few tips:
Work test-driven
Write your tests first, and then your code. Like this you can immediately check if your code is doing what you want. Also this helps to have all your code covered with tests.Use the debugger
The debugger is very powerful, as you can run and stop your code line by line and see which values your variables have at the corresponding line, for example.Write detailed pseudo-code
With pseudo-code you write down in โnormal languageโ what your code is supposed to do. Its important that you write very detailed and exact pseudo-code, so that its easy for you to fill in the actual code later.Use coverage tools
There are different coverage tools available, which check which parts are covered by tests and to what degree. Like this its easy for you to fill in the gaps.
What are your tips for solving complex coding problems? Have a nice day! ๐
Top comments (9)
Nice post. I also try to understand the general context, then break down it to small things first. With the small things, I can get it done quicker and also can get supports from people easier if I can't do it individually.
Hey, thank you! Yes it's a lot easier to handle pieces of the problem and solve these first possibly with someone else. ๐๐
I always like to think about the problem away from the keyboard first.
That's a great idea, pen&paper helps too. ๐
Thank you
You are welcome ๐
I used to write down the problem and try to break it into smaller sub tasks and then accomplish those and doin so it motivates myself to push one step ahead...๐
Thank you , really nice post.
I would love to add a small tip: take breaks during debugging.
You are welcome and I agree with you! ๐