Clancy Brown

I was watching an episode of Phineas and Ferb, an excellent kids show on Disney. The episode was Phineas and Ferb Get Busted and a prominent character in that episode was the drill sergeant. I recognized his voice, thinking he was maybe Lex Luthor from the DC Animated Universe cartoons and I even thought he sounded like Mr. Kraabs from Spongebob Squarepants.

Well, I was right as the actor playing the drill seargent was Clancy Brown and he played all of those voice roles and a ton more… in addition to countless TV and movie roles. Recall he was the Kurgan in the original Highlander movie?

If you haven’t seen Phineas and Pherb, I highly recommend you introduce your kids to it.

Clancy Brown

Logo Contest Source Code

The source code for my previous post on the TechCon 2011 logo is up at github: https://github.com/NickCody/TechCon2011.

Data URI’s

Inlining images in base64 encoding is a pretty neat trick. Not all that useful in most scenarios, since http connections are most likely all persistent these days and browsers tend to cache image resources. Still, I find this approach interesting when you want to limit the number of files you deliver or you can’t really reference external resources at all.

The basic technique involves two things: encoding your image in base64 format and inlining the resulting string into your img tag. Here is an example:


<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABICAMAAAA+uQBRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABJQTFRF////zMzMmZmZZmZmMzMzAAAA8496aQAABHBJREFUeNrsWNGW6jAIzAD9/1++DCRNWrVtovt2czyuusokMAyEUu4XRIDyV0t0y2Wm6kA/RYIYLbtZEVXbOtQvzoSwqDJ6SkCghmTqn61uPRyjdZfgEYQeav9HvtVNl7du3bq4R7j78xe5ickToJq3wZo7myd4Z96/OglgNYAPyOW7QJkGGCh5SRNnl0lsaBKA+5KRJm9hSF6tJ54kK+ovGdgRZnQarNNrGqC4ucEUYbYjDM0b+tdnAez1Jzgk8ZbO3wFmc0A/7Wn3mR49Oi1tl6njBrfje5vO4u0q+X8AwFS75MDXAB6Ego+pfAKQBa1jlDFq3RXJVgAiykFHRvss9yeAFbWOKHuCQmhLTpw6Asi0FLUohwKIv8AVABNjEUDDPW+yqAP4EU2XAOgaYS3mCYp+OoGYA8xLUQZBUIXHeWkhEz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85RKU/+tl/RNgAMFwGP4bvg4lAAAAAElFTkSuQmCC">

The tag’s src=”data:…” bit is called the Data URI scheme and has been around for a while and is now implemented in most browsers.

The encoding bit is easy and can be done in most frameworks. I spend a lot of time in grails so to do this in groovy you just do this:

f = new File("tcsmall.png")
b = f.readBytes()
b.encodeBase64().toString()

This approach has some overhead. Base64 encoding only uses 62 or 64 characters of a possible 256 in a byte so overall bytes going over the wire will be more. You would normally only use this for very small images.

For the life of me, I don’t know why browsers don’t use this technique when you save web pages locally. My gut says loading the base64 encoded versions from disk is negligible. If browsers used this, they could save an entire image-rich web page into a single html page. Instead, what browsers do is they write a single html file and all image /css resources in a directory alongside the html. References to images are all then re-pointed to the files in this directory. Yuck. Maybe browsers do this specifically so you can have the images as files for easy access. Who knows.

Anyway, I see some browsers (like Chrome) use this feature for things like “file/folder” icons when viewing ftp sites. Unless the browser is using OS native calls to render these directly, it needs to do something if it renders html to display this kind of interface. In the case of Chrome, it uses data uri’s and plain html to show a ftp user interface. I suppose a browser could reference files on your local hard drive, but seeing links in “view source” like: file:///C:/Users/ncodignotto/AppData/Local/Google/Chrome/Application/icons/folder.png, well, that shit just seems wrong.

Logo Contest

My company is holding a logo contest for our upcoming third annual in-house technology convention called Tech Con. Lots of people submitted logos and they were all awesome. My first idea was inspired by circuit boards and how they work words onto the actual circuit. The theme of TechCon this year is “The Big Picture” so this is what I came up with first, in about 10 minutes:
Still, I wanted to try something else. I am not sure why I had the idea for children-style alphabet blocks but I figure I could create something with povray, a ray tracing program that’s been around for a while. I stopped using it when I migrated to the Mac since it’s Mac support is firmly based in PPC land and emulated in Intel-land. Anyway, povray happened to come with a sample scene file which rendered blocks spelling “povray”. I was able to quickly modify this sample and change this to “techcon”. Techcon had the same number of different letters, 6, one for each side of the cube.
The first logo I created was this one:
First of all, if you click on any of these images they expand into a larger version that has a lot more detail. Notice how smooth the shadows are. Earlier versions looked terrible. The shadows are all rough and posterized. I dig into the documentation and found that since the scene used radiosity (where ray tracer takes lit diffuse objects lighting each other up into account), I had to increase a few settings in order to get enough samples to make everything smooth which was more than merely supersampling more.
The next logo compressed things a bit more by stacking the blocks, this was an easy change to some basic translations.
The next version, below, introduces some logic that I had previously disabled in the povray demo scene file I used as a basis for my work. You can see below that there are many more cubes randomly dropped via a trace function collision algorithm written by Greg M. Johnson in 2001. The main enhancement I added to this is a focal blur effect. Notice the blocks in front are in-focus and the ones in back are fuzzy. This is another expensive effect that I had to learn to use effectively. There was yet another setting I needed to bump up to get the cubes to be blurred in a smooth manner.
I even experimented in black, wondering what it would look like. To me, this version mainly looks like puke.
Knowing that the logo may need to be printed on the cover of a faux-moleskine notebook we give out every year, I brought a few of the logos into Photoshop and used the posterize and threshold filters to create a hip black and white version of  the logo.
So, the powerful ray tracers is thus reduced to a fancy way to create a low-fidelity graphic. But it did look cool.  You would not believe how obsessed I was at the creation of this. Rendering hundreds of variations, making tiny adjustments to lighting, camera, and block positions. After a while, I had most of the settings I wanted from a look and feed perspective, so I started experimenting with putting the year in, since it was an annual event:
Next, I incorporated the “Big Picture” into the logo and adjusted the color scheme. Here, the TechCon blocks are a mere annotation to the “Big Picture” cube.
Finally, I submitted my masterpiece. The result of like 30 hours of work. A hip black and white version of the logo that had all of the elements I was playing with and would look good on the front of a notebook.
Sweet, yes?
Guess which logo people liked? Yes, you guessed it. The circuit-board logo I started off with:

Batten down the hatches

Tomorrow, I leave for California with my family. Today, I battened down the hatches in preparation for hurricane Irene. The brilliant sunshine of the day was a bit ominous as the storm heads up the East coast. While the storm has just been downgraded, it still represents a bit of risk to my home since I won’t be here to address any issues should they come up. I took the day off to pack and it turns out that I was quite a bit busier than I expected.

Moving all possible projectiles into my garage was just the start. I emptied my pool a few inches and left the evacuation hose out. If the pool floods, I may be able to have someone turn on the pump to empty it a bit more. I secured my BBQ to our jungle gym. I might even secure the jungle gym to the trees in my backyard. I have a special pump that activates every 60 seconds and turns off after a few seconds if it detects no water. It wasn’t set up right so I set it up properly and ran the hose away from my house. If a tree falls on my house or we lose power then there is not much I can do. Flooding from the excessive rain is my main concern and with the pump set up, there is little more I can do.

The goods news is my mom is going to ride out the storm in my house while I’m away. Her house is more or less in the flood zone so it’s smart to be out of there so you don’t have to evacuate during the storm.

I wish all my NY friends luck this weekend.

Brazillian Jiu Jitsu and Judo

As many of you know, I’ve beent taking Tae Kwon Do since I was about 26 years old… that’s almost 16 years. Tae Kwon Do is a Korean martial art and competitions are almost entirely kicks. In 2000, I got a black belt and in 2005 I got a 2nd degree black belt. I competed in two tournaments, got a gold medal both times, but was never really a complete ass kicker. My technique was very good in some areas and very poor in others. I was always a bit pudgy and my attendance waned over the years. For whatever reason, I hit a wall and was losing interest. Plus, I was doing triathlon training for the past two years and a guy only has so much time in their calendar. I’d like to one day return and get my 4th degree which is a big milestone where you’re considered a master, a title of considerable respect. But for now, me and Tae Kwon Do are taking a break.

In the meantime, I figured I’d try something new. While on a boat trip with my brothers and a few friends, my brother Tom’s friend Ken was talking about Judo. He said it would be an excellent martial art for Marco since if can compliment wrestling rather well. I was intrigued as well so I figure I’d take a couple classes myself and bring Marco in once I’d gotten familiar with the school. As it turns out, Marco has a very busy calendar since Football is keeping him pretty busy, and I’ve only been able to get him to one class. Sera and Antonio also took a class. Everyone liked it and I’m sure I’ll have them al-l going once a week once school starts.

As for me, I’m pretty hooked. Judo is taught on some days and Brazillian Jiu Jitsu on other days. The classes are far more brutal than I’m used to. I’ve been choked, stretched, and contorted in ways I didn’t know were possible. The classes are all over an hour and a half  and I typically stay for almost two hours for open mat. All of the technique is totally new and foreign to me. Its harder. It hurts. The other students are all strong and experienced and I’m basically getting my ass kicked ten times over.

But it’s a lot of fun and I’ve been feeling my flexibility come back and feeling my strength come back. For the past two years, I’ve been doing these crazy triathlons and while the training definitely helped improve my stamina, the training is not something I love to do. It’s not something I look forward to. Right now, I look forward to these classes and  they seem like the right thing for me to be doing right now.

Zachs Bay with Journey and Foreigner

On Wednesday night, my brother Tom took his boat out with me and our older brother and four of my cousins. Our destination? Zachs Bay. The special thing about Zachs Bay is that it’s right outside the Jones Beach Theatre in Wantagh. Tom parked the boat and we had a lot of laughs while listening to Journey and Foreigner songs. We could see the audience pretty clearly,  there were tons of lights shining on them and the music was pretty easily discerned. We saw a nice sunset, just to the right of the Theatre and watch the blood-red moon rise to the east around 9pm. I only had my cell phone on me so I don’t have a good picture of the moonrise.

To relieve ourselves, we peed in a canister about the size of a plastic pretzel barrel. The canister was, by the way, actually a plastic pretzel barrel. We had to do this because the boats that were parked around us were rather close. So we basically got down low, did what we needed to do into the plastic pretzel barrel, and dumped the yellow contents overboard. To be nice, we would wash out the canister (you remember, the plastic pretzel barrel) with sea water. When we did that, we noticed a wonderful glow that happened when we disturbed the water.

What was this?

We were fascinated. So, we went to the back of the boat and began to stir up the water by hand. What we found was a billion billion jelly creatures that glowed when you disturbed them. It was amazing. I thought at first they were jellyfish, but then we caught one in our hands and it didn’t sting. Recall why we were all peeing and you can imagine how we were seeing double rainbows in the water with these little fucking jellies.

Soon after, a group of sea birds (maybe swans) came by to greet us. They waddled along and just started at our boat, floating and waiting patiently. Now, I know you’re not supposed to feed these cute guys (they are actually kind of big and scary-looking) but I wanted to do it anyway. My cousin was like, NO DUDE DON’T DO THAT. I was like, LETS SEE WHAT HAPPENS MAN?! Then he went onto say how the goose would come on board and wreak havok. I can remember wanting to feed them more than ever after hearing that. In the end, it was toward the end of the night and we had EATEN EVERY BIT OF FOOD ON THE BOAT. So there was none left for the geese.

When we got back to Tom’s dock, we ordered a pizza and hung out for a while. We had a lot of laughs that night.

same-shade-on-checkerboard-with-shadow-from-column illusion

Years ago (2005!) I posted a picture that demonstrated probably my favorite optical illusion of all time, the same-shade-on-checkerboard-with-shadow-from-column illusion. Here is that post:

http://www.primordia.com/blog/archives/2005/03/it_cant_be_true.html

Now, someone went and did this in real life. The effect is even more profound and amazing.

Arif’s Adventure

For almost a year, my friend and ex-Liquidnetter Arif Huque has been traveling through Asia snapping photos, blogging, tweeting, and journaling his journey in wondrous detail. I met Arif in 2009 when we went to Rwanda together (some links). To date, Arif has traveled through Kyrgyzstan, Tajikstan, Malaysia, Bangladesh, India, Hong Kong, and now China. He’s posted over 800 journal entries and taken thousands of photos. He’s met with many people on the way, and travels sometimes alone and sometimes in a group. I keep asking him when this trip will come to a close and he keeps telling me, I don’t know. This is simply amazing. I’m terribly jealous, but have resigned to live vicariously through my friend.

You can check out his main blog or subscribe to him on twitter. Below is a sampling of some of his recent images:

Omph1

Mural2Namwu14

 

 

Valley2

Moas1Namwu26

 

Tagongpf2Tibetan4

Cham6Cham24

 

 

Snow4

Burnghat

Begin

Sadhu

 

 

 

 

 

 

 

Ragnar Finish

One of my fellow Ragnar teammates forwarded this great picture from the finish line:

The original link is here.