Hello Again, Zend Certified Engineer!

June 12th, 2007

Last year, I tested and passed the Zend PHP 4 certification. Once again, I have overcome great adversity and climbed the highest figurative mountains in order to qualify and quantify my bountiful PHP skills.

Ladies and gentlemen, I would like to announce my acceptance of Zend Certified Engineer: PHP 5.

Tune in this time next year for my PHP 6 hat trick.

The Science of Luck

June 2nd, 2007

I’ve heard a lot of people claim not to believe in luck. Allow me to demonstrate that this belief, while psychologically satisfying to some, is tantamount to disbelief in Pi or milkshakes.

Luck is not some sort of ethereal faith-based system of wish-granting priority. Luck is the result of a simple calculation and luckiness is the sum of a series of luck calculations.

The Formula


Luck = Benefit / sqrt(Probability)

The basic unit of luck measurement is under some debate, but for our discussion, we will refer to the unit as Л or “El.”

You can see the formula in action with my online luck calculator.

Benefit:

A numeric value with min and max centered about 0 and range set to an arbitrary scale (ex.: winning a free bagel = 0.8 and getting a lethal papercut on the giant novelty check handed to you by Ed McMahon = -99). For our purposes, the benefit scale ranges from -100 to 100, inclusive.

Note: The benefit value is subjectively determined value on a scale where -100 is the worst possible, 0 is neutral, and 100 is the best possible outcome. Refer to table 1a for some examples.

Probability:

A ratio of the number of times an event will happen over a number of attempts. This value will always range from zero to one, inclusive.

Formula In Action

Assuming your assessed benefit value of finding a $20 on the street is 5 and the odds of doing so are 1:400 (1/400 = 0.0025 = 0.25%), the formula would work out like this:
Л = 5/sqrt(0.0025)
Л = 5/0.05
Л = 200

Homework

Everyone loves story problems, so here’s one for you:
Lucy values her life more than anything in the world except for that of Mr. Turtle, her cat. She places the benefit of losing her life at -99. After a friend of a friend perished in a tragic futon accident, Lucy found out that the odds of such a thing happening to her are 1:4,473. Aside from the toilet, Lucy owns no furniture with a seat or table top higher than 18 inches because she feels this will ensure her safety. However, a fateful visit to Sears nullifies all of her protective efforts as she trips over a footstool and suffers a fatal concussion.

Calculate the Л for Lucy’s untimely death. Show your work.
Hint: Surprisingly, the value is negative.

Luck Calculator

Use this simple tool to quantify the luck for a particular event.


Benefit (range: -100 to 100)

 

Probability (range: 0 to 1)

 

Л:

 
Table 1a.: Example relative benefits

Event Benefit
Senseless death -100
Identity stolen -50
Broken tailbone -25
Fender bender -10
Goldfish dies -5
Paper cut -1
It’s Thursday the 12th 0
Two toys in your happy meal 1
Flowers from an admirer 5
No cavities 10
No red lights for a whole day 25
Bowl a 300 50
Save Oprah’s life 100

Joost Invite Spooler

May 13th, 2007

There was once a time when having a Gmail account made you part of an exclusive, trendy club among some subcultures. Having Gmail invites at that time made you even more popular. During those days, I ran a Gmail invite spooler that distributed over 1.2 million invites, making it the most popular Gmail invite service. Two years after pulling the plug, it is still the 4th most popular non-Google Inc. search result for the word Gmail.

Over the past few months, I’ve been asked several times to set up a similar service for Joost. After much procrastination, I’m now dusting off the invite spooler service, giving it a new face, and adapting it for Joost and other invite services.

This is where I need your help. I’ll need at least one invite in order to test the updated tool. If you have a joost account and have invites to share, please send an email to joostinvite@isnoop.net.

Redfin Turns 4.0

April 27th, 2007

Congratulations to Redfin on their big 4.0 release yesterday. They have updated their look, added a new logo, made the maps expand with your screen size, and added several other new features that housing shoppers will enjoy.

Best of all, they spent plenty of time in QA to make sure there were no big bugs or undue downtime in the transition.

Now, if only their backend was in PHP instead of Java.

Lessons Learned House Hunting in Seattle

April 16th, 2007

House Graphic

Right now is a tedious time to be trading Seattle real estate. While the nation at large is experiencing a deflation in housing values, the Seattle market is stubbornly fluctuating between plateau and boom days.

A large number of properties are going unsold for 90+ days [zillow.com] while others are subject to irrational bidding wars. Part of me wants to sit it all out for another six to twelve months, but my better half insists that we need a house.

And so, we are in the market for a house.

House #1 was an estate sale for a beautiful, large fixer-upper with an entirely unfinished basement and asbestos throughout. Not afraid of building a little sweat equity, we placed a very attractive no-strings-attached offer slightly over the asking price of $350K.

