Archive for the 'Rants' Category

A Letter to an Aspiring PHP Programmer

Monday, August 6th, 2007

Below is an email I got through Zend’s certified engineer website. The questions posed by the writer below are not uncommon, so I have posted his letter and my response for general consumption.

Hi,

I am an aspiring PHP programmer. I need some advice from the right people like you before taking a plunge into PHP. I know to know what the future holds for PHP in the web development sector. Why is there more demand for ASP.net or Java than PHP when PHP is the best option available for web development. I have heard that PHP professionals are some of the least paid people in the industry, is this true? why should I not go for ASP.NET or Java as compared to PHP? I know it all comes to one’s interest but knowing a stable path for career is also essential. Please help me and my many other colleagues who want to join the PHP community. Your kind help would be highly a appreciated. Please be frank to give your advice.

–Vibhor S.

Vibhor,

Thanks for your email. From my point of view, I am inclined to
believe that PHP is actually in higher demand than ASP or Java.
However, the latter two are likely to be more common for large
companies. I believe this is mostly the result of corporate decision
making and the antiquated belief that PHP is not enterprise class.
Companies like Facebook, Flickr, and Digg are rapidly dispelling that
myth.

The roots of the enterprise class myth also help to explain the
question of compensation. PHP started off as a hobbyist’s language.
From there, it became the de facto scripting language for low-cost web
hosts. As a result, a lot of personal and small business websites
sprung up with PHP as a back end. Lacking the project and budget size
of medium and large companies, most jobs available to PHP developers
were (and perhaps continue to be) for less pay. This is not to say
that there are not good paying PHP jobs available. I live in Seattle
and am one of a group of 6 PHP developers for a medium sized company.
I believe we are competitively compensated compared to the industry at
large.

The other part of the compensation problem might have to do with the
experience curve of PHP programmers. I have seen many developer
resumes and the large majority of people who claim to be PHP experts
are in fact novices or even beginners. PHP is a very simple language
to learn and become comfortable with, but that comfort is not the same
as knowing (and using) best practices, OOP, or even PHP5. Many PHP
developers haven’t had any experience working in a collaborative
environment and, frankly, may not be suitable for full-time work in a
group of developers.

On the question of why one should choose PHP over ASP.NET or Java, I
cannot answer. I chose PHP as my language of choice for personal and perhaps arbitrary reasons. I like that it is open source, works best on *NIX
systems, is in active development, offers a tool for just about any
job, and has a wide and varied user base. It also helps that the
language happens to have a sustainable number of companies offering
full-time work for PHP developers.

One might just as well choose Java, ASP.NET, Ruby, Python, Perl, C++,
or any other popular web language for their own set of reasons.
You’ll find ample work with any of these under your belt. Some might
have a brighter future than others, but you’ll still find COBOL
programmers out there making pretty good money despite the dwindling
need for their chosen skills.

I hope this helps. Good luck with your programming.

–Ian

The Science of Luck

Saturday, 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

Lessons Learned House Hunting in Seattle

Monday, 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

Music Just Sounds Better With Mac

Wednesday, 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.

Dimmable CFLs: Not Ready for the Spotlight?

Tuesday, November 14th, 2006

Every light fixture in my home, with the exception of those in the bathroom, is on a dimmer circuit. I’m not sure who’s idea it was, but it is kinda nice if you want to set a romantic mood by the coat closet.

Most CFL (Compact FLuorescent) bulbs come with a warning indicating that they should not be used in dimmer circuits, among other things. Always interested in saving a watt or two, I’ve kept my eyes open for dimmer-compatible CFL bulbs every time I visit the lighting section of my local hardware store.

On my most recent trip, I found and purchased two 26W (100W equivalent) dimmable CFLs at the dandy price of $10 each. I installed them a week ago tonight and they worked fantastically. They don’t dim out fully like incandescent bulbs, merely reducing to about 25% brightness at the lowest level, but they produce a pleasant white light and don’t emit any noise.

That is, until tonight.

After one full week of regular nightly use, one of the bulbs began to “click” every few minutes. This went on for only a few hours until it clicked one last time, blinked, and then went out for good. As it turns out, I may have gotten a bum bulb and I will exchange it for another to make sure. However, my hopes are fading for this early crop of dimmable CFL bulbs. With a price point around that of 20 incandescent bulbs or 5 similar non-dimmable CFLs, one should expect much better results.

