home

Archive for March, 2006

MythTV Presentation to GT LUG

Friday, March 31st, 2006

Here’s the presentation I gave to the GT LUG. I was going to be clever and record it, make an audioblog entry and then get crrrrrazy and do something with a podcast/videocast and then I realized that my life would be complete if I did that, so I didn’t.

The presentation went well, we had a good turnout at the GT LUG. I think MythTV is a great example of an open-source project with a nice clear mission and a well-run group of contributors. It’s got a good mix of coolness and hype, and the time is right for a breakout product from either Apple or WinXP in the mythical-convergance set-top-box PC-market, so until that happens, or if you don’t want to be bound by Apple or MS’s crazy DRM shenanigans, then perhaps MythTV is for you.

Without further ado, here’s the presentation:

MythTV Presentation - LUG GT.pdf

MythTV Presentation - LUG GT.ppt

Enjoy!

Presentation on MythTV for GT LUG

Monday, March 27th, 2006

LUG@GT - The Linux Users Group at Georgia Tech

Meeting: Wednesday, March 29th, 2006
College of Computing Building, Room 17 (basement) at 7:00pm EST
http://lugatgt.org/

Agenda:
- InstallFest Planning
- Presentation: MythTV by Charles Brian Quinn
- Open Linux Q&A Session

This week’s presentation was described by CBQ as “A brief overview, glimpses of a possible setup/HOWTO, and some pointers to really trick out a setup.” Stop by and learn how to turn your Linux system into a DVR/PVR! We’ll also be making final InstallFest plans. Hope to see you all there!

Broken MacBook Pro

Tuesday, March 14th, 2006

I broke it already. Well, I didn’t actually break it or do anything, really, but for some reason the Delete key keeps coming off. Like, amazingly annoyingly, everytime I use it.

What’s up with that?

I’ve also managed to crash the Dock, and FrontRow has occasionally gone bananas on me (eating up 100% CPU, and I swear I saw it jump to 101% CPU, which must mean that dual core is eating up both processors). Otherwise she’s good to go.

My annoyance with the Home and End keys not working the Terminal (or lots of different windows) is enough to make me start to think about getting a full-size keyboard, but it’s probably a feature of the program, not the Apple-Right-Arrow that’s not working, which could spell bad-news for this convert.

TimeZones (with DST) in Rails

Tuesday, March 14th, 2006

I was having a doozy of a time implementing TimeZone aware-ness in an application I’m buidling in Rails, until I found some excellent posts (see the bottom for spoiler). Here’s how I did it.

First, let’s make sure you’re storing every date in ActiveRecord in UTC.

You can either set your machine default to be UTC ( in gentoo linux that’s copying over a file from /usr/share/zoneinfo, in OS X, in the System Preferences), or you can setup your default rails environment to use UTC:

in environment.rb:

ActiveRecord::Base.default_timezone = :utc

Now, go and get the TZinfo gem, it’s a fix to the TimeZone support included in Ruby to make it Daylight Savings aware.

you could do:

$ sudo gem install TZInfo

Now add one more line to environment.rb:

require_gem ‘tzinfo’

Now, let’s say you’ve got a user with a time_zone — this could be as simple as (db migration magic here): add_column :users, :time_zone, :string ) of ‘America/Detroit’.

Add to the User Model:

class User < ActiveRecord::Base
  # …
  composed_of :tz, :class_name => ‘TZInfo::Timezone’,
                :mapping => %w(time_zone time_zone)
end

You can now say (script/console magic here) assuming your something object has the magic created_at datetime field:

something = Something.create
=> # < something :0×22db8d0 @errors=#<activerecord ::Errors:0×22d52a0 @errors={}, @base=# <Something:0×22db8d0 …> >, @attributes={"updated_at"=>Tue Mar 14 15:58:33 UTC 2006, "something"=>"", "created_at"=>Tue Mar 14 15:58:33 UTC 2006}, @new_record_before_save=true, @new_record=false>
user.tz.utc_to_local(something.created_at)
=> Tue Mar 14 10:58:33 UTC 2006

