Join Kiva for a Developer Drink-up

Image:Kiva.org logo.svg

Halle is interning at Kiva, which, given her personality, I figure is her dream internship.

Kiva is a microfinance site for the poor that allows anyone to give flat-rate microloans via PayPal. As a coincidence of the “I seem to have a lot of cash” and my New Year’s resolution to be a more responsible person, I’ve recently started to put a tiny fraction of my income into Kiva. You can view my lender page here to see that I currently participate in 17 microloans.

I mention all this because Kiva will be sponsoring a Developers Happy Hour this Thursday at their headquarters in San Francisco. Considering I give 5% of my money lent back to Kiva, I’m going for the drinks. 🙂

(Find out more about the concept from Muhammad Yunus’s Nobel lecture, the FrontLine program on social entrepreurship, conservative columnist Nicholas Kristof’s editorial in the New York Times, and the books Banker To the Poor, and Creating a World Without Poverty.)

Continue reading about Moneywatch.com after the jump

Web development as torture

Apparently one commenter found my April Fools articleham-handed.”

ham-hand⋅ed
clumsy, inept, or heavy-handed: a ham-handed approach to dealing with people that hurts a lot of feelings.

I’m sorry that some people didn’t realize that an article was meant to show off someone else’s April Fool’s prank. I guess the snippets of code showing the joke, putting it in the “humor” category, and adding the words “april phails phools” to the URL just wasn’t enough for some people 🙁

Next time, in order to prevent hurt feelings, I’ll be sure splay across the top the words: “Look, Phails is an April Fools Joke, Please don’t take it seriously (pretty please?)” in 42-point Charcoal typeface.

On second thought, why bother? 37Signals has me beat in the tact and sensitivity department. Notice how they introduce Ruby on Rails as…

The very definition of integrity

Great moments in Truth in Advertising™ just ask Twitter.

(And when I replied that this was madness, he kicked me into some CAT-5 ethernet cabling with the words, “THIS IS SPARTA!!!”)

(I heard that Web development is so hard that Rasmus had John Yoo write up a torture memo lest any Guantamano detainees put up a website between waterboarding sessions.)

Thank God, that I learned Ruby on Rails so I no longer have to deal with the pain of writing a SQL select.

Always a bigger fish

Alexa revised their ranking system again. Data is now limited to the last six months.

I thought I’d look up my website.

Tagged vs. competitors

Tagged’s traffic (in blue) vs. similar popular social networks: friendster, bebo, and orkut. I got the list of competitors from TradeVibes, excepting Facebook (too large), and Piczo.

As you can see, even in the last six months, we seem to be growing in the face of a declining social networking trend. That’s no surprise. we were the fastest growing social network in the United States last year in all categories (by percentage).

That’s good. But let’s look at the big boys.

Tagged vs. big boys

Tagged vs. the largest social networks. Technically Tagged is larger than hi5 in the U.S. (Nielsen NetRatings: 3rd in users/day, time spent/user, and ad market share). This is worldwide marketshare. Not that I can hold a grudge, hi5 was incubated out of the same offices as Tagged—long before I joined it.

Hmm, not even close (remember the graph is logarithmic). Well, at least with 19 places in the last three months, we’re still growing fast right?

Twitter comes out of nowhere.

What about Twitter? The rank for Twitter is Yesterday: #49; 7 day average: #51, 1 month average: #63, 3 month average: #93, 3 month change: -491(!)

There’s always a bigger fish. Congrats, Twitter. 🙂

setlocale

Small little annoyance we found in the process of internationalizing the site for European locales.

setlocale(LC_ALL, 'es_ES.UTF8'); // Spanish from spain
$a = 1.2;
echo 'hi'.$a;

This prints hi1,2. Take out the first line and it prints hi1.2 as you might expect.

Not a big deal right? Well imagine if that is the index into a cache key of an object? Now when someone from Spain views the page, it thinks those objects aren’t in cache. Big mess ensues.

I noticed that I suggested object versioning to be integers in the documentation, but some of us were using floats and I wasn’t type-checking. Whoops!

Our solution is to only set the locale when rendering output from a template and then setting it back. It’s ugly and I’m a definite fan of using integers only for version numbers in my next life.

Possesives

In a unrelated note, the people at work had a long discussion of how to render possessives when internationalizing. The key in the U.S. is to stop being clever and follow the first rule of the Elements of Style. This way it’s just,

printf(_('%s’s pictures'), htmlspecialchars($display_name));

Hopefully, the long argument I had trying to convince someone to do this will be returned in less neutered quotation marks on the site. I’m not holding my breath.

How much is your millisecond?

At Tagged, I’ve been working on the project for the last month. Basically it allows us to cache dynamic parts of throughout the site and keep the caches from having stale data. Since we call the APIs both externally and internally—over 20 calls to generate a user’s profile page alone—the caching is turned on at the API level.

The initial hit to the system was severe.

Basically, I was causing the profile page to take 30 extra milliseconds to render. The profile page accounts for 17% of all page views on the site where we do about 220 million “views” a day. This 30 milliseconds, believe it or not, was dropping profile page views by 5%. And it took about 20 hours of back and forth before I finally resolved to rewrite the whole thing so that it can be rolled out gradually without any performance hit.

That means I cost the company one and a half million ad impressions. 🙁

The second day’s cached piece is actually measurable on the live site with tools I wrote. I am saving between 17 and 900 milliseconds depending on the state of the backend and load on the server.

Since I can’t measure how much actual page views I’m adding back into the system, I was curious about how much extra server capacity these changes are getting me.

In other words, how much is a millisecond?

Continue reading about Measuring milliseconds after the jump.

My monkey typing resonates

“We’ve all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true.”
—unknown

Chimp typing

Your humble author at work writing this article.

I love to quote people quoting me. I do this by creating a vanity feed— I like to look at it as stalking myself. Skimming my vanity feed last night, I read this:

Terry Chay once said something that resonated with me — one of the few things, actually — and it was something like this: complex > complicated, and that simple does not necessarily mean “not complex”. The point is that you can have a complex implementation that covers many use cases, without the implementation being complicated, and with the API still being relatively simple.
Matthew Weier O’Phinney

Only a few? Geez. I’m (almost) hurt. Next time, I see you, I’m going to call you Matthew O’Phinney.

For reference, here is the talk where Matthew is referring to, along with other previous references.

Since, like Matthew I work on a framework, I thought some of you might find this simple/simplistic complex/complicated distinction resonates with you as you write code.

I can’t claim credit for this idea. It comes from a different monkey, well before the internet:

“Everything should be made as simple as possible, but no simpler.”
Albert Einstein

PHP is a dying language

Friend: http://twitter.com/markscrap/status/1228353533
Me: 10 to 1 whatever kid wrote that is a ruby developer
Friend: haha

I’m just stating the obvious. When the first computer was invented, the legendary Grace Hopper created the first compiled programming language. That language is still around and is still popular today!

Programming languages don’t “die,” they proliferate.

And when a person makes blanket statements like, “PHP is a dying language,” it allows me to a make blanket statement about that person’s programming preferences and maturity.

The difference is, my statement is probably right.

A Net Effect

Zak Greant, who I owe big time because for allowing me to couch surf when I got locked out partying one night in Vancouver, is starting a new Mozilla Foundation program called Net Effects.

The idea is pretty simple. Just record a short snippet of you explaining how the internet has changed your life.

Zak gives a demo of how the internet has changed his life

You can even post it to on this Flickr group.

Join and have at it. 🙂