Ah well. As with all new things, one should expect some flaws. I just hope these bulbs won’t burn down my home like this company’s other models were said to. Only time will tell.

Welcome to 2003, Tivo!

Wednesday, November 8th, 2006

My Tivo just shut down while I was watching late-night election coverage. When the machine came back online several minutes later, I was prompted with a notice about the update I’d just received. As it turns out, my Series 2 Tivo now supports WPA security (with Tivo Wireless Network Adapter).

For the sake of those who downgraded their network security due to lack of WPA support on a few lagging devices such as Tivo, I’m very glad they have rolled out this update. After begging Tivo to release this feature, I chose to buy an overpriced wireless access point and hook the Tivo up to that.

Thank you, Tivo, for coming out to support your users’ security, even if it is several years late.

The 30 Year Mortgage Paradox

Thursday, October 19th, 2006

Imagine you were considering your options on a $350,000 traditional home loan. Assuming you have a FICO score of 725 (US average(1)), your interest rate might be 6.259% for a 30-year fixed mortgage(2). At the end of 30 years, you’ll own your home outright for a total cost of about $776K–that’s $427K in interest(3).

By contrast, a 15-year loan will net you a lower interest rate of about 6.011%. Your monthly payments will be a little bit more, but you will own the home in half the time for a total cost of about $532K–only $182K in interest.

Assuming a paltry average annual appreciation rate of 10% (US average since 1980 has been 11.28%(4)), your house would be worth 417% it’s original value after 15 years. That $350K house would sell for about $1.5 million. Assuming you sold it and put the cash towards a bigger home costing $1.85M, taking out a new $350K loan to cover the remainder, you would only pay another $182K in interest in the second 15 years. Sell that house after another 15 years of 10% appreciation and you bank $7.7 million dollars. By comparison, the original house would sell for $6.1M in 30 years.

The net effect of the two fifteen year mortgages is living in a much better home for half the time and only paying a grand total of $364,000 in interest while neting about $1.6M more in value after 30 years. That’s quite a difference! You might be wondering why anybody would opt for a 30 year home loan.

On the other hand, you might have figured out that the 30 year $350K mortgage with its lower payments might be the most you can afford each month; that in order to make that same payment amount on a 15 year loan, you can only borrow $255K(5).

Well, that stinks. In the Seattle area, that’s 14.5% fewer houses in your price range and 20% less square footage in those you can afford (worse still if you want the same number of rooms)(6). However, it’s not all bad news. If you’re willing to go the 15/15 route, your second home would be worth $434K in today’s housing dollars(7), giving you 41% more selection and 22% more space than the 30 year home.

So what’s a buyer to do?

I suggest you start any home buying process by getting a pre-approval for a 15 year loan (higher payments, shorter term). Then, shop the market and see if you can find anything that will fit your needs for the foreseeable future. If you find a house you can call home, snatch it up and start building more equity at a faster pace. If you exhaust the market and can’t find the amount of house you need on your 15-year budget, go back to your loan agent and have them recalculate your pre-approval for a 30 year loan and resume your search.

If must choose the traditional 30 year loan, there is no need to fret. Your needs and budget simply lie in the margin between price ranges of these two loan types. Most of the home buyers out there fall into this range and the seem to be quite happy with it.

If you find you can fill your needs in a 15 year loan, congratulations; you are able to live well within your means and you will eventually reap considerable benefits from your good budgeteering.

References
#1 wikipedia.com - FICO info
#2 myfico.com - FICO/loan rate calculator
#3 moneychimp.com - Compound interest calculator
#4 ofheo.gov - US historical housing appreciation data
#5 equifax.com - Financial calculators
#6 redfin.com - House value mapping
#7 bls.gov - US historical inflation data

Are Audiophiles Really This Dumb?

Sunday, August 27th, 2006

According to their website, TRI-CELL ENTERPRISES is a leading distributor of high quality electronics geared toward the true audiophile market. They have an interesting range of very high-end electronics and accessories for those with the most exquisite musical tastes.

