≡ Menu

16GB SD Card Formats to 8GB in Camera

I have a Canon EOS 20D and recently I started using SDHC cards for storage in combination with an SD-CF adapter. Works great and SDHC cards are 1) pretty cheap compared to CF cards and 2) work with all the other devices I have that support SDHC, including my MacBook Pro. I got a pair of 16GB cards and it’s pretty hard to use them both up on long trips. I ended up using only a little over one card on my recent two week vacation where I shot about 2000 photos in RAW+JPEG mode.

Anyways, I was clearing out a card so I could put some new photos on it and I decided to use my camera’s format option rather than doing an erase all, thinking it would be faster. It might have been, but it formatted the card to an 8GB capacity – half of what it should be. Turns out that while my camera can handle 16GB cards, it can only format 8GB ones. Popping it back into my computer to format it didn’t help either, as it now only recognized 8GB as well. Some hunting around the Internet led me to this blog post, which suggested reformatting the card with this USB_Format utility, which worked like a charm and I have 16 GB available on that card again. Now I just have to remember not to format this card in my camera again…


Pizza mit Fleisch (Emilia’s Pizzeria)

Berkeley. It’s a nice place to live and has some pretty good pizza in The Cheese Board, but the problem is that sometimes you get tired of vegetarian pizza, as good as it may be. Plus, they have an obsession with garlic olive oil which they apply liberally to all their pizzas. Not that it’s bad, but it makes things a bit greasy sometimes.

Recently, I needed a pizza with meat that didn’t involve the deep-dish heaviness of Zachary’s and Yelp pointed me to Emilia’s Pizzeria, over on Shattuck near Ashby. Emilia’s (named for the owner’s daughter) is a one-man operation run by Keith Freilich, who’s pizza pedigree includes Flour+Water over in SF, Pizzaiolo in Oakland, and in New Jersey, Grimaldi’s and a random Pizza Hut. Keith started as a Princeton grad (he mentioned wanting to go to Carnegie Mellon, which gives him bonus points) and worked in IT, which brought him to the Bay Area. After the dot-com bubble burst, we decided to get into pizza full time.

Because this is a one-man operation, he’s streamlined things to fully utilize his resources. This means that you can’t just call up and expect pizza in 30 minutes. On the day you want pizza, you call in and pick a time slot. He starts answering the phone at 4pm – the line is typically busy and you have to keep trying. Depending on the day of the week, you’ll typically get a slot at 6pm or later. I’ve called at 5pm and gotten an 8pm slot. The one nice thing about this is that your pizza will definitely be ready at the stated time. Period. I’ve ordered close to a half-dozen pizzas from Emilia’s and he’s always been on time.

Then you have only one choice of size, the 18″ which is a large to extra-large pizza. Thin crust with sauce, mozzarella, and basil are standard for $18. Then you can add up to 4 toppings from a short list, including sopressata and Calabrian chilis, which are Italian hot chili peppers. I wish black olives were on the list. The pepperoni and sausage are both tasty toppings.

Excellent ingredients and a great crust make for a superb pizza. Keith uses a high heat gas oven cranked to over 800 degrees F to simulate a coal fired oven – the result is a lightly charred crust somewhat reminiscent of New York style pizza. Good chew, while still being pretty light.

I love it. It’s great. While I still prefer Pizza California (not to be confused with CPK) down in the South Bay because I like their crispy medium crust, loaded with toppings (Earthquake!) this is a wonderfully tasty option up here in the East Bay. I am always drooling with anticipation when I’m driving home with a pie in the car. Heck, if you’ve read down this far, you’re probably hungry. Click on the first image of this post for some full-size mouth-watering deliciousness. If you’re not hungry, well, check your pulse. I never have leftover pizza.

While you can eat at Emilia’s, be aware that there are only two tables – it’s a small establishment. Oh, and they only take cash. They’re open Tuesday through Saturday from 5pm to about 9pm. It’s worth checking the webpage for updates (he also tweets @emiliaspizzeria) as Keith occasionally closes on random days or has special opening days as he recently did for Super Bowl Sunday. Street parking is usually available right in front of the store.


Upgrading to TortoiseSVN 1.7

A few notes:

  1.  1.7 requires upgrading your working copy, so after you upgrade, all the icon overlays in Explorer showing you the state of the working copy disappear, making it seem like they are not revision tracked. You need to right click on the root of each checked out repository and select SVN Upgrade Working Copy.
  2.  If you’re using public key authentication, Pageant 0.60 does not work with TortoiseSVN 1.7. You’ll need at least 0.61. 0.62 worked for me. Putty/Pageant Download Link, TortoiseSVN Forum Message.

