When bad code goes really bad.

Coding, Website, Work No Comments »

Alot of my time recently at work has been delegated to working on an internal tool that I wrote a long, long time ago.  When I originally created the tool ( which, by the way, is for task tracking/project management ) - I wrote it mainly as a lesson in XML/XSLT creation.  It wasn’t anything I ever intended to maintain.

Oops.

Now I’m left with this stinky pile of garbage code that I wrote, with a ‘It looked good at the time’ interface.  Unfortunately, my boss loves it.  Mainly because the part that does work - generating our weekly status reports - is all he cares about.

So once I started maintaining it, I realized just how awful XML/XSLT is and what a pain in the royal ass it is to do anything flexible in it.  So I started converting all the pages back to pure php pages.  Then, about half way through, I discovered jquery ( que light shining from heavens ) and started integrating some of that into the pages to make it more friendly.

Once I had started doing that, I realized how bad I am at organizing CSS files and styles and I’ve gotten so bored with this project that I haven’t bothered to go back and fix them.

What this all means, however, is that I’ve ended up with a project that, at the moment, is half XML/XLST, half pure php, with jquery integrated some places and pure javascript in others, with some disorganized CSS files laying around ( in some cases, I got so sick of styles I started putting them inline in the page.. oops. :) ) and generally this badly organized, badly coded mess of crap.

And that brings me to my final point - I put it up on phase2! I’ve no idea why I did this - if only to show you how (not) glorious my work is.  But then it turns out that my provider doesn’t have php5, which means I didn’t have access to mysqli.  Then combine that with security things they threw in the mix and I had a whole mess of new bugs.  I worked through them tonight and the page seems, for the most part, up and running.

So if you’d like to, check out my status, project management, task tracking tool here: http://www.phase2.net/status/

I made two logins ( oh yeah, I had to rip out all the LDAP stuff I had put in because we use it at work and change the DB around to use regular passwords ):

Login: admin, Password: admin

Login: jsmith, Password: jsmith

In all honesty, if someone finds this thing useful and wants it, by all means - let me know.  I’ll answer any questions you may have on it and help you if you run into some awful code issue of mine, but I doubt any one is going to want this thing.

And the funny thing is, I still have to keep improving it at work.  Oy.