O'reilly publishes Beautiful Code
Jonathan Edwards counters with a beautiful explanation.
Now, I haven't read the new book, but I have a strong resonance with what Edwards wrote. You should definitely read the whole thing, but I few sentences jumped out at me.
A lesson I have learned the hard way is that we aren’t smart enough. Even the most brilliant programmers routinely make stupid mistakes. Not just typos, but basic design errors that back the code into a corner, and in retrospect should have been obvious.
and
It seems that infatuation with a design inevitably leads to heartbreak, as overlooked ugly realities intrude.
Precisely.
If there's anything that agile says, it says that we should build things simply and with a eye to revision because we not only are we "just not smart enough", there are too many unknowns when we start.
The problem with "beautiful code" as a concept is that it is closely related to "beautiful design", and I've mostly come to the conclusion that any design effort that takes more than, say, 30 minutes is a waste of time.
The concept also gets confused about what the goal of software is anyway. The goal is not to have beautiful, elegant, code. The goal is to have *useful* code that does what you need it to do.
Discuss and comment
From the ever-popular Worse Than Failure, comes this post
Those of you who remember my work on Microsoft Windows Vista Windows DVD Maker may wonder if the last screen in the post is from DVD Maker.
It is not.
First off, while it is a wizard UI, it is not the DVD Maker UI.
Second, I fixed a startlingly similar bug in DVD Maker pre-ship.
This is pretty common when you're doing a combo box in a wizard. You put all the combo box entries into separate resources strings - so they can be localized into other languages (though I'm not sure how "8x" localizes...) - and when you come to a page, you grab them the strings out of a resource file and stuff them in the combo box.
Which works great the first time, but if you're writing a wizard, you may have forgotten that the UI sticks around even if you hit back/next a few times, so the strings you put in the combo box supplement the entries there rather than replace them.
Here's one I've been playing with for a while now. You may have it unwrapped as a salad, or in some sort of tortilla-based containment vessel.
Fish Salad / Fish Tacos
Sauce
If possible, drain the yogurt in a coffee filter for an hour or so to get rid of some of the liquid part. Add sugar to taste (you want to get rid of most of the bite of the yogurt, but not all), salt and pepper to taste, and then a dash or two of cayenne (yes, it needs it, but it takes an absurdly small amount, so go slow). Crush garlic clove, add to mixture and mix, set aside.
Vegetables
Dice tomato and onion, cut other vegetables in to thin strips. You can use cabbage if you must but don't invite me over. Put them all in a bowl, add the sauce, and mix.
Fish
Cut up and bread the fish. You could use an egg wash, but I normally don't. You should probably do the breading before you make the sauce.
Heat up a nice saute/frying pan on medium heat, add a bit of oil (peanut works well), and then add the fish. Distribute it so as much is touching the heat as possible. Add more oil if necessary. Stir (or toss if you have the chops) every 30 seconds or so, and cook until done (which for salmon means a little pink on the inside, or perhaps even a little rarer). If you overcook a nice piece of fish I'm coming after you.
Remove from heat, stir salmon into bowl, serve immediately.
Serves from 1-4 depending on how hungry you are.