Otherwise, I haven’t seen problems on Windows 7 x64 Professional.

{ 1 comment }

Spring Mountain Vineyard

Spring Mountain Vineyard is an 800+ acre winery located near St. Helena on the western slopes of Napa Valley. The winery has a history going back to 1884, making a splash in the famous 1976 Judgement of Paris, where it placed fourth in the white wine category. Since then, the winery gained notoriety as the shooting location for the 80’s soap, Falcon Crest, which shot exteriors for six-weeks each summer, including the Victorian mansion on the grounds. More recently, the winery was purchased by Jacqui Safra, a Swiss banker, who has focused on making the winery the best it can be, bringing in Bordeaux consultants and the like. A naturalist himself, he cares about sustainable, biodynamic practices. This has paid off in recent years, with their signature Elivette Bordeaux/Meritage-style blend (2005) winning a Gold Medal in Decanter Magazine’s 2010 World Wide Wine Awards. In addition, French Laundry, Thomas Keller’s three-Michelin-starred restaurant, currently has three of their wines (Sauvignon Blanc, Estate Cabernet, Elivette) on their wine list.

Trivia: Elivette is a portmanteau of Mr. Safra’s parents’ names.

The vineyard has 226 acres planted across 135 blocks which range in elevation from 400 feet above sea level to 1450 feet and were originally four separate vineyards (Miravalle, Chevalier, Alba, La Perla). This is definitely mountain wine. Because of the rocky soil and steep terrain, the vines are planted much closer together (4-7 times denser), which reduces the yield of each vine and more importantly, the stress on each vine. Because of the higher density, the winemaker also went with a very old (Roman times!) method of vine training – the vertical gobelet, which is used to maximize sunlight penetration into the vine. This is important due to the hillside location, which limits the amount of sunlight exposure.

It was a beautiful fall day last year in September, that I found myself standing under olive trees, looking up at the vines growing on the terraced hillside. I was there for a standing tasting, and we started with their 2008 Sauvignon Blanc. Cool and crisp, it was how I liked my white wines and matched the morning beautifully. Progressed through a nice ’07 Syrah and a very nice ’07 Cabernet. But for me, the highlight was the Elivette blend. The ’06 was very good, but the ’01 they let us taste was superb. I admit this was my first taste of decade-old wine, as I can’t afford to pick them up off the shelf, but boy, that’s what I want it to taste like! The depth of flavor and the smoothness was… remarkable. My tasting partner, Mark, said he thought it was pretty good, but not the best he’d had for that age. The generous and multiple pours were very nice, especially with such lovely wines.

I asked our hostess, Jeridan, about their harvest, and she commented that it was going to be very late, extending through October and perhaps even November.

Though I was only there for the tasting, there was a VIP/rich-muckety-muck who had shown up in a limo, and so we got an abbreviated bonus tour of the grounds and their wine cave. Jeridan was wonderful in showing us around and even offered us figs and squash from their organic garden. The grounds are quite beautiful – if you’re taking people who want to sightsee a bit more (or are Falcon Crest fans), it’s worth getting the seated tasting, which includes a tour of the grounds, which are fairly extensive and include both edible and decorative gardens.

I should mention that the VIP status of our fellow tasters may have affected my particular tasting experience and may not represent a typical experience.

Tours and tastings are only available by appointment and occur on the hour. Without an appointment, you won’t get past the front gate. Tasting options run from the standard varietal tasting at $25 through their reserve (Elivette) vertical tasting at $100. The tasting fee is refunded with minimum purchase.

Highly recommended.


Phil’s Sliders

Phil’s Sliders is a new burger place that opened last year here in Berkeley on Shattuck between Addison and University – two doors down from the Half Price Books. It’s a smallish spot, some would call cozy, with a community chalkboard covering the bottom half of the left wall and a bare brick wall on the right. Seats about 30.

It’s a simple menu – beef sliders ($2), portabello mushroom sliders ($2), potato tots ($2.50), poppyseed cole slaw ($2). Shakes for $2.50, drinks for $2. There’s a rotating desert selection and a s’mores bar ($2). Simple menu, but the execution of that menu is excellent.

It’s quite a good slider – beef is grass-fed (Marin Sun), so not as juicy as grain-fed, but they cook to medium-rare to help offset that. Great flavor with cheddar, sesame seed bun, and secret sauce (thousand island + chopped pickles). Two is a good number for an average eater, three if you’re hungier. You can add portabella mushroom for $1, and bacon for $0.50. I do wish they’d toast the buns. For the vegans out there, the portabella slider is quite tasty as well.

