Hey, I have an idea

Friday August 8, 2008 at 12:09pm web development, frustration Comments (3) »

When your website has about 300 pages, how about lets not actually code the menu 300 separate times - i.e., one for each page. How about lets write the menu code *once* in an external file, then we'll just call that on every page. Huh? Sound good? You know, just in case some poor sap comes in later and has to change something in the menu... ...cause you know, it would total suck to have to go into 300 different html files and change one line in the menu...

...no, no...that would be far, far too easy...

~PS

Cameron/Shadow says...

heheheheeeeheheheeeeee! *is giggling* Have fun with that one bud! Damn.... that reminds me. I still need to locate/sort/file/explain/post all the role possibilities in WW Central.... *stops giggling* *silence*

Zeb says...

Eww. That doesn't sound like any fun at all. But, umm, aren't *you* the guy that codes the web pages? I'm assuming you aren't the guy that coded the menu like that, what's the story here?

Penguinsushi says...

Yeah, i am the guy that codes the pages an no, there is no earthly way i'd had written it like that. Every so often we get clients that just want us to take over hosting/etc for their existing web sites instead of building them a new one. This often happens when the company *had* a dedicated IT/web employee who left or was fired or something. These sites are generally very large and cumbersome as well as almost completely hard-coded in straight html - which means each page has its own html file, and that each file contains all the code for the structure/layout of the page - so changing anything global means changing *every* file, and takes a very long time. My advice to my managers regarding such sites is nearly always "we need to rebuild this site if they want us to make any significant changes to it". Remember, they had a dedicated employee that did *nothing* but maintain this site. *We* are not in that position - we don't have that kind of time. Thing is, said client often doesn't want to pay to have their site rebuilt when they like it the way it is now... ....so they end up paying 10x more over the next year or so having us do stupid things to their existing mess instead of letting us rebuild their site with dynamic elements (that would make such changes take minutes instead of hours) and content that they can maintain themselves. I probably exaggerated on the page count there, but I did spend about 3 hours on friday simply opening files, find/replacing a menu item and going to the next one - though it probably would have taken less time if their file structure wasn't absolutely insane. That was the craziest folders within folders within folders mess i've ever seen on an html site. So yeah, you can see how much i love those clients. But hey, as long as we're doing good business and they're paying, i guess it's not too bad... ~PS

Submit a comment...

NO HTML ALLOWED [because: spam]