Monday, August 28, 2006

 

Self-Employed Again

I had nice, stable, full-time permanent employment, but today I gave my two weeks' notice so that I could accept a contracting gig. Maybe I didn't learn anything from my failed contracting career.

This didn't come out of the blue. I made the decision to leave my current job a few months ago. My latest project finished about a month ago, so I was able to start looking for work.

The timing of the offer was pretty good. I was on vacation last week, and now I have two weeks of not-really-doing-anything, including a three-day weekend, before the new job starts. It's almost like having three weeks off from my old job, except for all the stuff I need to do to prepare for the new job.

I've already bought a new MacBook and other computer equipment, knowing that I'd use it all for work (and that I'd get to write it off). Now I need to take care of getting a business license, medical insurance, accounting software, and all that other stuff that small business owners need to do.

Do I expect this time to be different from the last time I tried going independent? Yes. The economic climate is better, and I have a couple of reliable sources of future work. I'm also ridiculously optimistic.


Saturday, August 19, 2006

 

Installing Windows XP on Parallels

Parallels Desktop is a VMWare/Virtual PC-like application for Mac OS X whch allows one to run other operating systems on a Mac. I want my MacBook to be my one-and-only laptop, so I need it to run Windows XP and Visual Studio 2005.

I had trouble installing Ubuntu under Parallels with my first MacBook, but it installed without problems on my second MacBook. I think this is because I upgraded the RAM to 2 GB on the second MacBook. Ubuntu works very well in full-screen mode on the Mac; it's better than my dedicated Ubuntu notebook.

So, confident that it would be worth my time, I started the process of installing XP on Parallels. macosxhints.com has an article describing how I could use my now-obsolete Virtual PC disks to create a bootable XP installation disk. The article is focused on setting this up with Boot Camp, but one some of the comments described how to do the same thing with Parallels.

Once I had the bootable CD, everything was easy. I installed XP Pro, downloaded all the updates, and then made a clone of that virtual machine, so I can return to a pristine XP installation any time I need. Then I installed Visual Studio 2005 and SQL Server Developer, and made a clone of that as well.

The XP install used up about 2.5 GB. Adding Visual Studio grew it to 9.3 GB. That's a pretty big chunk of my 60 GB hard drive, so I don't think I'll be keeping too many clones around. I did a full install of all of Visual Studio's components and documentation; if I do it again I'll be more selective.


 

Vacation

I'm spending the next week at a lake house in North Dakota. I plan to do a lot of lying around, with brief interruptions to play golf.

I won't be taking my MacBook or my BlackBerry with me. I will have my personal mobile phone with me, but I expect to just leave it in my suitcase, turned off.


 

MacBook Wireless Connection Drops While on Battery

A problem I've seen with both my first MacBook and now my new MacBook is that the wireless connection drops while on battery power.

I'm not the only one who has seen this. A thread in the Apple discussion forums indicates that many people have the same problem. It seems to be related to particular wireless routers, and Apple recommends buying one of their AirPort products to fix the problem, but the problem only occurs on battery power, so it seems to be related to how OS X deals with power management.

The drops can be prevented by ensuring that the wireless connection doesn't stay idle. One way to do that is to run "ping -i 5 somehost.com" in a Terminal session. Unfortunately, continuous pings increase battery drain.


Friday, August 18, 2006

 

MacBook, Take 2

After work, I stopped by the Apple Store and bought a new MacBook. Due to a promotion, I also got an HP Photosmart C4180 printer/scanner/copier for only $20 (after rebate). The whole transaction took about five minutes. I wish I'd thought of this yesterday, instead of spending half an hour at the Genius Bar.

When I turned on the MacBook for the first time, the Apple logo appeared but there was no chime. Then when the Getting Started video started playing, there was no sound. Uh-oh, not again! But a few seconds into the video, the speakers suddenly started working.

During the setup, I couldn't connect to the Internet via my wireless network. Uh-oh, not again! But after power-cycling my DSL modem and router, it worked.

I was pleased to see the battery indicator in the menu bar. No "X" yet.

So now I'm downloading software updates again. Then I'll install Xcode again, and copy all my applications over again, and set all my preferences again, and so on. I'm just hoping I don't have to take this back to the Apple Store again.


Thursday, August 17, 2006

 

MacBook Battery Problem

The Problem

Well, my initial happiness with my MacBook was short-lived. There was some sort of problem with the battery or power circuitry. Here were the symptoms:

Resetting the PMU didn't help.

Apple recommends that you periodically recalibrate a laptop's battery by running it all the way down and then charge it back up. So I tried that. After it ran down and turned off, I plugged the power adapter back in and restarted. The menu bar icon showed the battery was charging. A few hours later, the LED on the MagSafe connector turned green. So everything looked good for a few minutes. But after a few minutes of running plugged in, I got the "X" and the amber LED again.

So I made an appointment at the local Apple Store Genius Bar. The Genius reset the NVRAM, and the laptop seemed to work. We rebooted it, unplugged, several times, and there were no problems. The battery icon never turned into an "X". The Genius and I watched it for a while, then I decided I'd take it home, and return if the problem recurred.

I took the MacBook home, and the problems recurred.

I did figure one thing out: the MacBook started having problems after I changed the brightness of the display. At maximum brightness, everything worked fine. Once I changed the brightness, the problems returned. This sorta makes sense—the brightness is one of the things that gets reset when one resets the NVRAM.

I wasn't willing to live with a MacBook permanently at maximum brightness. As a last resort, I decided to reinstall OS X. After reinstalling the OS, there were no problems for a few hours, but then they returned.

I read several threads in the Power and Batteries on a MacBook discussion forum hosted by Apple. Problems such as mine seem to be fairly common, but nobody knows how to fix them.

The Solution

At this point, I could take it back to the Genius Bar for another repair attempt, but the easier approach is to just return this unit to Apple for a refund, and pick up a new one at the local Apple Store.

I'm sure some would argue that a better solution would be to stop buying Apple products. I considered that, but I do really like the MacBook.


Wednesday, August 16, 2006

 

MacBook Arrived

The refurbished MacBook I ordered about a week ago arrived today. I'm happy.

I don't know how the brand-new MacBooks are packaged, but this refurbished model came in a plain brown box, with very little on the inside other than the notebook, the power adapter, a power extension cord, and a CD-sized box containing the user's guide, OS X Install disk, and a few other bits of paper.

I plugged it in, turned it on, answered a few questions (which wireless network to connect to, my name, etc.), and then I was good to go. Total time from opening the box to having a working computer was about five minutes. A lot of that time was spent unwrapping the twist ties from the power cords, and letting the MacBook take snapshots of me for use as my user picture.

It's downloading the system updates now. Here are my immediate plans:

I have only one complaint so far: I didn't notice before that the MacBook keyboard has only one Ctrl key. This will make it difficult to use vi or Emacs. I guess I'll have to adapt.


Monday, August 14, 2006

 

Flight Simulator X Demo

There is a demo for the newest version of Microsoft Flight Simulator. It looks very nice. The landscapes now have realistic hills and trees. Cars drive along the roads. Boats travel through the oceans.

I don't know whether anything has changed about the simulated physics, but the plane does "feel" a lot less jumpy than with the older version of Flight Simulator.

The default graphics settings were awful, so my initial impression was not good. But once I increased the frames-per-second from 20 to 60, everything looked great.

The trial only has four planes, and a limited number of airports, but it's enough to give a taste of what the product will be like. I'll buy it.


Sunday, August 13, 2006

 

Horror Movie Actors

I name my home computers after dead horror movie actors. My current machines are named karloff, lugosi, rathbone, and barty.

My new MacBook needs a name that fits the scheme. Here are the names I'm considering:

I've rejected chaney and schreck, because while I enjoy their work, the names just don't seem right. I'd really like to name a machine after Elsa Lanchester (Bride of Frankenstein), but lanchester is just too long, and elsa wouldn't fit the scheme.

cushing is currently my favorite, although price seems fitting for an Apple product. If anyone has any other suggestions, please comment.


 

Helicopter Bits

Long-time readers of my blog may remember that I used to fly radio-control helicopters. I abandoned that hobby when I started flying real aircraft, because the real aircraft are actually cheaper in terms of dollars-per-minute-of-flight.

My helicopter has been sitting on my desk in pieces for over a year. Today I finally decided to clean up the area for use as a home office. All the helicopter parts have gone into a box. I'm not sure whether I should try to sell the box on eBay, or just throw the thing out.

It is a little sad, because the junk in that box cost several hundred dollars, and I had a lot of fun with it. But I'm moving on. I thank my little helicopters for their service, and wish them well in their retirement.


Saturday, August 12, 2006

 

Something Different

A new boss is asking me to take over development of an ASP.NET-based web application. For the first time ever, I'm going to get paid to develop software in a programming language other than C or C++. And I didn't need to switch employers!

Happy, happy! Joy, joy!

I'm spending the weekend trying to get up to speed with ASP.NET 2.0 and C# 2.0. I'm not a complete newbie to .NET, but my last experience with it was three years ago, using version 1.1 of the framework. C# has just a few new features, but ASP.NET has evolved quite a bit.

I'm reading Programming Microsoft ASP.NET 2.0: Core Reference by Dino Esposito. It seems to be one of those all-too-rare good programming books. It doesn't have a screenshot on every page, and the code examples are short and focused. It barely mentions Visual Studio. It's not written for dummies. It's written for real programmers.

I expect to get to have a lot of fun at work over the next few weeks. I won't have to get my fix of new programming languages and libraries in my spare time—I'll get to do that during working hours. (Unfortunately, this means my OCaml chess program probably won't get finished.)

In a couple of months, I'll be writing about how horrible C#, ASP.NET, Visual Studio 2005, IIS, ADO.NET, and SQL Server all are. But right now, I'm excited.


Friday, August 11, 2006

 

Technology As an Enabler

A co-worker bought one of those silly little phones that fits in your ear. I asked him why he needed that Borg-like appliance.

"Because now, it will be easier to talk on the phone and smoke a cigarette at the same time while I'm driving."

He's a multi-tasker.


Thursday, August 10, 2006

 

Automated Builds

Jim Shore posted a good article today about the pleasures of a automated build. By coincidence, I created an automated build script for our team's project today, so I have a lot of thoughts about it swirling around my head.

People not in the software business might wonder what a "build" is. Briefly, a software product is created by bringing together a whole lot of files (often thousands), and running them through a series of preprocessors, compilers, linkers, unit tests, and packaging tools. The process usually takes a long time and a lot of CPU cycles and hard drive space.

The process is particularly difficult when it involves a lot of manual steps. A typical manual build process might be something like the following:

  1. Build Master tells everybody that it is time to make a build, and asks everyone to get their code into the repository. Then Build Master waits an hour or so while all the other developers try to finish "just one more thing".
  2. Build Master opens source repository browser tool, navigates to the place where the code for a component is, then chooses the "Get Latest Version" command. Build Master then sits for five minutes while all the code is copied to the build machine.
  3. Build Master opens Integrated Development Environment (IDE), opens the project/solution/workspace/Makefile/whatever, and issues the "Build" command. Build Master then sits for five minutes while the component is compiled and linked.
  4. Build Master repeats steps 1-3 for each additional component that makes up the product.
  5. Build Master runs some simple tests to verify that all the components built and work together. This takes five minutes if the Build Master is lazy, or much longer if the Build Master is thorough.
  6. Build Master opens the packaging tool. Build Master modifies the package configuration to handle any new files and to update version information. Build Master then creates the installation package.
  7. Build Master tests the installation package, to verify that it actually will install a working system. Repeat steps 1-6 until this actually happens. (At this point, most of the other developers have gone home, so it will be up to the Build Master to fix any show-stopper bugs.)
  8. Build Master sends the installation package to the testers, then goes home. (By this time, it is long after 6:00 PM.)

The good thing about the manual way is that you have a person performing some quality control during each step, and the person can immediately start beating developers who have introduced defects. But it is very time consuming, and it is hard to reproduce the results of any particular build. It is much better to have an automated build script. Then the process goes like this:

  1. Build Master starts build.
  2. Time passes. During this time, the Build Master may work on other tasks.
  3. Build script completes. Build Master checks the build log for errors or anomalies.
  4. Build Master tests the installation package, to verify that it actually will install a working system. Repeat steps 1-4 if necessary.
  5. Build Master sends the installation package to the testers, then gets back to work.

Or the process can go like this:

  1. Everybody goes home at 6:00 PM, or whenever they finish their work for the day.
  2. At midnight, the build machine automatically starts up the build script.
  3. The following morning, the Build Master checks the results, then either sends a good build to the testers or starts fixing problems.

While automated scripts are clearly better, there is often reluctance to create them. Once they exist, people love them, but many programmers would rather spend their time mindlessly going through the steps then spend a little time automating the process.

Our team was like this. For the past six months or so, all the builds have been manual. The process generally took a couple of hours from start to finish. We talked many times about how great it would be if we had an automated script, but it just didn't get done.

Last week, I became Build Master. I decided I would go through the steps manually a few times to make sure I understood them. But today, I had a couple of spare hours, so I finally wrote that build script. It's a 25-line .BAT script.

It's not finished. Right now, it gets all the sources and other files out of the repository, builds the components, and puts them in a staging area. The testing and packaging is still a manual process, but I'll tackle those parts tomorrow.

If you don't have an automated build for your system, then make one. Trust me, it will make your life better.


Wednesday, August 09, 2006

 

Warm and Fuzzy

My Mom has warned me that I haven't put anything "warm and fuzzy" on my web site in a while, and this is bound to hurt me in some sort of karmic reap-what-you-sow way.

So, here's a link to a nice web site I've been visiting a couple times a day: Kittenwar. Enjoy.


Tuesday, August 08, 2006

 

I Bought a MacBook

Well, I just bought a refurbished 2.0GHz MacBook from Apple. Estimated delivery: August 17.

Of course, I'll let you know how this goes.


Sunday, August 06, 2006

 

Samsung SyncMaster 204B LCD Monitor

This weekend, we had a sales-tax holiday in Georgia. Computer components were among the tax-free items, so I decided to buy myself a new monitor.

Up to now, I've been using a 20-inch ViewSonic CRT on my Windows machine. It was considered huge back when I bought it, but now 20-inch monitors are no longer a luxury item. That monitor supported 1600x1200 resolution, but was a bit blurry, so I usually only used it at 1280x1024. It was good for games, but I didn't really like doing "real work" with it at that low resolution.

I've really liked the LCD displays on my laptops, the iMac, and my 24-inch Dell display at work, so I decided to get one of those.

When I first started looking, I was disappointed to find that most 17-inch and 20-inch LCD monitors only support 1280x1024. WTF? For me, the point of having a big monitor is not just to make everything bigger—I want to be able to put more information on screen. Why buy a 20-inch monitor when it displays the same thing a 15-inch monitor does?

I was also annoyed to find that most LCDs with higher resolutions are only available in a widescreen aspect ratio. Are there really that many people watching HD programs and DVDs on their computer screens?

For "real work", the traditional 4:3 ratio is better, I think. I like a tall screen, so that when I'm working on source code or documents, I can see more of it. A widescreen aspect ratio sucks for that kind of work.

Anyway, after enough searching, I finally found the Samsung SyncMaster 204B. It does 1600x1200, has a quick response time, and was only $299 (after an $80 rebate). Thanks to the sales-tax holiday, I saved about $26.

So far, I have no complaints. It's a last-generation bare-bones LCD monitor, without USB hubs or other snazzy features that the newer LCD monitors have. The 1600x1200 picture looks nice, and the display takes up a lot less desk space than my CRT did. That's all I wanted.

I'm tempted to buy a second one, so that I'll have a multi-screen desktop, but then I'll have to buy a new video card. And a new desk.


Thursday, August 03, 2006

 

To-Learn List Update

Several weeks ago, I posted my To-Learn List. Here's an update on where I am:

OCaml

I read Developing Applications with Objective Caml, and I am currently working on a chess program in OCaml.

I really like OCaml, but I don't think I will never get to use it for real work. Even so, I think learning it makes me a better programmer.

Haskell

I've made it through the first few chapters of The Haskell School of Expression, by Paul Hudak. I like what I've seen, but I don't really know much about Haskell yet.

Eclipse

I've gone through a couple of the tutorials in Eclipse. So far, I'm not impressed. I suspect Eclipse is wonderful if you do Java, but that's not what I do. I'd rather use XEmacs. People at work are trying to find a 'good IDE" for Linux, but I don't think Eclipse will be it.

AJAX

I read Pragmatic Ajax. That book was really just an introduction to a bunch of Ajax libraries. I don't think I really know much. I'd rather know more about the low-level stuff—any idiot can use a library.

MySQL Internals

Not much going on with this. It's more likely that I'll be delving into SQL Server internals. Maybe I'll take the test that I need to become a Microsoft Certified Database Administrator, which might look good on the resumé.

OpenGL

I've started reading Game Programming in C++: Start to Finish by Erik Yuzwa, which covers an SDL-based library, which in turn uses OpenGL.

Other Learning and Habit-Changing

Changes at work mean that I might get to use .NET, so I've been re-familiarizing myself with that. I bought the Visual Studio 2005 upgrade, and spent an hour installing that on my Windows box tonight. But I also reactivated my World of Warcraft account, so I don't know how much VS I'll be doing in my spare time while sitting in front of my Windows machine.

I'm using Vim exclusively as my programming editor at home, on Mac OS X, Ubuntu, and Windows. I'm finding that I prefer it to XEmacs when using a laptop computer. I use it a little at work, but the VS editor is second-nature to me, so I usually just use that while I'm being paid.

All of my for-fun hacking is on Ubuntu. Right now, that consists of OCaml hacking, which is well-supported by Ubuntu and Debian.

I'm reading Basic Category Theory for Computer Scientists by Benjamin C. Pierce. It makes me feel stupid, but after reading each chapter two or three times, I'm starting to understand it. At least, I think I know what a "monoid homomorphism" is.


This page is powered by Blogger. Isn't yours?