On Code and Cooking

Other people’s experience won’t make you a better developer


Editor’s note: You should probably just skip this post and read “Learning Fluency” by Sara Simon since she does a much better job of making my point… unless you really just wanna learn how to make killer breakfast potatoes…


The two things I get asked about the most often are probably code and cooking. “How do you do what you do” is surprisingly hard to answer for both topics. For instance people don’t like to hear “I don’t follow recipes” — but no recipe I could provide would come close to transferring the knowledge gained from years of making mistakes and learning from them.

To illustrate: the following is a recipe and then a lengthy discussion on how I make breakfast potatoes (which I make better than probably anyone else you know).

The Recipe

Ingredients:

  • 5 medium potatoes, diced
  • 1 large onion, finely diced
  • 1 frying pepper, minced
  • 3–5 tbls cooking oil or butter
  • 2 tsp kosher salt
  • Spice mix to taste (paprika, chili powder, mustard powder, fenugreek)

Directions

In a medium sauce pan cover potatoes in cold water and bring to a boil then drain. In a large frying pan bring cooking oil to medium high heat then add potatoes, onion, peppers, and salt. Cook till golden brown then toss in spice mix. Serve with hot sauce and eat I guess.

The Problem

While accurate this recipe really covers over a lot of what I’ve learned… here is some of what’s in the gaps:

The Boil

You want to boil your potatoes until they are just shy of fork tender. Boil the potatoes too long and they will turn to mush. Each style of potato has a different level of starch. The lower starch potatoes are waxier and require a longer boil.

My go-to is the Russet. They also make great baked and mashed potatoes. Cut them to size, rinse, cover in water, and bring to a boil. Russets are high in starch and generally they hit 212 degrees at the same time as the water — so the moment you have a rolling boil you are ready to strain regardless of how many potatoes you use.

Occasionally I’ll use red bliss… those generally take 5–10 minutes longer. The fork is your guide. Experience will tell you when they are done.

Once you’re finished strain the potatoes in a colander and then sit the colander over the pot to let them drip and cool for a minute while the oil heats up.

The Oil

Potatoes pan fry well on medium high heat — which is a temperature range (375–450 degrees)… not a setting on your stove. Ideally we want an oil mixture with a smoke point at the bottom of that range… this lets things get crispy but doesn’t make things cook too fast.

Butter is tasty but has a smoke point of 350 degrees… a little low. To it I add a mixture of olive and canola oil. Both have smoke points around 400 degrees and give me a crispier caramelization.

If asked how much of each I use I’d happily answer “1 tbsp butter and 2 tbsps each olive oil and canola oil.” It’s probably close but I’ve never measured the amounts. Pan size would change how much I use — smaller pans require less oil. In practice I set the stove to a snootch above 7 (a number determined through trial and error with my own stove) and pour oils in until it looks right. “Looks right” is hard to describe… I just know it when I see it.

The Toppings

Onion selection is kinda key. Red onions are nice for color and flavor but if I’m cooking for myself I go with the flattest yellow onions I can find. They are stronger in flavor when cooked than red onions… and the flat ones are sweeter. Chop them up and add them on top of the potatoes as soon as they go in the pan.

If you like peppers I’d avoid bell. Frying peppers are mild, hold up better flavor-wise when heated, and don’t add a lot of liquid. If you use hot peppers make sure to test the heat before you decide how much to use. I normally add peppers after the first flip.

Cheese is also amazing. As much as I love melted gouda — I like things a little stringier for potatoes. I’m a fan of colby or mild cheddar. I add it at the last possible moment and let it melt for a minute before I remove it from the pan. You don’t want it to melt all the way in the pan… otherwise it won’t all come out.

The Fry

Once the oil mix is at the right temp — in go the potatoes. Shake the pan until they are sitting even, kosher salt to taste, and then drop in the toppings.

The next part is the hardest —I leave it alone until the bottoms of the potatoes start to caramelize. It should take five minutes or so… don’t let it go too long or it will burn. Don’t go too fast or your potatoes might not brown properly.

Once things are browned on the bottom it’s time to turn the potatoes. I don’t like using a spoon or spatula for fear of accidentally mashing the potatoes… so I do a pan flip. It looks like this (mute your computer… the noise is annoying):

There is no trick to the flip other than pan shape… it’s a skill that comes with practice. I‘ve seen posts suggest practicing with dried beans. Personally I just kept throwing food all over my kitchen till I got it right.

Flip the potatoes and let them sit for a minute then repeat. Continue until everything is browned to your heart’s content.

The Seasoning

When I first add the potatoes to the pan I add kosher salt and cracked pepper… but anything that comes as a powder I keep out until the potatoes are almost done. Adding the salt early prevents the potatoes from tasting salty — but powders too early tend to burn.

Seasoning is a personal thing. I like a mix of smoked or sweet paprika, mild mustard powder, ancho chili powder, fenugreek powder, and some sort of herb mix. Sometimes I add chipotle or cayenne for heat. Sometimes I go for a more curry-like flavor with cinnamon, nutmeg, cumin, and cardamon and coriander.

I don’t measure the spices… I just toss them in randomly. This makes for a complete lack of consistency… but it is also why I’m able to make this all the time and never get sick of it.

Toss in the spices, two flips, then on to the serving platter. Let them rest covered to soak up spices for a minute or two… the eat.

The Point

I often make the mistake of trying to encourage people when they are starting out by saying things like “Rails isn’t hard to learn — just follow this tutorial.” Lost in that message is the amount of code I had to write in order to get the level of skill I have today.

The idea that one can learn to become a good developer by simply following a recipe is seductive but unrealistic. A special kind of discouragement can come from trying to measure yourself up against a fictional belief that the skills just came naturally to other people. There is no magic path to follow.

Re-writing code examples is fine when you first start out — but move as quickly as possible toward experimenting on your own. There area ton things you can do improve your skills. Watch conference talks and try out the ideas you find, code with others, and most of all… practice. You’ll burn yourself a few times… but the lessons learned will be worth it.