The homemade tater tots are great. Squared-off oblongs of shredded potato, nice and crispy on the outside, tender on the inside, with just right amount of salt. Lovely with ketchup. The poppyseed cole slaw is a nice accompaniment, adding freshness to the meal, though the poppyseed reminds me of the sad salads that United Airlines serves on its flights. But that’s no reflection on the slaw itself. The slaw comes in a good sized portion – I’d recommend splitting an order with a friend.

Small selection of drinks, with very few sugar-free options. None of your standard soda options. I haven’t tried the shakes yet, but I’ve tried the iced tea and the homemade ginger ale. The iced tea is nothing to write home about. The ginger ale is OK – has good ginger flavor, but lacks depth. Both come in pretty small glasses and are way-overpriced at $2. I would like to see either cheaper pricing or at the very least a free refill policy.

Service is fine – you order and pick up at the counter, but both times I’ve been someone has checked in with me during my meal to make sure everything is OK, which is a nice touch. The first time, it was the owner himself, Hugh Groman. Seating-wise, I dislike the high tables and chairs – once I climb into the chair I find it difficult to pull up to the table. Otherwise, it’s a nice, well-lit space with a high ceiling.

A meal here is a little on the pricey side for the amount of food you get, but the ingredients are of high-quality – all organic – and the downtown Berkeley location probably doesn’t help either. My meal for two (4 sliders, 2 tots, cole slaw, 2 drinks) came to $19. With the $18 for $9 Yelp deal that they had when they opened, this works out to be a great deal.

As I mentioned, I’ve been to Phil’s twice, once in September last year and once recently. Food and service quality was the same both times.

I’m definitely headed back to Phil’s in the future.


View Larger Map


Cooking Blog for Food Allergy Sufferers

While the RoboGourmet does not suffer from food allergies, aside from a mild dairy intolerance and a mild reaction to cantaloupe, he understands that others do, and recommends that they check out his friend Jenney’s new blog at http://cookingallergies.blogspot.com/. First recipe is a tasty looking Chocolate Stout Cake with Cointreau Ganache!


Ma Po Tofu

Ma po tofu is an old Chinese classic, originating from Szechuan cuisine, and is basically a spicy tofu and ground pork dish. It’s typically spooned over steamed rice and is great on a cold winter day. The flavor palette is spicy, garlicky, and meaty, with the textural contrast of the almost crispy pork against the smooth tofu, along with the fresh crunch of the green onion. The version I describe here is similar to what my mother used to cook, which uses silken tofu and is not as spicy as most Szechuan cuisine tends to be.

[click to continue…]


Using and Maintaining Cast Iron

Cast iron cookware provides a cooking surface with great heat retention properties and typically is fairly cheap. And seasoned properly, this surface can be fairly non-stick as well – not as good as Teflon, but with a bit of care, able to release delicate fish filets and eggs. The key phrase here is “seasoned properly.” Seasoning refers to the layer of polymerized fat/oil which develops on the cast iron while cooking – it is this layer which provides the non-stick properties of cast iron. And while pretty much all modern cast iron pans come preseasoned out of the box, the factory seasoning is nothing compared to a fully developed seasoning layer. However, the much of the instruction for maintaining cast iron floating around the Internet derives from, it seems, ancient lore or someone’s grandmother. Some of the advice seems contradictory and in general, doesn’t seem well defined. I’ll write a little of what I understand about the process and what I’ve decided to do as a result of my research. I have never stripped my cast iron down and reseasoned, just built on top of the factory seasoning on my pieces.

[click to continue…]


Inside the RG Kitchen: Pans

Pans are the primary cooking device in most kitchens and mine is no different. I have three primary pans and some special use pans. And though they are called “saucepans,” they are really more like pots than pans (and aren’t good for saucemaking either), so I’ll leave those out. I’ll be skipping roasting pans as well and sticking to the general class of stove-top pans.

[click to continue…]


Speeding Up MATLAB

MATLAB is a great environment to quickly prototype scientific algorithms, especially with interactive debugging, decent data plotting facilities, dynamic typing, and all the built-in toolboxes. However, it’s definitely pretty slow when it comes to code-execution performance compared to, well, almost every other language out there. This is largely because MATLAB is an interpreted language – that handy ability to set a breakpoint and then run code and plot data comes at the cost of not being able to compile or optimize the code in advance and having to do everything on-the-fly. This can cause MATLAB code to execute up to hundreds of times slower!


