Tuesday, February 24, 2009

IPhone or Bold - My Decision

As some of you may know I have been debating on whether to get an IPhone 3G or a Blackberry Bold. Since I already had experience with a BlackBerry (a very positive one in general) I decided to give the IPhone a trial run for a month to see if I liked it better than my BlackBerry.

Honestly, I think I'd be happy with either phone. The BlackBerry experience was always great except for the fragility of the trackball; but the email, gmail, and google talk stuff all kicked ass on the BlackBerry and managed to meet most of my needs. I didn't like the music player on the BlackBerry so I always had to carry an IPod as well if I wanted to listen to music. I also never cared for any browser on the BlackBerry as they were too limited in what I could do while interacting with various webpages including this one (I couldn't moderate comments for example).

My employer uses Lotus Notes for email and we have a BB Enterprise server so, obviously, the BlackBerry was better for work email and calendering. However, not a lot better for email. I don't really need instantaneous email notifications, a few minutes delay here or there is OK. The inability to use an IPhone with the companies calendering system is a bit of a pain but, really, I don't have many meetings or events I need to schedule so not having them on my phone isn't too big of a deal. It's a knock against the iPhone but a pretty small one.

The BlackBerry supports copy-and-paste which, quite frankly, is great. I don't use it often but when I do it's very handy. I'm not sure why the IPhone doesn't have this feature even if I can't imagine a good way to implement it with the multi-touch interface elements that already exist. However, since I use copy and paste rarely it is still a rather small knock on the IPhone based on my usage.

The BlackBerry has a fantastic implementation of voice dialing. My wife can't live without it because she is in the car all day travelling between clients. I, on the other hand, don't even own a hands free set so voice dialing has no bearing on my life. Luckilly for the IPhone I never grew an attachment to that feature but if you like voice dialing you may want to avoid the IPhone.

Gmail on the BlackBerry is great - I love the native app which lets me see things in a conversation threaded view just like on the website. I also like that it integrates with the notification system on the phone so when a new mail shows up the light flashes and a little chime goes off. The Google Chat app is just as slick and also integrates nicely with the message system on the BlackBerry.

On the IPhone the Gmail integration just isn't as nice. Using the normal mail reader is OK but I really do like conversation view and I wish the IPhone supported it. Sure I could just use the web interface but then I wouldn't get notifications on my phone. Email is a major part of my phone experience so I pretty much have to use the IPhone interface. At least the formatting of messages in that interface is great and the large screen lets me read more of the message without scrolling - I just wish there was a native Gmail app.

There is no Google Talk integration - you have to go to the web interface. That pretty much sucks because now I can't get an IM unless I have the browser tab opened to that page. That's basically worthless. Fortunately the SMS app on the IPhone is pretty slick and "IM" like so it's not a totally lost cause. If nothing else someone can email or SMS me and tell me to get on chat. I have unlimited texting so its not bad for me but I guess it sucks for anyone who wants to contact me that way who doesn't have unlimited texting.

The IPhone is basically an IPod touch with a phone thus the Music interface on the phone is pretty good. I don't like it as much as the IPod classic interface but it is still better than any other music player interface I've experienced on a phone. Plus, with my home button set to double click launch the music player I can pause/play music without unlocking the phone so the integration works out pretty nicely based on my usage patterns. I had to screw around with ITunes for a bit on my computer to get it to stop trying to touch the phone but once I did that I was able to use Media Monkey to manage music on the phone. Now my phone is loaded with great songs I can listen to wherever I am and I have a good interface for playing them which rocks.

The last.fm program for the IPhone won't scrobble but if you jailbreak you can install a scrobbling app that works pretty well. I can't say that is reason enough to jailbreak but if scrobbling is important to you that's the only way.

The library of applications you can install on the IPhone is pretty extensive but, most of them seems useless to me. However I did find a few I really like. I really only use three with any regularity: twitteriffic, mint.com, and flickit. In fact, before flickit I hardly used my flickr account but now I have a camera and a good interface for uploading to it so I've begun to take advantage of my account. The free twitteriffic client is decent and makes tweeting on the go pretty easy. I use it more for keeping up with others tweets than posting my own. Finally, the mint.com app gives me a pretty nice look into my finances. I really like the mint website anyway and this app ties in nicely; I love the ability to see my current financial health instantly. None of these apps exist for the blackberry. Granted there are twitter apps for the Blackberry but I never used them. If there is a flickr app I haven't encountered it either.

Google Calendar and contact sync on the IPhone, for me, works better than it did on the BlackBerry. In this case it is because my phone won't sync with my work calendar oddly enough this is taking a weakness and turning it into a strength. The Google Sync feature automatically deletes events that are over two weeks old. When this happened on my blackberry it sent a deletion message to the BB Enterprise Server which resulted in the organizer of the event getting a "decline" message for past events. It was pretty annoying to them and thus I couldn't use the sync tool. Now I can and it is great having my full contacts and my wifes work calendar on my phone. Now I can email anyone and I can meet up with my wife for lunch when I see she is in town.

The absolute best part of the IPhone is the browser. I can interact with almost any webpage without a problem. I can now post to my blog on the run, I can manage my google groups on the go, I can do so much more on the web than I could before. It's really great. I didn't think the browser would make such a difference but it really has changed how I interact with my phone. I don't use it all the time but when I do it's great to have such a feature rich browser.

The final consideration is battery life. The IPhone does have a shorter battery life than my blackberry did (when it was new) but, of course, the IPhone is doing a lot more. The BlackBerry had a nice feature where you could schedule it to turn off completely each night and turn back on in the morning; you can't do that on the IPhone so I have to manually turn off the radios and wi-fi at night; it's not a big deal but it is an inconvenience. I get about 2 full days of normal use with the phone. My normal use is maybe 2-3 calls in a day (all shorter than 5 minutes), checking email regularly (cylces every 15 minutes), responding to about 10 emails a day on it (the rest I respond to on my computer or I just delete without response). I also browse the web, use the Google Reader interface quite a bit (over 30 minutes a day probably), and I get a few SMS messages a day. I also take a random photo, upload it to flickr, and check my finances on the mint app.

While I would prefer a longer battery life (wouldn't we all) the IPhone's battery is sufficient for my needs. There was one weird day where my battery went crazy and it just started depleting really, really fast. In fact that night I went to bed with 68% battery life, turned off all the radios, woke up 7 hours later, and the battery was completely dead. It was a fluke day but it does raise some concern. I hope it doesn't happen again.

With all this said and done I'm going to keep the IPhone. I don't really feel any pain in switching and I get a much, much better browser in the deal. Overall I'm very happy with the IPhone and am glad I decided to give it a try.

Thursday, February 19, 2009

Commas in Windows Calculator

So, color me ignorant, but one thing I've always disliked about windows calculator is when you have a large number, say 3 trillion, there are no commas to help you group the digits and easily identify the value for what it is.

Well, you can have it display commas. Go to the "View" menu and select "Digit Grouping" and BAM! you have commas.

Simple and easy. I don't know for how many years that has existed but I just found out about it today. I don't think I've ever looked at any of the menu's on the calculator so now I'll have to explore a bit more.

Wednesday, February 11, 2009

TortoiseSVN : Require an Issue Number

We are a windows shop and we use SVN as our version control system, so, most of us use TortoiseSVN as our primary interface to the SVN Server. Being agile and all we try to create issues for everything and to help enforce attributing code to an issue we, sometimes, use a nice built in feature in SVN that provides a limited Bug Tracking System integration.

We actually rolled our own bug tracking solution years ago that serves our needs fairly well so the references you might see to it in my examples that will follow should be replaced with whatever your systems conventions are.

Enabling Issue System Integration:


  1. Go to the root directory of your checked out project.

  2. Right click on the directory and select "properties" from the context menu

  3. Select the Subversion tab in the dialog window that appears

  4. Click on the "properties" button

  5. Add the following properties to your project:
    • bugtraq:append - true

    • bugtraq:label - "Bug" or "Issue" or "Jira" or whatever..

    • bugtraq:message - "Bug: %BUGID%" replace bug with whatever you used for the label

    • bugtraq:number - true : obviously only select true if you insist your issue numbers are numeric.. for instance a JIRA is alphanumeric so this should be false if you use Jira

    • bugtraq:url - http://my.issue.server/showIssue/%BUGID% - this is whatever url you need to load a specific bug, where %BUGID% will be replaced with the value entered by the submitter

    • bugtraq:warnifnoissue - true : this will alert the user if they try to commit changes without providing an issue number.


  6. Click "OK" svn properties dialog

  7. Click "OK" on the folder properties dialog



There, you're set up. Now you just need to commit the change to your directory to subversion. Then, everyone who updates from SVN will have these same settings and everyone on the project will have the same level of integration.

Monday, February 09, 2009

Distance Between Two Latitude + LongitudePoints - PHP

I once had a project where the client wanted customers to be able to search for the nearest vendor to the customers zip code - this project was in PHP but the algorithim contained here can be translated to other languages pretty easily (Note, this returns the value in miles):


function computeDistance($lat1,$lon1,$lat2,$lon2){

$lat1 = deg2rad($lat1);
$lon1 = deg2rad($lon1);
$lat2 = deg2rad($lat2);
$lon2 = deg2rad($lon2);


// Find the deltas
$delta_lat = $lat2 - $lat1;
$delta_lon = $lon2 - $lon1;

// radius of earth in miles
$r = 3963.1;

// Find the Great Circle distance
$distance = pow(sin($delta_lat/2.0),2) + cos($lat1) * cos($lat2) * pow(sin($delta_lon/2.0),2);
$distance = $r * 2 * atan2(sqrt($distance),sqrt(1-$distance));

return $distance;



}

Webhooks Have Me Hooked

Today, of all days, I have been inundated by discussions concerning webhooks. First I saw this post over at Jon Udell's blog where Andy Singleton mentions how great webhooks are. Then, a little later, I saw a post by Timothy Fitz about webhooks linked on reddit.com

It seemed clear that I should investigate and I'm glad I did. Webhooks are, really, a no-brainer. As one person described them they are "triggers for the web" - an analogy that only makes sense if you're familiar with databases but apt nonetheless.

So, you've made it this far but don't feel like reading the linked articles? No problem, I'll tell you what webhooks are.

Let's say you have an application, oh - i dunno, like this blog. On the blog you do a few different things but the most common action is to post a new blog entry. Blogs have actually long supported the idea of a webhook but you may not have realized a "ping" was a webhook. Basically, what happens is that when you publish a new post a separate http call is made to the aggregator site. A ping is super simple - it just calls the url with a special parameter and the receiving server then knows your blog, specifically, was updated.

However, any RESTful service could be the target so that when you do an action on your application an http call to the REST service, along with some properly formatted XML, could be made and bam some entirely new process might be set off.

Let's say you run a small theater and you use something like MS Outlook to keep track of your calendar of events. A webhook could be present that sends that same event off to your online calendar at the same moment for instant synchronization and publication to your theater's website.

Tim has a more mundane but probably more useful example:


I imagine a future where twitter feed updates instantly call a webhook. I’ve pointed that webhook at a service that does bayesian filtering. The filtering has been set up to determine if the tweet looks time-sensitive “Anyone interested in getting dinner tonight?” vs time-insensitive “Webhooks are cool.” Time sensitive posts call another webhook, this time set to sms my phone. Note that nowhere in this future am I writing any code. I don’t have to.


Webhooks have been around for a while but it seems likely that they will become far more ubiquitous in the future.

Here are some links for further reading:

Monday, February 02, 2009

One Month IPhone Trial

After much deliberation and debate I have decided to give the IPhone a one month trial. I really want a phone that does all of the following very well:


  • Plays Music

  • Email with Lotus Notes



Those are really my only major requirements. The Bold does Email very well with Lotus Notes because we have a Blackberry Enterprise Server (BES). The IPhone does music very well. Because I am paying for the phone I wanted one that will do both equally well. I've had a Pearl and have loved how it handled email; both Notes email via the BES and Gmail via the Blackberry Gmail App. However, I hated the music interface and ended up never using it for music so I had to carry both the phone and an IPod which is really more than I wanted in one pocket.

Thus I am giving the IPhone a trial. If my email experience is substantially degraded I will revert to a Blackberry and get the Bold. However, if the email experience is vastly better on the IPhone than the music experience is on the Pearl I will stick with the IPhone.

I picked up the IPhone last friday and so far I am fairly happy with it. I had my Notes account setup for IMAP access and am fetching both Notes and Gmail via the normal IPhone interface. So far it is OK but I haven't really been getting much work email yet. Honestly it isn't as seamless as the Blackberry was (for either email) but it hasn't been bad at all either.

Obviously I like the music interface on the IPhone plus I can use MediaMonkey to sync my music so I am not forced to use ITunes (though I do have to have it installed).

So far I do have a couple of small quibbles with the IPhone and one surprising place where it dominates the Blackberry experience for me. First my quibbles. Once in a while the keyboard is sort of unresponsive and my keypresses don't register on the screen right away; then, a second or two later, the keyboard catches up and everything I typed is rendered. It happens fairly rarely but it's still annoying. Likewise I'm still not as accurate with the keyboard as I would like to be and I tend to accidentally hit the button to the right of my target. That's probably my problem more so than the keyboards - but it is an adjustment I have to make in my perception due to the lack of key depth.

Another minor gripe I have is that I can't just tell the phone to use one of my songs as a ringtone - I could on my pearl and I loved my ringtone on it. I also miss my Gmail interface - I love the threaded conversation view in Gmail but, in order to get that on the IPhone I need to keep safari open and that isn't really cool. The BB Gmail app is fairly "push" like and runs all the time in the background (so long as you don't leave an email open). I also miss the Google Talk application (again, something you have to do in Safari)

However, there are a couple things I really prefer in the IPhone. The first is the size of the screen. When I read an email now I can see a lot more of the body at one time. That is pretty handy. I also found a free service for syncing my google calendar and contacts with the IPhone's calendar and contacts called NuevaSync. Google had created a calendar sync program for the BB but it had a really annoying problem of sending out "rejection" emails 2 weeks after any event passed and Google automatically removed them from the Calendar. Plus, the calendar on the IPhone is much easier to view and navigate (again thanks to the large screen). Next is Safari. I have bumped into a couple of websites that didn't work in it but I am able to do much more in this browser than I could ever imagine being able to do in the Blackberry Browser (or even Opera for the Pearl). Finally are the free Apps in the Apple App Store. I have grabbed a few already; tumble, wordpress, twitterific, and mint. If the last.fm app scrobbled I would get it too but, alas, it doesn't. While I don't have Google Talk handy the way SMS texts are handled/displayed on the Iphone is pretty nifty - though you can tell it is done that way to increase your use of SMS and thus (if you don't have unlimited texting) could cause problems (I have unlimited texting thanks to my brothers addiction to it).

As you can see it isn't easy to find a device that is perfect for me but I am hoping to at least find which one of these two is the closest to what I want. Oddly enough the one thing I don't really care about is call quality. I hardly use the phone for talking. At the end of the month I'll let you know what I decide to do.