9 ms·
Yes, I've done that quite a few times too. Write code for 1-2 months straight without ever compiling. When I'm done, it generally compiles and runs fine after a
by psyc 9y ago
Yes, I've done that quite a few times too. Write code for 1-2 months straight without ever compiling. When I'm done, it generally compiles and runs fine after about 20 minutes of fixing silly bugs. That requires designing the system on paper (actual paper) in quite a lot of detail first. But other times I start with a skeletal outline of input - middle - output, and evolve the middle in small increments, refactoring along the way. In either case, I always write about 5 drafts of everything at every level - the method level, the class level, and the system level. And I consider that my secret weapon - the writing of 5, sometimes 10, drafts.
Understanding the problem is key, as others have said. It's my belief that we seldom understand the problem in any detail until we've basically written a working system, and we'd do that fact the most justice by beginning a second draft as soon as the first working version is 'done'. That generally won't fly in the workplace, and that's one of the main reasons I avoid the workplace.
- jack9 9y ago> Yes, I've done that quite a few times too. No, neither have. You misunderstand the algorithm suggested. Even if you had 0 bugs, you're still going through the process described. The overwhelmingly common case you then describe: > When I'm done, it generally compiles and runs fine after about 20 minutes of fixing silly bugs. How is this not exactly what the article describes? > Programming is a long slog of trial and error, where the length of the trial and the > severity of the error depend heavily on the domain and the tooling.
- gravypod 9y agoThis article describes live programming which is something that dates back to some of the older programmers. It's a common methodology that crops up often. It's not about the number of times it takes you to run something or finding spelling errors. Fixing spelling errors still counts as "running the first time" as long as you're not changing the structure of the code. This article describes the idea of an interactive programming environment with a single language for all problems. This method of development, as described in this article, is very common in industry but not very productive. It is still lot of trial and error and in that same time I can be doing something that I know I will do correctly.
- seanmcdirmid 9y agoNote that isn’t the meaning of live programming, at least according to the definition laid out in Chris Hancock’s 2004 dissertation where he introduces the word. Of course, other definitions have been created to include more conventional programming practices (e.g. in Lisp and Smalltalk) or performance oriented live coding, but we are all talking about significantly different things at that point.