iMac@work

Date: 2008-11-02 11:52:02 Created: null

2007-01-29

Today our first modern Apple computer arrived at work, a new and shiny twenty-inch iMac. Right from the start I've intended to use it as my main work computer and so I spent part of the evening setting it up. While I assumed it would work in the end, I had no idea how much or little trouble the move might be as we've always been developing (and deploying) on Windows machines only. So I thought I'd document the process right here.

We develop in Java using Netbeans as our IDE. Our source code resides in a Subversion repository on a Windows server, along with our development mySQL database. Netbeans has builtin Subversion support, but requires a Subversion client to be installed on the system to work. I'd never gone through that process on my own before, so I figured if anything would really screw up, that would be it. Precompiled install packages for Subversion were easy to find, but they weren't the latest version. Fortunately, it turned out, neither was our Subversion server. I installed the client, being careful to follow the advice of adding /usr/local/bin to the system PATH. Still, Netbeans Subversion setup kept complaining, asking me to please check that Subversion was added to the path and restart the IDE. But it's added properly! Look, I'm entering test commands in the terminal!

Oh, right, perhaps add it to the Java path Netbeans looks at?

Right.

Diving into netbeans.conf and adding /usr/local/bin to the parameters there did the trick. More specifically, I opened up netbeans.conf (which hides inside the Netbeans application package, in the "Contents/Resources/NetBeans/etc/" folder) and added "-J-Dsubversion.path=/usr/local/bin" to the end of the "netbeans_default_options" parameter. Soon I had (to my slight amazement) checked out all my projects and was going through the usual fun of defining my libraries. And right after that, lo and behold, things built properly! Every single project!

Keeping my fingers crossed, I tried to run the client and server. Clearly I had already had enough first-try success for one night. Running didn't work, the server got some kind of access denial when it tried to fetch data. After checking that the OS X firewall was off and out of the way I decided to stop there for the evening. I'm sure that fresh eyes and perhaps a quick consultation with the man with the candy-floss hat will provide a solution easy as that.

And that will pretty much be it. Probably. As long as things build and run I can do my work on the iMac. Moving mail settings over is, what, a five minute job? (Of course I've set up my IM clients already. And yes, Quicksilver came down before the first round of system updates were finished.) These modern days of open-source, cross platform tools are wonderful. That's what it comes down to really, if Netbeans, Java or some other major part of our toolchain had not been available, and current, on OS X this little jump would not even have been contemplated.

Future fun: Netbeans keyboard shortcuts on the Mac - are they an unlearnable horror? Needing connection to a shared Windows drive to be able to do work - how soon will it bite me? How soon will I want more than the stock gigabyte of RAM? Will I ever miss Windows? Will I be installing Parallels or keeping two computers running to get all I need done? Will the chance of an all-Mac daily life make me an unbearable snob? Stay tuned for the next exciting episode!

Mac@work, episode II, 2007-01-31

Trouble struck early on the second day. That shared Windows drive, remember? That was the one. Apparantly, if you keep your repository on a SMB drive Mac users get errors when they try to commit changes. Which is what I tried to do on day two. As other things were more pressing, I went back to my Windows box, taking my changed files with me, and went on with my work. As updating things worked flawlessly I used the iMac to run demo/test builds, but that's not the way I wanted it.

Anyway, the next day Martin and I found some time to investigate and solve the problem. What we needed to do was connect to the Subversion server process and correctly tell it where the repository was. The server was actually already running, but as we hadn't used it before and initial setup had been a very experimental process it wasn't properly configured. Martin did the actual moves, but I believe it really was as simple as killing the server and restart, feeding it the right path to where we located our repository. After that, all I needed to do what check everything out from the "new" repository into a new folder on the iMac (as the old one was, in Subversion's eyes, used by a different repository), point my projects to the new folder for source files and pretend we'd never had a problem. As usual for things coming from the *nix/*nux world, it was all really simple and straightforward to do if you already knew the steps.

So, it would seem the major hurdles have bene cleared. As for the Windows question I was informed that more Parallels licenses will be purchased before I had time to even seriously consider my future needs. Netbeans shortcuts seem quite learnable too, but some re-assigning of things is necessary. I moved my Quicksilver keystroke so I wouldn't have to change the autocompletion shortcut (that would probably have been a killer), but I've prefered moving the build shortcuts instead of the Exposé invocation keys. As a result I've lost some debugging shortcuts, but I didn't use those much anyway, so putting them elsewhere probably won't hurt too much.

Episode III, 2007-02-05

In preparation for future needs I finished work today by installing Windows XP in Parallels. I left it to enjoy itself installing 64 critical system updates, and I assume I'll have to start fetching a few more tomorrow. I wouldn't be too surprised if I will spend more time maintaining the Windows install than acutally using it, at least for the immediate future. But then, if I don't I'll probably need it, and badly, right away.

I'm still not quite rid of the Windows share. There's some kind of weird configuration problem which makes two of my projects (both web projects, I don't know if that matters in some obscure way) fetch their updates from the Windows share route, but commit their changes just like everyone else. Strange enough.

I also have some text encoding problems in a few places, but not enough that it bothers me. The only way I can imagine that being a real problem is if it carries over if I build files on the Mac and then deploy them on another platform. I will test that as soon as I have the time.

Episode IV, 2007-05-07

More things have happened, and I'm now about as all-Mac as I expect to become in the forseeable future.

After the living-on-the-edge Subversion access finally went over the edge and stopped working, I spent some time developing in Windows on Parallels. Apart from feeling rather strained on memory every now and then it actually worked pretty well, but of course it was only temporary and a great relief to get rid of. About two weeks ago we finally got access to a new Subversion server set up. Configured by experts, secured and with regular backups, everything you could wish for. After spending some time in Windows re-configuring our projects so we could check them in completely (instead of just the source files like we'd done before) I imported the whole shebang into the new repository, crossed my fingers and checked it all out in OS X-land. To my amazement and relief, it all worked and compiled with a bare minimum of configuration.

So now I actually do all my development in OS X, and it, of course, feels really nice. Parallels is there when Windows testing is called for and when I need the Office applications, but that's that.

Good things learned: