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

Should I spend more time upfront thinking before coding (gasp!)?

Probably. But anyone who reads my blog could have guessed that I would say that.

I tend to spend a long time writing code and then never look at it again. I even forget the implementation details. It makes my life much easier -- if I had to keep thinking about how btree_node.c calls proto_lbs_client.c which calls wire_requestqueue.c which calls wire_writequeue.c which calls network_buf.c which calls events_network.c I'd never get anything done. And if I can remember all that, I'm going to think about it whether I like it or not.

Just get the code right the first time. Then you can use it as a building block without needing to worry about implementation.



I often use code as a tool to think about code.

So my time spent upfront may actually look like coding. Depending on the problem I may use strange domain specific languages like scribbling equations on dead trees.

The artefacts of this upfront thinking may get re-used in implementing the solution. Than it can look like refactoring.




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

Search: