loading...

re: How Do You Approach Your Coding Problems VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The trick is to break it down into small steps. Step 1: Understand the problem. What is it exactly you're trying to accomplish? In the example a...
 

Awesome answer!

I would add one thing: as part of step 1, ask yourself "Do I really need to solve this problem?" There could be any number of reasons for the answer to be No. For example, sometimes the requirements may be wrong ("We don't actually need the temperature in Fahrenheit"). Other times someone else -- a colleague, a third-party library -- will have done the work for you.

I've been there -- wasting time and brain power on a problem that didn't need solving. It's painful.

Of course, if you're solving the problem just to learn or have fun ... well, completely disregard this part, and move on to Lisa's steps.

 

Fun is an important part of this, otherwise what's the point? ;-)
... mind you, sometimes you're having fun, you just don't know it yet.

True: check to see if the problem has been solved elsewhere, although beware of falling into a black hole of searching for and implementing solutions that would be easier to just code yourself.

Absolutely, there's a balance to be found. That black hole is a very real danger. Still, I tend to err on the side of not writing the code if I can avoid it ... which probably makes me lazy and/or lacking in curiosity.

Fun is an important part of this, otherwise what's the point? ;-)

So true!

code of conduct - report abuse