Archive for January, 2009

How Funny is “Fart for Free”?

I was stuck in pretty terrible traffic last night, as a result, the 5 mile commute home took well over an hour forty five, during which time, I had to entertain a 15 month old. To pass the time, my daughter and I conducted an experiment: to find out which of the 16 fart noises that come in the iPhone’s “Fart for Free” application is funniest.

Fart for Free

Fart for Free

I can now report the results.

I find fart #6 to be funniest. Each time I listen to it, I continue to laugh, unlike some of the others, which are funny the first time but no longer surprising or funny thereafter. 1 is good, a simple pop, but 6 continues to make everyone laugh.

But the science part of it is thus: will a 15 month old, who doesn’t speak any real English, whose comprehension is limited to just a few short syllables, find any fart funny at all?

The answer is an enthusiastic yes! Jillian found fart #13 to the funniest, if her reaction is to be believed. She did not laugh at all at fart #1, however, she gave a good smile for #6. She cried during farts 10 and 11, which either means she didn’t find the herald blast variety funny or she was fed up with her car seat, but I’m inclined to believe the former, given that 13 led to fantastic laughter.

There you go: the most objective viewpoint, someone who, thus far is ambivalent towards farts as a whole, someone who has no preference for any particular brand of fart humor, someone who has no sense of embarrassment in this arena, a blank slate, totally unmarred by experience or shame laughed hardest at fart #13. Another great human mystery has been solved: the funniest variety of fart sound effect.

Rob Schneider is… The Stapler!

One of my favorite South Park clips.

Thank a Plugin Developer Day

Matt Mullenweg, creator of Wordpress and skipper of Automattic, has declared today, January 28, “Thank a Plugin Developer” Day. In thanks, I will list all of the plugins I use in my firsttube.com Wordpress install.

  • Akismet is a comment filter that uses a “karma” type algorithm to analyze comments and separate ham from spam. According to my internal stats, Akismet reports 37,512 spams caught, 284 legitimate comments, and an overall accuracy rate of 99.934%. Not too shabby. As a result, this site no longer has a captcha.
  • Blip.It iPhone Handler is a neat little tool that creates a method to display embedded flash as Quicktime on-the-fly, ideal for iPhone compatibility.
  • Cache Images, another Mullenweg gem, let me fetch remote images and store them locally. I prefer to host all images locally if possible, so this is fantastic.
  • “ftBlogrollerWP (ft)” is my own modified plugin that creates a page with all of my links, as seen here.
  • Google XML Sitemaps is a tool for creating a sitemap that Google and other search engines can use to spider your site. This would take forever by hand and would be very hard to keep up manually, but this plugin makes it effortless.
  • Limit Login Attempts. No sense in letting someone hammer your Wordpress admin login eternally. Basic security that ought to be part of Wordpress core.
  • Similar Posts is a snazzy little plugin that tries to find similar posts to any given post. I use this on each post’s page. In pre-Wordpress firsttube, I did this by searching for other articles with the same tags. In Wordpress-era ft, I do this via a plugin. Similar Posts requires the Post-Plugin Library.
  • Tangofy is a simple plugin to modify icons in the stock Wordpress admin pages.
  • TTFTitles is a sweet little plugin that creates images from text. I do this on entry titles and sidebar titles. It allows you to add a dimension of professional typography and to use fonts that aren’t in the eight “web safe.”
  • WordPress Database Backup: you’ll never guess what this one does!
  • WordPress Hashcash does the spam filtering in conjunction with Akismet. Whatever Akismet misses, Hashcash catches. Essentially, it catches *everything* Akismet misses and only really reports problems when users have javascript turned off.
  • Wordpress Popular Posts provide me view counts, plain and simple. I used to keep track pre-Wordpress, but sadly, I lost my hit count (many of which were in the thens of thousands of views) and only started again this month. Nonetheless, it’s in the sidebar.
  • wp-cache is a caching program, but I’m not currently using the cache.
  • WP-Lytebox automatically adds a lytebox effect to inline images, which is spectacular.
  • WP-Optimize is a database optimizer that does optimization not only of MySQL overhead, but also removes autosaves and other space wasters from your database.
  • WP-Syntax makes my code pretty, and that’s all.
  • WP iPaper is a plugin for embedding scribd stuff.
  • Lastly, WPtouch iPhone Theme is a stylesheet that makes this site look native on the iPhone. It’s truly a beautiful skin.

That is all. Thank you to all the above developers. As a reward, please accept this pingback!

Wordpress “Press This” 404 Problem

WordPress › Support » Press This 404 issue.

“Press This” hasn’t worked for me for ages.  I am so happy to have it back!

New Look and Feel

If you’re not reading this via RSS, you may have noticed that I’ve completely changed the look and feel of firsttube.com. It’s something I wasn’t expecting to do regularly, but since I’ve moved to Wordpress, this will be my third theme.  The first one lasted only a few days, to be fair, and I settled on the beautiful Librio.  However, I did a lot of customization with Librio, which meant I couldn’t really update the theme, and it was far from 2.7 ready.  On top of that, I hacked up some areas I didn’t like and I was never able to get it just right.  

Fast forward a bit, I’ve gone ahead and modified instantShift’s Christmas theme that was designed for Smashing Magazine.  I am, at least right now, very happy with this theme and I think I’ll stick with it for awhile.  

Today is a new beginning for the US… and a little change is in order.

Good Luck!

I wish people like Rush Limbaugh, Ann Coulter, Joe the Plumber, and Sarah Palin much success. They are the best thing to happen to the Democratic party.

by pintomp3, seen on Digg

Sorting a Multi-Dimensional Array with PHP

Every so often I find myself with a multidimensional array that I want to sort by a value in a sub-array. I have an array that might look like this:

//an array of some songs I like
$songs =  array(
		'1' => array('artist'=>'The Smashing Pumpkins', 'songname'=>'Soma'),
		'2' => array('artist'=>'The Decemberists', 'songname'=>'The Island'),
		'3' => array('artist'=>'Fleetwood Mac', 'songname' =>'Second-hand News')
	);

The problem is thus: I’d like to echo out the songs I like in the format “Songname (Artist),” and I’d like to do it alphabetically by artist. PHP provides many functions for sorting arrays, but none will work here. ksort() will allow me to sort by key, but the keys in the $songs array are irrelevant. asort() allows me to sort and preserves keys, but it will sort $songs by the value of each element, which is also useless, since the value of each is “array()”. usort() is another possible candidate and can do multi-dimensional sorting, but it involves building a callback function and is often pretty long-winded. Even the examples in the PHP docs references specific keys.

So I developed a quick function to sort by the value of a key in a sub-array. Please note this version does a case-insensitive sort. See subval_sort() below.

function subval_sort($a,$subkey) {
	foreach($a as $k=>$v) {
		$b[$k] = strtolower($v[$subkey]);
	}
	asort($b);
	foreach($b as $key=>$val) {
		$c[] = $a[$key];
	}
	return $c;
}

To use it on the above, I would simply type:

$songs = subval_sort($songs,'artist'); 
print_r($songs);

This is what you should expect see:

Array
(
    [0] => Array
        (
            [artist] => Fleetwood Mac
            [song] => Second-hand News
        )
 
    [1] => Array
        (
            [artist] => The Decemberists
            [song] => The Island
        )
 
    [2] => Array
        (
            [artist] => The Smashing Pumpkins
            [song] => Cherub Rock
        )
 
)

The songs, sorted by artist.

iPhone OS 3.0

I haven’t heard much about what to expect in iPhone OS 2.3. A quick Googling of the term, as of today, yields nothing of value, other than speculation. iPhone 2.2 came out in November, almost 2 months ago. Since we haven’t heard anything about 2.3, that leaves just a few possibilities.

First, it’s possible that Apple simply stopped development on the iPhone. I think the likelihood of this is practically null.

The other possibility is that Apple has been working on things, but nothing is ready. In two months, we haven’t heard anything at all – there’s been no SDK update, no betas. That means either they are working slowly, or they are working on things that are taking some time.

Rewind to iPhone OS 2.0. There was supposed to be a “push” mechanism by which applications would report to Apple, and a single iPhone tether to Apple would act as the pusher for all background services. That was delayed until “October” timeframe, and has since been ignored. Or has it?

