It’s actually not so new, I just wanted to help to fix the old one to make work as it should, not as I saw it worked or pretended as working, when more categories of collections were added to it, not only turbo series. And so everything went well, and I’m currently new owner and manager of this project, and it’s hosted on my server. This project is about storing one’s various gum papers collections in one place online, and ability to compare it to others. Collections have categories, and lists have some colors! Fun.
One moment I was sorry for offering help, but it was somehow very funny to look at so badly written code. And I believe it’s up to original developer who wrote that crap. Few main problems of old stuff:
- Completely no understanding of databases and how they should work. Every user registered has his own table in database. Database table entries in one single format, no signs of Unicode (multilanguage support) either. Totally mess.
- No functions using parameters (not talking about OOP either), code “copied and pasted” for every gum paper series to print. So it takes around 1000 lines instead of 50. Series comparison takes 2x of that. Much of a redundant code.
- And yes, if you need to add new series to the system, you need to “copy and paste” some bunch of old code, change it for your needs, and save it, in 3 or 4 different places.
- Most database updates have loops, and every single iteration has database query in it. When updating some series, every single number needs separate database query. Not efficient.
- And numerous other badness.
Need example of efficient code? Here’s how I think it should look like. Using loop just to generate items for update, and update them all at once. Hard to do like that? No, you need just to know some SQL syntax magic:
After all this it wasn’t surprise anymore, that you need different registration for different gum categories, as different categories had different database using, along with it’s own users.
I did put many efforts, redesigned database, rewrote everything, fixed most bad things, and hosted on my server. It’s loaded with all information and users from old versions, as it was day before this version release. System can be found here at http://list.turbogum.com and it seems for me that result is just flying, not as was before. But netherless, still much work to do to make it work in a way I would like. At least make extending of new series in a simple way, and add new collectible series. For example KOBRA is completely forgotten. And some other.
Feel free to try it out, and contact me if you have any questions.
Related posts:












