The Silver Lining

Woke up at 5:37 this morning to catch the train the Burbank. Sat delayed at Union Station for ~2 hours due to a fatal accident near the Burbank station.

Sadly 2 hours is long enough to make you forget how morbid and rueful a fatal accident is (I believe that’s the euphemism for suicide) and obsess with how to get a gaggle of squawking teenage girls to shut up for just 2 minutes.

Coming back tonight, the 7:05pm train simply never showed up. Finally caught the 9 something train. If I’m lucky I’ll be home by 1am.

The silver lining was meeting Thomas. Thomas is, or claims to be, a former marine, a veteran of Vietnam and the first gulf war, and a traveler of 48 of the United States and much of the world.

Thomas’s story was so fantastical it’s tempting to dismiss him as a wandering drunk. Which, actually, he admitted to being.

Thomas served in Vietnam in 1969. I’d have guessed he was late 30’s, maybe early 40’s, but he said he’s turning 57 soon. That would’ve made him 18 in 1969.

He has 4 brothers. Or had. 3 lost their lives in battle, one is serving in Iraq now.

He was healthy until the first Iraq war. He was caught in a firefight and ended up with a replaced hip, a mostly replaced right leg, and a partially damaged left leg. He was discharged, opening the door for his brothers to serve.

He was remarkably healthy looking. A thick, bushy beard and excellent control of his facilities despite his obvious inebriation.

He’s traveling the US to “see what he fought for”. “These people have no idea what goes on out there. They have no idea what it means to fight a war”.

It wasn’t worth it. If he had it to do again he’d give it all up for one more day with all of his brothers.

His mother had passed away while he was in Iraq. He was on his way to her old house. He wasn’t in any particular hurry; his plans for the night were to find a drink and “play”.

Come November he’ll get his “inheritance”. He’s planning on leaving the US. He’s thinking Syria.

I recommended Costa Rica. He said he loved the water there. He also liked the Philippines, the snorkeling.

I also mentioned Lebanon; my brother was very impressed with the place.

Thomas had lost friends in the 1983 Beirut bombing, so he wasn’t particularly fond of the place.

He said a lot of interesting things. One that struck me - the world’s not getting smaller, there’s just less in it.

He carried a plain-English bible and asked me to read a passage. He prayed for me.

He didn’t ask for money. He didn’t ask for anything actually.

If he has lost 3 brothers in battle, and I do believe that he has, what an incredible sacrifice for a family to make.

There was a depth and genuineness to him that made it difficult to picture him killing someone. My prayers are with him. I hope that he does get his inheritance, and that he finds happiness beyond drinking.

Ok, I Take It Back: iPhone Sucks

Here I am sitting at the train station waiting for a train that’s 1 1/2 hours late, and I can’t call home to tell my wife about it, because the iPhone ran out of battery. It was fully charged when I left the house this morning. I didn’t make any calls, did use it to browse the web, and also used it as an iPod. And now it’s failing to do what 5 of the 6 letters in its name claim - to be a phone.

The guy standing next to me has his new 3G iPhone turned off because he’s almost out of battery. He’s saving it in case he decides to forgo the train and have his roommate pick him up.

Some phone. Bah, humbug.

JavaScript-Only iPhone Apps?

Is there a way to write iPhone apps that can be distributed via the AppStore without writing Objective-C / Cocoa code? I’m perfectly happy writing happy HTML, CSS, and JavaScript, but don’t want to get too deep into Apple proprietary languages and technologies.

Basically I just want the HTML/CSS/JavaScript app I have packaged so it can live offline on the iPhone, have network access, and use the local SQLite instance. I’ve looked at the SDK videos, the docs, and everything else I could find, but they all seem focused on writing Objective-C.

If that’s not possible, is there a bare-bones skeleton app that simply embeds safari and renders files stored on the iPhone?

Color of Paradise: See It Now

Just watched Rang-e-Khoda, or Color of Paradise, for the second time. What a breath-taking movie. It’s amazing in every aspect. The casting, the acting, the direction, the cinematography, the story. Every scene is beautiful.

The title is mis-translated. It actually means color of god, which is really what the movie is about.

If you haven’t seen it, see it.

iPhone 3G As A Modem?

Ok, I want a 3G iPhone, and if I can find a way to use it as a modem for the laptop(s) I can actually justify spending the extra cash for it (since I’d be able to dump the EVDO card I’m currently using). Anybody know if that’s possible yet (because I’m certain it will be).

The Importance of Lyrics

My wife tells me no one listens to lyrics. Perhaps it’s true; I found myself singing Pony Up’s Matthew Modine today. It gets real interesting a few paragraphs into it.

That’s How I Roll, MoFo

Funny.

Taste Vectors: OpenTaste

I couple of years ago I wrote about Taste Vectors, did a bit of hacking, and not much else.

The Strands folks have launched a similar concept in OpenTaste. Worth a look, will write more if I get a chance.

Via Duke Listens!

Parsing (Top-Down) in Python

