1

I have been offered an "opportunity" to take over maintenance of a small internal website run by my group that provides information about schedules and photos of events the groups done.

My manager sent me the link to the site and I checked it out. The site looked clean and neat but loaded in ~5 seconds. I thought this was a little long considering the site really didn't contain a lot of content. This prompted me to take a look under the hood at the pages source code. To my horror it'd been totally hacked together using nested tables!

I'm new so I really can't say no to this "opportunity" so what should I do with it?

Every fiber of my being feels that the only correct thing to do is overhaul the site using CSS, Div's, Span's and any other appropriate tags that a sane/good web developer would used to begin with instead of depending on the render incentive magic of tables.

But I'd like to ask programmers with more experienced then me, who have been in this situation. What should I do?

Is my only realistic option to leave the horror as is and only adjusting the content as requested? I'm really torn between good development and the corporate reality I'm part of. Is there some kind of middle ground where things can be made better even if they're not perfect?

Thanks ahead of time.

Edit:

I've been looking into this a little deeper and noticed an extension type that rendered as HTML but was actually ".cfm". After looking into it I found out this was a ColdFusion file. Which is apparently an Adobe WYSIWIG program which must have been used by my predecessor to create this site.

This means maintenance will be trivial once I get a copy of ColdFusion. I will probably still need to do things like create thumb nails and move some of the content on the home page elsewhere to improve load times. I doubt I can go much further in optimizing the site past this without throwing out ColdFusion.

I am very grateful for all the good advice and will keep it in mind for future "Opportunities".

4
  • 16
    I doubt that the website loads in five seconds because of nested tables. Don't you think that you should first and foremost profile the website, find the bottleneck, and remove it, before starting minor changes on parts which doesn't affect the users, like removing the nested tables? Commented Sep 19, 2012 at 3:12
  • 5
    @Dan I sincerely wish you that you never see anything more horrible than 'nested tables'. Chances are my wish will not be fulfilled. Just check out some PHP snippets written by self-proclaimed experts that have 5-6 possible SQL injection vectors per query and you'll know what I'm talking about.
    – K.Steff
    Commented Sep 19, 2012 at 3:46
  • how will you do the maintanance? is this static html that can be edited with a html-wysiwyg editor? or is generated code from a content-managementsystem? is it a job where you have to do some programming in a language like php, c#, java?
    – k3b
    Commented Sep 19, 2012 at 7:57
  • 2
    My advice just follow the K.I.S.S approach. It stands for Keep it Simple Stupid, you really should not put a great deal of work into, unless you literally have nothing else to do. I would not even work on it during normal business hours if you decide to go ahead and update the website.
    – Ramhound
    Commented Sep 19, 2012 at 11:41

5 Answers 5

11

Beware of the Iceberg Syndrome!

With an iceberg, the vast majority of it is located under the water, with just a small percentage being visible. Likewise with a website, the vast majority of it is hidden out of view from the user.

Changing the site from nested tables to CSS/DIV's will take a considerable amount of time and effort, none of which will be visible to the users and managers. If you spend a month working on this change, to your managers it will look as if you have done nothing at all for the month. This could be very bad for your career, especially if you are new to the company.

I would take on the role of maintaining the site and continue to keep it up-to-date, while making small changes here and there to tidy up the architecture of the site, but I wouldn't waste too much time on it.

If it works, don't fix it.

You will almost certainly make some small mistakes somewhere, be it a typo or a DIV that doesn't quite align correctly. These are the only parts of your effort that anyone is going to see, and they are going to have a negative impact on their perception of the site, and therefore yourself. You could end up doing more harm than good to your career.

1
  • This is probably THE most frustrating thing I've ever ran into with web developing. I can spend a ton of time making a page render faster and it takes much longer then I'd like it to BECAUSE I'm not change the look for the end user even across browsers. But this in a corporate setting is usually considered a waste of time.
    – Dan
    Commented Sep 19, 2012 at 15:53
13

Nested Tables Aren't Necessarily Bad

There are things you can do with nested tables that you can't with CSS and <div>s, especially with regard to re-sizable width layouts. Tables may be old fashioned, but they are more versatile and work equally well on every browser. I personally prefer CSS where it works equally well on every browser and use tables where it doesn't. More than 3 levels of nested tables is almost always unnecessary.

Tables Aren't Slow

Have you looked at the timings in the developer console of a browser to find out what is causing it to be slow? If you don't identify the cause of the slowness, you aren't going to be able to fix it. I think I've seen layout issues slow down a web site's display 1% of the time. The other 99% of the time it is waiting for the server or the network - most often to download images.

Technology Doesn't Matter

This is not a customer-facing site. If the site displays well-enough on everyone's browser, the only person who will care about the technology behind it is you. Your boss's goal, I'm sure, is that you keep it functional and spend as little time on it as possible.

Clean up each page you have to change for a business reason to meet the most basic standards you can stomach and leave the rest. For me, that means making pages validate cross-browser Xhtml 4.0 transitional with Quirks-mode properly disabled (using the special doctype/html-tag combination) for IE. Why do I tilt at that particular windmill? Because I don't like surprises. When a new version of a browser comes out I don't want to have to run and fix the site. The HTML Validator plug-in for Firefox is great for this.

If you can do a little something to make yourself more productive in the future and/or make the html valid over time, do it. Otherwise, start a manifesto of what changes the site needs and plan to make those changes another time. As your manifesto grows, it will help you remember all the issues, identify your most serious pain points, and keep you focused on the low-hanging fruit that will actually make a difference to the people who use the site. And what will make a difference to your boss is how quickly you can say, "OK, next project."

If this were customer facing, if it were production code, I would give you very different advice - care is critical there. But not here.

3
  • 1
    "I personally prefer CSS where it works equally well on every browser and use tables where it doesn't." -- For a good developer, that's never. Tables should always be used when displaying tabular data, and should never be used otherwise. If CSS doesn't work for you, the browser is not the problem :). I agree with everything else in your post.
    – riwalk
    Commented Sep 19, 2012 at 14:00
  • @Stargazer712 Every web class I've ever had told me exactly that and if I wasn't so new to this SO site you would be getting an up vote from me. But I won't for get you when I'm living high on the hog and get to 15 points. :p
    – Dan
    Commented Sep 19, 2012 at 15:37
  • 1
    Yeah, I always use tables for tabular data. I agree with that 100%. But when you make a page that has to resize dramatically with the browser, there are some page layouts that just work better cross-browser (inc. IE7) with tables than CSS. Commented Oct 2, 2012 at 22:31
3

There are two ways to look at this. First, is making improvements to the web site something that will get you visibility at work? If so, definitely take the opportunity. It may not be the most pleasant task but it may open other doors for you in the future.

Second, should you rewrite the website? The web site is probably very old, from a time when nested tables was the only way to guarantee correct layout so make sure the browsers used to view the site will layout correctly using the new mark up.

If so, when you get time or when you fix or improve an area, also take the time to speed up the page. Make sure to profile the changes before and after then demo the changes to your boss and gauge his or her reaction. If he or she does not care, speed up the first few pages (so you know you can do it) then do the minimum required thereafter. You have learned everything you can. Otherwise, work through the pages as time allows and keep up the visibility.

1

Visibility & usability matters in web

I would agree with the comments that you may turn this task to a learning experience. You also get the most attention by fixing some usability issues that were left their for years. Thus, before starting to do any work, try to speak with end-users and get their feedback besides the requirements.

Identifying what is valuable

However, your work appreciation will directly depend on importance level of the project and how much your Boss values the progress. Thus, avoid any major re-factoring works and concentrate on visibility, usability and speed. That might be your Golden goose which might bring you, the work appreciation and joy of doing something valuable.

0

IF the site is working and only available to internal users and no one is complaining about the timeliness of the page loads, i don't think that it's justified to spend anything other than spare time converting it to "table-less" as it's "kind of" subjective. If you've got lots of time on your hands, then sure, it wouldn't hurt.

But if you go in and say:

"Hey bossman, check out how i changed the table's to divs!! BOO-YAH! Did you see how fast that loaded!!!"

he might talk to your manager about getting you some more work.. LOL

Now, if you could spin it and say, "hey Mr. Manager, look what i learned in the process of speeding up our company photo site!!" Maybe, they'll say, GREAT!! Now update all our websites!! ...maybe that's great???

You could also turn it into a learning experience and use it as a chance to showcase your abilities / methodologies and maybe even introduce new technologies, and that could turn some heads.. but moving the HTML from tables to div's and increasing the load times isn't going to bring that much value... not that it wouldnt be appreciated, but if there's other stuff to do, that'd probably be on the bottom of the list..

..good luck!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.