You can kill the background for speed, if you wish.[x]

Monday, March 30, 2009

Cloudy with a Chance of Fail

I felt the need to deviate from the usual geeky tone of this blog to alert you to a terrible occurrence. Many of you may be familiar with the beloved children's book, "Cloudy with a Chance of Meatballs." Well, they're making a movie of it.
I'm calling for a 98% chance of fail. Probably not financially, because America is stupid. But in every other aspect. For those of you not familiar with the original book, you will probably not understand. But if you have, watch the trailer, if you can bear it:
My response was as follows.
If the trailer is any indication, this movie heartlessly and mercilessly destroys and mangles the soul of a children's book that was and still is and always will be treasured by millions of children, including myself, for what? A cheap, two-bit 3D cheesefest, because Jimmy Neutron has already been done.
Gutting a book of all meaning, spirit, and substance for a bunch of gaudy pictures is hardly new to the movie industry, but rarely is it so perpetrated so thoroughly and shamelessly, to such a beautiful, precious target.
Now, I could be wrong. The movie could turn out okay. The scenes that are lifted straight from the book are decent. All they would have to do to avoid crushing the soul of countless children is cut out the first 75%, turn down the color saturation about 80%, cut out the main character or two, and re-frame the entire premise.

The idea of this movie just makes me sad. And angry. And upset. This book could conceivably be a movie, but it would have to be made carefully and lovingly by the likes of Tim Burton, à la Big Fish, not raped and pillaged for financial gain, because we can do stuff in 3D now.

I think I finally know how readers of V for Vendetta feel, and I apologize for enjoying that movie if it was anywhere nearly as heinous and adaptation as this.

Saturday, March 14, 2009

Pi Cookies, v3.0