Excellent article on Simple Top-Down Parsing in Python. The nud and led business could be better explained, but the rest of the article and code is great. I learned several things I hope to employ shortly.

I’m trying to remember if we studied this in compiler class or not. I think not, although I have terrible memory, so it’s possible we did.

Anyway, a companion tutorial article that would approach this strictly from the perspective of using the toolkit Effbot built in his article would be nice. In other words, knowing the under-the-hood details is fantastic and informative, but given the tools and helper functions built in the article one could fairly easily build a parser without worrying about how the helper functions are implemented. Sort of a user manual for building parsers given the helper functions.

Django: Retrieving Backward Related Objects

Another one in the category of always-forget-how-to-do-this-so-noting-here:


class Entry(models.Model):
    blog = models.ForeignKey(Blog)

b = Blog.objects.get(id=1)
b.entry_set.all() # Returns all Entry objects related to Blog.

# b.entry_set is a Manager that returns QuerySets.
b.entry_set.filter(headline__contains='Lennon')
b.entry_set.count()

Full docs here.

iPhone’s Weaknesses As a Business Phone

Still thinking about iPhone versus BlackBerry. The iPhone is great, but I prefer the BlackBerry for business use. The iPhone’s weakest points:

  • The speakerphone is unusable. Volume is far too low, quality of sound is below par. Unusable.
  • There isn’t a good way to carry the phone and/or stuff it in your pocket without paying attention to it. The surface of the screen responds to your unintentional touches, so as you try to lift up and put it in your pocked, boom, you’re disconnected. This morning I spilled my coffee because I was babying the iPhone so much. The BlackBerry, it gets stuffed in a pocket and forgotten about.
  • Mute button. Twice now I’ve accidentally unmuted myself during conversations and ended up sharing just a little too much. The mute button should not be where it is and shouldn’t be so easily triggered. Funny thing is there’s a physical switch on the side of the iPhone that turns the ringer on and off (I think). Why not have that be the mute button?

What does a business call look like? You put it on speaker (or headset), put it on mute, stuff the phone away while driving / walking / not paying attention, and unmute when you need to chime in. iPhone is weak in all of these areas. The BlackBerry, on the other hand, is strong - good speaker, physical mute button, easy to carry / stuff in a pocket without accidentally hitting buttons.

What’s missing from the BlackBerry really is just a usable browser. I don’t see why you couldn’t have a decent browser on there. It’d be missing the multi-touch zooming ability of the iPhone, which would be a big deal, but I think that can be worked around. For example, with a single-touch capable touchscreen and a physical button on the side of the phone you could pretty easily zoom in to an area of the screen (put your finger where you want to zoom, push the button).

The iPhone could more easily morph to become a good business phone than a BlackBerry could become a decent browsing device, but with a few improvements BlackBerry could significantly reduce the benefit of jumping ship to iPhone.

Gmail Magic Speed-up Button Found

This morning while trying to close a firefox tab I accidentally hit a button on Gmail that made it magically faster and better. I’ll share it with you: look at the top right hand side of your gmail screen. Look for the link that says “Older version”:

Gmail - Older Version

Click on this. Boom, magic. You’ll find suddenly Gmail is significantly faster, more responsive, and less prone to reducing FireFox to a groaning heap of ooze.

This is awesome. I’m not sure why Google is not publicizing more, and I can’t wait till they roll it out more widely. Perhaps it’s in beta.

BlackBerry + Decent Browser = iPhone Killer

I’m a bit of an iPhone fanboy, it’s true. However, Fred Wilson’s post on mobile apps has me thinking - the main reason I carry an iPhone as well as a BlackBerry is the iPhone’s browser. The rest of the stuff is great, but the killer app is the browser.

And the BlackBerry has its own advantages. It’s much easier to type on, for example. The camera quality is also better as Fred points out.

Generally speaking, the BlackBerry is a very nice device. It’s just not usable as a Web browser. If BB figured out how to put a real browser on there that matched the iPhone’s quality and usability, for all my fanboy enthusiasm, I’d probalby go back to carrying a single cell phone instead of both the BB and the iPhone.

Marry A Virgin In The Morning…

Genie

My brother-in-law bought Arabian Nights (aka 1001 nights) to read to his 2 year old daughter, thinking they’d be nice, quaint stories. He thought better of it and gave it to me, so I gave it a quick read.

You probably know the general story: there’s a cruel king that marries a woman each day and kills her the next, until one special girl enchants him with 1001 stories so intriguing that he can’t bear to kill her.

Well, here’s the start of the whole story, explaining why the king is so cruel:

Two brothers rule two kingdoms. One invites the other to come over for a visit. Shortly after the visiting brother leaves his palace, he misses his wife so much he decides to go back and give her a final kiss. On returning he finds his wife and her court having far too good a time with their male slaves.

Devastated, he kills the wife and leaves to visit his brother.

He’s happy to see the brother, but is so distraught over his wife he’s not much of a sport. He decides to skip the hunting party and stay at the palace.

The brother’s wife, thinking the men are away, throws a party of her own, and proceeds to similarly get down with the slaves. The visiting brother accidentally witnesses this and eventually tells his brother, who promptly strangles the wife.

The two brothers are so distraught they decide to leave their kingdoms and not return until they find someone more miserable than themselves.

As they’re about to make camp in the wilderness they see a giant genie (a nasty, gnarly one, not a cute one like the movies) emerge out of the lake. They quickly hide in a tree.

The genie comes over to the tree, produces a locked chest out of which he brings out a woman, and decides to take a nap while resting his head in her lap.

As the genie sleeps, the woman spies the men in the tree and orders them down. At first they refuse, but she threatens to wake the genie, so down they head.

She produces a string with 98 rings attached, and explains there’s a ring for each man she’s had a chance to party with since the genie has held her captive, and that she wants to make it an even 100.

The brothers, convinced that the genie is indeed more miserable than them, return to their kingdoms, and one of them takes up the lovely habit of marrying a virgin each day and killing her the next, since, clearly, womens can’t be trusted.

Now with a start like that, how can you not read the rest? Enchanting stories indeed.

Photo by PrincessAshley.

Windows/Eclipse/FireFox Slowdown Annoyance

Update: Gotta love it. Genius, I am. Turns out the laptop was on “Power Saver” mode.

About 2 weeks ago my Vista laptop started slowing down. I don’t know what caused it, but it started sometime after I updated to service pack 1, although I have no idea if that has anything to do with it. In any case, it’s stayed slow and it’s getting very annoying.

I’ve also been losing disk space. As I’ve gotten closer to filling up the disk I’ve made a concerted effort to delete items, but each time I do the space inexplicably disappears again.

My CPU usage is hovering at around 30% even when I’m doing nothing. I’m running FireFox 2.0.15 with -safe-mode, but doesn’t seem to be helping very much.

I fear I may do something drastic here if I don’t find a fix. If you have any ideas let me know.

jQuery serializeArray: Why Not An Associative Array?

I’m trying to examine and modify form variables from jQuery by catching the submit event. jQuery has a serializeArray method that hands you the form variables in a nice array. For example:


	$('#someform').submit( function() {
		$.post("/some/url/", $(this).serializeArray(),
			function(data){
			    console.log(data);
			}, "json");
		return false;
	 } );

This is great, but the result of serializeArray is an integer indexed array whose values are (key,value) pairs. Eg.


	var data = $(this).serializeArray(),
	console.log( data[0] );
>> output: Object name=somename value=537

I’m wondering why the array looks like this, instead of being a dictionary (associate array, hash, or whatever you want to call it) such that the keys are “name”s and values are “value”s. Eg.


	var data = $(this).serializeArray(),
	console.log( data.somename );
>> output: 537

Anybody know the answer?

Shopping For Broadband Access Card / Service

Cell Tower

I just cancelled my Verizon broadband account, mainly because the card was no longer working in my PC and the mac doesn’t take PC cards. I was surprised at how little effort Verizon put in to keeping me; I’ve been paying the $80 per month for almost 2 years now, and they let me go without giving me much incentive to stay.

I’m hoping the new 3G iPhone will be able to act as a modem; I could possibly stomach paying the outrageous monthly fees if it replaces my extra broadband card. I’m pretty sure it’ll be able to, through legitimate or hacked means, shortly after release.

Anyway, I do need wireless broadband service, so I’m going to get a new card and service. If you have a card / cell phone / service you use let me know what you like and dislike about it.

Photo by joneser005.

Black Nerds

Interesting essay from David Adewumi on Why Black Nerds Are Unpopular. My observation on nerdism and popularity, based on going to school in three different continents, is that “nerds” are an American invention. Popularity, or lack thereof, is of course universal, but being a social outcast due to intelligence is mostly American.

In Iran, for example, I’d say it was much closer to “winners” and “losers”. The smartest kids were often also the popular kids, and they also often participated in sports. My main arch-nemesis in school (later my best friend) was not only one of the top students, but also our best athlete. Being smart was not a detriment to popularity.

In England I remember learning the concept of “nerd” from America sitcoms, and being mostly puzzled. I only went to school for three years there and even that in a private school, so I can’t vouch for general public schools, but I don’t think the concept of nerd is very strong there either. Being popular or unpopular certainly exists, but intelligence doesn’t carry the kind of stigma it does in the US.

Cross-Language Data Serialization and Exchange

Interesting new open source release from Google called Protocol Buffers. Language neutral data serialization and exchange via protocol definition and generated code for C++, Java, and Python.

Apparently Protocol Buffers are heavily used inside Google, so they look to be a robust implementation. Should be a good format for wire protocols.

They compare it to XML and tout its size and speed advantages. In a client/server implementation, however, JSON is the more likely alternative. I wonder how the size and speed compare.

In Bruges: Not Too Bad

Watched In Bruges. Really not too bad. The British do good gangster movies - not shy about violence, but also layers of introspection and classical tragedy elements. I recommend it, worth seeing.

Next Page »