Snow Leopard’s file system changes

Mac OS X 10.6 “Snow Leopard” brought a slew of under the hood changes. There are two distinct but related changes that Apple made that most users will probably never notice and many developers probably never will either. But if you happen to be someone who works with the file system, these changes may affect you. These changes are:

1. KB vs. KiB. That is, is a kilobyte 1000 bytes or 1024 bytes.

2. file-system-level compression of files

Since I recently went around with these, I felt it’d be worthwhile to share what I discovered, since there isn’t much information out there on the topic. The only thing I found that remotely discussed the matter was this page of Ars Technica’s Snow Leopard review.
Continue reading

The waiting is the hardest part.

With apologies to Tom Petty.

That’s all I’m doing right now. Waiting.

Waiting to see how much it’s going to rain this weekend.

Waiting for Apple Developer Technical Support to get back to me with answers to the problems I’m encountering in the product I’m working on.

Waiting for the updated documentation to be delivered so I can integrate it into the product.

Waiting for the work day to end so we can attend my church’s parish fair. Which also means about the only time with the Wife and Kids this weekend. So, waiting on being able to spend my time with my family.

Waiting for the main event of my weekend to start.

Just waiting….

As long as I’m thinking about the Combined Skills class….

What do I want to get out of it? Education. Tom Givens and SouthNarc are among the best in their field. I just want to learn. I just want to further my skillset. I want to open my mouth as little as possible and open my ears and mind as much as possible.

And if it’s raining a lot, that I don’t flub up my draws too much. 🙂

Mac OS X x86 debugging

It’s been ages since I’ve had to do anything dealing with assembly language. And while I may not have to do much programming in it, it’s still a useful thing to know when it comes to debugging.

Today I’ve been trapped in debugging hell. We’ve got some code that works fine on Mac OS X versions prior to Snow Leopard (10.6) but seems to hang under 10.6. The code flat out executes differently. I watch how our code is invoked and things just don’t happen in the same order across the OS versions. Apple must have done some major under-the-hood changes to NSBrowser and NSTreeController. And since we’re using Cocoa Bindings, it’s a bitch to debug. Everything that’s happening is happening because of Key-Value Observing (KVO). I get somewhere into the bowels of NSBrowserBinder and it appears to be looping… looping… and never exiting the loop for some reason.

Now that we’re in the new x86-based world order of Macs, I went looking for some tips to help me work with debugging the x86 assembly so I could see what the OS was doing. I found a few useful resources.

Greg Parker at the Hamster Emporium has a great article about crashing in objc_msgSend and how to decipher the crash. I wasn’t crashing, but still there are some nice gdb commands and interpretation of the registers.

Then over at the Google Mac Blog, a 2 part article on spelunking. Part 1 and Part 2. These aren’t debugging articles (more like trying to hack around and discover how undocumented functions work), but they still explain a bit about how the x86 ABI works, AT&T syntax, and how Mac all mesh together. Note that Avi Drissman previously published the same article in his own personal blog, but edited it a bit for republishing in the Google blog.

Clark Cox provides a handy table on how to inspect Objective-C parameters in gdb.

And you thought the only thing I knew how to blog about was guns. 😉

How to manage geeks

An article from Computerworld on how to manage geeks.

Speaking as a geek, I can say that article is sound. Old school management practices will not work. Once you understand the geek, you’ll see that typically the best thing to do is let them do their job… get out of their way, shield them from crap, do things to enable them to get their work done.

And then we shall… and it shall be productive and glorious. 🙂

Why did Apple do this?

No sorry… nothing about today’s Apple fan-boy event. More as to why I didn’t post much today.

Apple’s new OS version is 10.6, named “Snow Leopard.” Snow Leopard brought about a lot of under the hood changes to the OS. One of them is fairly well covered on this page of the Ars Technica review.

Basically, Apple did some stuff very very low level to help with reclaiming some disk space but also taking advantage of the volume format layout of HFS+ and how they can use that to their advantage to speed things up… RAM and CPU’s are wicked fast these days, and disk drives are still abysmally slow by comparison (physics can only go so far). So Apple did some neat things to improve speed and access times, and for the most part it works out great. Most people will never notice.

But in the line of work I do… I’m not most people.

The software I develop in my day job does a lot of working with the file system. So all of these changes that Apple made are actually wreaking havoc and hell on me right now. Long held maxims like a file’s logical size will never be larger than its physical size…. out the door. That calculating sizes is now base-10 instead of base-2 (i.e. 1 kilobyte is now being calculated as 1000 bytes instead of 1024 bytes)… changes a lot of things.

I’ve been reevaluating our entire codebase (which is huge) and this just doesn’t play well with us. All I can do at this point is formulate a lengthy email to Apple’s Developer Technical Support and ask for some help and guidance.

It’s been a trying couple of days.

I’m glad I have Kali class tonight. That should relieve a little stress. 🙂

Sick day?

It’s the day before a 3-day weekend, and I see the emails going about the office saying “so and so is out sick.”

Uh-huh.

4 day weekend? 🙂

Now I don’t actually doubt they’re sick. It is the start of the school year and thus begins the giant petri dish of illness. In fact, both Wife and Daughter have visited the new “urgent care” clinic down the road from us just this past week and are currently working their way through their antibiotics.

But it got me to thinking, like it does every year.

Sick days are a disadvantage to working from home.

When you’ve got something that’s bad enough you wouldn’t want to go into the office to spread germs about, but it’s not incapacitating sick, well…. you can still work. Is there expectation that you’d work? Maybe. I know I at least put that upon myself, and maybe because I’m home, I’ve nothing else to do, I’d likely sit in front of the computer anyways, so might as well be productive.

