Lessig on User Generated Content

As always, Lawrence Lessig is better at explaining my views on copyright and art than I am. It's a 19 minute video, but I couldn't recommend it more. If you are working in art at all, please, PLEASE watch it. You might thing that copyright law is boring, or that it's obvious that you want to hoard and protect your work zealously so you can make more money... but please give this a watch.

0 comments

Bens Perfect Thanksgiving Turkey Recipe

BenStarr.com - Perfect Thanksgiving Turkey
Brining isn't easy, but it's worth it. After you've had one dry, tasteless Thanksgiving turkey, you know how awful it can be. Brining is the cure.
0 comments
Tags: pudding

How to make "calaveras" or Mexican sugar skulls

The net is an incredible place, because 10 years ago, if I wanted to make "calaveras," which are those sugar skulls that kids and lovers give each other for the Mexican holiday El Dia de los Muertos (the Day of the Dead), how on earth would I have figured out how to do that without going to Mexico and hanging out in some grandma's kitchen?

So I was all excited a couple of weeks back when I ordered my sugar skull mold (just a cheap piece of polystyrene that looks like the containers that things like Ipods and flash drives come in...that stuff thats practically impossible to cut open without slicing your hands) and got ready to make 40 calaveras for my fall dinner party.



The website that sold me the skull mold (for an astonishing $15 considering the cheap production cost...this stuff is just basically packaging) has a recipe for sugar skulls that I found repeated virtually EVERYWHERE on the internet. If a site had a recipe for sugar skulls, this was the recipe. And there simply were no other recipes.

The problem was that their recipe called for an ingredient called "meringue powder" which is an obscure ingredient typically only found in commercial kitchens, and it's offensively expensive. Sure, their website will be happy to sell you a small quantity, enough to make about 4 big skulls, for around $10. Maybe that's a bargain if you only want to make 4 skulls (which, with your $15 mold and $10 meringue powder, plus shipping, is going to make your skulls cost around $9-$10 per skull once you buy the rest of the ingredients). I can't afford that for 40 skulls.

But their recipe specifically states, "This recipe will not work if you leave out the meringue powder, the skulls will fall apart." And it was the ONLY recipe I could find on the net that looked legitimate.

"Surely," I thought, "those little grandmas in Oaxaca aren't pulling out their tin of ultra-expensive imported meringue powder when it's time to make calaveras."

Knowing that meringue powder is basically powdered eggs whites, I figured...why not just try using egg whites to help cement the sugar together, and maybe bake the skulls at a low temperature to speed the setting and drying process?"

An experiment proceeded to unfold. And I got it right with the first try! So if you can find yourself a sugar skull mold, here's how to make perfect calaveras without meringue powder:

6 cups sugar

2 egg whites

That's it folks. Put the egg whites in the bottom of a big bowl, dump in the granulated sugar, and get your hands all messy squeezing and churning it together until the sugar feels like wet sand at the beach. You want the sugar to be as dry as possible but still stick together in the mold, but it's better for it to be too damp than too dry.



Take a handful, dump it into your skull mold and press it down, and continue until the mold is full. Make certain that you press VERY firmly so the sugar is packed hard into the skull.




Then rake a knife or straight edge across the back of the mold to give yourself a flat edge for the bottom of the skull.


Then take a spoon and scoop out a little sugar from the center of the back of the skull so that you don't waste sugar and so the skull doesn't weigh too much.


Make sure the walls of the skull will be at least 1" thick when you dump it out of the mold, or it may collapse on itself.



Then take a square of cardboard just a little larger than your skull, place it against the back of the mold, and flip the mold over.



Gently pull the mold up off the sugar and you'll have a perfect replica of a skull staring back at you.



The mold should come off easily. If it is hard to pull off, your sugar is too wet and you need to add an extra handful to the bowl and work it in well with your hands. The mold should pull off easily leaving a smooth, perfect replica, and the drier the sugar is, the better this will happen.



Rinse the mold between each skull and dry with a paper towel. Continue making skulls with more sugar and more cardboard squares until you have all your skulls formed.

Then, very carefully, place your skulls inside a preheated 200F oven for 30 minutes. When you remove them, the surface will be very hard to the touch. But don't put too much stress on them yet...they need a week of drying before they'll be hard enough all the way through to handle vigorously.

Google "sugar skulls" or "calaveras" to see pictures of how the skulls are decorated. Traditionally, the name of the person receiving the skull is written on a piece of colored foil which is placed across the skull's forehead, and then the rest of the skull is decorated with brightly colored icing. You can get tubes of premixed icing at the grocery store which work just fine, or make your own by using lots of powdered sugar, an egg white, a few tablespoons of corn starch, food coloring, and a few drops of water. Stir it until it's thick, then stuff it into a decorating bag. If you don't have a decorating bag, make a cone of wax paper, parchment paper, or just plain paper, fill the cone with icing, and cut a tiny bit off the tip of the cone. Fold the top paper down until you can squeeze the icing out of the tip you just cut.

Use the icing to decorate the skulls, which can be done as soon as they come out of the oven and cool. Then let the skulls, icing and all, dry for a week and you'll have a perfect Mexican sugar skull.



