0

LPTHW: Exercise 1: A good first program and roasting vegetables

Howdy folks. Today I’m writing to you from Dr. Bombay’s Underwater Tea Party (real name) where I just finished Exercise 1: A good first program.

To be honest, this is the fourth time I’ve worked through this exercise. I started in early 2012 and have had several stops and starts with LPTHW since. (But this time it’s stickin’.)

I was surprised when I actually made some mistakes! I realised I’d used the GUI to create a “Learn-Python” folder in my home directory but I hadn’t cd’ed into it before trying to run my “good first program”. But when I tried to cd into it, it wouldn’t let me! A-ha: “cd learn-python” won’t work, because Python is case-sensitive. Little slip-ups, but important to the learning process.

ex1py

It feels weird to call ex1.py a “program” because all I’m doing is printing some lines. In the extra credit Zed has us comment out our working using #, but that’s really the extent of this chapter. I feel like a “program” should do something more exciting.

While we’re here, let’s chat about something similarly basic in the kitchen: roasting vegetables.* It’s easy and something you should feel empowered to do.

01_roastedeggplant

You can roast eggplant.

01_roastedpeppers

You can roast peppers.

01_mapleroasted

You can even roast whole pans of stuff.

There are too many blog posts on the internet about roasting red peppers, heads of garlic, acorn squash, etc. I don’t intend to add to the bulk by making a simple concept fussy, or insisting that every vegetable deserves its own special treatment. Sure, you can do that if you’d like — and sometimes it’s appropriate. (Feel free to Google if you’re curious.) But for your average just-got-home-from-work, wanna-be-doing-something-else, need-vegetables eater, what I am about to explain is more than sufficient.

Roasting is not complicated. The most you’ll have to think about, really, is how long you want to roast a given food. By this I mean: tender foods (like eggplant, summer squash, very young fennel) will need less roasting time. Firmer foods (potatoes, winter squashes) will need a little more. If you’re just roasting a sheet pan of acorn squash, it’s going to take somewhat longer than a sheet of asparagus. Acorn squash takes about an hour. Asparagus takes about 25 minutes.

But here’s the thing! You can actually roast firmer foods with more tender ones, as long as you cut them into smaller pieces so they’ll cook faster. See the example above: those are fairly small potato pieces (they’re also an especially tender variety, hence my choice).

Cutting pieces of food uniformly is a basic cooking skill you should practice. Chefs don’t just do it because it looks good. It also ensures that your food cooks more evenly.

So! Roasting!

Here’s how I do it:

  1. Prep vegetables. (Clean, core, chop uniformly, etc.)
  2. Pre-heat oven to 400 degrees Fahrenheit.
  3. Gather all vegetables in your largest bowl. Drizzle generously with olive oil and sprinkle with salt and pepper.
  4. Spread the vegetables out onto a heavy-duty rimmed baking sheet (jellyroll pan).
    1. Note: you will not need to grease your pan because you have already generous coated all of the veggies with oil.
  5. Roast for 35 – 45 minutes total, removing them from the oven every 15 minutes to stir (or in the case of large pieces, turn over).
    1. I recommend using the thinnest metal spatula you have to scrape up all the roasty goodness.
    2. Larger pieces (like halves of peppers) can be negotiated with tongs.
    3. Tender foods will take less time.
    4. Firmer foods will take more. Adjust as needed.

I like to play around with a combination of olive oil, soy sauce, maple syrup, and dijon mustard for potato-and-onion-based roasts. Try it!

*We are not having a conversation about how eggplants and peppers are technically fruits.

0

Free libraries and free software

Today’s post doesn’t have anything to do with Learn Python The Hard Way, but I thought it was worth sharing all the same.

It’s about my love for free software.

Today I got an itch to make some beats. I’ve been spending a lot of time in the gym lately and I’m never without my MDR-V6s. I know, I know — it’s terribly uncool to be dancing on the treadmill with giant headphones on. (But they’re the best, y’all!) My gym mix is ever-changing and all about energy. This morning I enjoyed some new Trust, old Skrillex, way too much Nikki Minaj, a few songs I heard on RuPaul’s Drag Race, and always, my girl Speakerfoxxx. I love a heavy, driving beat to keep my moving forward and push myself to the limit. (Go girl, go girl, go girl.)

So, I thought — why not try my hand at it? It’s probably really hard, I thought — but I might have some fun.

Because I’m all about free software, all I had to do was open up my terminal and issue one simple command:

get-itOh, apt-get. You are so very delightful.