For the past three years now (ever since I've been in college), I have made pi cookies in honor of Pi Day, based on the fantastic guide put together by one Joseph Hall for Ubuntu cookies. Today is Pi Day, and also no exception. After pondering fancy ways to make a good, decent pi shape, I decided to just eventually go with a double-T type shape, because the dough wasn't nearly as helpful as I had anticipated. Here are some pictures of the first time, freshman year: This is half of the final log, partway through cutting off the sections. You can see that the double-t design worked fairly well. This is missing the top section so far, but you can see how I made three sections of rectangular blue, and three of white, assembling them in this shape. This is them chopped up and on the sheet, and me eating one of the ends that didn't quite match up. This is what they looked like after baking. A reconizable, if not perfect, Pi.

This year, I went with the same basic plan, but wanted to surround them with an outer circle, and maybe make them a little more pi-like. But I used the same recipe, and same basic plan, but this time took more pictures! After some basic sketching, I determined that I should use approximately 1/4 for the pi, and 3/4 for the outside and filling. I simply divided the dough into quarters in the bowl, and added the color separately. I then put the lumps in the fridge overnight (since I mixed them up at about 1am this morning).
This morning, I divided the pistachio-colored section into three approximately equal parts, one a bit bigger than the rest, to make the legs and head of the pi. I then chopped off three hunks from the large blue part that were about the same size as the pistachio parts, to go in between the two pistachio legs. I rolled each of these into a long rectangles, on separate pieces of wax paper. I threw them into the freezer to re-solidify for a bit, and rolled out the remainder of the blue into a flat section as long as the other sections, and about 3 times as wide, since the diameter will be about twice the width of the sections, and C=pi*D, of course. After putting them in the freezer, I realized that they would make really big cookies, so I decided to cut each section in half lengthwise, flatten them out a bit, and make two logs (I did double the recipe). So for future reference, think about how big the cookies will be before you roll them out. I also decided to try putting little divots in the large section to wrap around the corners of the pi rectangle, so it would be vaguely circular. We'll see hot that works out.

Okay, tip. Actually,

VITAL PIECE OF INFORMATION THAT WILL SAVE YOU HOURS OF FRUSTRATION AND TROUBLE

Yeah, that's better. And it's pretty simple:

Never, under any circumstances, put two layers of cookie dough in the freezer with a piece of wax paper between them. This happens if you stack two wax papered slabs of cookie dough on top of each other. In fact, to make sure that this point is absolutely clear, I've made you a nice little diagram to explain it all: Now, from this diagram, you can learn a few things. Firstly, I have marginal, at best, drawing skills in Inkscape. Secondly, I am a generically caucasian, hairless person who happens to own (and wear for Pi day) a Pi Shirt from ThinkGeek (affiliate disclaimer), and has a fondness for jeans. But mostly, you learned that putting cookie dough on top of itself, with only wax paper to separate it, leads only to trouble and sadness. And that, my friends, is the take-home lesson.

Now that I've let the troubled cookie dough sit out for a while to thaw out for a while, I'll go and try to re-form the slabs that were destroyed by this fact. I'll let you know how it works. After thawing for a while, we re-formed the slabs, froze them, and formed them as planned. All pretty much went well, except that we lost a lot of dough with all the forming and re-forming and such, so we ended up only doing the blue strip between the legs of the pi, and just adding blue around it a little bit. This is what the end result looked like: I sliced sections off of the log, and laid them out on cookie sheets: I then put them in the oven at 375 for about 8 minutes, as directed, and they came out looking pretty good: They actually turned out pretty nicely. You can even see my efforts with the angling down of the left side, and the curving out of the right leg on some of them. Very nice. A piece of advice, however: make sure to use the wax paper. It works a lot better than trying to just put them on the pan. But once you have them all done, pile them on a plate, and celebrate. Here is the end result: Not a bad representation if I do say so myself. Next year, I will make more of the blue to surround the pi, and make sure to make the pis smaller initially, because I didn't end up having enough blue to wrap all the way around - so the divots didn't work out as planned. Overall, however, this was a very successful endeavor. Many thanks to Joseph Hall for the idea, and my girlfriend for assisting in the actual making of the cookies. Happy Pi Day!

Tuesday, March 10, 2009

It's official: I have switched to Linux.

Don't get me wrong. I've been using Linux as the primary (and basically only) OS on my laptop for probably two years now. And for most of that time, I would default to shortcuts like Windows+R to run something in Linux, and then use Alt+F2 when it didn't work. Well, I've been using Gnome-Do as of late, and moreso recently. It is, as the title bar will tell you, crazy delicious. If you're familiar with Launchy or Quicksilver, it's like that, only on steroids. If you use Linux, you must check it out. Anyway, that's beside the point. The point is, on Linux, I now use Windows+Space to do pretty much anything. Today at work, I wanted to call something up, and this is what happened:
Windows+Space
...hmm...dang, that didn't work...
Alt+F2
What? That didn't work either...oh wait.
Windows+R
I'm on Windows. Now what was I going to do? Oh yeah...the run dialog won't do that easily.
Start->Programs->Internet Explorer
There. Now what site was I going to test...
And the whole sequence made me smile. Except that I was testing one of my sites in IE, which shouldn't have to happen. And yes, I'm aware that I could have typed iexplorer in the run dialog, but I'm so used to typing something "Internet Explorer" (or, most likely, "Int") in Gnome-Do that I was in the start menu before I remembered that.

Monday, March 2, 2009

Syntax Highlighting for SPIM in Notepad++

For one of my classes we're working with SPIM, and I wanted my code to print out all nice and pretty, which means syntax highlighting. After a little digging through the docs (and finding the counterintuitively placed "View->User Define Dialog" option), I managed to create a user-defined language for SPIM. You can just copy the text below into your userDefineLang.xml to add it, or if you haven't done any user defined languages yet, just download this userDefineLang.xml from my settings and save it to your Notepad++ directory. This file also includes definitions for Smarty as well, just because I didn't see any reason to strip it out. So if you program in PHP and use Smarty, you get a bonus! If you do PHP and not Smarty, I'd recommend checking it out - it makes my life a lot easier.

P.S. I still can't spell recommend right on the first try for the life of me. Stupid word.


P.P.S. When I realized all the angly brackets would mess with the HTML, I hit upon the idea of using a quick
print htmlentities(file_get_contents("/path/to/file.xml"));
in a
php -a
console to HTMLize it, which worked beautifully. Nice.

P.P.P.S. To stop Blogger from inserting <br/> tags all over the place and messing everything up, I had to set "Convert Line Breaks" to "No" in Settings->Formatting. Just FYI.