But it also means I rarely use my sick days in a day. I may still get sick, but no one’s going to get my germs anyways, so I continue to slog away.

Oh well. A minor disadvantage really. The fact that some days I’ve been able to program in my underwear, that works just fine. 🙂

4.5 out of 5 stars

I write Mac utility software for a living. A software bundle the company creates, CheckIt 2 Performance Suite, was just reviewed and received 4.5 out of 5 stars. The particular product I work on, Spring Cleaning, is the flagship software in that bundle.

What stood out to me in this review versus other reviews of the product is the reviewer seemed to look at the entire product and didn’t overlook key features. Many reviewers seem to only focus on the “pretty icons” and the basic tools, as if they just gave the product a 5 minute look over and then wrote a review. This reviewer appeared to fully examine the product and review based upon that:

Spring Cleaning comes with other features that are used to modify and limit how the other features work, allowing you to choose areas or files that you don’t want it to include. Finally, and very importantly, is the ability to schedule any or all of these functions to be performed automatically. For instance, it is probably a good idea to repair disk permissions once a month, and it is a good idea to allow the Unix maintenance routines to run. Using Spring Cleaning, you can easily set these up to automatically run when it works for your schedule.

Talked about things like Exclusions, and most importantly, the Scheduler. That’s one of the biggest strengths of Spring Cleaning, that you can easily set up automated schedules to keep your Mac running in top shape. As Ron Popeil was fond of saying, “Just set it and forget it!”

We understand a lot of functionality here is something an über-geek could do on their own, but not everyone is an über-geek. We strive to bring a lot of power and functionality “for the rest of us” so that anyone can keep their Mac running well.

I was just happy at the excellent review. Now go buy a copy and keep me in a job. 😉

Working elsewhere

I am fortunate that my job allows me to telecommute. I work from home full-time and enjoy it. I have everything I need, all the comforts such as listening to whatever music I so feel like and as loud as I wish. I have access to my wife’s awesome cooking. I get to be around my kids. Life is good.

That said, sometimes I need to get out. 🙂

I used to be able to go to my buddy W’s house. It was perfect. Interet access, comfortable digs, good food, and someone to talk to about work things which made it like a mini office setting. But W recently moved, so I no longer have access. Consequently, I’ve been wondering what I can do and where I can go when I need a change of work surroundings.

The key thing I need is Internet access, given the nature of my job. What’s cool is Austin has a great many places with free WiFi. I found a couple nice lists here and here. Trouble is, none of the spots are really ideal.

Some places are just right out. For instance, I will not go to the airport just to get WiFi access. Or some hotels may have free WiFi but you have to be a guest and get their passcode. So those places are out.

What does that leave?

The Austin Public Library, or restaurants and bars (including coffee shops).

None of this is ideal.

The library actually seems like the best bet. There should be electrical outlets to plug into. The place will be fairly quiet and conducive to learning, and some ability to be private. The downside is no food or drink. Plus if I had to take a phone call, I can’t easily do that.

Restaurants have pretty much the opposite problem. No problem with food or drink; in fact, I’d argue if I was taking up a table for a long time that I better buy some food and drink. If I need to take a call, no problem. Electrical outlets can vary (one nice restaurant near my house apparently has only one open outlet, up by the front south-facing windows… heat, glare, no workie). But it’s going to be noisy, especially at meal times.

Bottom line is, it’s good to see Austin is quite friendly and accessible. While much of this free WiFi may be limited for circumstances like mine, what it really shows is you can whip out your Internet-enabled phone (iPhone or otherwise) and do things. So while you’re having dinner, you could look up where to go afterwards. Or maybe you just want to see what traffic is like, or what the next showtime is, or when the next train/bus is coming. Having free WiFi “everywhere” is quite a boon.

Now I just need to find a place that can work for me.

Treemaps for space-constrained visualization of hierarchies

If the title made your eyes glaze over, no need to click this link to read Ben Shneiderman’s paper on treemaps.

I’ve been buried in working with them all day today at work. Just conceptual and design at this point, haven’t started to write algorithms just yet. It’s pretty cool stuff, at least for geeks like me.

Even if you’re not, the graphical representation of treemaps can look pretty cool. I really like these circular treemaps.

Who knew examining the composition and state of your computer’s filesystem could be so trippy. 😉

The Mac is dead. Long live the Mac!

So the next version of Mac OS X (10.6 “Snow Leopard”) is going to be Intel-only. That means those with the older PowerPC-based Macs are now left behind.

This is fine and good. The way Apple needs to move forward, they need to do it with the Intel chips. The old PowerPC chips just aren’t going to cut it any further, so it’s good for Apple to cut the losses.

I do wonder tho. In the keynote speech today Apple said after installing Snow Leopard that you’d regain a lot of disk space. My guess? The lack of the PowerPC portions of the executables. Makes sense to not bother shipping them any more.

These days for me to support PowerPC isn’t really a big deal. I work in higher level languages (C, C++, Objective-C, Objective-C++, Python, etc.) and I don’t have a lot of endian issues to deal with any more (e.g. we store things in neutral ways, like XML or plist-binary formats). So to deal with PowerPC is merely flipping the switch on the compiler to do ppc codegen. 

But it does mean that I need to buy a new iMac for the family. The old G5 one is certainly a relic now. I’ve always said with tech stuff that you should wait until the last minute to buy… wait until you absolutely must have it and can’t live without it any more for whatever reason, then buy and buy the best you can. Since there’s always something new and better on the horizon (and you know even better is just behind that, ad nauseam), that’s about the best you can do. I’ve put off the iMac purchase for as long as I could, and while I’m not rushing to The Apple Store to buy a new one, I know it’s coming.