Mac XP: some stuff arrives

Post office delivery truckSome stuff arrived today as expected. Other stuff did not. The stuff that did arrive was the Mac Pro itself with the displays. The stuff from OWC seems to be still in Indiana somewhere. According to Fedex tracking, it will be here next week tuesday.

The post office truck arrived with three boxes. One big and heavy box for the Mac Pro itself, plus two boxes, each with a 23″ cinema display in it.

Three boxes on a table

Optical drive slotsAfter unpacking the Mac Pro chassis, I got my first disappointment. They’d obviously forgotten the two superdrives I ordered. Checked the invoice and sure, there they were. Checked the chassis and there was just two blind plates were I’d expect two optical drives to be. I would never have expected Apple to be this random about a custom build. With the phone in one hand, ready to give Apple sales hell, I figured I’d check if they had simply forgotten to remove the covers or something. Poking the blind plates I noticed they could slide down, and lo and behold, there was an optical drive behind each cover. Well, I’m glad I didn’t call sales and make a fool of myself. They hadn’t forgotten. You simply can’t see the drives from the front unless you eject.

Opening up the chassis is like opening a vault. This machine is awfully sturdy and quite heavy. It has a definite tank aura. You’ve seen pictures of the insides, I’m sure, but if not, then Apple has excellent pictures of it on their site.

I set up the machine under my desk and the two new displays on top. I have to wait for the new drives before I transfer all the content from my iMac to the new Mac Pro so I have to have both machines on the table for a couple of days. As you can see, it’s getting crowded. Lucky for me, it’s only temporary; when the new machine is ready it moves to the office and I can use the old one, the iMac, to access it from home if I need to using “Back to my Mac”. Or the MacBook if I’m on the road.

A really filled desk

Right now I’m typing on the new keyboard, and it feels totally the same as the keyboard on my MacBook, but more solid. I think I’m going to like it. Having the two new displays on the same desk as the 20″ iMac and the Dell monitor actually makes the iMac look a bit dim and slightly yellowish. I have tuned the colors on the iMac so they don’t deviate too much from the Dell, but that’s only part of the explanation. These 23″ cinema displays are really much brighter and whiter than the iMac. Now, comparing to the Dell monitor, which is three years old, the Dell looks like something found in a dumpster. It’s unbelievably crappy in comparison, at full display intensity.

There are two things missing on this system. There’s no webcam built into the displays. I’m sure Apple will come out with 24″ cinema displays with built-in iSight cameras any day now. They only waited for me to buy these two first. I’m going to try to get my old Logitech webcam to work with this system (there are open source drivers for all this, which I hope will work).

The other thing missing that I simply didn’t think of is a sound system. Having tinny dialogue emanate from under the table simply isn’t right. I have to do something about that.

My little son is sitting here asking “Is that my new computer?” over and over again. That is not a good sign. Have to get this new machine out of the house before he gets used to the idea.

Son and new mac

Mac XP: ordering new stuff

Price quote Mac Pro

As I already told you about in my previous blogentry, I need to replace my iMac 2 Gb with something heftier.

So the solution is to get a new Mac that allows me a lot more RAM and a number of internal fast diskchannels. If I can place the Parallels images on one or two secondary disks, leaving just the OSX on my primary, I think I can avoid having the system thrash. There’s only one model that can do all this and that’s the Mac Pro. (Yes, I know recent iMacs can take 4 Gb of RAM but that’s not really enough. The single disk limitation also remains.)

So I went to the Swedish Apple store and configured up one, looked at the sticker and broke out in a sweat. With 4 x 500 Gb drives and 8 Gb of RAM and 2 x 23 inch monitors, I’m out around 50800 SEK, before VAT. Ouch.

There has to be another way. Especially that RAM seems ridiculously expensive. So the first item on the agenda is to find cheaper RAM, and while I’m at it, drives.

Surfing around, looking for good and bad experiences in the newsgroups, I came to the conclusion that Other World Computing (OWC) had a pretty good rep. Checking out their site I noticed they weren’t averse to international shipping. Some people in newsgroups recommended using Fedex, since UPS has a bad habit of crushing boxes, it seems. So Fedex it’ll be.