We tried very hard not to get wrapped up, but being the first house we’d made an offer on, it was difficult not to get emotionally invested. It attracted a lot of attention including two offers that ended up beating ours, both with automatic re-bid triggers that pushed the final cost to well over $400,000.

In the end, the most stressful part was waiting for that call from our agent, but we were certainly disappointed when word came that it wasn’t meant to be. Perhaps I shouldn’t have spent all of those hours making a detailed scale Google Sketchup diagram of the entire house.

The buzz was that some of the other bidders had family ties to the house, so I imagine their own emotional attachment added considerably to what they were willing to spend.

Lesson learned: Remember not to lose your head over the first house you fall in love with. Better yet, don’t fall in love with a house if you can avoid it. Best of all, stay away from family affairs if at all possible.

House #2 was FSBO (for sale by owner). While outside of our primary search area, it had a nice location that made it worth considering the extended commute. Not wanting to be consumed in a bidding war like the one we’d just witnessed, I did an extensive amount of number crunching to find the true market value of this house.

Just looking at the raw numbers for the neighborhood, a house of its stats is valued at $315K-$325K. Excluding the outliers on both ends brought the house down a couple thousand, but in real estate it may be best to leave that data in since those are your neighbors, after all.

The killer feature that this house has which few of its neighbors could claim was the wilderness reserve directly across the street. I factored that in at a $20K bonus to the property value. That bonus brought the estimated value right in line with the more contextual housing valuations such as Zillow and an appreciation-adjusted comparison of the houses on the same block that have sold in the past year.

Unfortunately, the house turned out to be FSBSO (for sale by sentimental owner) and they had been given advice by someone that the house was worth $365,000; 75% more per square foot than even the nicest of their close neighbors. Perhaps self-conscious of the high price, they even misrepresented number of bedrooms and square footage.

The owner was quite galled when our agent presented the initial offer of 9% less than the asking price. In fact, this FSBO wrote off the possibility of a counter offer until I called them directly to discuss the situation. Still quite ruffled, they agreed to counter, but only after flat refusing to pay the buyer’s agent’s fee at any price.

The sad part is that this house may have quickly fetched a similarly inflated price a year ago, but I believe that more buyers are getting wise to the fact that they could buy a larger condo near downtown Seattle or a little mansion in the midwest for similar money. 2007 may shape up to be the year of the self-informed house buyer due to the online revolution in market information.

With any luck, this mixed-up market may yet produce a buyer who doesn’t do due diligence and pays full asking price just because they love the house. Then again, this un-motivated seller may still be living there months or years from now when it finally appreciates to the price they want. This person has very little to lose by just waiting until the right buyer comes along.

Lesson learned: Some FSBO sellers don’t want to know what their house home is really worth. They certainly don’t think you’re doing them any favors by butting in with your know-it-all offers. Don’t let yourself think you can convince them otherwise. Don’t let any of that stop you from trying.

Photo credit: Lance McCord

Drobo “Storage Robot” vs ReadyNas NV+

April 11th, 2007

The new Data Robotics Drobo is a very tempting new offering to the expandable storage market; a segment appealing both to home users and small business.

For $699, this desktop redundant storage box offers four hot-swappable SATA drive slots that are automatically managed by the device. Simply plug it into your computer’s USB 2.0 port and it appears as one large storage device. There is no need for management or hassle. Lights on the front of the box indicate device capacity and when its time to add or replace drives.

The Infrant ReadyNAS NV+ is arguably a different beast, but priced at $649 and covering a lot of the same territory as the Drobo, it is a valid competitor.

Infrant’s ReadyNas NV+ offers most of the basic features of the Drobo, with the huge added benefit of NAS (network attached storage) capabilities. However, the Drobo has one killer feature not offered by the NV+:

Both devices offer hot-swappable drive support, but the Drobo offers much more flexibility when dealing with drives of different sizes. If you have four drives in your NV+, the protected capacity is essentially the smallest drive size times three. The Drobo employs a more intelligent redundancy system that employs a dynamic combination of mirroring and parity to deliver more usable space when working with drives of different sizes.

This means that where 2×250GB + 2×500GB in the NV+ would yield about 750GB of protected storage whereas the Drobo would get you about 929 GB, according to their interactive capacity tester.

A bit of fact checking revealed that the Drobo is in fact slightly larger than the NV+ and does indeed employ a cooling fan. However, like the NV+, the fan is temperature controlled. No word yet on the noise level.

The Drobo appears to fall down when it comes to other features. The NV+ costs just a bit more but offers full NAS (AFP, SMB, WebDAV, FTP, rsync and more), media serving, and several modes of security.

Drobo’s 100% hands-free management can be a boon, but the added flexibility afforded by the NV+ web-based control panel is very useful if you need any features beyond USB storage.

