June 23, 2008
Recently after switching from Mac OS X to Debian, I found I needed to restore a couple files from the Time Machine backup that I kept. The drive works just fine as an HFS+ mount, but I couldn’t figure out how to retrieve anything within. When Google didn’t yield the answer, I began to explore on my own. Turns out Apple does a couple slick things with the file system to make incremental backups work.
So for anyone that needs to access their Time Machine from something other than its associated Mac, here’s how you do it:
Mount the drive. On linux it should automount if you have gnome-volume-manager installed. If you don’t see it in /media then run nautilus and check the desktop. Still don’t see it? Read man mount. And then don’t forget the -t hfsplus flag.
Change directory. My mount point is /media/Time Machine/. Within that path I find the directory Backups.backupdb/. This represents the directory layout of your backup system. Inside that directory is the name of your disk. Inside that are folders labeled with dates corresponding to each incremental backup that was made. Pick the one you want, or choose the Latest symlink. For example, my path is now:
/media/Time Machine/Backups.backupdb/Drive\ 1/2008-06-05-073745
Find your file’s folder. Within that path is a complete representation of your filesystem. Navigate to the location of your file. If it’s not too big or nested too deep, it may be plainly visible. However there’s a good chance that its parent directory doesn’t exist. Instead you’ll see a zero-byte file for the parent that takes its name and acts as a pointer. Run ls -l and take note of the first numbered column. Example:
...
-r--r--r-- 2155704 root 5791966 0 2007-06-25 02:54 Wallpaper
-r--r--r-- 2155725 root 5791967 0 2007-06-25 02:54 Web-Identity
-r--r--r-- 5441953 root 5791968 0 2007-06-25 02:54 Windows
-r--r--r-- 5511926 root 5791969 0 2007-06-25 02:54 Work
After the permissions you’ll see the directory number that typically refers to the number of directories within that folder. For a file it should always be 1. Here it is not. What Apple has done is adjust the information in this file’s inode to use it as a pointer to the directory that contains the actual file. That way multiple revisions of the same drive can coexist without duplicating data.
Find the data. So in my case I want to grab something out of the Wallpaper folder. First I make a note of the directory number, 2155704 and then cd /media/Time Machine/.HFS+ Private Directory Data. This is where the data really lives. From there just cd dir_2155704 and voilà!
June 19, 2008
Recently I came across an academic reference to Cliffard Pickover’s biomorphs, a generative fractal-like art that resembles cell structures. Outside of Richard Dawkins’ famous evolutionary invention of the same name, which is similar in purpose but different in design, I had never heard of Pickover’s work. Sadly I couldn’t find the original article for free. [Biomorphs: Computer displays of biological forms generated from mathematical feedback loops]
I did, however, find a good overview of the subject by Mad Teddy. [Explore his website to discover why he is, in fact, quite mad.]
Ten minutes later I generated my own biomorph:

Download the source code as an Xcode project (Mac only, 51 KB). Possible improvements, including animations, to follow.
December 4, 2007
These are a handful of the books I’ve enjoyed recently about finance. The summaries are brief because countless others on Amazon have done the job for me.
|

|
The Concepts and Practice of Mathematical Finance
by Mark S. Joshi, 2003
One of the most succinct, to-the-point explanations of what finance is all about. Joshi, in very clear words, turns the theory into complete understanding.
|
|

|
My Life as a Quant
by Emanuel Derman, 2007
For those considering jobs as Quants, this memoir leaves you with plenty of inspiration, but little practical insight.
|
|

|
Statistical Arbitrage
by Andrew Pole, 2007
A decent numerical guide to the guiding principles behind stat arb. Very similar to other Wiley Finance books.
|
|

|
The (Mis) Behavior of Markets
by Benoit B. Mandelbrot
Mandelbrot—without question—is one of the most influential, yet under-appreciated figures in complexity, math, and finance. This book should be required reading for any risk manager, trader, or economist.
|
June 10, 2007
I want to highlight this particular link, “Top Ten of Programming Advice NOT to follow” [sic]. Except for #10 (throw exceptions), every one of these suggestions flies in the face of what programmers are traditionally taught. The general complaint that the author makes (suggestion #1) is that design is overrated. Start coding instead! I completely agree, with only a few provisions. Take time to think about what’s going on, but don’t waste valuable time creating formalisms.
Unless you’re working for NASA, you probably don’t have to prove your invariants—so stop pretending. If you understand the problem you’re approaching, and you’re competent enough, you’ll quickly figure out a reasonable way to get there. Even if you make mistakes along the way, who wants to bet it’s easier to correct them after the fact, when everything is set out plain and clear than it is to try to nail the solution the first time around. Think about the tradeoff you make everytime you draw a UML diagram. Is your careful planning really saving development time? No, you’re massaging yourself into delusion—your model isn’t robust; you’ve ignored the implementation details; and now you have to manage another component of the system.
Let’s think about the evolution of software design over the past decade and try to draw out a few points. In the beginning there was assembly, of which the function call pattern was a design issue. C made it obsolete—you had to use it. Then the theorists spent their time lecturing on the OO paradigm, writing books, and generally coercing the masses into its adoption. C++ obsoleted that. Since then, further refinements in the way we program have transpired, giving rise to Java, C#, and agile techniques. So at least for the moment, the issue of design has been resolved. Given the hardware we currently use it seems unlikely that there will be any new paradigm shifts. Oh no. What are the authors, the theorists, and the managers to do?
Here’s a challenge: find all the software design books of the past few years and look up the author’s biographies. How many still regularly program? It should be surprising, except when you realize that there’s a lot more money in consulting than in actual programming. I’d say most of the “top ten” advice you get when you read about software engineering should be taken about as seriously as your horoscope.
Yet although they’re obnoxious, I don’t see the designarati as the reason people fall into the pit. To me software development is an art. It requires practice and learning by example, also by doing. And it’s a subjective thing; what works for you may not work for someone else. The important thing is think a little about what makes sense and then get to work. You can’t preemptively design your way to a solution. It’s a premature optimization of the very worst temptation.
May 28, 2007
If you’re new to this weblog, you may have been redirected here from a stale link of many years ago. You see, over the past decade or so I’ve leisurely toyed around on the web, maintaining various websites, and experimenting with various ideas. This post marks the culmination of my effort to consolidate my online self into one location. Of the old domains that I still own, I have now redirected them here.
The result is that I see a not insignificant amount of traffic to this website. This is great; having a website that many people visit challenges me to create interesting things. (Whether or not anyone cares about it is another matter.) My challenge now is to think of the genre that I want to write about, and the types of things people will read. Those who stumble upon this page are almost certainly of the techno-culture crowd, so my immediate vector is in that direction.
What I will not do is relate personal stories, comment on memes, or throw my voice into any discussion that is already too big. My intent is to make this weblog worthwhile to everyone who reads it—not just for friends or family, and not just for those who care only about something specific or obscure.
I’ve never really had a personal weblog before, so I guess we’ll see how it goes. Hopefully the fresh redesign and transition to Wordpress will be a catalyst to keep me on top of things. In summary, my rules:
- Stay fresh.
- No journaling, no meming.
- Be original. Be useful.
Many thanks to those that visit.