Adventures in Aarhus

This is a blog to capture the adventures of Ken, Leysia, Max and Lilja while spending their first sabbatical in Aarhus, Denmark.

Saturday, January 31, 2009

Switching Between Python 2.5 and 3.0 on MacOS X

I'm starting to learn the ins and outs of Python 3.0: its a fun, clean language. I really like some of the changes they've made since 2.X. However, its going to be a while before I'll be able to use Python 3.0 for large projects since its not clear when the major 3rd party frameworks (wxPython, scipy, numpy, etc.) will switch to it.



As a result, I need to keep Python 2.5.X installed on my machine and use that when I'm working on ACE and then switch to Python 3.0 when I want to have fun writing smaller-scale scripts that don't require the use of the major frameworks.



So, here's what I did.



First, I followed the instructions located here to install Python 3.0 on MacOS X Leopard. (Only, I didn't bother using MacPorts to install readline. I just installed readline myself in /usr/local by downloading the readline tarball from gnu.ftp.org.)



Those instructions install Python 3.0 here:



/Library/Frameworks/Python.framework/Versions/3.0


right where it should be.



And my Python 2.X version is installed here:



/Library/Frameworks/Python.framework/Versions/2.5


My path is set-up to include this directory:



/Library/Frameworks/Python.framework/Versions/Current/bin


with Current simply a symlink to 2.5.



So, to switch between the two versions, I created two scripts, one called make2.5 which looks like this:



#!/bin/bash
cd /Library/Frameworks/Python.framework/Versions
sudo rm Current && sudo ln -s 2.5 Current


and one called make3.0 which looks like this:



#!/bin/bash
cd /Library/Frameworks/Python.framework/Versions
sudo rm Current && sudo ln -s 3.0 Current


and now I can effortlessly switch between the two versions like so:



Jiriki:~ $ python -V
Python 3.0
Jiriki:~ $ make2.5
Password:
Jiriki:~ $ python -V
Python 2.5.2
Jiriki:~ $ make3.0
Jiriki:~ $ python -V
Python 3.0
Jiriki:~ $


Heaven! :-)



Ken



Should I be concerned about the unemployment rate? YES!

See mint's not-so-governmental guide to the unemployment rate for details.



Ken

Books I'm Reading

I'm currently reading all of these books at the same time:




  1. Programming in Python 3 by Mark Summerfield

  2. Beginning iPhone Development by Dave Mark and Jeff LaMarche

  3. Learn Objective-C on the Mac by Mark Dalrymple and Scott Knaster

  4. Xcode 3 Unleashed by Fritz Anderson

  5. Head First Software Development by Dan Pilone & Russ Miles

  6. House of Chains by Steven Erikson



Why?




  1. Because Python is cool!

  2. I'm going to be developing crisis informatics iPhone apps

  3. I need to dust off my Objective-C skills to create iPhone apps

  4. You need to use Xcode to create iPhone apps.

  5. Its the textbook for my software engineering class.

  6. Because its part of the Best. Fantasy. Series. EVER.



Enjoy,



Ken

Friday, January 30, 2009

Apple's Design Team Stumbles

Our lab has an ancient Apple monitor (remember the cinema displays?) that we'd like to use with our more recent Apple laptops. I learned recently that the cinema displays used a connector technology called ADC. The machine in the lab that we want to connect to this monitor uses a connector technology called DVI. To get the two connected, you have to buy (not surprisingly) an ADC to DVI adaptor which Apple helpfully sells on-line.



It arrived last night and so I came into the lab this morning to install it. I had to admit to being surprised at how big the box was, as I'm use to the small size of the DVI to SVGA adaptors that are found strewn through the workplace of Mac users everywhere.



Well, I can't claim to understand the engineering constraints that Apple was facing when making this product but this adaptor is HUGE. Staggeringly HUGE. I mean big. Here's a picture:



Huge Adaptor: Apple's ADC to DVI



I put the adaptor next to my 17" Macbook Pro and a scissors to give it some context. It may not look that big in this picture but its huge in person. I mean its much bigger than an iPhone and gives the impression that it could be the latest rev of the Mac mini! :-)



Enjoy,



Ken


Thursday, January 29, 2009

Republicans are Unbelievable!

Guess how many Republicans in the House yesterday voted for Obama's stimulus package?



Just to help you out, there are 178 Republicans in the House of Representatives.



