4 ms·
Free programming tips are worth every penny
- psyklic 18y agoThis is a GREAT article. I love the author's "axiomatic" approach to programming -- these aren't your standard programming tips.
- michaelneale 18y agoYeah - its a good read - his approach seems quite at odds with the currently heavily talked about "agile" approaches.
- kirubakaran 18y ago"Don't write code until you know what you're doing. Now, you may not be able to "know what you are doing" just from thinking, in which case you should start a TEST project and write a bunch of ugly code to make sure your ideas are correct. Then, start again, in a new directory. We had seven or so different test project directories during the making of Delicious Library" Wow! Must some inflexible language. In Python, Lisp and Javascript, (those are the ones I am 'happy' with) you can coax "test project" code into real and beautiful code. You can explore as you code. Many other issues he mentions can be transcended simply by using a better programming language and a good helping of bottom-up programming.
- snprbob86 18y agoMaybe for a small bit of code: a method or a simple class. But once you are talking about a serious system? Your prototype code is guaranteed to be of prototype quality. Starting over from scratch is a strong way to mitigate the risk of it infecting your production code.
- kirubakaran 18y agoIn the languages that I mentioned (js,lisp,py), you will write a small function in the interactive shell (repl) and play with it and tinker it until it works perfectly. Then you'll write another function that uses this and other such functions etc. You'll build functions on top of functions until you have a fully usable system. As you know, this is bottom-up programming. While you can continue to improve things and refactor code as much as you want, at no point do you have to throw everything out and start clean. You don't lose any work. I don't know much Objective C. I've just written some tiny iPhone apps in it. But my feeling is that it strongly encourages top-down programming, which results in the programmer having to do the things mentioned in the article (plan ahead, rewrite from scratch etc).
- statictype 18y agoIn the author's case, its Objective-C. May not have the elegance of a dynamic language but it won't have the sluggishness either.
- kirubakaran 18y agoYour username clearly indicates where you stand :-)
- statictype 18y agoHeh, actually, I'm partial to Python and Javascript, myself. My id is a bit misleading in that sense.
- neilc 18y agoSeriously, how often do you say to yourself, "I think I'll dive into this messy code today and try to make it nice and pretty without adding any functionality?" Maybe I'm just weird, but I do that all the time. Nobody is going to pay you for that. Sure they will: refactoring and code cleanup is a commendable activity at plenty of competent software shops.
- snprbob86 18y agoYou're not weird. Or at least you are no weirder than me. I sometimes enjoy refactoring more than writing new code. Deleting code, in particular, is pretty much my favorite professional activity.
- deleted 18y ago[deleted]
- kirubakaran 18y agoUnacknowledged type-B procrastination? :-) http://www.paulgraham.com/procrastination.html http://www.paulgraham.com/procrastination.html
- snprbob86 18y agoMaybe. However, I haven't really regretted it yet. I always regret type A. I do a lot of it. I'd like to think I am pretty good at type C...
- apsurd 18y ago+1 I'm on your side too. A benefit of "cleaning house" is that it does not take as much planning/thought as actually creating new code so this allows me to turn up my favorite music, get into a nice groove, and have at it...now that's what I call a good Friday night!
- deleted 18y ago[deleted]
- 18y ago
- mjgoins 18y agoThe article's tips are mainly aimed at beginners, but I think correct.
- tokipin 18y agofunnily, this approach is the complete opposite of the way of the samurai, which stresses swiftness and decisiveness cf. kamikaze
- hboon 18y agoIt is important to realize that different styles suits different programmers doing different things. Wil Shipley works better with being more careful and spending more time analyzing before coding. I remember reading about a programmer who writes hours of code (or was it days) before compiling. Or TDD where iterations are shorter and focus on incorporating unit tests. Etc.