Older MacBook Pro Late 2008, a simple performance tip if you have an SSD + HD installed

If you read this blog for some time you may have come across my story on upgrading my MacBook Pro Late 2008 by adding an SSD to it. There were a couple of other things that I’d been doing but didn’t blog about, frequently shuffle around programs to make the most of the SSDs. I’ve been applying these techniques and it didn’t occur to me to talk about it until I saw an article on Apple’s newly announced Fusion Drive technology.

If you read this blog for some time you may have come across my story on upgrading my MacBook Pro Late 2008 by adding an SSD to it. There were a couple of other things that I’d been doing but didn’t blog about, frequently shuffle around programs to make the most of the SSDs, that’s the story I am about to tell here. In this post I am assuming that you are familiar with Unix/Linux file naming conventions, and that you have similar constraints that I have as explained in my disk upgrade story earlier in this blog.

To recap the posting I’m referring to, I had deliberately chosen a smaller SSD (60 GB) to keep the costs down, but that meant that I had to keep a lot of large files in the slower HD drive. Given the difference in performance between the two drives, I was wondering how I could somehow make that SSD work harder for me. So I came up with a simple routine, which I didn’t think much of at the time. There are times when I am more frequently programming, and other times when I am using graphical tools or launching virtual machines (Ubuntu, Windows xx), so I would swap around those programmes and large folders between the two disks in an very simple way.

Mac OSX has a feature that comes in handy here: applications may be installed in the system by placing them in the folder “/Applications”, or installed only for one user when placed in a folder called exactly “Applications” in the user’s home folder, which in Unix is “~/Applications”. Knowing this, I laid out my two disks to take advantage of it. In case of data files, even virtual machines you simply have to ‘forget’ any cached uses and get the application to load it by giving it a direct folder reference. Parallels is an exception, it is sensitive to virtual machine images being moved around and might fail to load them. While loading it, you have to tell Parallels that you have moved a VM, it will do the right thing, otherwise you may damage your VM. I won’t go into that here.

When I am frequently using Xcode I would move it to “/Developer”, I would move other large software like Adobe FireWorks from “/Applications” to “~/Application” and create symbolic links to mask these changes. When I enter another period where I don’t develop or do it less frequently, I swap those large folders around again and restore the original links. This may sound convoluted but it isn’t, it’s just a couple of lines of shell scripts that would run a couple of minutes then you’re done. The trigger for starting this folder dance was that, when my SSD had less than 10GB free space the machine could run out of virtual memory (remember I have 8 GB RAM on this machine), so I had to try and keep that disk above 11 GB free space at all times.

The main drawback I run into was when I tried to do the same with iTunes and iPhoto (my large photo library), I run into problems and had to stop that, but it worked fine for running frequently used programs. I also used to run “Fix Permissions” after each shuffling of large folders, this made my technique even slower, so I only tended to do it once every other week and sometime forgot to revert things when I changed daily work routines.

To summarise, if you have a MacBook Pro Late 2008, like I have, or any Mac that is equipped with both an SSD and an HD, you can make the SSD work harder for you and gain some performance by applying this super simple folder shuffling technique. You can even do it with large data files that you may be opening several times a day or in relatively quick successions. I initially came up with the idea by thinking about the way detachable storage works, nothing special. The technique is most effective if you have a relatively stable work routine over several days or weeks.

I recently saw an article by ArsTecnica on Apple’s Fusion Drive, which seemed to be indicating a somewhat similar technique but obviously a sophisticated and robust one that is also transparent to the user. This technology will be available in their new line of MacBooks, I didn’t really follow that event. t thought of telling this story, in case someone happens here while looking for tips. I have to say though, I read lots of stories about SSD failure rates, I experienced one with my older Time Capsule external storage drive, it was a LaCie 1TB drive, one day it simply stopped responding, no warning whatsoever, gone for good without any (noticeable) incident. So, although SSD are exciting, and I’ve been enjoying  a performance boost since I installed mine, there’s a little nervousness that it may surprise me one day. I wanted to warn you, the reader, about this risk because, you just never never know.

Tech platform curation is good, but let adults take responsibility

In tech, like in many other industries, people need to make trade-offs. Apple chose to curate as much as possible, and they are mostly doing a good job – why else would their devices be such a runaway success? And yes, it is certainly a slippery slope giving so-called power users more choices. But I don’t think the need to curate should be detrimental to good practice, in this case a backup solution should never force a user down a single path, the way Time Capsule is doing it here.

I frequently experience the issue that Apple, in their attempt to totally curate the platform, actually take away vital responsibility from those who could otherwise be more empowered. Most computing devices are good when they function normally and remain responsive to user interactions. But, when something goes wrong, that’s when you really appreciate the ability to get out of trouble. And those are the moments when a technical savvy person could get really frustrated with Apple. Take this latest example with my Time Capsule:

Time Capsule wants to delete my backup history
A dangerous Time Capsule dialog

This dialog might look innocent but it isn’t, here is what it is saying to me:

Time Capsule has decided that it is going to destroy your backup history from the beginning of times. This means that you are starting anew, there is no way back from this. Now I give you two options, a) do this right now and get over it, or else b) I stop doing any backup until you finally accept this situation.

This is terrible for several reasons. The first one is that it defeats the whole purpose of Time Machine, remember when Steve Jobs famously demo’ed feature saying that you “will never lose a file again”? Well, this dialog clearly contradicts that claim, your history will be gone for no fault of your own. The second reason why this isn’t good is that, backup rotation schemes have been around forever, Time Capsule has no business deleting my older backups without giving me any other alternative. What it is supposed to do here, is to allow me to either add a new disk, or take the current backup history offline, or simply suggest to delete the oldest backup (but not the entire history!).

If given more options, since I know how to go about this, I would be able to take an appropriate action and be content with the product. But if it treats me like a kid, giving me no other option, that is a bad user experience and it is frustrating. Another example is that, I noticed the disk free space on my MacBook Pro had shrunk dramatically and I suspected something wasn’t quite right. Luckily I’d used the Target Disk Mode before, so I did that and found out the disk needed repairing, which I run. Before repair it was reporting 34 GB free space, after Repair it reported 124 GB free space! I have one more example with Server Manager (OS X Mountain Lion) but I save that for another post, if time permits.

This Time Capsule issue is one example where platform curation falls short. And at the moment, it looks like Apple is the biggest culprit in such practice – though Microsoft seem to be marching fast on the same track – I’ve been running Windows 8 RC for a while, it’s getting harder to troubleshoot issues, see what apps are running for example.

In tech, like in many other industries, people need to make trade-offs. Apple chose to curate as much as possible, and they are mostly doing a good job – why else would their devices be such a runaway success? And yes, it is certainly a slippery slope giving so-called power users more choices. But I don’t think the need to curate should be detrimental to good practice, in this case a backup solution should never force a user down a single path, the way Time Capsule is doing it here.

 

Apple doesn’t just do nice device experiences, their SDK and documentation are masterclass too

If you know C and you get properly acquainted with Objective-C, you will realise that Apple succeeded in making people write large C code without hating it or getting into trouble. People say, and I agree, that learning Functional Programming (FP) makes you a better programmer even if you were to go back to non-FP languages. I think the same thing can be said of programming for iOS using Apple provider toolkits. Learning to code iOS application yields much more than solid applications, it also teaches you how to be a better programmer.

I’ve been regularly using Apple SDK for a number of months now, earlier on I only did small proof of concepts (as an Architect sounding out and testing gears before making any recommendations). I’ve used many developer toolkits throughout the years, but Apple’s have been an eye opener for me, once I decided to build a sizeable application with them. I would easily give Apple a top mark for creating and nurturing a development platform, yes they do make breaking changes but they clearly keep the concepts sound and stable throughout.

In the next paragraph I’ll be mostly referring to development environments (IDEs), I’ll skim over documentation because it made no big difference except in the cases of Microsoft Visual Studio and Apple’s Xcode.

I’ve used Eclipse intensively throughout the years, before that I’ve used IBM VisualAge on large projects. Eclipse is good, but I find IntelliJ IDEA to be a much sharper and more productive product than Eclipse in that area. I’ve looked at NetBeans too, for a time its free profiler was a selling point for me but I didn’t end up doing any serious work with it. I’ve used Microsoft development tools since the time that Borland shipped better ones (Borland’s were my favourite at the time), and I still use Visual Studio every now and then. For a time PowerBuilder was the best productive development tool for me and I enjoyed it until I moved on to web applications for good. I’ve had some exposure to IBM Rational software engineering products too, at the time they were often unstable, bloated, so I never got to liking them much. I’ve also used, and continue to use many text editor flavours, Unix ones like VI and Emacs, and various others that I don’t care much to mention. So I’ve seen quite a wide variety of developer tools and mostly didn’t come out too jazzed up about them.

What all of the above developer toolkits have in common is that they provide you a base upon which you can extend by means on plugins or add-ons. In nearly every case you need to source additional libraries to complete projects, at least that’s been my experience in most cases. However, in my opinion these products fail to teach you best practices in any meaningful way. If you are looking to learn to write fool-proof and performing code, you still have a long trial-and-error learning curve in front of you, the toolkit won’t provide you any guidance.

Apple’s combination of XCode, Cocoa, Objective-C and the documentation, together provide you much more than just an SDK and IDE, they actually teach the developer how to write code properly. As you write applications for Apple platform, you get more acquainted with patterns in a practical and effective way, you learn one behaviour and can become more productive as time goes by.

Microsoft have attempted to do something similar, Microsoft Patterns & Practice web site is where they are trying to complement where Visual Studio is lacking. There is a lot of good examples on how to compose Microsoft tools to produce results, it’s the best source I’ve come across if you only target Microsoft platforms. But I’ve found Microsoft Patterns&Practice to be too heavily biased towards APIs, and those APIs tend to change before you get to master them. So, unless you are immediately applying the techniques that you learn in an active project, preferably very close to the publishing time period of the articles, the learning may not stick and might get dated. I’ve had my fair share of disappointments learning Microsoft development libraries. For example, I’ve been through numerous Microsoft data access technologies and every time I had to learn a totally different approach for no clear reasons.

IBM’s DeveloperWorks is huge and for a time it offered lots of good articles on various development topics. But usually, they helped a lot if you were targeting IBM WebSphere and Lotus product stacks, they required more effort if you didn’t. I’ve long not done much with IBM technology stack, I look at DeveloperWorks every now and then, the venerable WebSphere stack is chugging along. I would think that IBM WebSphere development toolkits may help in learning some good practices, but I think unless you can afford the pricey IBM Rational suites you may not reap good learning fast enough and may end up having to patch things up to become proficient.

I’ve watched Oracle technology stack get more and more complex as they acquired companies. I’ve used many of the their components at separate times and when companies like BEA and Sun MicroSystems shipped products. In recent years I’ve come to believe that the JavaServer Faces (JSF) approach isn’t an efficient one if you didn’t specifically target Oracle platform. I’m not particularly fond of what I see on Oracle sites, I don’t think they help much in teaching good practices to developers.

These are the largest technology solutions that I have significant experience with, and I haven’t really seen the sort of purposeful learning that I see when dealing with Apple development toolkits.

In my opinion, Apple has done a better job in this critical area of developer enablement than many others, and what you learn in the process will serve you well beyond Apple platform. If you know C and you get properly acquainted with Objective-C, you will realise that Apple succeeded in making people write large C code without hating it or getting into trouble. Before iOS became popular, and aside from Linux hackers, you could’t convince a young developer to learn C programming. Apple has somehow pulled that trick without people realising it. And if you know your design patterns, for example the Gang of Four book, you will find it a delight to discover how Apple’s Cocoa code hangs together. The way you design and write iOS applications is closely aligned to the way patterns should be recognised and applied, for this reason you are learning patterns as you code for iOS. This choice alone ensures that developers grow quickly to maturity when they develop for iOS platform.

I’ve not talked about HTML  development toolkits so far (meaning HTML, CSS, JavaScript), for a reason. I have yet to see any toolkit in this area that actually teach good practices. It is actually paradoxical that that kind of web application development could become so popular, because I think it offers the highest learning curve of all. Yes, sure, people clone (GIT) a To Do List application sample, make a few changes and promote that into an application. But there is no good practice in there, actually that’s where the learning begins. The number of concepts and technologies that a developer must learn before they can write solid HTML code is astonishing. And if they don’t learn those things all they tend to do is create more mess and never learn any good skill in the process. So I’d say that there is no useful learning environment there, unless the recently announced Adobe Html would prove me wrong.

Talking about web development specifically, there are many popular development platforms that help people produce applications quickly. However, the most popular ones such as PHP, Ruby On Rails (RoR), won’t teach you much about good practices. RoR did a good job in helping beginners get in the game with its convention over configuration practice, but that is it. Once people got started with their first RoR application, they usually don’t know where to go next and quickly run into learning shortcomings as their application usage picks up.

In summary, I think the benefits that iOS developer realise is greater and more durable beyond the platform alone. People say, and I agree, that learning Functional Programming (FP) makes you a better programmer even if you were to go back to non-FP languages. I think the same thing can be said of programming for iOS using Apple provider toolkits. Learning to code iOS application yields much more than solid applications, it also teaches you how to be a better programmer.

My MacBook Pro Late 2008 humming with Mountain Lion, smooth as silk

My MacBook Pro Late 2008 is shining ever more with OS X Mountain Lion. With this setup, unless there would be a serious hardware failure, this MBP can go a few years without needing any upgrade, though I am pretty confident Apple might drop support for it after 1 or 2 OS releases from now.

I’ve upgraded my MacBook Pro Late 2008 to Mountain Lion. The process was flawless and quick. My mac runs noticeably faster than it did with Lion. All apps start up and close faster than they did before, Omnigraffle Pro in particular loads up stencils much faster than it used to.

As happened when I upgraded to Lion, I had to fix issues with some developer tools. Apple removed  the (Unix) X11 server package from OS X Mountain Lion distribution, they recommend installing the open source package called XQuartz in replacement. This is automatically suggested, I can’t even remember the dialog as I wasn’t thinking about blogging when I started the upgrade process. OS X Mountain Lion also features an automatic dependency software discovery, it kicked in as I launched a Java app that required JVM 1.6.

Open source brew and rvm

The first thing to do is run “brew doctor” on a terminal window, this will point to any issues it finds and there were a half dozen in my case. The biggest issue was with X11 server. Once I was done resolving brew reported issues, I run “brew upgrade”, then “rvm upgrade” shortly after, to ensure that all native package dependencies were recompiled and linked with the new OS libraries. At the end of it all, brew doctor warned me that XQuatz wasn’t known to work well with brew packages, but I haven’t run into any problems yet. This was all I needed to do to be completely up to date with OS X Mountain Lion.

FileVault Legacy encryption

Apple shipped Lion with FileVault2, which obsoleted FileVault I had in place earlier on. Nothing breaks, it just feels untidy to be constantly remminded about this legacy. When I upgraded to Lion I didn’t have enough space to turn off FileVault and redo the encryption. The same thing happened again with Mountain Lion, not enough space. So I did one simple radical thing, used Carbon Copy Cloner to backup my user home folder, deleted and recreated the user account, this removed FileVault. This whole thing wasn’t necessary as I said, but I like to tidy up sometimes and remove legacy software.

Now I am enjoying OS X Mountain Lion, the only thing that took time was the backup prior to upgrading. Backing up my MBP to Time Capsule over wi-fi was excruciating slow. I had two false starts because I would accidentally hit a key and stop it after a couple of hours. It took nearly a day to backup about 280 GB. I just left it running and went about other business.

My MacBook Pro Late 2008 is shining ever more with OS X Mountain Lion. With this setup, unless there would be a serious hardware failure, this MBP can go a few years without needing any upgrade, though I am pretty confident Apple might drop support for it after 1 or 2 OS releases from now.

Mountain Lion, a better file handling in the App. Spotlight has room to improve though.

OS X Mountain Lion improves upon the way files are handled in Applications. You can now duplicate, rename or move a file as illustrated. I still miss something, which I think would be very handy: in the Spotlight search result list, it would be nice to have more of the same options too.

OS X Lion introduced a radical change in the way files were handled in Applications. The experience wasn’t quite right for a proficient user,  definitely missed the “save as” option. With Mountain Lion they’ve fixed that issue. I like the change they’ve now introduced.

New file management in OS X Mountain Lion
New file management in OS X Mountain Lion

Now, I think a similar improvement in Spotlight search result would be really cool for a more advanced user. Every time I search for files in Spotlight, I wish I could do some of these things:

  • open a Terminal window where the file or folder is
  • see some information about the file, without actually opening it
  • or just open a Finder window on the file location

Those would make my experience much better, and I think many people, especially technical people, would enjoy that too.