echo "Content-Type: multipart/related; boundary=\"boundary-example\"; type=\"text/html\""

echo "--boundary-example"
echo "Content-Type: text/html"
echo "<h1>Email</h1>"
echo "<img src=\"cid:image.png\" alt=\"image\">"
echo "--boundary-example"
echo "Content-Location: CID:something"
echo "Content-ID: <image.png>"
echo "Content-Type: image/png"
echo "Content-Transfer-Encoding: BASE64"

base64 /tmp/image.png

echo "--boundary-example--"
./email.sh | sendmail some@emailaddress.com
So you've got a PC without a CD-ROM drive. (Err, DVD-ROM, DVD-RW, whatever). Or you bought a new PC motherboard without realizing it lacks an IDE port for your antiquated DVD player. Then you bought some software on physical media like it was the 90's. (Perhaps you got a great deal on tax software, for example). So you have a Mac that has a DVD drive, and you'd like to copy the installer off the Mac but when you insert the CD into the Mac it mounts the Mac partition, not the PC partition.

Drop to the command line and figure out where the CD is getting mounted:

$ diskutil list

Make a temporary directory to mount the image:

$ mkdir /tmp/mnt

Mount the iso9660 partition at that location:

sudo mount -t cd9660 -o nodev,nosuid /dev/disk3s1 /tmp/mnt

Replace /dev/disk3s1 with your CD's location.

Silent Privilege and Bias

| No Comments
Philip Guo has an excellent article on slate.com today about his experience as an Asian American software engineer.

    Even though I didn't grow up in a tech-savvy household and couldn't code my way out of a paper bag, I had one big thing going for me: I looked like I was good at programming.

I admit I've had predisposed biases about people before getting to know them. It's human nature, it's the way our brains work. The world is a complicated place and our brains need a way to quickly categorize what we experience or else we would be overwhelmed.

As a hiring manager, it's a part of my brain that I try to shut off when I'm assessing someone's technical skills--but it's tough. I've even played games in the past where I covered up the person's name before I reviewed the resume to see if that altered my impression of them. But over the years I've encountered enough individuals that violate any kind of stereotypes I had that it's unwound most of them.

People always talk about race bias and gender bias, but something that surprised me when I first encountered it (in myself and others) was experience or education bias.

Tess Rinearson in this article talks about the "technically entitled," the programmers that boast about how they've been programming since they were 6. You would think that someone who has been coding for that many years would be amazing, right? In my experience that's not always the case. I've had candidates tell me on the phone they've been doing C++ since they were in middle school but when you dig into it they can't answer simple questions about the language. Me personally, I started coding at a very young age but I know quite a few people that didn't start until they were in college and they are way better software engineers than I am. If you assume there's a correlation between experience and ability you could run into trouble.

What's especially surprised me talking with and interviewing folks from different colleges and universities around the country is its dangerous to assume there is a correlation between education (school and/or GPA) and programming capability. You would think Stanford has an amazing computer science program, being in the heart of silicon valley. Anyone with a Stanford CS degree must be amazing, right? Well... I've interviewed Stanford grads that could not explain some of the most basic concepts about how an operating system works. But I've also interviewed Stanford grads that during the interview taught me new things about how operating systems work. So you can't infer anything about ability from education either.

Race, gender, experience, education.. what inferences can you make about people then? None, really.

GMO food

| No Comments
The New York Times has a great article on the fight over banning GMO crops on the big island in Hawaii. It covers the science, the pseudoscience and the hysteria over what GMO food supplies might do to people and the environment.

This prompted me to revisit a blog post I wrote in 2007 on cloned cattle: FDA says cloned livestock is safe to eat. I had written:

    What happens when 10%, 20% or maybe even 50% of our beef comes from the same DNA "mother cow", or possibly a small genetically similar group of cows? It seems like then it would just be a matter of time until a virus or bacteria strain crops up that has adapted to exploit some weakness of that cow, and then it spreads like wildfire throughout our cattle. But what if that virus was undetectable some how, and turned out to be the next Mad Cow Disease?

Reading that again I sound a little hysterical. To clarify, by "just a matter of time" I was thinking a span of decades or centuries. But I do still have the same concern and I haven't heard anyone address it yet (at least not in any media sources I follow). If we dramatically decrease the genetic diversity of a crop (animal or plant) could that introduce a single point-of-failure on our food supply?

I'm not convinced there is a health risk with GMO food to a single consumer or group of consumers... but is there a risk to the industry producing that crop?

To illustrate, I will actually get a little hysterical: Imagine 50 years from now Golden Rice is a huge success and its being grown everywhere. It now makes up 99% of the world's rice production. (The other 1% is non-GMO organic sold only at Whole Foods and other stores that only 1%'ers can afford to shop at ;). So basically all of the world's rice is now genetically very similar. Now imagine there is a random mutation in a pathogen that effects rice (like RGSV -- Rice Grassy Stunt Virus), and this mutation effects Golden Rice particularly bad. Because there is so little genetic diversity the virus could probably rip through the world's rice fields faster than we could control it. This would be an economic and human disaster.

This is probably a far-fetched scenario, but it is my one concern with GMO crop production.
I have a custom kernel on my linux machine (that I apparently did not install correctly) so when I went to use VirtualBox I got an error about DKMS not being ready. The docs say I needed to update my "virtualbox-ose-dkms" package to the latest version but when I did that it failed to install, saying the module could not be built.

Running the reconfigure command manually gave me this error:

$ sudo dpkg-reconfigure virtualbox-dkms 

Deleting module version: 4.1.12
completely from the DKMS tree.
Loading new virtualbox-4.1.12 DKMS files...
Building only for 3.2.37-32corexeon
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
 * Stopping VirtualBox kernel modules [ OK ] 
 * Starting VirtualBox kernel modules
 * No suitable module for running kernel found [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
What you'll find online if you search for this error is its missing the linux-headers-`uname -r` package. I had it installed, but it still wasn't finding it.

The issue turned out to be my /lib/modules/3.2.37-32corexeon directory was linking to the original location where I had compiled the kernel, but I had since moved those files. I updated this symlink and then it worked:

  -> /usr/src/linux-headers-3.2.37-32corexeon/
Thanks *nix notes!
In "Taking Our Company to the Next Level," a lecture in the Entrepreneurship Through the Lens of Venture Capital series, Theresia Gouw is talking about organization structure in software engineering companies. Her thesis is: have an org structure, but keep decision making flat. There's a rule of 5 with direct reports, and a rule of 5 with teams.

I cracked up when, in the middle of this, she offers this caveat:

"...well, this is in software engineering. Obviously if you're building the next spacecraft and you've got significant complex systems it would be different."

Overall, her points do align with my personal experience:

"You get the most out of people when there are around 5 or 6 people on a team, in terms of productivity. And happiness, when you do the surveys. For what its worth."

Turkey recycling: soup

| No Comments
What do you do with all these leftovers? You can't let them go to waste! You paid top dollar for that organic free range turkey and you're determined to squeeze every drop of flavor out of it.

I'm not a fan of leftover dark meat by itself so I decided to make something out of it. Inspired by The Best Chicken Stew from last month's Cook's Illustrated (which I made, and it was the best), I thought I would try making "The Best Turkey Stew." It turned out pretty awesome, if I may be so bold. Since you can't taste mine (we ate it all in <24 hours) you'll just have to take my word for it.  But here's how you can make your own...


8 cups water
4 cooked turkey pieces (I used 4 wings but some combo of wings/legs would work also)
6 sprigs fresh thyme
6 sprigs fresh parsley
4 fresh sage leaves
0.5oz dried porcini mushrooms, rinsed
1 bay leaf


6 tbsp bacon grease, melted
3 tbsp flour
1 onion, finely chopped
2 carrots, chopped
3 celery stalks, chopped

Stock: Separate most of the meat off the leftover turkey pieces and start a stock from the bones, fat and little bits of meat you're too lazy to pick off, using the ingredients above. Let it go at a slow simmer, covered, for about 3-4 hours. If it hasn't boiled down to about 2/3 the liquid content uncover it and let it continue simmering until it does. Pull the bones out and run the rest through a fat separator, squeezing as much liquid out of the meat and herbs as possible. You should be left with about 4 cups of opaque, dense, hearty turkey stock.

Soup: After you've got the stock, chop the meat bits into bite sized pieces and place them in a dutch oven on the stove with 3 tbsp of bacon grease. (If you don't have bacon grease laying around, by all means go make some fresh bacon grease and then add the bacon bits into the recipe later!) Heat the turkey bits on medium-high until lightly browned. Add the onion, carrots, and celery and continue to cook until veggies are soft. Meanwhile, preheat your oven to 325F.

Build a roux: Push the meat and veggies to one side of the dutch oven and pour the remaining bacon grease into the cleared side.  Working quickly, sprinkle the flour over the grease and mix the flour in using a fork, making sure there are no chunky bits of flour. Keep mixing it for a minute while it starts to bubble and turn brown. Add about a half cup of turkey stock to the roux and keep mixing it until it thickens, then add the rest of the turkey stock.

Finish the soup: Place the dutch oven, uncovered, into your oven and cook for 1 hour. When you take it out fond will have formed on the sides of the dutch oven, scrape this off and mix it back into the soup! It's full of awesome flavor.

Serve: Put leftover bread in the toaster oven for a few minutes, dice it up and then toss it on top of the soup. Serve with a Chateaneuf-du-Pape Grenach blanc or Franzia Crisp White, whatever your preference is.

Opportunities for expansion: If I had a half cup of white wine on hand, I would have added it before tossing in the oven. I think that would have made a good addition. I also meant to add a teaspoon or so of anchovy paste to amp up the savory content but spaced it.. turns out it didn't really need it, but I wonder.. 

"Coin" is a swipe/credit/reward card emulator that's tied to your smartphone. You load it up with all of your cards so that presumably you only have to carry the Coin instead of a stack of plastic.

I want to love this device for its cleverness, but I hate that a device like this is even being considered as a viable product. It shouldn't need to exist.

Take credit/debit cards: Do you really need to carry so many forms of payment? What's wrong with just credit and debit? Or perhaps you should reject short-term loans completely, live within your means and go with just a single debit card?

Take rewards cards: Are you finally accepting rewards cards are here to stay? Do you ever question why a retailer needs a rewards card to track your identity when they already have your identity via the debit card you are about to pay with? Have you ever noticed that a lot of retailers have a "cheater card" under the counter that gives you the same discount you would get with your own? Have you noticed some will actually let you sign up for a new card every time you shop, holding everyone up in the line behind you while you fill out the form for the Nth time?

Yes, I'm that guy.

Thank you Coin for acknowledging what a sad state personal commerce is in.

Footnote: Coin reminded me of a struggle I had as a kid when I bought my first wallet: I'm about to spend money on something that will hold money. But it won't hold all of my money, because I'll just have spent some of it on the wallet. I'll have more money if I turn around and don't buy the thing to hold the money. But then I might lose my money if I don't have something to keep it in. This went on for probably 15 minutes. I almost considered holding my money in a ziploc bag. I ended up buying the cheapest wallet I could find.

Good pinto beans

| No Comments
Pressure cooker + beans = amazing

2 cups pinto beans
7 cups water
2 tbsp oil
2 tbsp chili powder
2 tsp salt
1 tsp cumin
1/2 tsp ground coriander
1/2 red onion, diced
4 cloves garlic
4 bay leaves

Express bean soak: Rinse beans and place in a 2-cup microwave safe measuring cup (Pyrex).  Cover with water, microwave for ~4 minutes (until boiling), let stand for 10 minutes.

Place soaked beans and everything else in a pressure cooker, cook on high heat for 45 minutes. Remove from heat and let rest for 15 minutes (still under pressure). Remove lid, remove bay leaves, salt to taste.

See also: Good beans

My wife's debit card got hacked; just noticed it last night. Friendly reminder: routinely check your bank statement. You usually only have 60 days to report a fraudulent charge, but it's easier to deal with the sooner you recognize it.

This sent me down a multi-hour exploration of personal finance tools to see if there was anything out there that could passively (maybe with some training) categorize account transactions and detect fraud. As in, iPhone notification: "What's this $1000 you just spent on eBay? You haven't used eBay in 7 years."  I'm sure the financial industry has tools they're not sharing that look for patterns of behavior across accounts, but I thought this being 2013 someone would have some software out there to do this for individuals.

Thinking if anything were out there, this being 2013, it would probably be built into an existing personal finance tool. I found and tried these tools: Mint.com (positioned as Quicken Online, essentially), Gnu Cash, PageOnce, Personal Capital and Wave Personal.

None of them really worked all that great in terms of transaction classification.  A bunch of transactions that were clearly restaurants (just cross-ref with a Yelp database) showed up uncategorized. Re-categorizing transactions was agonizing with all of them, but Gnu Cash was especially agonizing. I expected them to say, for example, "Hey I see you set this one to clothing, do you want me to set all others that match this to clothing also?"  With the online tools I would have thought that they would have at least one other customer in their database who had already categorized something from that vendor and used that data to help me out.

And none of them seemed to do any kind of real-time, push notification categorization.  It was all up to me to login, sort by uncategorized, and then start clicking away.

Of the four tools, I spent the most time with Personal Capital. The checking account management features were weak compared to the others but it had an interesting mutual fund fee analysis tool. It visualized how much I'm spending on mutual fund fees (mostly from my 401k) and what that's going to cost me over a lifetime. You can tweak with the inputs to see how certain adjustments to your investments would change the fee structure. Informative.

Another thing I decided I "needed" through this was a historical investment performance tool. The data is all there to plot how my investments have been doing over the last couple of years but none of the tools seemed to have the capability.  Most of them didn't even try; they said I had $0 yesterday. As a tangent I figured out how to export as much data as I could from my 401k as a CSV and pulled together some performance plots in Excel. (Cumbersome, but it's possible). I also read about the Open Financial Exchange protocol and discovered its really not that hard to extract this data yourself. I'm surprised there aren't more tools out there.

In the end I cancelled my accounts with all of the online tools. None of the tools solved the fraud problem the way I wanted to deal with it (push notify) and the investment tools I can reload again if I wanted to see them, but I'll probably pull together my own next time.



Monthly Archives


Tag Cloud

Find recent content on the main index or look in the archives to find all content.