Wednesday, November 7, 2007

new Gmail UI breaks libgmailer's contact features

I've reported the bug on libgmailer's sourceforge forums, but I figure it's good to post it here too.
To get the good old libgmailer-compatible UI, you have to specify "ui=1".

I'll be rolling out updates for iPhoto2Gmail and Aperture2Gmail soon, either with my own patch or the official libgmailer patch.

Lines 1471-1484 in the fetchBox() function in libgmailer-0.9.0-beta-8 can be patched like so:

$q = "ui=1&view=cl&search=contacts&pnl=a";
elseif (strtolower($box) == "search") // Added by Neerav; 15 June 2005
$q = "ui=1&view=cl&search=contacts&pnl=s&q=".rawurlencode($parameter);
elseif (strtolower($box) == "detail") // Added by Neerav; 1 July 2005
$q = "ui=1&search=contacts&ct_id=".$parameter."&cvm=2&view=ct".$this->proxy_defeat();
elseif (strtolower($box) == "group_detail") // Added by Neerav; 6 Jan 2006
$q = "ui=1&search=contacts&ct_id=".$parameter."&cvm=1&view=ctl".$this->proxy_defeat();
elseif (strtolower($box) == "group")
$q = "ui=1&view=cl&search=contacts&pnl=l";
else // frequently mailed
$q = "ui=1&view=cl&search=contacts&pnl=p";
break;
default:
$q = "ui=1&search=inbox&view=tl&start=0&init=1";


Or as libgmailer forum user sardion points out:

Line 1476 of libgmailer.php
change:
$this->fetch($q);

to:
$this->fetch("ui=1&".$q);



Update: Neerav's latest CVS version (as of Fri Nov 9 03:32:52 2007 UTC) solves the contacts problem and also fixes the sending problems in Leopard. I hope to release new versions of the plugins this weekend.

Tuesday, November 6, 2007

Quantifying a "labor of love"

I have been thinking about the time I have invested over the past year on iPhoto2Gmail. Lots of long nights figuring out Objective C and the Cocoa API's, lots of nights tracking down bugs reported by users, etc.

In any case, I wanted a way of quantify my efforts, so I ran the excellent SLOCCount on the most current iPhoto2Gmail release. I only included files that I wrote, and didn't include Aperture2Gmail. Here's what SLOCCount reckons my efforts are worth on the open market:

Totals grouped by language (dominant language first):
objc: 1777 (95.44%)
php: 85 (4.56%)

Total Physical Source Lines of Code (SLOC) = 1,862
Development Effort Estimate, Person-Years (Person-Months) = 0.38 (4.61)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 0.37 (4.47)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 1.03
Total Estimated Cost to Develop = $ 51,894
(average salary = $56,286/year, overhead = 2.40).
Data "generated using David A. Wheeler's 'SLOCCount'."


I do it because I like it, not for the fame and fortune ;)
So... maybe it's time to open-source this stuff -- or maybe Apple or Google wants to buy it?