Safari 4 is replacing FF3 on my Mac

Posted by Ed on June 12th, 2009 filed in Uncategorized
2 Comments »

Except when I need add-ons. But damn is it fast for non-work browsing. And the visual history and bookmarking rock!


Eclipse doesn’t have wild card Find function in 2009?

Posted by Ed on June 12th, 2009 filed in Rants
2 Comments »

Wow, version 3.4.2 on linux 64-bit.

Can’t search through the current page using a wild card.

It’s supposed to be there (Regular expressions), but maybe somebody made a mistake in this build of eclipse?

Just finding a lot of commonly used productivity functions missing on a daily basis.

Basically, the things that make IntelliJ a joy to use.


Apple iPhoto Flickr Sharing Doesn’t Include Video?

Posted by Ed on May 25th, 2009 filed in Uncategorized
1 Comment »

I am continually disappointed with iPhoto’s connectivity. The Apple team cripples it every time. It won’t put videos on Flickr? It throws away meta data when uploading to Facebook? Have you ever tried to upload iPhoto controlled albums by hand? The folder structure is a mess on the filesystem! I love the Faces feature, but Apple make my content too difficult to share. I’m switching to Picasa to manage all my media on my Macbook.

ok, just found that I could drag and drop from iPhoto into Flickr Upoader. That’s a lot better than hunting through the iPhoto folder structure. Now, if only Flickr Uploader didn’t crash all day. Why can’t I just ftp or sftp into my Flickr account? It’s old, stable technology that just works.


Jquery autocomplete plugin fix for single click focus

Posted by Ed on March 31st, 2009 filed in Uncategorized
2 Comments »

Jquery autocomplete forces a double click to get the drop down to show up. That’s no good for me. I’m using the jQuery autocomplete plugin instead of a Select box drop down. It needs to have the attributes of a dropdown, with the extra UI goodness of autocomplete pairing down a potentially huge dropdown list.

I’m going to be really lazy. I talked about the problem in a Google group thread here:

http://groups.google.com/group/jquery-en/browse_thread/thread/bb7b5df163aa9e2a/

Here’s the patched plugin code:

http://www.edwardotis.com/public_files/js/jquery-autocompleteplugin/autocomplete-single-click-dropdown-option.zip

Enjoy!


FlickrJ’s ThreadLocal gotcha

Posted by Ed on March 31st, 2009 filed in Uncategorized
Comment now »

If you use Desktop license from Flickr, you have to use the RequestContext class as follows from the FlickrJ examples:

Auth token = this.flickr.getAuthInterface().getToken(frob);
RequestContext.getRequestContext().setAuth(token);

RequestContext stores the token in a ThreadLocal variable. To be brief, I’m running an app on Tomcat. Tomcat uses a ThreadPool. RequestContext corrupts my app because the threads go back to a pool, they don’t die. So, the token of previous users show up in new user’s requests. Not good, and took a while to track down this bug.

I’ve added checks in my FlickrDAO class to clear out the RequestContext’s threadlocal variables at the beginning of each public method that can be impacted. Now my users authenticate properly with Flickr, and information doesn’t leak between requests.


Where I find value from Twitter

Posted by Ed on March 31st, 2009 filed in Tips
Comment now »

I usually find twitter to be pretty worthless for me my life.

However, tonight (April Fool’s Eve), I went to youtube. Got a 500 error. So, I went to:

http://downforeveryoneorjustme.com/youtube.com

However, they don’t parse error messages, so they reported that the site was up.

So, I went to twitter and searched for ‘youtube’, and all the tweets about the service dropping for lots of users showed up.

Point to Twitter.

In much the same way, the only other useful feature I like on Twitter is when it is  paired with GPS on my iPhone so that I can get location aware tweets. I was inside a music venue on Election night this year, wondering where everyone was. I used Twinkle and found out there was a street party outside with cops blocking off the ends to contiain the crowd of Obama revelers. Much better experience than the Independent at that point.

About 1.5 years ago, I was working late in North Beach and I heard explosions that mildly shook the blinds of the building. I couldn’t find information anywhere online. I called some friends, and they could hear the noise and police helicopters. However, they had no idea either. Nothing in the papers or on Google the next day. I still don’t know what caused all of that noise. Twitter would have given me the answer.

So, I guess I like to ask questions from Twitter, that only a service like Twitter can answer. That’s the Twitter value for me. (And the cost is sifting through  the firehose of useless updates about what’s for lunch :)


Setting up Hudson, Maven and Jetty Service on Windows

Posted by Ed on March 11th, 2009 filed in Tips
Comment now »

One gotcha with this setup. By default, Hudson will correctly persist all the jobs you create into C:\Documents and Settings\{username}\.hudson

However, Hudson will not attempt to load any of  jobs or configuration from this default location after your first reboot because the Jetty service starts before a user is logged in to the system. i.e. It no longer has a way way to know which user profile to use.

Therefore, you need to manually set HUDSON_HOME in your System Environment Variables to C:\Documents and Settings\{username}\.hudson

Then reboot and all your previous jobs will be happily running.

Maven gotcha:

The maven repository will end up being on your system drive at c:\.m2 after your reboot. It will start in your user directory under .m2. However, when you need to add custom libraries directly to the repository, or update the settings.xml, the proper place appears to be c:\.m2

enjoy

ed


Developing using 3rd Party REST Servers

Posted by Ed on February 4th, 2009 filed in Tips
Comment now »

I have found it  imperative to create a suite of integration/functional tests for each 3rd party REST site you use in your app. (Facebook, Flickr, Bebo, etc) These should ideally represent the set of API functions that your app is using for each API. You should create test users and data for the sites. Then, when you app goes wonky, you should fire off these tests BEFORE you begin wasting your time looking for a bug in your code.

Ideally, the 3rd party sites would provide status pages that continually hit their own API’s and show the problems to us and them. Put some RSS feeds on that page, and you have a nice alert system. But none of them bother to provide that.

Ultimately, I want to add these tests into a continuous build system, like Hudson, so that I can get alerted within a short timespan when one of the services I depend on goes down. In addition, I’m thinking this should trigger an automatic update to my web app. Probably a warning on my site and support forums  that states that features using site XYZ are not behaving properly as of XPM on a given date.  Even better (though more risky?), if the failure shutdown functionality depending on that failed REST server until it passed my integration tests again. This would also show a message to  users and also alert the developers.

At a bare minimum though, setup your own tests, and be ready to run them at a moments notice. It will save you a lot of grief and wasted debugging.


When IntelliJ goes bad

Posted by Ed on February 4th, 2009 filed in Tips
Comment now »

Recently, my IntelliJ 8.01 install stopped recognizing annotations w/ syntax highlighting. Then, it wouldn’t commit to subversion unless you removed the ‘optimize imports’ feature. Then, the debugger stopped working for incoming web requests, but it worked fine for debugging unit tests.

I’m on Mac OS 10.5.x . I reinstalled the IntelliJ application package, but that did nothing. Next, I renamed the IntelliJ 8 cache folder, so Intellij would create a new one the next time it started. This solved all the problems.

This folder on a Mac is located here:

/Users/[your user name]/Library/Caches/IntelliJIDEA80

/Users/[your user name]/Library/Caches/IntelliJIDEA70


iphone mail - Fail

Posted by Ed on November 7th, 2008 filed in Rants
Comment now »

Wrote my longest ever email on the iphone mail program last night. It went into power save mode a couple times while composing it, and then I sent it. The message is gone. Not in Inbox, Drafts or Sent items. No error message either. Awesome. That sucked, Apple!

Rule Number Fucking 1: Don’t lose the user’s data!

Rule Number  2: Don’t lose the user’s data!

Rule Number 3: Find a text editor iphone app that can integrate with mail when it’s time to send. (Since there’s no cut and paste still…<sigh>)