By Collin Allen

Return of the Mac

March 30, 2005

Just days after I posted my little blurb about Hackers and Painters, Paul Graham published a great article on the return of the Mac.

“If you want to attract hackers to write software that will sell your hardware, you have to make it something that they themselves use. It’s not enough to make it ‘open.’ It has to be open and good.”

This is where the Mac is headed.

Apple ADB Mouse Conversion

March 29, 2005

Here’s a little hack I did not long ago during the course of a weekend. I opened up an old, blocky Apple ADB mouse and swapped the internals with that of a newer USB mouse.

usb adb mouse

Unlike today’s injection molded, glued together, snap shut technologies, the Apple ADB mouse was no problem to open, with just had 4 standard Phillips screws on the corners of the underside. With the mouse open, two small circuits are visible. The circuit near the front of the mouse is where the pushbutton for clicking resides, and the other board tracks mouse ball movement and the ADB interface. Interestingly enough, the chip inside the Apple ADB mouse was made by Logitech, whose 2-button wheel mice I swear by today. I separated the two boards so that I could use the same pushbutton on the “new” mouse guts – the Apple ADB mouse has a distinct click, and I wanted to maintain that classic feel after the conversion.

Opening the USB mouse (an IBM one I bought a while back but didn’t like the feel of) was just as easy. After locating the left-click pushbutton and tracing the wires to the main board, I marked the points with a permanent marker and cut the ribbon cables, separating the USB mouse’s two boards as well.

connected boards

The next step was to combine the old Apple pushbutton with the main board of the USB mouse. Since I marked the two points where the USB mouse was expecting a left-click switch to be attached, I soldered wires from the Apple switch to those points. In hindsight, I should have checked and made sure that both switches (old and new) were normally open or normally closed, but I got lucky – they matched.

assembled components

The hardest step in this whole hack was cutting the right size and depth hole in the bottom of the Apple mouse plastic so that the optics of the USB mouse could fit and work properly. After much dremeling and hot glue, I was able to get the USB main board in a place that was stable and could “see” the desk. After testing the optics and mouse pushbutton, it was time to close the little guy up. I dug up a USB cable left over from another project that actually matched the Apple mouse color, attached it, and routed it through the hole used by the old ADB cable. A little more hot glue to keep everything in place, and I closed it up and put the original screws back. It’s not very pretty on the bottom, but it works. Not bad for a two or three hour weekend hack, I think.

mouse underside

D-Vision

March 28, 2005

When it comes to encoding video on the Mac, you have lots of options. You can spend as much or as little as you want. Since we don’t all have hundreds of dollars to spend on video applications, there is a nice selection of cheap video tools out there. One of the ones I’ve recently started using is D-Vision. Not only can D-Vision encode ripped DVDs to various multimedia formats, it also includes a handful of useful tools for segmenting/joining/repairing AVI files, converting audio, joining VOB files (commonly found on DVDs), and extracting DVD subtitles. I’ve found D-Vision to be an easy one-step application for backing up my DVDs onto my Xbox, making for quick access while maintaining high quality audio and video.

Sharing Media to XBMC

March 27, 2005

Following two posts on MacOSXHints.com, I felt I should mention the easiest way I’ve found to get content over your network to Xbox Media Center.

For those who don’t know what it is, Xbox Media Center (XBMC for short) is an Xbox program that plays just about any kind of multimedia you can throw at it. It’s like the turbo-charged VLC for your TV. Not only does it play standard MPEG-1 (.mpg) video and audio files, is plays MPEG-4, DivX, XviD, WMV, Audio CD, AAC, MP3, AC3, DTS, M4A, JPG, PNG…the whole alphabet soup of media types. The best part is that it all happens behind the scenes. You don’t have to worry about telling it specific information about what kind of file you’re dealing with. It just works. And here’s where this tip comes in - XBMC can also use the Xbox’s built-in networking to access computers on your network via Samba sharing (and various other streaming protocols, too, like XNS) and iTunes sharing (DAAP).

So how do you share media from your computer to your Xbox? You can follow one of the two tips above, but the way you’re about to learn is much quicker, and the program you use to accomplish it is quite handy. A great little tool called SharePoints lets you create Windows and Mac network shares without making a new user for them, as the network sharing is built into the OS, but there is no Apple-provided solution for managing them. With SharePoints open (either the preference pane or the application), fill in Share Name with a short name like “Movies”, set the Owner permissions to “r” for read-only (the Xbox has no reason to write to that directory), and choose a Directory for the new share. The Directory that you set is where the share actually pulls files from on your computer, so you would want to pick something that matches what your Share Name indicates - Movies for movies, Photos for pictures, etc. Then, under the “Windows (SMB) Sharing” popup menu, choose “Shared (+)”, and click “Create New Share.” Now that you have a folder available to your Xbox from your computer, it’s time to tell your Xbox how to get to it.

If you’re previously set up Xbox Media Center, this step should be easy. Inside the XboxMediaCenter.xml UserData/sources.xml configuration file, add a new block of code the line inside the appropriate section (photos, movies, or music).

8/1/2006 Update: See this post regarding changes to the way XBMC handles network shares.

Give the share a short name within the name tags, which will be shown onscreen. Then replace username, password, ip, and share above with your Mac user’s username and password, your Mac’s IP address, and the Share Name you created in SharePoints. Save the modified file to your Xbox via FTP, and reboot your Xbox. When XBMC starts, you should be able to browse files on your Mac using your Xbox, and play them right over your network.

Hackers and Painters

March 26, 2005

Hackers & Painters: Big Ideas from the Computer Age is a compilation of brilliant essays by author and Viaweb creator Paul Graham. Covering everything from startups, programming, open source software, web-based software, and more, Graham details the ideas behind technological innovation and the people that make them happen. Hackers and Painters is written in a very down to earth style and clear manner than anyone, not just computer people, can understand.

If you’re at all interested, read the essay Hackers and Painters at Paul Graham’s website, and you’ll be hooked. That single essay is what convinced me to buy the book. If you’re still unconvinced, another of his essays, “Great Hackers”, is available in text form and in audio form at IT Conversations.

Hackers and Painters is a fantastic book that covers a wide spectrum of topics in technology, but links them all together seamlessly. It’s one the best I’ve read in a long while and has significantly impacted my views of programming, business, and design. Here are some choice quotes from the book:

“What do hackers want? Like all craftsmen, hackers like good tools. In fact, that’s an understatement. Good hackers find it unbearable to use bad tools. They’ll simply refuse to work on projects with the wrong infrastructure.”

“What worries [Bill Gates] about Google is not the power of their brand, but the fact that they have better hackers.”

“It’s a mistake to try to baby the user with long-winded expressions meant to resemble English. Cobol is notorious for this flaw. A hacker would consider being asked to write ‘add x to y giving z’ instead of ‘z=x+y’ as something between an insult to his intelligence and a sin against God.”

“It is by poking about inside current technology that hackers get ideas for the next generation.”

“[I]f function is hard enough, form is forced to follow it, because there is no effort to spare for error.”

“In the desktop software business, doing a release is a huge trauma, in which the whole company sweats and strains to push out a single, giant piece of code. Obvious comparisons suggest themselves, both to the process and the resulting product.”

“I think [programming] language designers would do better to consider their target user to be a genius who will need to do things they never anticipated, rather than a bumbler who needs to be protected from himself. The bumbler will shoot himself in the foot anyway.”

Mastodon