Related link: http://www.cdbaby.com

Pretty soon I’m going to re-write CD Baby from scratch.

CD Baby, including the storefront, backend intranet, members login area, and various cron scripts is made up of 91,345 lines of PHP code in 1105 files. And I did it all myself over the past 5 years.

6 years ago when I started CD Baby, I didn’t know shit about programming. I just knew some basic HTML. The first version of the site was done in Microsoft FrontPage (how embarrassing! It worked hand-in-hand with the shopping cart software, though, so I had to.) When people would mail me CDs, I would open up a template in FrontPage, and cut-n-paste their info into the template, and upload their page.

As it grew, I knew I had to go to something database-driven. But to me, a database was Filemaker Pro. A program where you click things on the screen, drag and drop things, etc. I guess for people using Microsoft servers, it still can be that way. But my gurus taught me the peace-of-mind of open source. Using only non-commercial technologies, so that nobody can decide to start charging you too much.

So I bought some books on PHP and some books on MySQL. I learned s-l-o-w-l-y. I mean REALLY slowly. I mean only really after 3-4 years did I feel I knew what I was doing. Until then I would get by with something just barely good enough to work, which was enough for me.

But now after 6 years and 90,000 lines of PHP code, I really am getting good at this. So I want to go back and re-write CD Baby from scratch, knowing what I know now, to right my past wrongs, and leave a much more flexible, expandable, maintainable program to ride into the future.

This journal will document the re-writing thought process, decisions, philosophies, cool tricks, and all that fun techie stuff.