In about a minute, it appeared. My heart fluttered and my face broke out into an irrepressible smile. At the risk of sounding silly, I shared on Twitter: “gosh, i love free software. sudo apt-get install x gives me the same feeling as walking into the library as a kid: the world is mine.”

LMMS

But that was exactly it. When I was a kid, the library was my favorite place. I exhausted the school’s collection and begged for trips to local branches. I was a little local library connoisseur, calling them by their full, proper names, and even noting the county system — yes, I was a nerdy kid!

I craved the promise that the library held: the world could be mine. Who knows what I might find in the stacks, between the pages?

That feeling rushed me when I installed LMMS. And it could have been anything. The other night, I couldn’t figure out how to do something, so I googled and found that I needed to install something very small. Though it didn’t work and I had to make another choice, it felt profoundly empowering to be able to even try. It’s thrilling to know that the work of some of the world’s brightest, most generous and principled developers is always out there for me to discover when I need it, just like the great works of literature that lined the shelves of my childhood libraries.

And LMMS? Well, I’m now the proud creator of a fifteen-second track that is actually pretty enjoyable, perfect for a first attempt.

Thanks, FOSS.

1

Bash for beginners / most common conversions

Recently I took off to Chattanooga to spend the day drinking coffee, playing cards, eating good food, and… learning Bash? Yep. Turns out craft coffeehouse Brash provides the perfect backdrop for making flashcards (henceforward known as bashcards) and gettin’ down the basics.

bashatbrash
Featuring Android: Netrunner. I slay as Andromeda.

bashcards
a few of the bashcards

I’d already worked through the Command Line Crash Course‘s terminal-based exercises, but I wanted some practice drilling. Thankfully my beau was willing on the long, slow drive back from Chattanooga. I didn’t have too much trouble, since I recognized many of the terms from my first attempt at Learning Python the Hard Way. Only xargs made me go argh! I definitely feel like I have a good enough handle on the basics to move on to the first chapter, so I’ll cover it in my next post.

For today’s cooking tip, I want to share a few cooking conversions and measurements that I use all the time. Like Bash above, just memorizing these will make your life so much easier. Say you’re making a salad dressing and it calls for all kinds of “tablespoon this”, “teaspoon that”… and you want to triple the recipe for a party. Are you really gonna stand there and carefully measure out 9 tablespoons of sticky tahini, when you could just do a generous 1/2 cup* and call it a day?

Here are the measurements I use all the time:

Dash = 1/16 of a teaspoon. This is nothin’. This like a dustin’. When you see a dash of something, consider that it’s basically an optional ingredient. …Just kidding. …sorta.

Pinch = 1/8 of a teaspoon. This is quite a bit more than nothin’, so don’t discount it. It’s okay to literally pinch a bit of the spice and toss it in (to your mise en place, remember?), but if you want to measure it out, that’s okay too. (If you’re working with cayenne or another pungent spice you might actually prefer to measure it.)

One teaspoon = 1/3 of a tablespoon.
Two teaspoons = 2/3s of a tablespoon.
Three teaspoons = 1 tablespoon.

It’s so helpful to know the above when you’re reading a recipe that says “5 teaspoons” (seriously, I hate that). If you see “5 teaspoons”, just think 1 tablespoon plus 2 teaspoons (or, if you’ve got some experience at eyeballing, a 2/3s-filled tablespoon).

Two tablespoons = 1/8 cup.
Four tablespoons = 1/4 cup.
Eight tablespoons = 1/2 cup.
Sixteen tablespoons = 1 cup.

When I see a recipe that calls for four tablespoons I know they need an editor. Quarter cup y’all!

Your 1/3 cup measure go missing? No big deal. Just measure out 1/4 cup plus 4 teaspoons (or 1/4 cup plus 1 tablespoon plus 1 teaspoon). Note: the internet believes that 1/3 cup equals five tablespoons. This is not true, but it works for most purposes. 1/3 cup is actually slightly over five tablespoons (hence the +1 tsp above).

Doubling a soup? Memorize these:

Pint = two cups
Quart = two pints (4 cups)
Gallon = four quarts (16 cups)

So there you have it: a beginner’s guide to some of the most common and helpful cooking conversions. While I highly recommend that you memorize the above, you can use Google if necessary. Just specify what you’re looking to convert (i.e., “How many ounces in a pint”) and Google will help you out.

googleGoogling: not just for learning Python!

*technically 9 tablespoons = 1/2 cup + 1 tablespoon, but I’ve been in this gig long enough that I’m lazy. I do “scant” for just under a given amount and “generous” for just over.