The recipe above will make about 2 complete large skulls. (Molds come with a front and a back. You make them separately and then glue them together with icing. I found it was just as cool to just make the front of the skull, the face, and decorate it so it lies flat on the table and stares up at you.) So the recipe above will make 3-4 large skull faces, but this will vary depending on the size of your mold.

If you make lots of skulls, buy a huge bag of sugar and lots of eggs. I went through 25 pounds of sugar and 18 eggs to make 40 skulls, and only made the front half of the skull.

0 comments
Tags: thoughts

11 Year Old "Baseball Kid"

There's a really fun article on Yahoo! Sports written by 11 year old Will Jauss. Of course, one of the other nice things about being the son of a major league coach is that when you write an essay about something, there's a chance a major new outlet might run it. This never happened to me as a kid.
One of the fun things I did last summer was spend time in the outfield shagging fly balls during batting practice. I had a lot of fun talking to J.D. Drew, who now is with the Boston Red Sox, while waiting for fly balls. When a ball would come my way I would try to make a diving catch unless it was coming directly to me. I was able to shag fly balls in places like Arizona, New York and Colorado, but the one thing that remained the same in every stadium was that kids and adults in the stands always screamed at me, asking for baseballs.In the clubhouse, I liked to do surveys with the players, asking them to vote for their favorite things. Two of the surveys I did were, "Who's better, David Ortiz or Albert Pujols?" and, "What's better, Dr. Pepper or root beer?" Pujols and Dr. Pepper won. I was rooting for David Ortiz and root beer.
0 comments
Tags: dave

Read Buffer performance hit

I had some fun yesterday with some odd performance problems. So I did a run with oprofile and got this:


561612   25.0417  /lib64/tls/libc-2.3.4.so memset

429457   19.1491  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux clear_page

214268    9.5540  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux do_page_fault

144293    6.4339  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux do_no_page

94410     4.2097  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux buffered_rmqueue

64998     2.8982  /lib64/tls/libc-2.3.4.so memcpy

59565     2.6559  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux __down_read_trylock

59369     2.6472  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux handle_mm_fault

47312     2.1096  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux free_hot_cold_page

39161     1.7462  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux release_pages

39140     1.7452  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux unmap_vmas

27200     1.2128  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux __alloc_pages

21520     0.9596  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux
__pagevec_lru_add_active

20772     0.9262  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux page_add_anon_rmap

19852     0.8852  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux page_remove_rmap

16424     0.7323  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux bad_range

11993     0.5348  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux __might_sleep

Which seemed to me like an awful lot of page faults, especially on a system that wasn't
swapping at all.

Alexander Rubin and I got to talking about it, and I learned a few new things. The first thing is that mmap() appears as page_faults, because the
machinery for doing mmap() and for doing swap is actually the same. Fun.

Back to the problem at hand... the following was in the my.cnf:

read_buffer=5M

As I understand it, if read_buffer set to over 256K, it uses mmap() instead of malloc() for memory
allocation. Actually - this is a libc malloc thing and is tunable, but defaults to 256k. From the manual:
Each thread that does a sequential scan allocates a buffer of this size (in bytes) for each table it scans.
In this case, the server is pretty much handling click logging, so all of the queries are pure inserts. Why then would the read buffer get used at all?

Well, it just so happens that this is a PHP app and is not using any sort of persistent connections, so the app is connecting and disconnecting 60 - 100 times a second. Each of those connections is going to have to authenticate against (at least) the mysql.user table. On the other hand, that _should_ be cached, so it shouldn't be a problem. However, lowering the read buffer is quite easy ... and it'll be interesting.

So, theory to the fire - I reduced read_buffer to 128k (the default) and then got this output from oprofile:


2220     15.7760  /lib64/tls/libc-2.3.4.so memset

785       5.5785  /lib64/tls/libc-2.3.4.so memcpy

608       4.3206  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux thread_return

398       2.8283  /usr/libexec/mysqld      yyparse(void*)

337       2.3948  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux system_call

234       1.6629  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux do_gettimeoffset_hpet

197       1.3999  /lib64/tls/libc-2.3.4.so _int_malloc

183       1.3005  /lib64/tls/libpthread-2.3.4.so pthread_mutex_lock

181       1.2862  /lib64/tls/libpthread-2.3.4.so pthread_mutex_unlock

181       1.2862  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux clear_page

176       1.2507  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux wake_futex

143       1.0162  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux sys_tgkill

138       0.9807  /usr/libexec/mysqld      yylex(void*, void*)

130       0.9238  /usr/libexec/mysqld      update_sys_var_str(sys_var_str*, _pthread_rwlock_t*, set_var*)

126       0.8954  /jbd                     (no symbols)

123       0.8741  /usr/libexec/mysqld      my_strntoul_ucs2

106       0.7533  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux __might_sleep

106       0.7533  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux do_futex

104       0.7391  /usr/lib/debug/lib/modules/2.6.9-34.ELsmp/vmlinux tcp_recvmsg


Which is more what we would expect.

The results on the system as a whole were that with read buffer set to 5M, extra 3-5% usr and 6-12% sys cpu time taken on an 8 cpu box (as reported by top) or, to look at it another way, about 100% of a single CPU taken by mysqld.

With read_buffer reduced to 128k, the CPU usage dropped to just about nothing.
0 comments
Tags: code db