Saturday, December 6, 2008

Best Soup Ever

I don't really know why I have never made Split Pea Soup With Ham before. I guess I thought it would be hard or something. But I had a big ham bone and a bunch of spiral sliced ham that needed to get used and I wasn't up to doing a ham stock to be used for something else (like Jambalaya).

So when I was at the store I picked up two pounds of green split peas, some onions, celery heart, and carrots to go with my ham bone + an approximately equal volume of ham meat.

I chopped up a big pile of onions (3 medium large), thinly sliced 5 or 6 outer stalks from the celery heart + 3 medium large carrots, and cut the the ham meat small bites.

I sautéed the onions a bit and dumped them in the soup pot. Then I did the same for the ham. Threw in everything else (including the split peas), topped with water, brought to a boil, stirred a couple times, and tossed on the cover for a slow simmer. I checked it and stirred it a few times to make sure it didn't dry out. A couple of hours later when the peas had basically vanished it was done and I fished out the bone.

There are no missing ingredients here. I didn't add any salt, or pepper, or a bay leaf or anything. Just the three aromatic veggies, the ham, and the peas.

It is the best soup I have ever tasted. Far and away the best split pea soup I have ever had. My wife, who claims to hate split pea soup, ate a huge bowl of it for dinner. It is so good that I may never buy a boneless ham again.

David

Wednesday, November 19, 2008

Conversations with Genius on my iPod

I finally upgraded my iPod. I've been needing more space for ages, but when the Classic came out it had user interface issues (stutters) and the price point for the 160GB version was a tad high. I played with one of the new 120GBs, though, and they fixed both the stutter and the price point, so I bought. This iPod has built-in Genius playlist building. I thought that would be fun to play with. It went like this...

Me: "OK, let's see what you've got. I figure if I start with 'Escape (The Pina Colada Song)' you should hit Jimmy Buffet within 3 songs. Go"

iPod: "Steve Miller Band - The Joker"

Me: "That works."

iPod: "Gary Wright - Dream Weaver"

Me: "Umm, OK."

iPod: "Jimmy Buffett - Margaritaville"

Me: "There it is. Well done."

iPod: "Joan Jett & The Blackhearts - I Love Rock and Roll"

Me: "What? That's not even close. Are you insane?"

iPod: "Me insane? You're the one having a conversation with an iPod."

Me: "Bite me. New genre. Coal Chamber - Fiend. Go."

iPod: "Korn - Wake Up Hate, then Kittie - In Winter, then Dope's cover of You Spin Me 'Round."

Me: "Whoa. That last one I never would have thought of, but it totally works. Well done."

iPod: "Well, I am a Genius."

Me: "OK Genius, try this. Jocelyn Pook - Masked Ball."

iPod: "WTF is that?"

Me: "It's that really cool dark brooding music from the masked ball in Eyes Wide Shut."

iPod: "Like that helps. You do know that I don't watch movies, right? Anyway, not only does it not sound like anything else in your collection, I don't think it sounds like anything else period. So here, have a list of completely random songs."

Me: "Sigh. OK, another new genre. The Crystal Method - Murder. Go."

iPod: "Leftfield - Song of Life, then Propellerheads - Bang On!, the Goldfrapp - Hairy Trees."

Me: "Nicely done."

iPod: "Thanks."

Me: "Another new genre. In-Grid - Pour Toujours. Go"

iPod: "French electronic? Seriously?"

Me: "Why are you being judgemental?"

iPod: "I'm not. You do know that you are having this conversation with yourself, right? Anyway, how about Bond - Hungarian, then Bond - Samba, then Aurora - Real Life."

Me: "OK, that works, I guess. But do you have something against French music or something? Edith Piaf - L' Homme A La Moto. Go."

iPod: "Genius is unavailable for the selected song."

Me: "Ha! Got you. At least that's better than random songs. OK, let's try something different. Alien Ant Farm's cover of Smooth Criminal. Go."

iPod: "OK, how about System of a Down - Chop Suey!, then Disturbed - Land of Confusion, then Dead or Alive - You Spin Me 'Round."

Me: "Another cover of You Spin Me 'Round? It works I guess, but why?"

iPod: "Why? It's your music, Bub."

Me: "Sigh. Chris Thile - Stealing Second."

iPod: "Sheryl Crow - Steve McQueen"

Me: "Huh? I give you instrumental bluegrass and you give me Sheryl Crow?"

iPod: "R.E.M. - Rockville"

Me: "Still not even close."

iPod: "Neil Young - Sugar Mountain? The Grateful Dead - Franklin's Tower? Kings of Convenience - I'd Rather Dance With You? You know - it's not my fault if you don't have any similar music."

Me: "I have a dozen instrumental bluegrass albums and a couple dozen instrumental celtic albums that would be way closer than anything you've shown me."

iPod: "Yeah, whatever."

Me: "OK, one more. Yo-Yo Ma - Elgar Cello Concerto."

iPod: "Yo-Yo Ma - Gershwin Prelude #1, then Jian Wang - Suite No 2 in D Minor, then Hayley Westenra - Wuthering Heights."

Me: "The first two are great, the last one though? That's a cover of a Kate Bush song."

iPod: "By a classical musician."

Me: "That's the tie? That's stupid."

iPod: "Whatever."

Note: The idea of turning this into a conversation with my iPod was totally stolen from Wil Wheaton's twittering.

Thursday, November 13, 2008

Faith in Humanity, Restored

Will and I were munching on some tasty Kelly's Roast Beef sandwiches tonight. We were almost done when a woman walks up and says, "Do you have a green Legacy parked outside?"

Oops. That can't be good.

"Yes, I do."

"I am afraid that I backed into it. I don't see any damage, but maybe you should come out and look for yourself. I was going to leave a note, but it is raining and I was afraid the note would dissolve."

So we went out and looked. I think she scraped a little dust off my bumper. Seriously, no damage at all.

"I don't see anything. Forget about it."

"Are you sure? You could take my name and number in case you notice something later."

I've never seen this woman before and we were eating in the back corner of the restaurant, so she must have walked through the whole place asking people if they had a green Legacy.

Apparently someone actually totaled her car once in a parking lot and just took off, so she is particularly sensitive to parking lot incidents. But still, what a great thing to do.

David

Thoughts On Software Testing

I have read a bunch of blogs lately about software testing, unit testing, functional testing, etc, including this and this.

There are circular arguments out there that go like this: "Developers can't possibly test their own software because they understand it too well." - "Yes, but developers have to test their own software because only they truly understand it (plus those tests make changes easier)."

These are both true of course.

In my view there are three kinds of testing and people confuse them all of the time.
  1. Unit testing. This is testing written by the developer at the object or module level that proves that the code does what the developer intended it to do. Ideally you should inject dependencies and make the tests fairly shallow.
  2. Integration testing. This is testing that proves that the objects/modules/bits of the software work together as expected. It proves that the internal contracts are being met. This can be written by the developer, but it doesn't have to be. They should probably be written by whoever decided on the contracts. Writing integration tests using JUnit doesn't make them unit tests. These tests can and should be deep. Call stuff at the highest level and prove that everything works all the way down to the lowest level.
  3. Functional testing. This is testing that demonstrates that the software works as it is supposed to. This should never be done by the developer because they do indeed know too much about the software. If the developer tries to do functional testing, they can only prove that the software works as they intended and that is not the point here at all.
These are different things and you need all of them. Automate them if you can with a priority of 1, then 2, then 3.

