

Free programming tips are worth every penny - bootload
http://wilshipley.com/blog/2005/02/free-programming-tips-are-worth-every.html

======
neilc
_Seriously, 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
You'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.

~~~
kirubakaran
Unacknowledged type-B procrastination? :-)

<http://www.paulgraham.com/procrastination.html>

~~~
snprbob86
Maybe. 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...

------
kirubakaran
_"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
Maybe 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
In 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).

------
psyklic
This is a GREAT article. I love the author's "axiomatic" approach to
programming -- these aren't your standard programming tips.

~~~
michaelneale
Yeah - its a good read - his approach seems quite at odds with the currently
heavily talked about "agile" approaches.

------
hboon
It 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.

------
tokipin
funnily, this approach is the _complete opposite_ of the way of the samurai,
which stresses swiftness and decisiveness

cf. kamikaze

------
mjgoins
The article's tips are mainly aimed at beginners, but I think correct.