iPhone OS 3.0My prediction: the next version of the iPhone OS to see light of day will be iPhone OS 3.0. It will feature background notifications via Apple’s push services (which I further suspect will take between 2 and 3 months to work properly). It will feature some sort of tool for better applications management, maybe folders, as the current springboard is inelegant and cannot handle large numbers of applications. It will include copy & paste, if only to shut up the online crowds, but also because it’s necessary for a true smartphone-type device.

I think the biggest changes will be at enterprise level. The fact is, the iPhone is getting a lot of play in executive settings, and I think better management tools and business integration is a mound of cash waiting for Apple. They’ve conquered the home market, everyone I know has a damned 3G now. The business world is ripe for the taking, as Blackberries are so far behind the iPhone in features and style it’s not even funny.

What won’t be a 3.0 iPhone OS? Wi-fi and bluetooth syncing, unfortunately. There will be no voice dialing, no MMS, no Flash, no video recording.

Why? Wi-fi and Bluetooth sync seems unlikely to me. Apple did not want to allow Time Machine over Airport for some time either, possibly because of data corruption. I think the holdup here is that the SQLite databases on the phone may not be atomically updated, and therefore, an interruption in signal availability could damage the phone. Of course, this could happen with the cable too, but I think the fact that the battery would be in use may also be of concern. This is, of course, pure speculation.

Voice dial and MMS seem unlikely, because if Apple wanted to ever include these standard phone features, it seems they would have done so by now.

Flash is a third party app. It won’t be in the OS. If Apple wants to bless it, they can and would do so for 2.x.

Video recording would be unlikely largely because the camera on the iPhone sucks. So why bother, if every iPhone filmed video would be poor quality, 100% of the time? Perhaps if new hardware came out that wasn’t camera-shorted, it would be more likely, but current models, with the terrible 2mpx camera, will not produce video worth watching.

This is entirely assumption, I have no inside information. However, I think the major gap in time is suggestive of big things to come.

Check This Out: Something Corporate’s Leaving Through the Window

In the early 00’s, there was a flood of what I call “new punk” or “candy punk” on the music scene, fronted by several bands, some of which I really liked. Yellowcard, New Found Glory, and many others were amongst the successful, and they brought a combination of punk, rock, and run-of-the-mill pop music together. Amongst that group was a band that was unfairly seen, I think, as one of the “candy punk.” Something Corporate demonstrated, on their two major releases, some brilliant song writing, some beautiful composition, and great musicality.

Leaving Through the WindowThe singles released from “Leaving Though the Window,” their first album, include “Punk Rock Princess” and “If U C Jorden”, both of which, I think, hold up well today. But the masterpieces are in between: the gorgeous harmony of “Hurricane,” the slow rocking of “Fall,” the bounce of “I Woke Up in a Car,” the humor of “Drunk Girl.” Something Corporate was able to convey a sense of humor balanced against their strong composition. For example, without sounding didactic – the way they build up to the first chorus but pull it away in favor of another verse; or the way a first chorus will only give you half the lines before the fuller subsequent ones. “Leave ‘em wanting more” really does apply with music, and it leads to repeat listens.

What makes Something Corporate unique is that they are built around the piano played by their frontman, Andrew McMahon. As a result, every song has a depth and tone missed by second rate bands like “Panic! At the Disco” and “Fall Out Boy” driven by almost entirely by power chords. The future for Something Corporate is definitely cloudy: McMahon was diagnosed with leukemia shortly after recording a solo album mid-decade and has gone on record suggesting his interest in Something Corporate is more nostalgic than create, but also as suggesting that not ever recording and touring again would be a let down to fans. Not counting demos, EPs, maxi-singles, and earlier releases, we only have two major releases for this young and talented band. Every single song on “Leaving Through the Window” is worth a listen. You should check it out.

Some Flickr Favorites

From time to time, I find some great photos on Flickr, and I mark them as “favorites.” But for whom? Well, I’m going to post a few of my favorite favorites. I hope you enjoy them too.


The Pink Slips, originally uploaded by roccokasby.

Crates, originally uploaded by cw3283.

Dinner, originally uploaded by verymiao.

soccer field, originally uploaded by Avi_Abrams.

Plums, originally uploaded by Loua.

So… WTF are you?, originally uploaded by eric.genn.

Muuuuuuuuca, originally uploaded by ewanr.