Linux Does Comics
A few years ago, some friends and I opened a small store selling mostly role-playing games. We stocked many other games and as a sideline some of the partners wanted to sell comics.
A little bit later, after Linux version 0.11 hit the streets, I bought my first home PC. It was a 386/33dx with 120 MB of disk and 20 MB of RAM, and for a while it was just my toy.
Back at the store, comic sales were picking up, and when you sell comics you also take subscriptions. So Tony, one of the partners, started to take lists of comic subscriptions written on paper. When the comics orders came in he would spread out all the new comics on a table and scan each list for titles on the table, and when he saw one he would put it in the subscriptions folder.
Tony started to stress out when there were about 50 people with subscriptions. The time to scan the 50 lists on paper with the 100 comic titles spread out on the table was getting overwhelming. Tony would try to hurry, but then he started to miss comics and make mistakes, and then people would ask why we did not save their comics for them.
At this point one of our less computer-oriented partners, Greg, tried to put the subscriptions on a spreadsheet. He tried to list each customer as a row and each comic title as a column. It did not work, because the spread sheet was too wide to print. At this point I brought in my computer from home, and Greg helped me type in the comic data. I stored each subscription in a separate file. Now the big transformation that was needed was simply to use cat and sort. This turned lists of subscriptions (of titles) into lists of titles (of subscriptions). “The Guys” like hard copy, so they print the list sorted by titles, take each title in turn, find the list of subscriptions for that title on the printout, and put a copy into each comic slot.
My first incarnation of this was written under DOS mostly with DOS-perl. But being a Unix hacker, I missed all the Unix system calls and stuff. After playing a bit more with Linux, and after I installed the first MCC-interim Linux distribution on my PC, I switched the comic system over to Linux.
Now the comics were going to the right customers. We still used the paper pages for users to make changes to their subscriptions, though. And one of us still had to take each page each week and enter the changes into a file and print out the new subscriptions.
After a few months of editing subscription pages it became tiresome and error-prone to make all the customer changes. Customers would come in and ask us where the X-Men titles they signed up for were, and we would check their current list on the computer, and it would not be there, but the paper page where they requested it would be in the book.
I wrote a set of menus with perl (what else) that would let users delete and change their subscriptions online. So far, so good, but we could not allow a customer to add simply anything to their subscription. We could have a customer try to subscribe to something new that we could not get for them, so we had a problem with customers adding things.
My solution was that a customer could add any title that another customer was already getting. At least most of the time, if one customer was getting a copy of some item, getting another copy was not a problem. For this I took the current list of titles of things being asked for and made a file that the user could search through to get to a single item that was desired. This item then could be added to their subscription.
So now customers were able to add something old to their subscription. Now for the new stuff. The comic book distributors we use have a computerized ordering system, so they supply us with a computerized listing of new titles at the beginning of each month. This data is in the form of a DOS disk with a file of one-line entries for each title. Yet another perl script pulls out the new titles and saves them in another file like the current items listing I just talked about. Now the users can search through this file and add new titles to their subscription. The distributers also supply a 300- to 400-page catalog that we give out free to our subscription holders.
There is a two week window each month from when we get the data and the catalogs to the time our customers can add anything from the catalogs to their subscription. After two weeks we make our order to the distributor, so I delete the new titles file, and the menus detect this and no longer let customers add new stuff, so only the current old titles are available after the 15th.
I set up a dumb serial terminal in the front of the store and wrote some menus that would let customers edit their subscription file. Customers can add titles from the distributors' listings or from a list of popular titles. This way a customer cannot add a title we can not get, but he can change the number of each title or the starting and ending issue numbers, as well as delete a title. We have been using this system for nearly two years, and we now have over 200 subscribers managing over 1800 subscriptions on-line with Linux.
Special Reports: DevOps
Have projects in development that need help? Have a great development operation in place that can ALWAYS be better? Regardless of where you are in your DevOps process, Linux Journal can help!
With deep focus on Collaborative Development, Continuous Testing and Release & Deployment, we offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, advice & help from the experts, plus a host of other books, videos, podcasts and more. All free with a quick, one-time registration. Start browsing now...
- The Ubuntu Conspiracy
- A First Look at IBM's New Linux Servers
- Vigilante Malware
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Libreboot on an X60, Part I: the Setup
- System Status as SMS Text Messages
- Vagrant Simplified
- Dealing with Boundary Issues
- Bluetooth Hacks
- Non-Linux FOSS: Code Your Way To Victory!