Conclusion
Data Robotics’ Drobo offers great value if your goal is to eek out as much usable space as possible from an array of drives varying in size. It is also ideal if all you need is a USB backup solution and you don’t want to spend any time configuring it.

However, its lower cost and much wider feature set make the NV+ a more attractive option for power users and networked environments.

If the Drobo isn’t your cup of tea right now, I’d suggest keeping your eye on Data Robotics. If their first product is any indication, their inevitable NAS product ought to be a formidable contender for the home & small office storage crown.

Superdouche Your CSS

January 18th, 2007

After just one or two revisions, your site’s CSS can get pretty cluttered with redundant content and inconsistent formatting. I’ve written a simple tool called the CSS Superdouche that programmatically rewrites your CSS, removing all superfluous elements and reformatting it in an attractive manner.

The CSS Superdouche is capable of streamlining already highly optimized CSS. It attempts to detect whitespace-stripped code and, if necessary to shrink file size, it will do the same.

Check out the CSS Superdouche

Resolution Comparison Video: From SD to 1080p

January 17th, 2007

It seems that many people are in the market for an HDTV right now. With the Super Bowl fast approaching and the holiday splurges fading from memory, the lure of that new TV is hard to resist.

There are a lot of decisions to be made when choosing an HDTV. Do you want Plasma or LCD? Direct view or rear projection? How many inches? And then there’s the thousand-dollar question:
What resolution do you really need?

Of course, almost everyone would take the very best solution they can manage. However, you can save yourself a considerable amount of money if you realize that you can’t see or dont’ care about the difference between 720p and 1080p. That knowledge could mean a difference of $1,500 or more for the same size television.

I have found composed a resolution comparison demo video help illustrate the differences between the different television resolutions. The source file is a 1080p clip made by Red Digital Cinema with their jaw-dropping Red One (2540p @60fps native) camera.

The video is 1920×1080, silent, and composed of several sections:
SD (standard definition)
ED (enhanced definition)
720p
1080p

In the full-length comparison, each of the reduced resolutions is demonstrated in two ways. First, it is displayed in native resolution to demonstrate the original pixel dimensions of the clip. Next it plays again in fullscreen to simulate the picture quality of a television of a fixed size stretching the indicated resolution to cover.


(Click here for a full-resolution screen capture)

The comparison ends with a fullscreen side-by-side comparison with 1080p, 720p, and 480p bars of the same film striped across the screen. This side-by-side segment is also available by itself in a separate download.

Most computer screens aren’t as big as 1920×1080. If your screen is not that big, I suggest watching the video at 100% zoom so the pixels aren’t distorted.

Download Torrents Here

There are two versions of the HD resolution comparisons available:
Torrent full comparison video. (232MB)

Torrent side-by-side comparison only. (50MB)

WiiSaber: A Wii, Mac, and Lightsaber Sandwich

December 7th, 2006

You might recall an application I wrote earlier this year called MacSaber. If so, my new Cocoa application should be quite familiar.

Hiroaky just released a handy bit of code that adapts the Nintendo Wii’s “WiiMote” wireless controllers for use on the Mac. I have taken his idea and merged it with the magic that made MacSaber to bring you a new breed of audio Lightsaber simulator.

This application looks and works just like MacSaber, but the input device is the WiiMote instead of your Apple laptop. I plan on adding more features including more visual response and multi-controller capabilities soon, so check back again later.

Download WiiSaber 1.0 Beta 1 Here

Music Just Sounds Better With Mac

December 6th, 2006

I work in a large corner office with a beautiful view of Seattle’s Lake Union with frequent breathtaking views of Mount Rainier just to the side of downtown. The hitch is that I share it with three other developers.

On top of the general noise four people make while coding, there is a constant stream of visitors who come to make unceasing mouth noises. Of course, all this stray conversation makes productivity difficult, especially when your job relies heavily on mental focus.

In order to improve my concentration in the face of such adversity, I purchased a pair of AKG K271 circumaural headphones which promised to cut the noise in polyphonic style.

All of their claims are true. These new headphones are like magic genies singing ultraphonic renditions of all of my favorite songs right into my brain all while silencing the crazy world around me.

I typically work with a Windows XP machine as my primary machine and my personal MacBook Pro off to the side as a secondary tool. I had just burned some MP3s to CD on my Mac and was testing them on the PC when I noticed the audio had lost some of its vibrance.

I returned the CD to the Mac to verify and the music did indeed sound much better. Even after turning off EQs and matching volume levels, the audio quality was notably better when comparing the same song back to back.

I suspect that Apple is using some subtle 3D sound enhancements that my poor Dell workstation’s corporate class sound card simply can’t compete with. Many PC sound cards, even generic varieties, come with this feature, but I simply don’t have the hardware to make that comparison.

So, for now, I’ll just have to conclude that music just sounds better with Mac.