David

Test Post

At the moment I am getting an error when attempting to access any "blogspot.com" address (below), but I am able to log into "blogger.com" and get to the post creation page. Weird.


Monday, November 10, 2008

David's Unofficial Guide To Disney World (For Adults)

The last time I was in Disney World was the early to mid '70s. When I was last there, there was only one theme park, so I wasn't really prepared for how HUGE it has become.

When you are in Vegas, you often hear people saying things like, "Vegas is just Disney for adults." I have always understood this to mean that Vegas is where adults go to play and Disney is where kids go to play. But the similarity is actually much more substantial. All of the changes to Vegas since, say, 1986, represent a real disney-fication of the place. When I was in Disney, I could not help but constantly think, "This is just like Vegas, only bigger."

Anyway, back to Disney World. How huge is it? Disney World is easily bigger than all of Las Vegas put together. It is mind numbingly large. It is mile after mile of fabulously cool imitation reality or pseudo-reality.

There are a few things that adult visitors might want to keep in mind when visiting, though. The biggest is simply the observation that it is an entirely closed system. If you stay at one of the resorts on the Disney property, you will never leave the reach of a single company. Like other closed systems (airports, isolated casinos, etc) you should expect to pay more than normal and have fewer choices. Disney World is big enough that you still have a bewildering array of choices, but not in everything.

Coffee at Disney World

For example, the coffee in Disney World is absolutely wretched. The regular brewed coffee is pretty variable. At its best it only really makes it up to the level of "pretty fair diner coffee", but on the whole you can choke it down if you have to. The espresso is a complete disaster. They have tons of fully automated espresso machines in various locations, but they are not great machines, they contain inferior beans, and they are run by completely untrained "cast members". The "espresso" they put out is almost impossible to swallow. To add insult to injury, the pricing of espresso drinks is outrageous. To add two shots of espresso to a latte, for example, they will charge you the full cost of a double espresso. On the whole, the espresso drinks end up costing about twice as much as Starbucks, but they are about 1/10th as good (if that). This makes the espresso I consumed in the last few days the worst and most expensive coffee I have ever had, bar none. Oh, and did I mention that most places only have non-dairy creamer?

Deb did tons of internet research on the coffee situation before we went, so we went prepared with a pound of Peets coffee and my AeroPress. At least the first cup of the day was decent that way. The coffee maker in our room took the small basket filters and our resort gift shop (Wilderness Lodge) actually sold the filters, so we could have gotten away with just bringing the coffee.

I can confirm that there are two places with decent coffee. At the Kona Cafe in the Polynesian Resort, they will bring a french press of decent coffee to your table. This doesn't appear on the menu for some reason, so you have to ask for it. Also there is a coffee/desert bar in the Morocco section of Epcot that serves actual handmade espresso. It isn't the best in the world, but it is decent. If you get the Moorish coffee they add some cinnamon and nutmeg to the espresso making it both decent and novel.

Beer at Disney World

I was not expecting to find decent beer (or even any beer) at Disney, but there are a few areas that are actually remarkably good for the beer drinker.

I was surprised and pleased that the various countries in the country showcase offered "local" beer at outdoor stands and you can take a cup to go. This means that it is actually possible to do a round the world walking beer tour. The beers present don't always represent a nation's best, but some are pretty decent. Ironically, the best selection was actually at the American Adventure which was sponsored by the Boston Beer Company who (again ironically) put a better selection of their beer in place there than you can find in all but a few pubs in Boston itself. I had a tasty Black Lager. I also had Guiness, Beck's, and Spaten Optimator (by the liter at the Biergarten) and skipped many more. It is possible that the beer selection is not always as good as my experience, though, since the Food and Wine Festival was underway while we were there.

There is a nice outdoor pub (Raglan Road) at Downtown Disney too. I had a fine pint of Guiness while munching on tasty fish and chips from the next door chip shop.

I never made it to the brewpub on the Boardwalk, but I have to have something to go back for.

David

Tuesday, October 7, 2008

Mark To Market

Let me start by saying that I am no accountant or financial expert so there is no reason whatsoever to think that anything I say here makes any sense. On the other hand it makes complete sense to me and I can't see how any reasonable thinking person could disagree with what I say. If you know better, please, pretty please take the time to educate me.

I have seen a whole bunch of articles and blogs lately that claim that Mark to Market (M2M) accounting is to blame, or partly to blame, for the bubble that caused our current financial crisis. Some of these call for a suspension of M2M, others call for a ban of M2M, and still others think that M2M is critical and should be left alone.

OK, so what the heck is M2M? Also sometimes called fair market accounting, it is the practice of putting assets on the books at their market value. So if I own 100 shares of company X and those shares are trading at $100, then I would put the value on the books as $10,000. This makes total sense to me. In fact the only thing that doesn't make sense to me is the fact that this is relatively new. M2M accounting rules were only put in place in response to the Enron fiasco. It is crystal clear to me that if I am an investor, I want to see the best possible approximation of the value of the company I am investing in and M2M accounting is the best way to show that real value.

Or at least it is when the assets are liquid. But what happens when you think the market value of an asset is $10,000, but there is no way in Hell that you could sell it to anyone at the moment? Well, that's a problem. It clearly isn't really worth $10,000 in that case. You could only estimate the value by estimating when you could sell for $10,000 and subtracting the associated opportunity costs.

Or what happens if Mr. Market is temporarily insane and wants to pay $10,000 for something that is only really (intrinsically) worth $1000? This is the heart of the argument that M2M caused the bubble. Irrational exuberance caused book values to be hugely inflated, leading to big loans that couldn't possibly be paid back and so forth.

OK, so you need to have M2M accounting in order to tell investors what the real value is, but if you have M2M accounting it can lead to different problems in illiquid or irrational markets. What can be done?

In my opinion, we should just require full disclosure. We should stop letting corporations hide things in spreadsheets that assume that there is a single rational value for all assets. There is not and never will be a single accounting method that is even a vague representation of the truth.

I would like to see assets reported as M2M and cost (price paid) and an estimate of intrinsic value (when possible, perhaps a liquidation value or an arbitrage value), along with estimates of liquidity. If I am a shareholder, then I am an owner of your company and I insist on knowing how you run my business.

Would this prevent bubbles? Of course not. People are intrinsically irrational. But at least you could look at what they did and laugh at them for being stupid.

David

Thursday, September 18, 2008

Pretty Sourdough

I am totally jealous that John got brotforms, but you can make pretty loaves freehand too. :-P

My standard white sourdough.

David

Saturday, September 13, 2008

Thoughts on Genius