Also, remember, that this is the party that just ran a presidential election with the motto: "Country First".



The answer: Zero.



That's right, not one. Way to go guys, way to put country first.



Their objections: they didn't want to spend a single cent on new job creation. Not one lousy cent.



Instead, their alternative plan consisted of just tax cuts. That's it. The same plan that drove this country into the toilet over the past eight years... they just want to keep doing that.



Unbelievable! The best thing these people can do for their country now would be to resign and get the hell out of the way.



Ken



Making Verbal Progess

Miles, at two and a half, is finally making progress on verbal skills. (He is light years BEHIND Lilja, who at 18 months was speaking simple sentences and had the ability to pick up Danish words at her Danish pre-school faster than her cohort of native Danish preschool kids! At two and a half, Lilja was easily speaking in multiple sentences and using that ability to issue imperious commands to her older brother and her parents.)



Miles's most recent acquisition verbally is the ability to say "Happy Birthday" but with his own unique twist. He says "Happy Doo Doo!" and then gives a great big smile. He's saying it a lot recently because L's dad just had a birthday and Lilja turned five today! :-)



Ken


Friday, January 16, 2009

Man Thanks Wrong Entity

In a CNN story on the comments from passengers who were on US Airways Flight 1549 yesterday (the one that landed in the Hudson River) a passenger named Andrew Jamison said:



"God was certainly looking out for all of us."



thereby thanking the wrong entity for his life.



God had nothing to do with it. If you think about it, Andrew should be asking God why He threw two birds into the engines to put them into the situation in which the real hero had to step forward and save everyone's life, including his own, namely the pilot, the wonderfully named:



Chesley B. "Sully" Sullenberger III



Hey Andrew Jamison, you should be thanking Sullenberger not God. It was Sullenberger who spent decades acquiring the skills he used to safely land that plane yesterday. You denigrate his effort and his hard-won expertise by thanking God.



So, please join me in thanking the pilot of Flight 1549: he was incredible and rightly deserves our praise. As do the rest of the crew on that flight... its not easy to get 155 people out of a plane when its sinking into a river: the professionalism of that crew was amazing!



Ken



P.S. Edward Current agrees with me.


Quote of the Month

Science Avenger has put forth a candidate for Quote of the Month:




You Obama supporters are DUMMER THEN MUD and you cant keep 1 fact straight.


If this is at all representative of the opposition to Obama then I look forward to eight years of Obama leading our nation!



(And, yes, I mean eight years: With all due respect to the Mayas, I don't believe the world is going to end in Dec. 2012.)



Enjoy,



Ken

Friday, January 09, 2009

PES

These are awesome: PES

Wednesday, January 07, 2009

Big Fire in North Boulder

11,000 people evacuated. The problem is that we've had high winds today and those winds are making things very difficult for firefighters.

People on twitter are talking about the fire using the keyword: #boulderfire

One person managed to capture a classic picture of the fire earlier today.

Note: we are safe, well away from the fire, so no worries on our behalf. Focus your concern on the people who live in North Boulder.

Ken

Friday, January 02, 2009

Traveling while Muslim

Super patriots on a plane traveling from Washington D.C. to Orlando Florida correctly identified a family as Muslim and had them removed from the plane.

The super patriotic airline claims no wrong doing, even after the FBI checked the family out and cleared them of all wrong doing.

The fact that the family was talking about a subject that comes up all the time during plane travel, namely what seat is considered the safest seat on an airplane, was a complete coincidence and had nothing to do with the arrest but everything with why the FBI cleared the family of all wrongdoing.

The super patriots disembarked in Orlando falsely believing that they had done some good that day. They are currently at large in our society no doubt trying to identify other Muslim families who have the audacity to think they can travel in this country.

(Sigh.)

Ken

Happy New Year!

Here's hoping we can salvage a good year out of the piss-poor position that we find ourselves in.

If it wasn't bad enough that outright greed from the "elite" has trashed this country financially and that we still have an occupation to extract ourselves from in Iraq and real terrorists to eliminate in Pakistan and Afghanistan and that the credit card bubble is about to burst, we also have to deal with pig-blind ignorance from people that creates sites like this: The Paliban.

That site has left me speechless... it shows the true results of the anti-intellectualism that has assailed this country for decades.

All I can do is resolve to bring up my children rationally and show them how to identify and fight against this type of insanity.

We have a challenging year ahead of us... I wish us the best of luck!

Ken