(Some soothing and allusive tunes for the following post.)
Before I can continue with my new and exciting project, I have to fix my development environment. I’d like to think that most developers have to go through these types of problems before they can become great, but even thinking that doesn’t make me feel more comforted. So, despite causing myself a bit of embarrassment, I’m going to explain what happened in order to maintain a sense of honesty and realism about the job. Here goes.
It all started when uninstalled MacPorts. I followed a web forum’s instructions and executed a few commands that ended up scraping my local file. In all fairness, it wasn’t the forum’s fault, I should have paid more attention to the delicacy of the environment set up I was using for Bandcamp. Reasonably, some of the tools used by my local Bandcamp app were now uninstalled and I was unable to continue developing without them. This isn’t really the worst thing that could have happened because under normal circumstances, I would simply reinstall any lost programs by running setup.rb like I did on my first day. Unfortunately my computer is quite old (an early 2008 macbook) and mechanically more sensitive to major software installations. So the ruby program got stuck at the make install command during the first tool installation. Although this problem didn’t directly affect my team, I was disarmed and essentially useless to Bandcamp (except for my awesome blogging) until I could get my machine back up and running.
I began by breaking down the installations and trying to do what the set up script did by hand. After installing several tools, including the one that was hanging at the make install while running the setup.rb script, and feeling close to a solution, I hit the same hang while installing ffmpeg. (Since ‘got stuck’ and ‘was hanging’ is a very confusing way to explain the problem I was having, I will explain in more detail what that means in the next paragraph when I use my utilities to look at the problem.) Scouring online tech communities for solace and coming up empty handed, I desperately asked Joe for advice. He suggested my hard drive might be the problem.
The most difficult part of the problem was that make install wasn’t generating an error, it was just an errant process. When make install didn’t work, the command would run forever (if I let it), and yet, it didn’t look like anything was happening from observing the Activity Monitor. The Activity Monitor is similar to the command line program top, but also shows stats related to the system memory, and disk usage and activity and provides a useful interface to delete, inspect, and sample processes. But, as far as I could tell from all that, make install was not even running.
So, I ran a check to verify the integrity of my hard drive using Disk Utility, another application in my ~/Applications/utilities/ folder. A couple red lines of text told me that my drive was corrupt and missing an expected file, so the next step was to perform a disk repair. By restarting my computer and holding down shift key, I started my computer in safe mode and accessed my disk utility from there and did a disk repair.
Back from a successful disk repair, I tried to run setup.rb again and still had the same problem. Deciding to check my utilities for something else that could be useful, I actually found a lot of cool stuff. Have you every tried using the graphing utility, Grapher? It is so fun:
It even gives you the option to take derivatives and integrals! I would have loved to use that in the 1st and 2nd year calculus courses I had to take. You can also use Grab to capture screen shots and look at the colours on your screen pixel by pixel with the DigitalColor Meter. There is also Console which provides a very detailed system log. This one I could actually use, so I executed a make install command and kept an eye on the console. I noticed an indexing error with mds, an indexing tool for mac, as make install was ‘running’:
Interesting, so seemingly still a hard drive issue after repairing the disk? To make sure the repair actually worked I double checked the disk quality by verifying disk again, but it returned with a clean check. In one last ditch effort to get my computer back up on its feet, I reinstalled my OS. Surprisingly, a few hours later, it worked! I was able to run setup.rb successfully and could once again play with the bandcamp app on my personal machine.
Although, the fact that I had a problem in the first place makes me question the integrity of the mechanical parts of my computer. Joe says he “would bet dollars and donuts that [my] drive is failing” from a combination of the age of my macbook and the added stress caused by uninstalling and reinstalling a lot of items.
Perhaps one day I’ll will have a post about what it’s like to replace your hard drive, but for now, on to investigating PayPal fees.