I just installed iTunes 8 with the new Genius music recommendation/playlist feature. I have played around with similar functionality for years in the form of Pandora and MusicBrainz. These tools are how I find new music anymore (combined with iTunes own recommendation system and Amazon's recommendations). I have not listened to the radio in a few years at least.

Genius is pretty cool when it works. It instantly generates a very mood appropriate playlist from a selected song, which is nice. The Genius side bar shows a whole bunch of recommendations too - this function blows away the old school iTunes recommendation system since it allows you to look for specific kinds of music.

But it completely fails on obscure tracks and obscure genres. Even on obscure tracks and genres purchased from the iTunes store. It is useless for classical music, usless for traditional irish music, usless for some classically influenced electronica (where useless is defined as not recognizing a large enough fraction of similar songs to build interesting playlists, not as the complete inability to recognize anything at all). It doesn't work for music videos at all, unfortunately, either (come on Apple - that should be easy to solve for videos purchased in the iTunes store).

Still it works for some surprisingly obscure stuff and it is wicked fast. I'll definitely be using it.

But if you find yourself getting the message, "Genius is unavailable for the song..." frequently, do yourself a favor and install MusicBrainz.

David

P.S. I have also discovered that it works differently for music purchased from iTunes vs. other music. Even if the tracks are identical otherwise (different formats, but the same sound signature).

Thursday, September 11, 2008

Programming's Dirtiest Secret

Stevey has up a brilliant rant about developers and touch typing. But touch typing ability (or lack thereof) isn't really the dirtiest secret about programming. Even though I can touch type, I am going to use a lot fewer words than Stevey did. Ready?

People are, on average, pretty darn average. Developers are no exception.

In most endeavors average is pretty bad. Software development is no exception.

Telling the difference between an average developer and a great one in an interview is really hard.

David

Developer Best Practices

I have been thinking about best practices at work and I am going to throw some ideas out here to help me think them through and to get feedback if any of you have opinions. This isn't complete or well organized - I am just trying to get the juices flowing.

  • Do not rely on this or any other document to provide a complete list of best practices. There are too many and some seem too obvious to talk about. You are a professional software developer - learn the craft. Don't stop learning. Aim for 10X.
  • There is no absolute "best" way to do anything. Think about what you are trying to accomplish. Be pragmatic.
  • Design applications in layers. Create distinct modules or blocks of function. Design the module interfaces first. Design by contract.
  • Write unit tests.
  • At a minimum write unit tests of the module interfaces.
  • Ideally write the tests before the code.
  • If you are about to debug something, stop and write a unit test for it first.
  • Don't create mindless unit tests. The auto-generated ones your IDE makes for you are only stubs - don't rely on them for coverage.
  • Inject your dependencies as a matter of course. This will greatly simplify unit testing. You don't actually need a framework for this - understand the underlying principle instead.
  • Keep stuff in source control (SVN, CVS).
  • Do frequent check-ins.
  • Comment your commits.
  • Don't rely on your IDE to do builds. Have a build script instead.
  • Have an independent environment where the build script can be run that is not a developers personal space. Ideally do continuous integration here, but at a minimum regularly check that this build environment still works. Use this environment to build releases.
  • Settle on a layout style for the team. It doesn't matter which style, it matters more that everyone is consistent. Or just agree to do it differently and people can reformat their code using their IDEs. But make sure everyone is on the same page.
  • Optimize code only when you have demonstrated that it performs poorly. Make a regular practice of benchmarking modules. Run the benchmarks with your unit tests so you know when something gets really out of whack.
  • Employ regular peer review of some kind. Internal code reviews. Pair programming. Whatever works for your team. This is how bad code gets found and how developers learn to get better.
  • Also have occasional external code reviews that involve more than just the immediate team.
  • Encourage zero code ownership. Everyone owns all of the code. Anyone can change/fix anything. Any bug is everyone's responsibility.
  • Use tools regularly to check for common bugs/problems. If I review your Java code I am going to run findbugs on it - so you should too.
  • Minimize local configuration information in multi-tier applications. An ideal java midtier should only need to know one thing - a JNDI datasource from which all other configuration information can be derived. An ideal thick client should get global configuration from the server.
  • Always close resources. Take full advantage of try/finally blocks.
  • Don't reinvent the wheel. Use the core libraries of your platform. If you are writing in Java and you think you need to write a sort routine, or a string to date routine, or an array copy routine: STOP. Find good adjunct libraries and use them.
  • Have a well thought out strategy for handling exceptions and logging. All errors should be logged, preferably once. The log entry should give enough information to lead back to the root cause. It should be time stamped. It should contain a stack trace if applicable. It should have a context appropriate message that can be understood by someone not intimately familiar with the code.
  • Do your release cycles faster. I don't care how fast you are doing them now, go faster.
  • It is OK to make pragmatic short term compromises in your code, but make sure you go back and fix them very soon. Do not fall into the boiled frog trap.
  • Eat your own dog food. If you design a service interface and never actually use it, chances are it will actually be unusable in some way. The same for a user interface.

Recommended reading for best practices:
Any thoughts out there?

David

Thursday, September 4, 2008

What Does Good Software Look Like?

Good software looks and feels like this:

(I drew this - feel free to make fun of my artistic abilities)

And bad software looks and feels a lot more like this:

(image credit)

Far too much of the code that I look at invokes the latter image. Stop it please.

David

Tuesday, August 19, 2008

On JavaFX

JavaFX has the potential to be a really cool technology, but it has a little ways to go yet.

At work we are trying to figure out what we want to do in the Rich Internet Application space and I was asked to review JavaFX to ensure that it could perform one really critical niche function - that it can be used with existing libraries to display chemical structures. The simple answer is that it can. I had no trouble at all writing very thin plain Java wrapper classes around ChimePro, Marvin Beans, and JMol so that I could use them in a JavaFX script.

The more complicated answer, though, is that there are still lots of gotchas.
  • The API has been in a state of flux, so code examples that you can google up tend to be unusable (ignore anything dated 2007 or that has an import for javafx.ui.*).
  • The API is still fluxing, so you can expect lots of changes soon. One critical bit that relates to my Swing component test is that the base display (container) classes are changing. To get the cool "drag from the browser" behavior you need to start with the Application class (or maybe Applet) and add Nodes to the Scene, but to use Swing components you have to use the older containers (that work fine for a JNLP application). And you can't easily subclass Node to fix this yourself because it is an abstract class that has an abstract method that returns an object in the com.sun.* hierarchy - something you probably shouldn't mess with.
  • There isn't a lot of good information out there. There is one book. It is a decent book, but it tried to hit a moving target so it isn't perfect. Combine the book with the author's blog and you have one good source of information. The API documentation and related Sun documents is the other good source of information, but it is still far less complete than, say, the Java documentation.
  • Netbeans integration is not complete. It is really well done, it just isn't quite finished. The visual constructor/previewer is brilliant, but there isn't support yet for fixing problems (e.g. fixing imports) - you just get a red (!) and you have to figure out why (and the compiler messages aren't really all that informative ("I got confused by...")).
The language itself, though, is kind of neat once you get past the declarative style. It makes it easier than plain Java2D to create spiffy new graphical content. But you can't do anything in JavaFX that you can't do in Java2D if you know what you are about.

One of the central powers of JavaFX is that it can use any Java library, but that might also be its downfall, especially if it gets widely adopted by mediocre Java programmers. One of the reasons that Applets have gone the way of the Dodo bird is that people had a tendency to bloat the jar downloads to the point that the Applets were slow and finicky and painful to use. The same is certainly possible with JavaFX. Don't do this. Keep the presentation layer as thin and clean as you possibly can.

The allure of a declarative scripting language for rich application development that harnesses all of the power of the Java platform is undeniable and I will continue to play with the technology as it matures. But it isn't quite ready for prime time yet.

David

correction: Where I said Scene I should have said Stage. My memory tricked me. I am referring to javafx.application.Stage.



In answer to a question in the comments, here is an example of how to turn JMol into a JComponent. Note that although you don't see long lines in the blog, when you copy/paste the text you seem to get it all. I'm not sure why and I am open to suggestions for better ways to include code.



package fxstructurerendertest;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import org.jmol.api.*;
import org.jmol.adapter.smarter.*;


public class JMolDisplay extends JComponent implements ActionListener {

private static final long serialVersionUID = -5404266974773735194L;
private JmolViewer viewer;
private JmolAdapter modelAdapter;
private JPopupMenu popup = new JPopupMenu();
private JCheckBoxMenuItem dotsItem = new JCheckBoxMenuItem("Dots");//dots on/dots off
private JCheckBoxMenuItem spaceItem = new JCheckBoxMenuItem("Spacefill");//spacefill on/spacefill off
private JCheckBoxMenuItem ribbonItem = new JCheckBoxMenuItem("Ribbon"); //ribbon on/ribbon off
private JCheckBoxMenuItem colorAminoItem = new JCheckBoxMenuItem("Color Amino");//color amino/color NONE
private JCheckBoxMenuItem colorChainItem = new JCheckBoxMenuItem("Color Chain");//color chain/color NONE
private JCheckBoxMenuItem bondItem = new JCheckBoxMenuItem("Bonds");//wireframe 25/wireframe off - SELECTED
private JCheckBoxMenuItem atomItem = new JCheckBoxMenuItem("Atoms");//cpk 25/cpk 0 - SELECTED
private JMenuItem resetItem = new JMenuItem("Reset");//reset

public JMolDisplay() {
modelAdapter = new SmarterJmolAdapter(null);
this.setPreferredSize(new Dimension(100, 100));
viewer = JmolViewer.allocateViewer(this, modelAdapter);
viewer.setJmolDefaults();
viewer.setColorBackground("BLACK");
this.addMouseListener(new PopupListener());
bondItem.setSelected(true);
popup.add(dotsItem);
popup.add(spaceItem);
popup.add(ribbonItem);
popup.add(colorAminoItem);
popup.add(colorChainItem);
popup.add(bondItem);
popup.add(atomItem);
popup.add(resetItem);
dotsItem.addActionListener(this);
spaceItem.addActionListener(this);
ribbonItem.addActionListener(this);
colorAminoItem.addActionListener(this);
colorChainItem.addActionListener(this);
bondItem.addActionListener(this);
atomItem.addActionListener(this);
resetItem.addActionListener(this);
}

@Override
public void actionPerformed(ActionEvent e) {
Object c = e.getSource();
if (c == dotsItem) dots();
else if (c == spaceItem) spacefill();
else if (c == ribbonItem) ribbon();
else if (c == colorAminoItem) amino();
else if (c == colorChainItem) chain();
else if (c == bondItem) bond();
else if (c == atomItem) atoms();
else if (c == resetItem) {
if ((e.getModifiers() & ActionEvent.ALT_MASK) != 0) {
ScriptDialog d = new ScriptDialog();
d.pack();
d.setVisible(true);
} else reset();
}
}
private void reset() {
runScript("reset");
}
private void atoms() {
//log.debug("cpk toggle");
if (atomItem.isSelected()) runScript("select all;cpk 100");
else runScript("select all;cpk 0");
}
private void bond() {
//log.debug("bond toggle");
if (bondItem.isSelected()) runScript("select all;wireframe 25");
else runScript("select all;wireframe off");
}
private void chain() {
//log.debug("chain color toggle");
if (colorChainItem.isSelected()) runScript("select all;color chain");
else runScript("select all;color NONE");
}
private void amino() {
//log.debug("amino color toggle");
if (colorAminoItem.isSelected()) runScript("select all;color amino");
else runScript("select all;color NONE");
}
private void ribbon() {
//log.debug("ribbon toggle");
if (ribbonItem.isSelected()) runScript("select all;cartoon on\ncolor cartoons structure");
else runScript("select all;cartoon off");
}

private void spacefill() {
//log.debug("spacefill toggle");
if (spaceItem.isSelected()) runScript("select all;spacefill on");
else runScript("select all;spacefill off");
}

private void dots() {
//log.debug("dots toggle");
if (dotsItem.isSelected()) runScript("select all;dots on");
else runScript("select all;dots off");
}

public JmolViewer getViewer() {
return viewer;
}

class PopupListener extends MouseAdapter {
@Override
public void mousePressed(MouseEvent e) {
showPopupIfNeeded(e);
}

@Override
public void mouseReleased(MouseEvent e) {
showPopupIfNeeded(e);
}

private void showPopupIfNeeded(MouseEvent e) {
if (e.isPopupTrigger()) {
popup.show(e.getComponent(),
e.getX(), e.getY());
}
}
}

public void runScript(String script) {
viewer.evalString(script);
}

class ScriptDialog extends JDialog implements ActionListener {
JTextArea scriptArea;
ScriptDialog() {
scriptArea = new JTextArea();
scriptArea.setPreferredSize(new Dimension(200,200));
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
this.getContentPane().setLayout(new BorderLayout());
this.getContentPane().add(scriptArea, BorderLayout.CENTER);
JButton runButton = new JButton("Run");
this.getContentPane().add(runButton, BorderLayout.SOUTH);
runButton.addActionListener(this);
}

@Override
public void actionPerformed(ActionEvent e) {
runScript(scriptArea.getText());
}
}

/**
*
* @param structure
*/
public void setStructure(String structure) {
viewer.openStringInline(structure);
}

/**
*
*/
@Override
public void paint(Graphics g) {
Rectangle rectClip = new Rectangle();
g.getClipBounds(rectClip);
viewer.renderScreenImage(g, this.getSize(), rectClip);
}


}


Monday, August 4, 2008

Sourdough Recipe Conversion

In principle it seems like converting a yeast recipe to sourdough should be very straightforward. But given my limited success with the attempt to convert the basic Artisan Bread in Five Minutes a Day recipe to sourdough I felt I needed to validate the principle with a more normal recipe.

Let's start with how I think it should work. I think you should be able to convert any recipe by simply calculating the water and flour contribution of the starter and subtract those amounts from your recipe. In my case 238g of the starter always equals 125g of flour and 0.5 cups of water (because that's how I feed it). And of course you need to add time for the slower growing culture to do its thing.

I have been baking a lot of typical sourdough bread and I wanted to try this technique with something very different. On the bread spectrum, not much could be more different from a crusty free form hearth baked bread than an American sandwich bread baked in a bread pan. My favorite sandwich bread recipe is the American Sandwich Bread from The New Best Recipe cookbook, so that is my starting point.

I decided to start with 238g of starter, because this is the amount I normally feed. This is more or less equivalent to a cup of starter. The original recipe calls for 532g of flour: 532-125=407g flour. It calls for 1/3C warm water that I normally dissolve the yeast in, this gets removed. It normally calls for a cup of milk, but we need to decrease the liquid a bit more, call it 7oz of milk.
  • 238g fed starter (fed overnight at room temperature just before using)
  • 407g King Arthur all-purpose flour
  • 7oz 2% milk, warmed to tepid
  • 3T butter, melted and cooled a bit
  • 63g honey
  • 1T kosher salt
Put everything in the KitchenAid bowl. Mix with the dough hook until combined, then turn up to medium speed and knead for about 10 minutes until satiny, scraping the dough off the hook a couple of times. Allow to double. Punch down, pat into a rectangle, fold into thirds to make a cylinder and pinch the seam tightly. Place seam down in a greased loaf pan and press the loaf flat and into the corners. Allow to double. Bake with steam at 350 degrees F for 35-45 minutes until the internal temperature is 195 degrees F.

I ended up needing to add a couple tablespoons of flour during kneading to get the right consistency, but this is within normal variability.

One thing that surprised me is how long the rises took. My normal sourdough recipe takes about 2 hours, this took 4 hours. That is for each of two rises, so 8 hours of total rising time. I might try this again with double the starter, but if I do I will probably need to use nonfat dried milk to get any of the milk character into the dough (because that will double the amount of water also and force me to reduce the milk further).

The bread turned out very well. The loaf is just slightly shorter and the crumb slightly denser than the standard recipe, but the difference isn't huge. It doesn't taste like sourdough at all, it just tastes like very nice normal sandwich bread. That was a bit surprising as I would expect 8 hours of rising to generate lots of sour flavor - maybe the honey counters it.

Was it worth it? No, probably not. Eight hours for a result you can get in two is kind of silly. But it validates the conversion principle and I expect I'll try this with other recipes to see what kind of effect I get.

Get out your calculator and try your favorite recipe with sourdough starter. You might like it. But leave yourself plenty of time.

David

Sunday, August 3, 2008

Yes, I Think Your Project Sucks

I am a software/systems architect in a very large corporation for which software and IT are not core business. In this role and previous roles I have frequently been called upon to participate in project code reviews.

When I perform these reviews I usually generate pages of notes and constructive criticisms that I share with the project team. I don't pull punches in these reviews. If I spot some code that is smelly I will highlight it and explain why it is wrong. I will call out shoddy code organization and poorly thought out build scripts and stupid package naming and bad error handling and crappy unit tests and useless comments and other details ad nauseum.

But all of these details are the trees. What makes me like or dislike a project is the overview of the forest. To be sure, one element is the sheer number of details that I have to call out. An overgrown forest stands no chance. Here are some other higher level things that I look for:
  • Evidence of a professional developer attitude
  • Evidence that the end goals are understood
  • Evidence of higher order design/architecture

Evidence of a professional developer attitude

Show me that you have a process. That you care about the quality of the project and the code. That you care what other developers think. That you are trying to set a good example. Some indicators:
  • Clean, well organized repository
  • Repository is up to date and has regular check-ins (with comments!)
  • Clear build scripts that serve as documentation for the build process and dependencies
  • Unit tests and TDD thinking (even if you don't do TDD)
  • Continuous build (or at least nightly)
  • A single central build environment (NOT your IDE, doofus!)

Evidence that the end goals are understood


Show me that you understand the user. That you aren't going to show the user error messages like, "Database Error: Code 5387". That the user interface doesn't freeze or time out. That you have processes in place so that you can quickly debug problems in production. If this is an API, show me that it is clear and understandable and that the contract utterly explicit. Some indicators:
  • A system for handling errors/exceptions that is logical, that logs details, that presents the user with a message that is clear and simple.
  • Asynchronous UI processes
  • Sensible timeout logic where appropriate
  • Integration/unit tests that monitor task time and alert when changes to the code may have slowed something down
  • For APIs do the error messages contain the extra details that a developer would need?
  • Do you eat your own dog food?
  • Are you logging in such a way and at an appropriate level of verbosity such that you can troubleshoot unexpected problems?
  • Documentation for any APIs. Yes, documentation. If you can't clearly explain in a document how to use your API, then what good are you (or it)?
Evidence of higher order design/architecture

Show me that you have thought about reusability. That you understand the value of layered abstractions. That you understand what an object is and what a process is. Every time you look for a library to do X for you and don't find it, do you then write a decent library to do X? Or do you just hack some code to do X into the middle of some poor unsuspecting class? Some indicators:
  • If you are writing a service that does Y, do you have a well orchestrated class/library that does Y, upon which you have layered a service? (as opposed to building the functionality directly into the service classes/methods)
  • Are complex tasks broken down into small logical slices? (as opposed to long confusing methods)
  • Are things that could/should be reusable actually reusable? (as opposed to having unnecessary interdependencies with the rest of the project)
  • Are your objects named like (and function like) nouns?
  • Are your method and object names indicative of actual behavior?
  • Is the project an assembly of small pieces that fit neatly into a bigger picture? (as opposed to a monolithic beast)
It isn't shocking to me that I have never seen a project that scores perfect on all of these indicators. Perfection should be rare. But it is shocking to me how many projects I have seen that score zero.

David

Saturday, August 2, 2008

Back Up Your Online Content!!

It is kind of ironic that I am writing this post now as I have just been doing research for myself on how best to do the opposite (put my back-ups online on e.g. S3).

It recently came to my attention (via a poker blogger who was irate that Tao of Poker got locked) that some blogs on Blogger got improperly locked by a spam detection bot. I did a little investigation to see how big the problem was and it is big. Really big. Here is a small sampling of what I found:
a b c d e f g h i j k l m n o p q r

Google has admitted that this is a mistake here and here. Fair enough. Mistakes happen. But what if it hadn't been a mistake? What if it happened and you were on a three week vacation and were offline? What if you lost all of your writing?

This got me thinking about how much I have been trusting online companies with my content. Probably too much given that they have absolutely no obligation to me at all. The only thing keeping me "safe" is the character of the folks actually working at Google et al. and the corporate fear of bad publicity. If my gmail account contents were lost I would be devastated. Possibly crippled.

So I did some long overdue back-ups. And you should too.

The best way to back up gmail is to turn on POP3 support with the "Enable POP for all mail" flag set. Then fire up a POP client and sync. It actually takes multiple syncs apparently because Google throttles the number of messages you can get in one go, so make sure that you have it all.

The best way to back up your Blogger content is to formulate a link like this:
  • http://twentyonetimestwo.blogspot.com/search?max-results=10000
Where you replace "twentyonetimestwo" with your blog name and "10000" with a number that is more than the total number of posts you have written (if necessary). Then do a "Save Page As" from Firefox. If you choose "web page, complete" as the type you will get your images too.

Do it now.

David

Wednesday, July 30, 2008

SOAP and REST and Tools and Consequences

Jeff makes some interesting points about SOAP and REST. SOAP is probably dead. R.I.P. But I want to take the conversation a step further.

He points out that vendors haven't really jumped on the REST bandwagon and I agree - they haven't. But I think that this is a Very Good Thing (TM).

First of all REST is simple enough that (especially on the client side) you don't really need tools. This is where a lot of the utility comes from.

Secondly and more importantly REST hasn't beaten SOAP because the protocol is massively superior. REST has beaten SOAP because of SOAP's complexities and incompatibilities. But it isn't the protocol that is complex and incompatible, it is the tools!

If you want to build a successful service protocol I think you have two choices:
  1. Build something simple enough that normal inconsistencies can easily be dealt with on a project by project basis. (e.g. REST or basic HTML request/response)
  2. Build something that is absolutely specced out to the nth level of detail so that there is absolutely no ambiguity and produce several reference implementations (e.g. IDL/IIOP)
Anything in between these two extremes is doomed. I claim that tools (especially mediocre tools) could, if widely adopted, push REST out of category 1 and into the middle territory. Either that or the tools would die. Either way I don't see the long term value and I hope that the vendors stay away for a while longer.

David

Tuesday, July 29, 2008

You Make PB&J Wrong

How can that be, you ask? All you have to do is take two slices of bread, spread some peanut butter on one slice, some jam on the other and slap them together, right?

That might be acceptable if you consume it immediately, but otherwise, no, you aren't doing it right. If you pack your lunch, you will very much regret your casual attitude towards PB&J.

I won't even go into the advanced math required to get the amount of filling right. Suffice it to say that you want as much filling as possible without any squirting out when you bite.

What I really want to talk about is the long term effects of jam on bread. It isn't pretty people.

jam + bread + time = goo.

Over the centuries there have been countless attempts to solve this problem, but most people don't even bother. This is wrong. But then most of the well known solutions aren't ideal. My grandmother used to spread room temperature butter on the jam side. This nicely solves the jam and bread problem, but unfortunately the result is no longer actually a PB&J sandwich, it is a PBB&J sandwich.

But there is a (nearly*) perfect solution. Spread a very very thin layer of creamy peanut butter on the jam side slice of bread before applying the jam. Really, this works great.

Why do I care how you make PB&J sandwiches? I don't. Not one bit. I don't even care if you agree with my solution. I am using PB&J as a metaphor.

But I'm not going to tell you what the metaphor is. That is an exercise for the reader.

I will, however, make the claim that if you read all of that and actually thought about whether that was a good solution to the problem, then you just might have the capacity to be a good software designer.

David

* - The solution is only nearly perfect because it slightly changes the slipperiness of the bread and the advanced filling calculations have to be redone.

Saturday, July 26, 2008

Jumper Cables

I am not normally a political activist, but I'm going to make a rare exception.

Let's see if we can bring the 4th amendment back to life and send a message to our elected representatives that we do not want to live in a police state.

Pledge here if you agree. I'll forgive you if you don't.

Become a StrangeBedfellow!

Friday, July 25, 2008

Klatte's Law

I was just listening to the 6/30 episode of TWiT (yes, I am way behind in my podcasts - blame my audible.com addiction).

This is the episode where they talk about Bill Gates' retirement and the contributions he made to the world and the industry. Their conclusion was that his biggest contribution was a strategy based on an understanding of Moore's Law. The thesis is that he understood that if you release something as soon as it will run (even if it runs badly), Moore's Law will bail you out shortly and that is more efficient than trying to make something that runs tight in the first place. I agree that this strategy was a huge part of the success of Microsoft and it was clearly both the correct strategy in hindsight and a forseeably correct strategy given Moore's Law.

But I think that strategy is failing now and I think that this is a huge part of the reason why Vista is tanking. It doesn't have much to do with why Vista is not of interest to me (that is more around DRM and a closed mentality), but I think it is a big part of the greater market failure.

Why is the strategy failing? I have to introduce a concept for a minute here and for the purposes of this article, let's call it "Klatte's Law". Klatte's Law states that at any moment in time, a user's computational needs can be represented as a gently sloping linear increase. This will stagger up as the user discovers whole new categories of computational need (i.e. if someone who just does word processing starts doing video editing, there will be an enormous jump, but both before and after the jump it is a gentle slope).

Klatte's Law applies to mass market computing, but not to specialized niches like high performance computing.

If you were to plot a zoomed in view of Moore's Law plotted with Klatte's Law, it might look something like this:



The strategy of ignoring tight code in favor of the depending upon Moore's Law works as long as you are to the left of the intersection of Moore's Law and Klatte's Law, but it starts to break down as you approach the intersection and fails completely to the right of the intersection.

Fundamentally, I think that the market as a whole is currently to the right of this intersection. This could change at some point if a killer app comes out that requires tons of computational power (but this killer app will not be an operating system). You can depend on Moore's Law to bail you out if you think you have that killer app, or if you are so far to the left of the intersection that the user already wants to upgrade their system.

But if you do not have a killer app and if the user is satisfied with their current system, you are toast.

"What do you mean I need a quad core machine with twice as much ram to run Vista well? My core2 duo machine does everything I need just fine!"

Microsoft understands Moore's Law, but they don't understand Klatte's Law at all.

David

Tuesday, July 22, 2008

Salty Lox (and more)

Also called "regular" or "belly" lox.



I have no idea why people don't make this all the time. Lox is delicious and utterly trivial to make. Plus you can't even find the old New York deli salty lox anywhere outside the city any more (and it can be hard to find it in the city). It has been mostly replaced with the milder Nova lox that has been pre-sliced and pre-packaged at the factory.

Here is the general procedure for making any kind of lox:
  • Take a cure, which is a mixture of salt and sugar and optionally some spices or herbs.
  • Cover the fully de-boned salmon fillet (including pin bones) and spread the cure over it. You need more cure on the flesh side than the skin side. The objective is to do this in a container that is right sized for the piece of fish, so that you can use less cure. I like heavy weight zip lock bags. On the other hand if you aren't doing production volumes of the stuff, the cure is pretty cheap.
  • Press the fish with a weight to aid the expression of juices. Some kind of flat plate or pan with some cans or water bottles in it works well. For this last batch I put two pieces of salmon in two plastic zip lock bags on top of each other into one loaf pan, then topped with another loaf pan with weights. Store the whole thing in the fridge. The dry cure will turn into a brine as it cures, but there should always be some undissolved cure so you know that your solution is saturated.
  • Periodically check the fish for done and redistribute or add cure as necessary. It is done when you press it and it doesn't feel squishy, but feels kind of "cooked". A few days is usually about right.
  • Rinse off the cure and pat dry with paper towels. Wrap in freezer paper and store in the fridge (or serve immediately).
  • Slice thinly on the bias to serve. This takes a sharp knife and some practice, but it isn't hard.
You can optionally cold smoke this for some styles of lox. The cure can be can be anywhere from 1/3 salt and 2/3 sugar to 2/3 salt and 1/3 sugar (by weight). Use any kind of salt, as long as you measure by weight, but I use kosher salt.

Salty lox is the ultra minimalist version. 2/3 salt and 1/3 sugar, no other spices, no smoking. It is done in about three days. Really easy. It is sort of a gateway to charcuterie (the next thing you should make is duck breast prosciutto, or maybe duck confit). My nephew called it "salmon bacon" - yup, that's about right. Yum.

David

Thursday, July 17, 2008

KitchenAids and Volume

I always have exactly twice the amount of sourdough starter that I need when I make bread. This is just a consequence of the need to feed it and the limit of size that my vessels have. It's not a huge deal - I just throw a bit out.

But the other day I decided to try doubling the recipe instead.

I reasoned that although this technically exceeds the "flour power" of my kitchenaid, the dough isn't really all that tough and kneading a double recipe is only fractionally harder than a single recipe. So I wasn't worried about burning out my motor. And the volume of the bowl is large enough to just hold the doubled dough (with maybe a little doming at the top), so I figured I was also OK on volume.

Well all of those assumptions are probably correct. But what I did not consider is that the action of the dough hook is very volume sensitive.

Let me save you the trouble of this experiment. The dough creeps rapidly over the top of the dough hook and you have to stop and unstick everything about every 10 seconds.

Plus it is quite challenging to form 6 pounds of dough into two large loaves (that barely fit onto a large baking stone) and get them into the oven and baked. I managed it, but only just.

The bread turned out well, but I won't be doing this again.

David

Wednesday, July 16, 2008

Charities Suck

OK, that's a terrible thing to say and I don't really mean it, but GOD they can be annoying.

About 12 or 13 years ago I joined PBS. We lived in Chicago at the time and I joined with a largish donation that entitled me to a Jacques Pepin book. I mean I love the programming (Jacques, Dr. Who, Monty Python, etc) and I felt good about contributing to make the programming possible. I was very happy to contribute and I would have happily renewed my membership year after year, occasionally taking advantage of interesting offers and making larger donations.

But then they started to call and ask for money. Mind you, when I first signed up they asked me if it was OK for them to call me and I said, "No." Every time they called I asked them to remove me from their call list. After a while I started asking for supervisors. Nothing helped. It will be a cold day in hell before I ever give my contact information to a PBS station again.

They can have my money, but they absolutely can NOT have my digits.

What reminded me of this? Yet another friggin' message from the Red Cross about another blood drive that I can't possibly go to. I have donated gallons of blood over the years and I am happy to do it when I can, but I seriously do not want their stupid machine to talk to my machine twice a week about a blood drive happening in the middle of the work day close to home, but 35 miles from where I work. It will be a cold day in hell before I ever give my contact information to the Red Cross again.

The only difference is that I have long since learned never to answer my phone. If you call my home phone I absolutely guarantee that you will not talk to me.

Just because charities have legal immunity from ignoring Do Not Call registries, does not mean that there are no consequences for seriously pissing people off - how can they possibly not understand this?

And yes, all of my numbers are on every possible Do Not Call registry.

David

Friday, July 11, 2008

Diets and Diaries

This study validates my whole approach to weight loss. There is some more discussion here.

I haven't been very good about keeping my food diary of late and I have gained a few pounds back. One of the reasons I get tired of the whole food diary thing, though, is that I have insisted on doing complete calorie calculations, which gets darned tiresome.

The study implies that that might not be necessary. The more you record, the better you are likely to do, but the act of recording may be what puts you over the edge.

Like I might not have had that second handful of yummy M&M Premiums (Triple Chocolate) last night if I had had to record the fact for posterity.

So I am going to try it for a while and see what comes of this easier lighter weight food diary.

David

Thursday, July 10, 2008

50% Whole Wheat Sourdough

This bread turned out really well. I made it the same as my regular sourdough, but used 50% whole wheat flour. The whole wheat didn't detract from the texture or crust at all, but it added nicely to the flavor. This is really great bread.

  • Weighed out 238g of active starter (that basically equals 125g flour and half a cup of water).
  • Mixed in 1.5 cups warm water.
  • Stirred in 375g King Arthur whole wheat flour.
  • Let proof for 2 hours.
  • Mixed in and kneaded 250g Harvest King high protein white flour and 1T kosher salt.
  • Allowed to double (around 2 hours).
  • Punched down, formed loaf, allowed to rise (around 2 hours).
  • Dusted with flour, slashed, baked at 450 degrees for 20 minutes, then 400 degrees to an internal temperature of 200 degrees (about 5 more minutes).




David

Wednesday, July 9, 2008

Long Culinary Weekend

We didn't do much over the long weekend. Our plans for Saturday got canceled due to the weather and the rest of the time we chilled. So I spent some time in the kitchen.

The tally:
  • White sourdough bread
  • American sandwich bread. Twice.
  • Double-vanilla ice cream (best I've ever had)
  • Rich chocolate sauce
  • Deep caramel sauce
  • Terrific baked ziti (supposed to go the party on Saturday, but we ate it instead)
  • Whole wheat sourdough bread
  • Fromage fort
  • A couple of spatchcocked chickens on the grill
  • Cornbread
  • Scratch buttermilk pancakes
  • French toast from the sandwich bread
  • A killer sandwich of ham with caramelized onions and fromage fort browned under the broiler.
  • Meringue cookies (to use up the egg whites whose yolks went into the ice cream)
There might be something wrong with me. If nothing else, I think I should probably go back on my diet...

David

Friday, June 27, 2008

Five Minute Sourdough Bread: An Experiment

Of course any sourdough bread is going to take more than five minutes. But it is an attempt to convert the basic recipe for Artisan Bread in 5 Minutes a Day (ABI5MAD) into sourdough and that is the best title I could come up with. It kicks the butt of "ABI5MAD Sourdough".

I am using this starter. When I feed it, I feed it with 125g King Arthur all purpose flour and 1/2 cup of bottled spring water (or multiples thereof). If for some reason you felt compelled to attempt to repeat this experiment and you use a starter with different ratios of flour to water you may need to adjust the recipe. My starter lives in this crock, because my starter is cool. I need to get my starter some sunglasses.

The flour proportions were easy to calculate, but I had to make some guesses when it came to yeast. I decided that adding yeast was good because the real magic of ABI5MAD is that I can grab a handful of dough out of the fridge and have a fresh loaf in an hour and a half (most of that time unattended). I want that dependability. But I decreased the yeast a little because the sourdough culture already has a bunch. It was a total shot in the dark, really.

I used tepid water for the rise to avoid heat shocking the sourdough culture. I don't care so much if this rise takes longer as long as I don't have to wait years to proof the loaves when it comes time to bake. Plus this will theoretically allow more flavor to develop. Will it be too much flavor?

Took 238g starter from the fridge and added half a cup of water in the bottom of my 6qt plastic container. Stirred to dissolve, then mixed in 125g of all purpose flour. Fermented overnight, about 10 hours. (did the same to my starter and put it back in the fridge in the morning)

In the morning, added 2 cups of tepid water (room temperature plus a tiny bit) that had 1T granulated yeast and 1 1/2T kosher salt dissolved in it. Stirred to mix. Then added 533g of King Arthur bread flour (all purpose is probably fine too). Mixed with a wooden spoon until everything was completely wet and there were no dry spots.

Allowed to proof until the dough started to collapse. Since the water was cooler than normally used for ABI5MAD, this took longer than usual. I let it go around 4 hours.

Then I used the dough as I would the basic boule dough from ABI5MAD.

Day 0 - a mini boule.

I felt the need to test the dough right away. As usual with ABI5MAD doughs the fresh dough was wicked wet and sticky. I managed to form a fairly rustic looking boule. It came out prettier than I deserved. It was a fairly flat loaf, again like most of my ABI5MAD loaves. It tastes great. Lovely crisp crust with a moist chewy/creamy crumb that I associate with sourdough. But it isn't at all sour despite being almost 1/3 starter culture by weight. It doesn't really taste like "sourdough". It is moister and creamier than the standard ABI5MAD boule. It is much less resilient and much less sour than say, a Bodin loaf. And a LOT less round. :-)

Still, a very satisfying result for a first try. It's tasty.




Day 1 - A classic sourdough

Today we are going to take a break from the experiment. Sort of. I decided that I need a more classic sourdough to compare the ABI5MAD loaves to, so I baked one. We also had sourdough pancakes for breakfast. Yum.

By the way, what's the deal with all of the "classic sourdough bread" recipes on the 'net that have baking soda in them? Yikes. This has none of that. Flour. Water. Salt.

The classic bread is pure sourdough (no commercial yeast), about 6 1/2 cups of flour , 2 cups of water (both including the starter contents) and a tablespoon of kosher salt, for a single large round loaf. I took my time with it. Refreshed the starter overnight, then built it up with a couple cups of the flour for 8 hours. Then the usual (mixed ingredients, kneaded, raised, punched, formed loaf, raised, slashed, spritzed (the loaf rising was long enough that I wanted to make sure that the crust had a moist start in the oven), and baked with steam). It took all day. Most of it unattended, but still much more effort than ABI5MAD.

As would be expected, the dough was much more manageable than the ABI5MAD dough. It was easy to knead (thank you Kitchen Aide), easy to form, and shockingly easy to slash well (the sticky dough for ABI5MAD is kind of hard to slash and I have gotten used to it).

The loaf is pretty and almost perfectly formed, despite the fact that Deb almost leaned on it. The crumb is dense and moist and chewy, much more like a Boudin loaf. Sour enough to know for sure that you are eating sourdough, but not overwhelming. A highly pleasing bread.

I would happily munch on either of these loaves, but the classic would be my choice if I wanted to make sandwiches. Or an impression. It is a fine bread. It wins for eating, no doubt.

But the ABI5MAD dough is still in the fridge. I can bake more fresh tomorrow. Or the next day. It wins by a lot in the flexibility category. And being less perfect it has more character, I suppose.

The photos may not do the classic loaf justice. I finished it so late that natural light wasn't an option without a tripod and the flash and angle of the shot make it look a bit flat and misshapen. It was neither.




Day 2

Breakfast was a big slab of sourdough bread with butter. Well, OK, two big slabs. I couldn't help it. And a latte, of course. It occurred to me while munching on this lovely fresh bread that shelf life is something I should consider when evaluating the ABI5MAD dough. Sourdough and poolish made breads tend to keep longer, so will the ABI5MAD sourdough keep well? To test this, I'll have to bake a loaf big enough to last for a couple days. But not until we eat most of the giant classic loaf. So not today.

Day 3

No baking today. Leave me alone.

(Well, OK, I made pizza dough, but that has nothing to do with this experiment. It's not even sourdough. Go away.)

Day 4

I took 2/3 of the remaining dough out to form a largish loaf. Right away I noticed that the dough was even wetter and stickier than usual. I managed to form a relatively attractive loaf. But as the loaf sat waiting to be baked, it started to "melt". It just oozed itself away. I dusted, slashed, and baked the puddle anyway. The slashes completely disappeared, sealed back into the gooey dough.

When I cut into it, it seemed surprisingly like normal bread. A decent cell structure. It smelled nice and "sourdoughy". It tasted OK too - at first. But the aftertaste is a sour that just won't go away. I really like sour sourdough, but this was way too much.

This is what a completely failed experiment looks like:




Even if I could solve the structural problems by adding more flour or something, I think the flavor problem makes this a lost cause. No five minute sourdough, sorry.

But if you have the time, classic sourdough isn't all that hard and it is delicious and the basic ABI5MAD is very good and very flexible. I wanted to demonstrate how flexible by making sourdough pita tonight, but I won't be doing that with this dough.

David

Digital Scales and Accuracy in Baking

If you read my review of Artisan Bread in 5 Minutes a Day, then you know I have been baking.

Since I am a bona fide nerd, that means that I have been reading a lot about baking from all kinds of different sources.

And that my friends, means that I have repeatedly run across the completely ridiculous assertion that weighing things in grams is somehow intrinsically more accurate than weighing things in ounces.

So here is a little primer, let's call it "Balance 101".

  • A balance is what scientists call a scale.

  • Units of weight measure are ways of describing how much of something you are weighing.

  • Units of measure for weight are always convertible to any other unit of measure for weight (1g = 0.03527oz). They have nothing to do with either precision or accuracy.

  • Precision is the number of significant digits used for the representation (1.000g = 0.03527oz), or the degree to which fractional units of measure in different units can be considered to be the same, within the constraints of accuracy.

  • Accuracy is the degree to which the displayed precision reflects reality. (My balance reads 1g, but I know that really means 1g, plus or minus 1g, so there is somewhere between 0g and 2g of stuff being weighed).

So where does this annoying assertion come from? Why do so many sources claim it?

Well, let's look at the specific case of my kitchen balance. It has a precision when weighing in grams of 1g (that is, it displays no fractional grams), but a precision of 0.1oz when weighing in ounces. As long as the accuracy of the balance reflects the least precise of these measures (0.1oz is less precise because it is 2.8g), then it doesn't matter which unit of measure you use to weigh. That is, if the accuracy of the scale is plus or minus 3g, then it doesn't matter at all whether you weigh in grams or ounces.

However if the actual accuracy of the balance is plus or minus 2g (or less) then it actually is better (more accurate) to weigh in grams.

Notice that this has nothing to do with the fact that grams are more precise than ounces. It has to do with the fact that the firmware in the balance fails to represent the values in ounces with sufficient precision to reflect the actual accuracy.

David

Monday, June 23, 2008

Book Review: An Edge In The Kitchen

I am a knife enthusiast. Maybe even a knife nut. I have read virtually every book ever published on the topics of knife making, knife smithing, and sharpening. I have made knives from kits and from blade blanks and by stock removal. I own a number of custom and semi-custom knives.

I also love to cook and every knife stuck to the wall in my kitchen is sharp enough to shave the hairs on your arm.

So I was delighted when An Edge In The Kitchen: The Ultimate Guide to Kitchen Knives: how to buy them, keep them razor sharp, and use them like a pro showed up in my Amazon recommended reading list.

I highly recommend this book for any serious cook and also for any serious knife enthusiast. The knife enthusiast will learn a great deal about kitchen cutlery that he/she probably doesn't know (I learned quite a bit about the evolution of styles of kitchen knives - a lot of the knife literature if very heavily weighted towards hunting knives). The cook will learn knife techniques (there is nothing new here - serious cooks may not learn much) and most importantly sharpening and knife care.

The author (Chad Ward) shares many of my biases about sharpening and he does a decent job of describing techniques that should produce excellent results. I strongly believe that people should sharpen their own knives. It is neither rocket science nor voodoo. When Alton Brown told me that I had to send my knives to a professional to get them sharpened, I threw my remote at the TV. I am sure that there are excellent sharpening services out there, but I have never personally experienced a "professional" edge that was even close to being as good as the edge I put on my knives. On the other hand I have overheard some shocking conversations in high end cutlery stores that have convinced me that there are lots of professional knife sharpeners who have no clue at all what they are doing and who likely ruin knives at a fabulous rate.

Here is the book by section.
Part one: Choose Your Weapon

Here the author describes the various knife styles, tells you what you actually need (one big, one small), tells you how to get what you need on various budgets, and tells you what the options are if the sky is the limit. He also does a nice job covering the ins and outs of cutting boards. This section contained the most new material for me - I think I will definitely have to branch out from my "traditional german-made" chef's knife and my plastic cutting boards.

Part two: Cut Loose

This section is devoted to classical kitchen knife techniques. It is well done and the photographs make the subject clear. It is not comprehensive (you won't learn how to butcher a cow), but it has the vegetable and chicken basics.

Part three: Stay Sharp

This section is the better part of a hundred pages and it is pretty comprehensive. It covers everything from metallurgy basics, to edge geometry, to sharpening techniques and systems.

I do have a couple of criticisms, though.

At one point, the author disses round crock sticks in V-system knife sharpeners because, "It is difficult to produce a flat edge with a round stone." That is complete nonsense. The knife edge contacts and is pulled along the top arc of the cylinder. In geometric terms this is a straight line meeting another straight line. In my opinion the round crock sticks are better (for everything except serrations) because you can just turn them a bit to get a clean surface. I have several of these V crock stick sharpeners and they have become my favorite tools for keeping a good edge on my kitchen knives. My only complaint is that they don't offer enough choices in angle, but you can solve that with a drill press. The Idahone system with coarse and fine ceramic rods is hard to beat.

My other criticism is that he doesn't make it plain enough what the difference between a good sharpening job and a bad one are. He does a nice job of describing how to get the planes of the blade to meet (raise a burr) and how to polish off the wire edge, but he fails to warn the reader that a single swipe at too steep an angle can undo half an hour of painstaking work. To sharpen successfully you have to understand the basic physics involved (which he explains well), but you also have to be very mindful and consistent.

David