If you wasted weeks coding the wrong thing then you didn't solve it overnight. Making mistakes is a part of the process, you have to count that time as well.
If you wasted weeks coding the wrong thing then you didn't solve it overnight. Making mistakes is a part of the process, you have to count that time as well.
That was what the OP said.
For me "typing code" is part of the thought process. These days, with GUI IDEs, and symbolic debuggers, there's almost no excuse to "measure twice; cut once," like we did in the "big iron" days.
I was trained as an artist, and the process of sketching is a lot like the way I work in architecting my code.
Also, I wouldn't call it "wasted" code. What was it that Edison is reputed to have said about 10,000 failed experiments?
"I now know 10,000 things that don't work."
I actually enjoy coding. I also really like my code to be clean, efficient, and useful. If code that I write is not all of these, I don't want it in my work.
I saw a chap that had a .sig that said something like:
"I hate code, and want as little of it as possible in my programs."
Few things make me feel as good as ripping out large swaths of code. It's like lancing a boil.
With coding, you are confined to formal syntax and semantics, but if the code (even partially) works, you can be more confident in your design.
With paper, you can plan as high-level as you want, with the danger of being too highlevel and overlooking things.
I cut my teeth, in the days when we were supposed to design the entire program; from start to finish, on a pad of paper, hand it to a data entry clerk, who would then create a deck of cards, based on the work.
It would then be scheduled for an expensive slice of time, and, if it screwed up, you got spanked.
It sucked. It really sucked.
Full disclosure: by the time I entered the field, punchcards had been replaced by VT-100 terminals and line printers, but the process was still the same, minus the data entry clerk.
These days, it's totally freewheeling. I try stuff out, screw up, kick myself, then try again.
I write about how I do stuff, here: https://littlegreenviper.com/miscellany/thats-not-what-ships...