Ask HN: Have you ever written (extensive) code that works the first time?
As I continue down a little project of mine, I realized that I've never written an app that works completely the first time I run it.<p>I wondered if it was my incompetence/lack of experience/ignorance/etc., or if it was a common phenomenon.
13 comments
[ 3.3 ms ] story [ 41.0 ms ] threadThe first draft is NEVER perfect.
Now, I don't know anyone who measures code in "pages". This isn't a good metric when most projects are made up of multiple files. It's as good as measuring productivity in LOC.
I've also written code which didn't work at all, and then spent days debugging it. But I've learned that I'm really bad at debugging code, so instead I take the time to plan out what my code is doing so that I can get it right the first time.
And then there are days I've hacked through some muddy recursive reference problem in a few lines of code, just knowing the solution should be obvious but not seeing it.
The good moments make me happy to program; the bad ones make me think about becoming a lumberjack instead.