The Mac Pro, latest version, uses memory with pretty special cooling requirements and if you don’t want the fans in the tower to spin too fast and make howling noises, you’d better get memory with these extra large fins.

Mac Pro memory OWC

For the drives, I chose the Seagates, since according to spec they’re the least noisy.

Seagate 500 Gb drives OWC

Add to that Fedex shipping and the total is:

Total price OWC

Not bad, not bad at all. The price for the Mac Pro with minimum RAM (2 Gb) and one 320 Gb drive is still 34500 SEK without VAT or thereabouts. What more can be done?

Well, I’m a developer, and Apple is kind to developers, so I checked out the ADC Select membership and ordered it:

ADC Select membership

Except for DVDs with developer tools, access to a lot of training, extra technical developer support and stuff, you also get a reduction on one hardware purchase per year and, not least, a t-shirt. That t-shirt clinched it.

With the ADC Select reduction applied, the Mac Pro without the extra RAM and disks came to 28885 SEK. Now we’re talking. Which means that the ADC Select reduction exceeds the price of ADC Select itself. The only requirement is that you don’t sell the hardware within a year and that you use it for development for the Apple platform, which is exactly what I do. I suspect that I even get access to OSX Server this way, except I haven’t really located it yet.

None of all this has arrived yet, but various status reports and phonecalls back and forth indicate that today may be the day for both shipments.

As always, stay tuned for further developments.

Developing on Mac XP

Way back, I developed under Windows, starting from nothing (v 1.03) and going all the way up to XP. Then I drifted into OSX. Recently I drifted back, but not all the way. Currently I’m developing for Windows XP on my iMac, and this is how it looks:

Photo of iMac running XP

As you can see, I’m running two instances of XP, the one on the left has Visual Studio 2005, a full SQL Server developer’s edition, while the one on the right has Visual Studio 2008. That one connects to the SQL server over a faked internal net in the 10.x.x.x A-class. Note that the Dell monitor to the left is connected to the iMac and displays an extended desktop.

Both XPs run under Parallels desktop for Mac, both run in “full screen”, which means they’ll take the full monitor they happen to be on when you go to full screen. Working this way is just like two separate XP machines, except I only need to use one keyboard and mouse. Pretty darn neat. Naturally, you need at least two full XP licenses to do that, but go get an MSDN Pro or MSDN Operating Systems subscription and you’ve got more than enough licenses for this.

For a full screen shot of the two XPs side to side, click this link. (The Dell monitor has lower resolution, which explains why the left XP image is a little bit smaller than the right one.)

When I travel to a customer’s site, I copy over the files for an XP instance to my portable, a MacBook, and when I get back I copy it all back. For instance, I went to a customer site, had them install and set up an SQL database on the XP on my MacBook, came back to my office, copied it back and now the XP running on my iMac has that database installed and set up. It’s the same XP instance. No need for reactivation or anything, XP doesn’t notice the move.

Even more interesting is that I don’t even need to shut down and boot XP. I can leave it open in Visual Studio, for instance, on the iMac, close Parallels, move the files to the MacBook, start Parallels, and I’m still in Visual Studio in XP, right in mid-keystroke, so to speak.

But, there’s a problem.

Both my iMac and my MacBook are dual core Intels and both have 2 Gb RAM, max for these models. If I run two XPs on the iMac, the memory allocation looks like this:

Activity monitor showing memory use

Now, that’s a whole bunch of read paint. And most of the rest is yellow. The two XP instances have 512 and 768 Mb RAM allocated through Parallels, which isn’t all that much for XP, but it is really more than can be handled in 2 Gb of RAM. As long as I do nothing else on the iMac, I can work comfortably this way, but as soon as I try to run NeoOffice or Firefox, for instance, things get real slow. The machine starts thrashing the disk and switching between programs can sometimes take minutes.

I needed a plan to get out of this situation, a plan that definitely does not involve Dell, HP, Lenovo or any of those people. Stay tuned.

Cocoa, Core Data, and me (VI)

We’re still working to get the country browser right, and it isn’t right yet.

The countries browser.

