the original database This blog entry is directed mainly at the body of web developers who have very little formal training but are trying to improve their own skill sets. As I’ve matured in my understanding of object-oriented software design, I’ve come to grips with certain realities. Often, I’ve found myself doing something that feels ‘dirty’ or ‘hackish’. That’s usually because I’m “doing it wrong” as smarter people say to me when I show them my code or describe my problem. When that happens I have two courses of action, but the only one that provides growth and self-improvement is to heed the advice of my mentors (usually a chorus of developers on IRC saying, “you’re doing it wrong!”).

Continue reading »

3D sound USB sound card In part 1 of this series, I took an Asus router and loaded openwrt onto it. I added an LCD display and connected it to the serial port on the router board. At this point, I have a low-power, small form factor computer that I can customize to my heart’s content. As far as I/O, the computer still has its original wifi antenna, 5 wired LAN interfaces, a serial port and a USB port. My USB sound adapter still hasn’t arrived from Hong Kong, so I’m going to work on another piece of the puzzle.

Buffalo LinkStation Duo The first thing I did after joining this device to my wifi network was telnet in and change my password. Now the project that I’ve been following up to this point is mainly to be used for playing internet radio stations as I understand it. My wifi radio is going to be used for that too, but also for playing selections from my own music library. I plan to get one of these Buffalo 1TB Linkstation NAS devices and put all my media on it and leave it down in the basement. I’ve read that you can really customize these devices, but all I need to do is add an ssh server to it. Then I can mount the whole filesystem to a folder on my wifi radio and have access to a full terabyte of storage space.

Continue reading »

OpenWRT wifi radio + LCD I’ve been inspired by Jeff Keyzer to build a wifi radio. I’ve wanted for a long time to build a wifi radio to play internet radio and music from an arbitrary remote filesystem. The low cost of the platform he chose, the WL-520gu which I picked up for $35 shipped and is now even cheaper made the barrier to entry much lower than I had thought. So I bought one and tore out the guts as soon as it arrived.

mightyOhm has a good series of blog entries for doing almost exactly what I want to do. I skipped the first bit about hooking up a terminal because I don’t have a TTL-USB device lying around and flashed the router with openwrt. As I found out, TTL is not RS-232. You can’t just connect an RS-232 cable to your PC and solder the other end to the serial pins on your router. I do have a TTL LCD panel that I picked up last year on eBay (I’ve been planning to build a device like this for some time). Modern Device has these 20x4 character blue LCDs with a TTL serial interface for around $30. Jeff built his own, but he’s also an electrical engineer.

Continue reading »

I was looking at the bottomless pit of badly-written and malformed javascript that loads on fresnobee.com the other day and noticed a peculiar filename loading multiple times (of-course) in our advertisements: DocumentDotWrite.js. Since I loathe the overuse of document.write on our site, it piqued my interest. I had to see what on earth could be in this ridiculously named script.

function DocumentDotWrite(s){document.write(s);}

It didn’t take long to figure out what this does, but I still haven’t figured out the why. Why in the world would anyone need this? Is it one component of a basic abstraction pattern for different implementations of document.write? It’s certainly not easier to type DocumentDotWrite so it couldn’t be a shorthand. This is where context comes into play. The script tag itself is written by a document.write call which is contained within an iframe which is written by a call to document.write which is loaded by another remote script whose tag is written with a call to… take a wild guess.

Continue reading »