Runar Ovesen Hjerpbakk

Science-based software development


Programming Sucks

Via Still Drinking:

This is what it is to learn programming. You get to know your useful tools, then you look around, and there are some handy new tools nearby and those tools show you the bottomless horror that was always right next to your bed.

It's funny 'cause it's true (mostly)! A must read.

Notes on Writing Discoverable Framework Code

Erik Dietrich on DaedTech:

Perhaps most important to discoverability is to make screwing up as hard as possible. Have clients of your code “fall into the pit of success.” This means taking whatever steps are possible to disallow doing the wrong thing.

Write your code clean and be mindful of your public API.

Premature Optimization

Donald Knuth once wrote our most often misunderstood quote:

Premature optimization is the root of all evil.

Which in context reads:

Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

"What premature optimization means is an optimization that has a little impact but keeps the programmer or designer busy during the design phase to change the design significantly. This, of course, is very different from many of the circumstances where a recommended practice is not followed or a small change without affecting the design can give us better results."

(Via Keyvan Nayyeri.)

Read More