Not there’s still a “UTC” stamp on that bad boy, but now you’ll never show that long format since you’ve got it stored with their Time zone.

Update: You can do:

< %= time_zone_select ‘user’, ‘time_zone’, TZInfo::Timezone.us_zones.sort, :model => TZInfo::Timezone % >

which sorts the us_zones, but hmmm, as for the rest of ‘em, good luck. ;-) How very American, eh?

See Using TZInfo in Rails and the TZInfo - Ruby Timezone Library for more info.

Day 2 of MacBook Pro

Thursday, March 9th, 2006

And I’m still in love….

Bluetooth synchronized to my Windows Mobile 2003 Smartphone - one click connects me to the GPRS network (can you say, internet anywhere)?

p.s. I’m posting from the WordPressDash widget. Too cool for school.

macbook pro: incredible

Wednesday, March 8th, 2006

This thing is incredible. It’s just beautiful, and powerful, and crazy-wicked cool, and …..

Wow.

I’ve been anxiously awaiting its arrival since Jodi pre-ordered it in early February. It shipped March 3 from Shanghai, and arrived in Atlanta on the 7th, where it sat all day at the FedEx facility (FedEx Tracking: Estimated Arrival Mar 7, 10:30am — wrong). But today, it arrived, and I’ve spent all day getting her up and purring. I’m already up — and dare I say it, feeling a million times more productive.

Don’t get me wrong, I love Windows, and I love Linux (especially gentoo), but I loooove Mac OS X. My gentoo linux laptop used to be the most reliable, productive machine I’ve had. Until now.

Wow.

web framework shootout

Wednesday, March 8th, 2006

Watched a very good video this morning (I know, right, not like I work or anything) titled Better Web App Development by Sean Kelly, on doing, you guessed, it better web app development using quite a few of the web frameworks out there. It had a little J2EE bashing, which is alright by me. I’ve done my share of java servlet compiling, tomcat restarting, re-copying the war file, restarting, re-copying the war file, ahem. I’ve also done quite a bit of Rails work recently, and was interested to see how Django shaped up. I’ve also used Zope (Plone) and found it difficult, but I never had an “aha” moment until I saw it used in the video. I got the feeling that Rails was a biased favorite in the beginning of the video, but each framework was compared evenly and overall done fairly — except, I know I’m letting my bias show through: my one contention is a statement about needing to write SQL when setting up RAILS, and an error with namespacing: using Rails migrations takes all the SQL writing out of the process, and I would imagine through the use of the script/console to load up the development environment, one could find conflicts with namespace issues, though both are somewhat new features.

The video compares a J2EE stack (and JBOSS to test full J2EE), Rails, Zope (Plone), TurboGears, and Django on a variety of “metrics,” fun being one of them. Check it out, this is a spoiler page, but the video is done very well:

Web Frameworks Shooutout Conclusion

Better Web App Development by Sean Kelly.

Atlanta Python Users Group Meeting

Thursday, March 2nd, 2006

From the Atlanta Linux Enthusiasts (ALE) mailing list:

The Atlanta Python Users Group is meeting at 7:30pm on March 9 at the
Decatur Public Library. Jeremy Jones will be speaking on how to use
Python and Django to develop web applications.

Django is a high-level Python Web framework that encourages rapid
development and clean, pragmatic design. (Many comparisons between
Ruby on Rails and Django have been made.)

Jeremy recently wrote an article for O’Reilly on Django:
http://www.oreillynet.com/pub/wlg/9075

The conference room is downstairs in the Decatur Public Library. I
will open the room at 7pm. The meeting will start promptly at 7:30pm
and the library will kick us out at 8:45. I hope you can join us.

Address:
Decatur Public Library
215 Sycamore Street
Decatur , GA 30030
404-370-3070

Here is the meetup page for our group:
http://python.meetup.com/46/