College radio stations are small, but highly technical organizations. The era of the scruffy stoner spinning disks and mumbling into a microphone have been replaced by software systems that manage the station’s programming around the clock, and play recorded segments of scruffy stoners mumbling into microphones.

Kyle was the “tech-guy” at one station. Like any other small organization, the job involved doing anything from desktop support to server administration and some basic programming on the side. To keep the station’s website up to date, Kyle’s predecessor, Chad, had built a home-grown CMS-like system. Everything done by the station ended up there, in one form or another: photographs of every event, recordings of every interview, calendars and set-lists. As the tech-guy, Kyle put all of the data into that system.

Bill, Kyle’s boss, wasn’t terribly happy with Kyle’s technical performance. “Why the hell is it taking you so long to update the website? I gave you a stack of photos three weeks ago, and they’re still not in the gallery page.” Bill was technical enough to understand what goes into doing basic web page updates.

“Well,” Kyle said, “I have to get them into PHPTXTDB.”

“Into what?”

Kyle explained. Once upon a time, when Chad was in Kyle’s position, Chad knew just enough PHP to be dangerous . When someone said, “We need a website,” Chad broke out Learn PHP in 24 Hours and got to work. Since the “tech-guy” role had so many hats to wear, Chad couldn’t devote himself to it full-time, which meant he was very protective against any form of scope creep.

For example, no one said, “we need to store data in a database.” Chad didn’t build one. Instead, he created PHPTXTDB. Designed to be simple, it was a folder stuffed full of text files. To provide a schema, Chad named them all things like “01.phptxtdb” and “AR.phptxtdb”. The files were delimited, but if Chad delimited them with common characters, like a comma or tab, then he’d need to escape these characters so they could be stored in his “database”. Sensitive to scope creep, Chad didn’t include any escaping logic. Instead, he delimited each file with a string that would never be in his data: “(Y)”.

Since the requirement was, “we need a website”, Chad also didn’t allow any scope to creep in by making reusable code. If you accessed one of those database files, you simply opened the file and split("(Y)", …) the contents. If you hoped to know which files contained which data, or what the various columns in the data meant, don’t worry- documenting this solution wasn’t in scope either. Even better, some files had a specific column layout, and others had an abritrary one.

“Since there’s no editing tool,” Kyle explained, “I have to go in and modify each of these manually and hope I don’t break anything.”

“Okay,” Bill said, “this sucks, but I still don’t understand why it’s taking you so long.”

Kyle walked Bill through the process. First, he opened i.phptxtdb. This file stored an image name and a base64-encoded representation of the image. Adding the image there also meant that he had to check and confirm that he didn’t reuse the same name twice. Then he had to open 03q.phptxtdb, and repeat this process, because sometimes the application looked at that file for images. The reason for that was a mystery.

The actual page templates were stored in 000.phptxtdb, 001.phptxtdb and pages.phptxtdb. The entire body of every page was stored in-line in this “database”, which meant Kyle usually ended up trying to edit the HTML as a single line. For the more complex pages, this was quite a chore, and it was easy to screw up- as Kyle unintentionally demonstrated to Bill several times before even one image displayed correctly.

“This is terrible,” Bill said. “And this works?”

“Mostly. If images exceed a certain size, I think we overflow the buffer, but I haven’t tested it in awhile.”

Bill spent a long moment staring at Kyle’s screen, and the phptxtdb files he had been working on. Finally, he said, “Can we replace this with like, Wordpress or something? I know it’d be a lot of extra time for you to get everything ported over, but-”

Kyle cut him off. “I would be happy to. I’ll make the time.”

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!