Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Depending on the problem, I disagree with this idea "think before you code". I think /by/ coding, sometimes a problem is too big to fit into my head and if I write some code and try to string it together the code will tell me where my mental concept is missing something.

If the real underlying problem/solution is a shape too big to put in your head, what do you propose? Pen and paper as superior to code for modelling things?



I never wrote "think before you code", and agree that's not always the most suitable way to go about a problem, although I believe a lot of programmers would benefit from doing that more often.

I wrote "think about what you're doing".


I'm sick of dealing with code written by people that had no clear thought process before they started coding.

It comes through in the code, it's messy, there are entire classes and functions that are never used. The logic is all over the place. The code is messy to look at. There are edge cases that haven't been handled.

Well engineered code I should be able to look at understand what the developers thought process was as he was writing it.

I've seen a Dev write a piece of code, that wasn't that big, maybe a few hundred lines then later that day he couldn't explain how it worked in a meeting. Even going through his code line by line he couldn't follow what was happening.

If he can't follow what is happening in his code or explain it coherently, how can anyone else!

And it was because he dived into coding something without thinking.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: