Thursday, August 14, 2008

iTouch Time Wrong?

Unpredictably, sometimes when I sync my iTouch the time and date go wonky, and suddenly I'm 12 hours and a month in the past.  This wreaks havoc on any chance I had at using the calendar functions, and since I've recently started using a journalling app, it was time to fix it.

Turns out that it's a known bug with no current fix from Apple as of the latest firmware.  However, there's a workaround, at least one that's working for me.  The problem only happens when iTunes is running and then you plug in your device. If you close iTunes, then plug in the device (and let iTunes launch on detection), I get the right time, every time.

It's a bit of a pain to have to remember that, but not as much as being beeped by reminders of meetings that happened a month ago.

Tuesday, August 12, 2008

Upgrading to Rails 2.1

Started upgrading from Rails 1.2.6 to Rails 2.1 today.  Here's a few things we ran into:

  • Oracle adapter now known as "oracle_enhanced" rather than "oci", and can be installed via the "activerecord-oracle_enhanced-adapter" gem
  • There's a couple of config.* options that are no longer valuable and you'll be warned to delete.  They are in the specific environment file (e.g. development.rb), not environment.rb, in case you're looking for them.
  • Delete any tmp/sessions you've got lying around, and for that matter clear the session cookies in your browser as well.  Sessions are apparently different now.
  • Speaking of which, you need a key for session generation.  In your environment.rb file you'll need this:
    • config.action_controller.session = { :session_key => "_myapp_session",
              :secret=> "some random secret key of your choosing over 30 characters" }


  • gem update --system (with TWO dashes, everybody always gets a cut and paste error with that) needed to update the Gem system
  • gem update   may run into some gems that do not offer precompiled binaries (only relevant for Windows, I suppose).  I hit a wall with hpricot and ferret in particular.  So to get around the problem I uninstalled them (ignoring any dependency warnings), continued with gem update so all my other gems would update to their latest versions, then put back hpricot and ferret based on the versions I previously had.  Oh, and mongrel gave me trouble as well.
  • For some reason rake also gave me trouble because an old version was lying around with "require_gem" in it, which apparently hasn't worked for awhile.  For that I just edited rake.bat and changed it to 'gem'

Other than that, things seem to be working.  I didn't have to change my source code at all, which is a testament to the "reverse deprecation" that's been going on where in anticipation of 2.x my code has been telling me "Ok, this thing here is going away with 2.x, so stop it."  Can you imagine what the Java language would look like today if they'd taken that approach from the beginning, instead of just forever marking things deprecated and never removing them?

(I haven't touched Java in a few years, did they ever get around to removing the deprecated stuff??)

Monday, August 11, 2008

MIT DEFCON Subway Hacks

Ok, now that's pretty cool stuff.  Most of it's over my head, sure, but it's not like I was planning on using any of it to begin with.  I just think it's neat to be reminded that the generation of original "Hackers", those that find their way through the system by whatever means necessary (the first pages are all about the social aspects of just paying attention to what is around you), is still alive and well.  Recommended reading, just to appreciate the mindset that goes into that sort of hacking.

And, because there are people that won't want you to.  Acting on it should be illegal, writing and reading about it should not.