Entries
RSS 2.0

Comments
RSS 2.0

Reinvention for 2008

I’m writing this post from TextMate on my brand-new MacBook. I’ve used Macs in the past, but I haven’t ever owned one myself. I’ve been in the market for a new notebook, and with my recent foray into Ruby and Rails development, and my incessant frustration with Vista, I decided to make the plunge and buy a MacBook. I had dismissed the buzz about Macs to simple “fanboyism”, but I didn’t realize how far Macs have come in the past few years. I’ve used Linux extensively, so the fact that OS X is UNIX-based was the final selling point. I mean, come on, the machine comes with a slick GUI *and* has vi pre-installed? How could you go wrong?

Simply put, this is an impressive machine. I decided against the MacBook Pro, because it really only has 3 improvements over the MacBook: aluminum casing (which adds to weight and supposedly reduces wireless power), external graphics card (which I don’t care about, since my Wii monopolizes my gaming time), and an additional FireWire port, which I wouldn’t use anyway. I also prefer smaller form-factors for notebooks, since I like to be able to toss it in my bag and work anywhere. I did, however, decide to play the “black tax” to get the dark casing. Nothing says “scratch magnet” like a white case. :)

Apple does do something that’s very confusing. The newer MacBooks (and Pros) have the “Santa Rosa” architecture, meaning you can add up to 4GB of RAM. However, if you want to buy a 2×2GB kit of RAM from Apple, it’ll run you a whopping $700! Instead, I got 4GB of Crucial memory from trusty Newegg for $72 with shipping, after $50 in mail-in rebates. I guess Apple figures that people that buy the top-of-the-line don’t know better, but come on, a 900% markup? Right now, I’m running with 1GB of RAM, which is plenty as long as I don’t try to do anything too exotic.

Since I’m still a Microsoft developer by day, I also picked up a copy of VMWare Fusion, which is quite literally the most impressive piece of virtualization software I’ve seen. Unity Mode makes it ridiculously simple to run things like Visual Studio seamlessly with the typical OS X experience. This is the main place where the RAM upgrade will help… virtualization, after all, comes at a price, but so far Fusion’s performance has been very good considering I only have a gig of RAM.

If you’ve been considering buying a new computer, I highly recommend that you give Macs a chance. When I mentioned I was planning to buy a Mac, a lot of people were surprised that I would be interested in one. I think the common misconception is that since it has a slick, simple-to-use interface, it would get in the way of being a “power user”. I can definitely say that this is *not* the case, particularly for someone with a UNIX background. It’s really nice to be able to flip open a BASH terminal and type away — but unlike X-Windows on Linux, you aren’t *required* to do so. The snazzy OS X interface hides a tremendous amount of power in this little machine.

I’m sure that my honeymoon with Macs will end eventually, but for now, I’m very impressed, and I wish I hadn’t waited so long to give them a chance.

Light at the End of the Tunnel

One of my pet peeves are blog posts where the writer says “don’t worry, I’m not dead, I just haven’t posted in awhile.” I promise this won’t be one of those, in spite of the fact that it’s been a few months since last time I’ve written anything.

Work has been particularly taxing for the past couple of months… actually, as I write this, I’m on a flight to Las Vegas for our first field test of the system that my team and I have been writing since the end of summer. It hasn’t been easy, but I think we’ve got a great piece of software. Hopefully, any bugs will present themselves in Vegas, and we can fix them up before we go live in January.

In spite of being difficult, this project has actually been a lot of fun to work on. We’ve been able to use some really interesting technology, and apply it in particularly creative ways. I mentioned the different pieces of software we were using already, but we’ve added some things since then. The product uses handheld computers to capture data, and transmit it back to mobile servers via a wireless LAN. Since the area that the handhelds need to be used in is pretty large, the system is designed to operate “disconnected,” meaning the handhelds can queue messages and transmit them whenever they come back within range. The entire system has to be mobile as well, so the servers are broken down and moved between locations. That means a whole bunch of data migration and synchronization logic, not to mention importing data from existing legacy systems — specifically, manufacturing machinery.

Originally, we had intended on writing two interfaces to the system, one in WinForms, and one in ASP.NET. In the meantime, one of the developers mentioned the absolutely amazing JavaScript library ExtJS. It’s by far the best toolkit I’ve seen for creating rich Internet applications that have the feeling of a thick-client without the bulk. As a result, we ended up wrapping all of the interface into a web site. I admit, working with JavaScript was a bit painful, but I think Ext dramatically improved our efficiency, and made the project work and look great.

The interface was backed by a RESTful architecture written using Castle MonoRail and ActiveRecord. This was the largest project that I’ve applied NHibernate to, and it was amazing how much easier it made the entire development, not having to work directly with the database. We split off some long-running processes into Windows services, which the web site communicates with via remoting. (I would have preferred WCF, but .NET 2.0 was a requirement. For the next project, I hope to dust off my shiny new MSDN copy of Visual Studio 2008 and crank out some C# 3.0… :)

Our final stack ended up being:

  • .NET Compact Framework 2.0 SP2 on Windows CE 5.0, with OpenNETCF to fill in the holes here and there
  • ExtJS 2.0
  • Castle MonoRail, with the Brail view engine, but mostly just for piping JSON back and forth to Ext
  • Castle ActiveRecord for pretty much all data access, except for legacy systems (for that, we went straight to ADO.NET)
  • Ninject, integrated into MonoRail
  • A custom build of Ninject created for the Compact Framework (first time I’ve applied IoC in a compact framework environment… very interesting, and very useful!)

This project has definitely made me re-think the way I develop software. I used to be skeptical of RIAs, but I’m starting to believe that in certain situations they can be a dramatic improvement over thick applications.

Another contributor to my changing mindset is the fact that I’ve been spending my free time (the little of it that I’ve had) learning Ruby and Rails. My wife and I have started to develop a concept, the end result of which is a web site that should launch in the next couple of months. (If only there were 28 hours to a day…)

Ruby is a fantastic language, and working with it has made me become a little frustrated with the verbosity and rigidity of C# from time to time. (In particular, Ruby blocks are friggin’ sweet.) Ruby is the first “dynamic dispatch” language that I can really get behind… I really think it strikes a great balance between flexibility and clarity. I’m no fan boy, though, and I think that the hype does the language a disservice, by distracting from its legitimacy.

I’d love if there was a way to write Ruby for client-side browser code, rather than using JavaScript… :)

Rails is by far the most impressive full-stack framework for web applications that I’ve ever seen. Certainly, it’s not without its problems, but I can definitely see that the buzz has merit. One of the most impressive pieces is the database migration system. Each time we made a change during my “day job” project, I longed for a similar system in .NET. (If someone can tell me how I can bend the space-time continuum to give myself more time to work, I’d be happy to write one. :)

So there it is, my “I’m not dead” post. :) Over the next few weeks, my “day job” workload will be decreasing, so I should be back more often with more inane ramblings!