So in particular, loops are pretty bad because MATLAB has to interpret every line of code individually and loops just mean lots of time spent interpreting. Basically, in MATLAB, the fewer lines of code you can do something in, the better. Fortunately, because MATLAB was designed to work with matrices, most of the built-in functions can process entire matrices at a time, rather than having to process them one element at a time as you would in most languages. This is called vectorization. For instance, in C, to take the square root of every element of a 2-D array and multiply them by 2, you’d need to have a nested set of FOR loops to iterate over every element – this would look something like: (using MATLAB syntax)

for i = 1:size(matrix, 1) % Loops BAD!
    for j = 1:size(matrix, 2)
        out(i,j) = sqrt(matrix(i,j)) * 2;

In MATLAB, this takes forever. The proper, vectorized way is simply:

out = sqrt(matrix) * 2; % Vectorized!

not only is the vectorized version much faster (0.022 vs 1.1882 seconds – 125X – on a 1M element array in MATLAB 2009b on an Intel Core i5), it’s much shorter to type. Basically, whenever you want to write  a FOR  loop do to something on an array, you should instead be vectorizing it.

The MathWorks guide to vectorization is here.

Pre-allocate Memory

This is important in most languages, but especially so in MATLAB. If MATLAB has to keep reallocating memory for the array as it grows, it slows down a lot. In the above FOR loop example, adding one line cuts the execution time in half:

out = zeros(size(matrix)); % Preallocate output matrix
for i = 1:size(matrix, 1)
    for j = 1:size(matrix, 2)
        out(i,j) = sqrt(matrix(i,j)) * 2;

Suppress Output (aka Semicolons are your friend)

In MATLAB, if you don’t terminate a line with a semicolon, that’s OK! Your code will still run, but without the semicolon, MATLAB will print the output to the Command Window. Just as if you’d thrown a cout/printf after that line of code. In the previous FOR loop example, leaving off the semicolon on the line:

out(i,j) = sqrt(matrix(i,j)) * 2

means that MATLAB will print the entire million element array for EACH of the million iterations! This takes a small eternity – hit CTRL-C to kill it and put that semicolon in. In fact, it’s typically best to make it a habit of terminating every line of code with a semicolon and using the ‘disp’ command to write formatted output.

Aside from displaying text in the command window, drawing figures is also very time-consuming. If you’re trying to update a plot frequently, consider deleting the specific elements and drawing just the new ones, rather than redrawing the entire plot. Also, if you’re generating a bunch of plots that you won’t be looking at, say because you’re writing them to disk, don’t keep spawning new figures – just create one and keep erasing it. The more figures your have open, the slower MATLAB’s graphics engine becomes.

Use the Profiler!

MATLAB has a pretty nice profiler which will tell you how many times each line is called and how much processing time each takes. Makes it pretty easy to figure out what’s really bogging down your program so you can speed it up, whether by refactoring, vectorizing, or simply converting it into a MEX function.

Install Lightspeed

There are a good number of useful functions in MATLAB which are, sadly, unoptimized. One of the biggest is repmat, which is really handy when it comes to vectorizing code as it is used to create matrices by tiling a smaller matrix. This function, plus a lot of other useful functions, have been written as blazingly fast MEX-functions (see the next section for details) by Tom Minka over at Microsoft Research. I’ve seen many-fold to orders-of-magnitude speedups with this toolbox! Also, in some vectorization guides, they’ll tell you not to use repmat as it’s slow, and to use the ones indexing trick to simulate the functioning of repmat. Don’t bother – just install Lightspeed and use repmat to your heart’s content.

Download Lightspeed here.

Write MEX-functions

MEX-functions are C, C++, or FORTRAN programs that have been compiled with the MEX interface so that MATLAB can call the program. Because the MEX-functions are compiled, they typically run much faster than normal MATLAB code. Just absolutely have to do something in a FOR loop? Write a MEX function. This is also great for pulling in external functions from a library like OpenCV. Basically, all a MEX-function is is a program with an interface wrapper to define how data is passed into and out of the program from MATLAB.

MathWorks MEX Guide is here.

Install the latest version of MATLAB

So over the years, MathWorks has put some effort into improving the performance of MATLAB. Repmat, for instance, has been sped up many-fold, though the Lightspeed version is still faster. MATLAB now also has a Just-In-Time accelerator which allows MATLAB to compile certain things on-the-fly, including simple FOR loops. So you need not fear loops – as much! There are certain rules, though, for what can and cannot be accelerated. This document lists these rules. The profiler also helps to identify what is and is not being accelerated, as described here. Finally, if you’re willing to pony up for the Parallel Computing Toolbox, this is an pretty easy way to take advantage of multiple processors/core/machines.

So go out there and write some code! And if you come up with any tips of your own, drop us a line!

{ 1 comment }