Just a little bit unwieldy now...
Mar. 9th, 2011 02:12 amSo, that Link Tags system I'm in the process of writing is starting to show a bunch of bugs, and seemingly at random to boot!
Currently, if you include all lines in the source code (comments included), the whole script weighs in at around 1250 lines of code.
Up until now, I've been putting the stuff that manipulates the database directly at the top of the file, the stuff that reformats the stuff taken from the database into stuff that can be thrown at the browser in the middle, and the logic that browsers interact with directly at the bottom.
I think I need to start breaking it up into modules so I can keep better records of which is supposed to do what.
Three ought to do it, though I'd have to figure out how to use modules in PHP...
Today's issue was that it started to choke on labels, links that had names, but no descriptions or URLs.
I haven't figured out what went wrong yet, but I need to go to bed soon, so I'll probably fix it some time tomorrow.
Currently, if you include all lines in the source code (comments included), the whole script weighs in at around 1250 lines of code.
Up until now, I've been putting the stuff that manipulates the database directly at the top of the file, the stuff that reformats the stuff taken from the database into stuff that can be thrown at the browser in the middle, and the logic that browsers interact with directly at the bottom.
I think I need to start breaking it up into modules so I can keep better records of which is supposed to do what.
Three ought to do it, though I'd have to figure out how to use modules in PHP...
Today's issue was that it started to choke on labels, links that had names, but no descriptions or URLs.
I haven't figured out what went wrong yet, but I need to go to bed soon, so I'll probably fix it some time tomorrow.