これはすなわち、伝統的なUnixのハッキングとMac OSのノウハウの両方を合わせて使いこなすまたとない機会であるということだ。『Mac OS X Hacks』は、単に特定のmanページや、たいして役にたたないヘルプ情報を集めているだけではない。これまでのMacのパワーユーザーや、Unixのハッカーが培ってきた最強のtipsやトリック、ツールを、彼ら自身から引き出しているのである。
これらのハック手法は数分で簡単に読むことができるので、正しい答えを求めるのに何時間もマニュアルと首っぴきにならずにすむ。Mac初心者にも、長きにわたりMac OS Xやその基盤となるUnixの世界を究めているユーザーにも、『MacOS X Hacks』は、実践的な解答を直接与えてくれる。
『Mac OS X Hacks』は、オライリーの新「ハック」シリーズの3冊目の本であり、「ハッキング」を良い意味の言葉として復権させることを狙っている。ここ数年、「ハッキング」という言葉は、インターネットを妨害したり、コンピュータのセキュリティを破って、情報をかぎ回っては盗み出したりする極悪な犯罪者というイメージとともに使われている。しかし、もともとはもっと良い意味で使われていた言葉であり、今でも開発者が集まればこの言葉は本来の意味で使われる。我々の新しい「ハック」本は、コンピュータ技術に革新をもたらす、真のハッカーのスピリットで書かれている。
The book is divided into nine chapters, each with about 10 tips. The subjects include Files, Startup, Multimedia and iApps, The User Interface, UNIX and the Terminal, Networking, Email, The Web, and Databases. Each tip is one to three pages long and well laid out in easy to follow step-wise instructions. A simple "thermometer" icon is given with each tip to alert the user to the level of difficulty. Additionally, throughout the book the authors alert users to areas where they should be careful. Being new to the Unix environment, I found the tips on use of the Terminal application and several utilities that are unique to Unix to be a valuable introduction for me. After the thorough introduction to the Terminal application, Dornfest and Hemenway proceed to build on the basics by demonstrating the usefulness of the application with more advanced commands such as chmod and sudo.
Tricks covered include: Stubborn trash, stuck images and Jammed CDs; Turning your Mac into a Hard Drive; Hijacking Audio from Mac Apps; Top Screenshots Tips; Interacting with the UNIX Shell from AppleScript; Sharing an Internet Connection; Creating Mail Aliases; and Serving up a Website with the Built-in Apache Server. Each chapter includes tips and tricks for beginners and advanced users alike. Several of the hacks make reference to other areas covered in the book, but each tip is useful on its own.
Several of the tips are hacks to the system using the Terminal application and serve to show the user the underpinnings of the OS. All in all, a fascinating look at OS X from two masters of the realm.
The book is especially useful in that each hack is written as a short, standalone article, so you don't have to have read #1-26 to be able to follow #27. If one article assumes or benefits from something covered in another, it's explicitly referenced in the text, as are other sources to turn to for more information, on the web and in print. It also provides the benefit of long-time Mac experience from a number of different authors - you can find out what Derrick Story has learned the hard way from years of backing up his own laptop on the road, for example.
The authors do a good job of pointing out many little freeware and shareware utilities and workarounds for specific tasks - the sort of thing you'd usually have to spend half an hour digging through forum postings to find. Of course, this means that many of the tricks and techniques (like removing the brushed metal from Cocoa applications) can be found on the web for the price of some patient Googling, but the pleasure in having a book like this is that someone - or many someones, in this case - has already done the necessary dredging and written a slick little nugget of an article condensing everything you need to know. The authors are, for the most part, excellent writers and vastly knowledgable about their subject matter. I've selected a couple of my favorite chapters to talk about (I couldn't include them all for space reasons).
Chapter Two: Startup
This is one of the sections - and there are several - where Mac OS X Hacks reminds me very much of Unix Power Tools. I particularly remember the Logging In and Logging Out chapters of UPT, which were a revelation to me years ago when I first started playing with a Linux box and had never heard of such a thing as a .profile. The Startup chapter in this book deals with (among other things) verbose booting (#13), using open firmware for added password protection (#16), and how to get OS X running on an older, unsupported Mac (#17).
Chapter Three: Multimedia and the iApps
I admit I haven't spent all that much time with this chapter, because I prefer other options for most of the functionality provided by the iApps. I think Audion does a better job as an MP3 player than iTunes, and Adium a better job for instant messaging than iChat, and iCal fascinated me for about a week before I went back to a pen-and-paper planner, of all things. However, I'm intrigued by some of the different ways these applications can be combined and scripted. #28 (Controlling iTunes with Perl) is definitely worth a read.
Chapter Four: The User Interface
Mac users have always been fond of customization, especially as far as the GUI is concerned, so it's not surprising that the chapter in which I feel this book really shines is this one. Many of my favorite (and now dog-eared) articles live here. #40 (Extending Your Screen Real Estate with Virtual Desktops) was a treat; I've always liked using multiple desktops with other window managers and had wondered if it could be done under OS X. The article points out a couple of options - one shareware, one freeware. #43 (Screensaver as Desktop) was fun as well - Running the Cosmos screensaver in the background beneath a slew of transparent terminal windows is a striking effect, and not as CPU intensive as you might think. Other gems in this chapter include #45 (Speakable Web Services) and #47 (Prying the Chrome Off Cocoa Applications). There's also a discussion of various alternatives or additions to the Dock, although noticeably absent is my personal favorite, DragThing.
Chapter Five: Unix and the Terminal
More Unix basics that many people will already know, but also some interesting discussion of material specific to Mac OS. There's the requisite information about changing the appearance of Terminal windows (mmm, transparent) and an introduction to Apple's Developer Tools, featuring Project Builder and Interface Builder. #56 (Top 10 Mac OS X Tips for Unix Geeks) collects some of the differences *nix users will encounter between OS X and other operating systems. #65 (Running Linux on an iBook) is fun, too.
Chapter Eight: The Web
The web chapter is a lot of fun. #85 (Searching the Internet from your Desktop) explores a couple of ways to use Google outside a browser - this seems like the kind of thing there might be more of in the Google Hacks book - as well as other search methods, including Sherlock. Other favorites from this chapter include #87 (Reading Syndicated Online Content), and the articles dealing with the Apache installation that comes with OS X. These are #88 (Serving Up a Web Site with the Built-In Apache Server), #89 (Editing the Apache Web Server's Configuration), and #90 (Build Your Own Apache Server with mod_perl).
There's a lot in this book that smart users could figure out by themselves and that experienced users would already know, but that's not why you'd buy it. Mac OS X Hacks picks up where Mac OS X: The Missing Manual leaves off, assuming a reasonable level of competence in day-to-day functions, but guiding you through the wealth of capabilities contained within OS X that you might be vaguely aware of but haven't really played around with. You probably could find out a lot of this information on your own, but would you?
Considering how much benefit this novice MAC OS X user got from the book, more advanced Macintosh users are likely to find that this book provides a quick "easy reference" for some of the more tricky or complicated setups. Since the book is organized into independent sections, one could easily use this for a desktop reference. Plus, it's not the "Macintosh for Dummies" type of book that seems to fill most shelves nowadays - the authors assume you want to do the advanced stuff with OS X, but just need some tips to get you going. Hopefully O'Reilly will continue with the "Hacks" series of books (I'm eagerly awaiting a book on Windows Hacks!); they are the first series of books that really let the end users get under the hood of various platforms and tasks and "get the job done" without feeling lost. I would not be surprised to see MAC OS X Hacks, as well as other Hacks books, come out in volume format. After all, after spending almost a week with the MAC OS X book, I can see how these can quickly expand to cover a lot more topics in a similar, condensed format - which for us "get it done now" type people is a godsend!