Okay, fine. Let’s look at some of their products:

High-end Amplifiers:

Seems reasonable. Probably could use a power cleaner to go with it.

 
Quality subs

Nice, nice. Very nice.

 
Top-notch turntables

I have heard that vinyl is one of the best means of reproducing audio. Or something.

 
Magical cones that magically make your music better via means of magic

Wait, what?

 
50LB, 3 Motor, Full Suspension System Mounted Turntable

Okay, now they’re getting out of hand.

 
Cable Supports

Cable lifts/dampeners? Are the shock waves of the Persian cat crossing your sound dampening shag rug really that detrimental to your Journey LP?

 
The “Analog Disk” and “HRS Nimbus” will rescue you from harmful analog interference.

Placing checkers on top of your records and under the feet of your turntable is just so obvious. Why didn’t I think of it?

 
Shakti Electromagnetic Stabilizer

If only I got a nickel for every time I wished I had a hunk of very expensive metal to place on top of each of my electronic components in order to dampen the electromagnetic interference…

 
SpJ and La Luce CS Centoventi


I understand that having a heavy turntable makes for better playback, what with inertial stability and all. However, a 100lb Plexiglass, steel edge weighted turntable is nearly as much overkill as a diesel engine smoothie machine.

 
So, seriously… This site displays a decent array of wholly reasonable products, but there is a disturbingly large number of mindless audio toys that seem to be more snake oil than sound-worthy. Can anyone dispel my misgivings on products such as the Shakti, or perhaps just confirm that the most hard-core audiophiles really are this dumb?

KILL THE CAPS LOCK

Wednesday, August 16th, 2006

CAPSoff has embarked on a crusade to eliminate the Caps Lock key from standard keyboards. I have used applications such as Toggler for Windows for years to automatically control the Caps Lock key, but the idea of eliminating it altogether seems fairly reasonable. It is true that it causes more headaches than it prevents for most people.

If not eliminated, I would strongly advocate popular operating systems adding an option to delay toggling the Caps Lock key on until it is held for a few seconds. Several applications already include a “smart caps” feature that automatically turns off caps if you begin a sentence holding down the shift key and then type several more letters without it, as you would if you didn’t mean to turn on caps. Enabling these features system wide would prevent the most common problem of inadvertent caps typing.

Another solution would be to remove the Caps Lock key and make a new convention of pressing both shift keys at the same time to trigger lock-shift. It may seem obscure, but Ctrl+Alt+Del was also obscure to you at one time as well.

See: http://capsoff.blogspot.com/

Hey, I Said Don’t Click My Ads!

Tuesday, August 8th, 2006


Once again, I have irritated the giant that is Google. It seems that I just can’t get on their good side. I just got this email from Scott in Google’s AdSense team:

Hello Ian,

While reviewing your account, we noticed that you are currently displaying Google ads in a manner that is not compliant with our policies. For instance, we found violations of AdSense policies on pages such as dontclickmyads.com.

Publishers are not permitted to bring unnatural attention to the ads on their sites in any way. We found that the site’s URL and page content directs unnatural attention to these ads.

As a result, we have disabled ad serving to the site.

Your AdSense account remains active. However, we strongly suggest that you take the time to review our program policies (https://www.google.com/adsense/policies) to ensure that all of your remaining pages are in compliance.

Please note that we may disable your account if further violations are found in the future.

Sincerely,

Scott
The Google AdSense Team

As it turns out, the website that I made in jest and then promptly forgot about after a prior AdSense policy reminder has once again gotten me in hot (or at least luke warm) water with Google.

I’m not out to fleece Google by funneling mass traffic to that one-joke site. I’m not even out to make a particularly bold statement about being kept down by the Google man. It sure would be nice if they got the joke, though. I doubt anyone made or lost much money off of the 108 visits I’ve had so far this month. Especially so considering two of the top four user agents were googlebot.

Oh well, I’ll just switch to AdBrite. It doesn’t matter that I’ll earn less per click. A lower percentage of zero doesn’t affect my bottom line much.

Just for the record, I do not condone any clicking of my ads. Don’t click them, don’t click near them, don’t look at them, and don’t think about them. I don’t even have ads!

So there.