February 15th, 2007 § § permalink
The nice thing about writing a little ‘signup’ application for a class that your wife teaches is that you have full control over the hijacking of that application any time you feel like it. See figure one:

Fortunately for me I didn’t get shot down, and we got some Gold Class seats at VivoCity.
Today, unfortunately, is not turning out nearly as good as yesterday. My mac is seriously on the fritz exhibiting the following completely random and seemingly unrelated ‘features’.
- Adium can not connect to any of the IM protocols I have configured including Yahoo, MSN, AIM and GTalk.
- Microsoft Word opens all files as Read-Only so if I want to modify them I have to “Save As…” first.
- Although CPU usage is completely normal, the entire systemm locks up at random, and I can barely switch between applications or type at a normal speed.
- My Airport signal strength indicator is in a “permanent off” state. My laptop is 100% convinced that my Airport is turned off, but I’m connected wirelessly to my network as I post this.
- DNS is completely screwed. I have to hit Shift-Reload sometimes 3, 4 or 5 times to get a page to show up in FireFox or Safari because it can’t seem to resolve random hosts. (This could partially, maybe, explain the Adium behavior.)
- Random applications terminate as soon as I start them. Yesterday it was Remote Desktop Connection. I would start it up to connect to a Windows box, and it would terminate before I could do anything. Today it’s photoDrop droplets that are crapping out.
- Mail.app won’t download any of my Mail (potentially also could be related to network issues, I suppose).
- Often when I start an application (say, TextMate or iPhoto for example) – I can’t click on any of the menu items in the menu bar. They’re locked. Which means I’m limited to only being able to use the functionality of the app that I remember via keyboard shortcuts, until it magically decides at some point in the future (20 minutes, 40 minutes – it’s all a great guessing game) when it decides it will permit me to now click on said menu items.
As I’m typing this, SuperDuper! has just finished backing up all my user files, and Mr. Laptop is now going to receive a full enema. I sure hope that this isn’t a hardware problem, or I’ll be severely unimpressed. At least the thing is under warranty. But if Apple is going to take my laptop for a week while they try to figure out what’s going wrong – I might have switched to Ubuntu by the time they give it back to me.
February 14th, 2007 § § permalink
Coding in Ruby is like using a Mac. If you’re not used to it, you spend quite some time looking for an obtuse way to do something, only to come to a “one line of code” solution about 2 hours later.
For me, I wanted to deserialize a YAML serialized ActiveRecord::Base subclass. Looking at the YAMLrdoc, it appeared that I could register a custom type via YAML::add_domain_type – but I wanted to Google around a bit just to see if anyone had already solved this <ahem>YAML deserialization problem</ahem>, to find me some sample code.
I learned nothing via Google, so I turned to the handy rails console (may it live forever) for a quick test, and I ended up with something like this:
monkey:~/Work/[client]/trunk daniel$ ruby script/console
Loading development_daniel environment.
>>
>> class BlaTest
>> attr_accessor :bla
>> end
=> nil
>> b = BlaTest.new
=> #<BlaTest:0x3718164>
>> b.bla = "Yay Test"
=> "Yay Test"
>> c = YAML::load( b.to_yaml )
=> #<BlaTest:0x37138bc @bla="Yay Test">
>> c.class
=> BlaTest
>> c.bla
=> "Yay Test"
So basically, we’ve created a new class with a single property, instantiated an instance of the class, set the property, and then we’ve called YAML::load for the YAML representation of our created instance. The result of YAML::load we’ve assigned to c.
To my surprise (astonishment?), I didn’t even need to register my custom type at all. As you can see, the resulting instance c is of type BlaClass with the appropriate value for the bla property.
One line of code. Beautiful.
February 11th, 2007 § § permalink
Over the past 3 days, I’ve found that more and more of the searches that I do on Google via the little Google search box in FireFox is sending me off to this page:

Now, these searches have been anything from stuff like “rdoc syntax” to tourism information on Laos. I’m really not sure why I keep getting dumped to this page, but it’s starting to get freakin’ annoying.
February 8th, 2007 § § permalink
As one might already know, I read a lot of books. Two of the latest titles have been A Generous Orthodoxy and A New Kind Of Christian – both written by Brian McLaren.
These books discuss a lot about Christianity (and other religions) as they pertain to modernism and post-modernism (among other things).
This got me to thinking about the software development industry, and how the industry is reacting to an era in transition. We are transitioning from the modern era to the post-modern era (and probably have been for a while, whether or not we knew it) – and I’ve formed a bit of an opinion (hypothesis?) about programming languages, tools and frameworks as they relate to this post-modern transition.
It seems to me that the characteristics of dynamically typed languages are those that seem to embrace post-modern characteristics, whereas the characteristics of statically types languages seem to more tightly cling to the characteristics of modernism.
Some terms I’ve heard, used in characterizing post-modernism are things like transience, flux, pluralism, fragmentation. Modernism seems to try harder to rationalize everything, with concreteness – very ‘scientific method’ like.
Am I completely out to lunch, and off my rocker? Probably. But I see a lot of post-modern characteristics in tools like Python, Ruby and Rails. And I see a lot of modern characteristics in tools like Java, C#, etc.
If I wanted to start to talk really crazy, I might say that tools like ASM, BCEL and ideas like Aspect Oriented Programming attempt to take a modern paradigm (in this case Java related) – and, keeping the ‘safety’ and ‘concreteness’ offered by Java as a statically typed language, apply manipulations to byte code at compile or load time, in an attempt to provide some of the benefits that a language like Ruby provides out of the box (in these examples, the ability to dynamically modify and redefine code at run-time). One thing that’s great about tools like Spring is how it manages to take the best of what it can from both paradigms (given the limitation that it’s a framework written in Java for Java developers) – and bring all sorts of post-modern characteristics with it to the Java platform (load-time weaving, friendly AOP, etc.).
I’m probably blabbing about a whole lot of nothing, but no one said you had to read it.
February 5th, 2007 § § permalink
Last night proved to be a great time, with a Java meetup here in Singapore once again brilliantly organized by Christopher Marsh-Bourdon. The event was held at Brewerkz and us Java geeks were on the receiving end of a great overview of the many facets of the Spring Framework from one Ben Alex, of Interface 21 and Acegi/Spring Security fame.
It was great to have a chance to chat with Ben a bit about Spring, open source companies, and different approaches that companies seem to take in building APIs and interacting with developers and users of said APIs.
My first experience with Spring was on a somewhat large personal project that I started working on about a year ago. Code that hasn’t seen the light of day in the real world, but has been a phenomenal learning experience as far as working with Spring, Acegi, as well as the Spring HibernateTemplate support, Spring MVC – and a bunch of other stuff that I just can’t remember.
If any of you out there have the attitude that I used to have, which was something like:
“Why do I need to use Spring, it’s just another framework, and all it does is manage other frameworks.”
I highly recommend that you download Spring right now, and use it. You won’t be disappointed. It’s worth the download and integration for the IoC and Dependency Injection alone.
February 2nd, 2007 § § permalink
New company with Nick Means (from Texas y’all) is slowly starting to take shape. Between getting paperwork sorted out, coding for clients and looking for new clients – it’s keeping us pretty busy.
So for all your Ruby, Rails, Java and PHP needs…click.
January 29th, 2007 § § permalink
I just finished reading a rather excellent interview that Jessica Livingston (of YCombinator fame) conducted with Joel Spolsky. The interview comes out of a book that recently went to press called Founders at Work.
Joel’s getting a little cheeky in his old age, but he still captivates when talking of technology, programming, and addressing issues near and dear to those with an entrepreneurial spirit. In this particular interview, a number of things stood out to me, but none as significant as this. Joel addresses a certain segment of software developers and says:
To them, it’s just kind of engineering step by step; it’s never the magic of creation.
That’s exactly what I don’t want for my ‘career’. To me, I want it to always be about the magic of creation. What code can we weave? What problems can be solved? What great hack can we write that reduces 2000 lines of code to 2 lines of code. Solve problems. Code for the end users. Code for the customers. Code with passion.
January 24th, 2007 § § permalink
I’ve used IRC on and off for the past, um, 10 years or so. I’ve had a Mac for the past 5. For the life of me, I had not been able to find an IRC client for the Mac that didn’t completely and utterly suck. That is, until now.
Enter Colloquy – the sweetest, loveliest, most wonderful IRC client for the Mac that I have ever seen. Maybe the sweetest IRC client I’ve ever seen anywhere.
Now if only #van.rb and #singapore.rb weren’t all tombstone and tumbleweed like
Did I mention it’s free?
January 23rd, 2007 § § permalink
If you thought Steve’s demo of Multi-Touch on the iPhone was impressive, you need to see this TED talk from Jeff Han, who is a research scientist for New York University’s Courant Institute of Mathematical Sciences. Get the feed or download a zipped copy of the QuickTime file.
This is multi-touch gone crazy. The keywords that grab me are “low-cost”, “scalable” and “high resolution”.
This is a must-see.
January 21st, 2007 § § permalink
My favorite podcast, hands down, is the JavaPosse. There’s nothing quite like sitting back with a cup of coffee and listening to Dick, Carl, Tor and Joe yammer about Java (and/or technology in general) – especially if they’ve been drinking.
A few months ago they launched a Google group in which I am an avid lurker, and very occasional poster. One of the more recent threads was surrounding third-party iPhone application development. I think that the winning comment in this thread was this one:
The simple question here is therefore “Is this phone of any further interest to the Java community/Java Posse?”.
He might as well have said:
If it’s in the world, and it has nothing to do with Java, we shouldn’t discuss it or have any interest, and said object might as well be used as toilet paper. If it’s not Java, it can kiss my bleeeeep.
Forget the fact that it’s a phone – and I could care less if it had anything to do with Java whatsoever. I don’t care if I can write or run 3rd party apps on my phone, or my iPod. I want a phone so I can (go figure) phone people. Of course, all the other iPhone stuff is awesome as well (calendaring, sms, voice mail, iPod, photos, videos, etc.). Why, for the love of all things good, would a community write off said device claiming it no longer deserves “any further interest [from] the Java community” – because it doesn’t have Java on it? Maybe the Java community should stop having interest in hard disks, or RAM, or digital cameras, or iPods for that matter – simply because they don’t allow for third party Java application development on them. I’m making a pact right now. I’m not going to purchase another stick of RAM until I can plug it into a USB port on my laptop, and write a third-party Java app for it that makes it light up, or sing, or something.
Unfortunately, this is the collective wisdom that (stereotypically speaking) the Java community now tends to bring to the table. Let us look at a fictitious (but not fictitious at the same time) example:
Jim: Hey there, have you played with Ruby at all?
Greg: Are you crazy, that stupid thing?
Jim: It’s got some really powerful syntax, and I can’t believe how fast you can prototype apps in it.
Greg: Nothing more than a stupid toy language.
Jim: Have you used it? Have you seen how powerful some of the APIs are?
Greg: No. I’m a Java developer.
Jim: Why don’t you just take a look, see what you think?
Greg: No. If it’s not Java, it’s stupid and useless.
Right. Thanks.