A favorite passage from Strunk & White's The Elements Of Style:
Vigorous writing is concise. A sentence should contain no unnecessary words, a paragraph no unnecessary sentences, for the same reason that a drawing should have no unnecessary lines and a machine no unnecessary parts. This requires not that the writer make all his sentences short, or that he avoid all detail and treat his subjects only in outline, but that every word tell.These words should be part of everything we do as programmers. They apply as much to programs and functions as to essays and sentences.
I always think of programs as machines, built with logic and data.
Re:Kindof implied
vsergu on 2002-09-26T21:41:40
But isn't that thinking what got us into the current situation with software patents?Re:Kindof implied
jordan on 2002-09-27T01:48:04
The fact that programs are machines seems intuitively obvious to me. I don't change my world view because of some inconvenient legal framework.
That would be making reality fit with what Society demands. I think reality should dictate Society and not the other way around.
Perhaps the problem isn't with Software Patents but Patents in general.
Re:Kind of implied
chaoticset on 2002-09-28T21:32:15
The problem with intellectual property isn't the intellectual. It's the property.The concept of property cannot possibly hold out against the modern ability to copy. The only reason land-as-property is going to remain stable is because you cannot copy land. Same for buildings. Same for pets.
It's not the same for a book. Not any more. It's not the same for a recipe or a book or a program or a picture.
Re:Kindof implied
ziggy on 2002-10-02T13:36:19
It's not implied at all. I've seen lots of code over the years that has dozens of variables defined to use in a 100-200 line function. I've seen this in many languages, in many contexts. Loads of senseless repetition and fat.It's a classic beginner's mistake. Beginners use too much code to get the job done in general.
Re:Kindof implied
jordan on 2002-10-02T17:12:01
How is this responsive to my point?
You can't imagine a machine built with senseless repetition and fat?
Programming is typically easier than building machines, so it's easier to put together monstrosities. When you see a bad program, think of a Rube Goldberg contraption.
Re:Kindof implied
ziggy on 2002-10-02T17:31:49
I misread your statement (that programs are machines built of logic and data) to mean that programs have no unnecessary parts.Upon re-reading it, I now see that your point is that programs, as machines, should have no unnecessary parts.
Oops.
This goes for technical presentations, too. I used to take only 5-7 minutes to say what I had to say in 15 minute presentations. I'd cover the material, to be sure, but no sense rambling or repeating. Extra lines of code are an opportunity for a bug to creep in; extra minutes of speaking are an opportunity for you to distract your listeners from what's important.
I was ranting about the terrible "Tell them what you're going to tell them, tell them, then tell them what you told them" advice at least three years before MJD's Conference Presentation Judo [only one of MJD's talks I missed at YAPC; a real pity]. (My grandfather was a preacher for over half a century; he taught me to say what you had to say, then sit down and shut up!