I don’t want the table in the browser to be editable, that is what the drawer is for. So when you doubleclick on a row in the browser, I want the drawer to slide out, if it’s not visible, and to have the focus set to the first field in the drawer. After editing is finished, I want the drawer to close again. If you click the “+” button, I also want the drawer to open so you can enter a new record. If you click the “-” button, I want the row to be deleted without any “Are you sure? Are you really sure? Are you really, really, really sure?” dialogs. After all, we have (or will have) full undo available.

Continue reading “Cocoa, Core Data, and me (VI)”

Cocoa, Core Data, and me (V)

Let’s take a closer look at the radiobuttons and how they relate to core data. Remember how the countries drawer pane looks in Interface Builder:

Detail view in IB

I want the four radiobuttons to correspond to the four possible “VAT regions” in the data model:

Data model

Maybe I need to explain what I mean by “VAT regions”, as most non-europeans will find the concept literally foreign.

Continue reading “Cocoa, Core Data, and me (V)”

Cocoa, Core Data, and me (IV)

I’m back after finally getting the tax forms mailed in. What a waste of time that is. A civilized society shouldn’t be doing these things to their citizens.

Now the time has arrived to construct the CountriesController class. This class controls the model and view for the countries data element. It is instantiated by the AppController and in turn loads and shows the Countries.nib. There’s only one single instance of the CountriesController class, so it’s a singleton.

Continue reading “Cocoa, Core Data, and me (IV)”

Cocoa, Core Data, and me (III)

I realize I skipped a step right in the beginning. I’m sure I skipped more steps, but at least I noticed this one. The step I missed is:

How does one create a new window and its associated objects and have it created when a menu option is clicked or another part of the application needs it? We don’t want everything crowded into the MainMenu.nib, so we need to modularize it somehow.

Continue reading “Cocoa, Core Data, and me (III)”

Cocoa, Core Data, and me (II)

I promised to describe how to implement validation to ensure uniqueness in the database. Here goes.

First, you need to open the datamodel in XCode. With the datamodel on screen, select File… New… and you’ll see “Managed Object Class” under the section “Design”. Note that this choice simply isn’t there unless you first opened the data model.

Continue reading “Cocoa, Core Data, and me (II)”

Cocoa, Core Data, and me (I)

My travails as I implement my first project in Cocoa, part I.

This is, or may become, a series of blog entries about Cocoa development, as written by a complete n00b. I’m not saying it’s correct, I’m not saying I will even go on with the entries; I may stop at any time or lose interest or something. Or die, or end up in jail. Or lose my memory, or lose my website and backups. But if I don’t do any of those things, I intend to chronicle my advances into the world of OSX development. Thanks. You’re welcome. BTW, if I discover that I said something unusually stupid, I may change the text afterwards and pretend nothing happened. So if you want to prove me an idiot, you’d better take a screenshot of it before I remove the evidence. Another way of saying the same thing is: I will update the text as mistakes are discovered. Or not.

I’ll put my entries about this project into its own blog category: OSX Dev, so if you want to follow just this story, select the category in the sidepanel.

I’ve done Windows development for 20+ years and I’m sick and tired of it. I’ve been PDG (Pretty Damn Good) in a couple of languages, like compiled Basic for CP/M, Clarion for DOS, C++, and Delphi. I’ve been decently good in C#, and I’ve done my share of hating Centura. I’ve tried Java, and it left me cold.

Some languages inspire, like Clarion for DOS and to some degree Delphi. Some languages are too tedious and complex to inspire and only turn into a dreary day job, like Clarion for Windows and C#. Some languages inspire revulsion, like Centura. But that’s just me, YMMV.

Some languages are highly productive, and again, I drag up Clarion for DOS. I really love C++, but I can’t call it productive. It’s like going to the pub. You can delve into irrelevancies forever, to get everything just right, but you’re not advancing very much. There’s nothing like a perfectly tuned template to turn me on, but what’s the point? Yes, I know, there is a point, but it’s a bit too small to get actual real live and breathing software delivered.

I have a feeling that Objective-C and Cocoa may be an inspiring combination, so I started a project just to learn about it. The project is an accounting program, so it’s a database app. I’m not aiming for multiuser or anything fancy, I just want an accounting app I can change myself when I need something. I’ve done accounting apps before, so I know how they work.

Continue reading “Cocoa, Core Data, and me (I)”