"Just clean it up"



  • Recently I had a web design client who, long story short, had a rough static HTML site which he wanted me to add some DB admin frontend stuff to and a web service that interacted with the MySQL database. Apparently another developer had started the job and just went out of contact. It ran on the usual LAMP stack, we negotiated on price and then he handed over FTP/cpanel access and I got to work - mistake number 1, I didn't read the HTML upfront.

     

    Each page was made up of a table where every cell was part of an image, with names such as page1_10_11.gif, links were added onto single table cells.

    The title of each page was either the domain name of the site or a filename such as logo.gif.

     In the database, some questions for a quiz were stored, the questions table had question_id, question_name and question_text.

    The answers table, also had question_id, question_name and question_text, and answer_text_id.

    The answers_text table had question_id,question_name,question_text, answer_id,answer_text_id and answer_text


    A small sample from the homepage, names altered for obvious reasons:

      </tr>
      <tr>
       <td rowspan="6"><img name="homepage_r2_c1" src="images/homepage_r2_c1.gif" width="6" height="551" border="0" id="homepage_r2_c1" alt="" /></td>
       <td rowspan="2" colspan="2"><a href="http://www.wtfsite.com"><img name="homepage_r2_c2" src="images/homepage_r2_c2.gif" width="63" height="15" border="0" id="homepage_r2_c2" alt="" /></a></td>
       <td rowspan="4"><img name="homepage_r2_c4" src="images/homepage_r2_c4.gif" width="8" height="333" border="0" id="homepage_r2_c4" alt="" /></td>
       <td rowspan="2"><a href="http://www.wtfsite.com/private/"><img name="homepage_r2_c5" src="images/homepage_r2_c5.gif" width="81" height="15" border="0" id="homepage_r2_c5" alt="" /></a></td>
       <td colspan="3"><img name="homepage_r2_c6" src="images/homepage_r2_c6.gif" width="90" height="1" border="0" id="homepage_r2_c6" alt="" /></td>

       <td rowspan="2"><a href="http://www.wtfsite.com/aboutus.html"><img name="homepage_r2_c9" src="images/homepage_r2_c9.gif" width="81" height="15" border="0" id="homepage_r2_c9" alt="" /></a></td>
       <td rowspan="4"><img name="homepage_r2_c10" src="images/homepage_r2_c10.gif" width="1" height="333" border="0" id="homepage_r2_c10" alt="" /></td>
       <td rowspan="2" colspan="2"><a href="http://www.wtfsite.com/contactus.html"><img name="homepage_r2_c11" src="images/homepage_r2_c11.gif" width="81" height="15" border="0" id="homepage_r2_c11" alt="" /></a></td>
       <td rowspan="4" colspan="3"><img name="homepage_r2_c13" src="images/homepage_r2_c13.gif" width="389" height="333" border="0" id="homepage_r2_c13" alt="" /></td>
       <td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
      </tr>


      <tr>




     



  •  So TRWTF in this case is Macromedia Fireworks?

     The product would allow you to design a page in an image like way and then break it up with hotspots and such until you get a completely inaccessible page with really hard to read code for normal devs.

    The image names did have a meaning: <original image name>_r<row number>_c<column number>.gif



  •  I guessed that the _r and _c would correspond to row and column, but still - what a nightmare to work with, and that says nothing about the database schema.

     

    More to the point - what's wrong with using an image map?



  •  That's what you had to buy Dreamweaver for!



  • @Pol said:

     That's what you had to buy Dreamweaver for!

     

    LOL

     

    Reminds me of a story in high school IT lessons.

    Assignment is to produce a simple set of webpages, so naturally the tool of choice the teacher tells everyone is frontpage. Finding frontpage to be the steaming pile of excrement that it is, I decide to instead just fire up notepad and get to work.

    While hard at work on my assignment, another student sitting next to me looks at me writing up HTML in notepad and asks what i'm doing. I respond "i'm writing the webpage, I prefer doing it by hand instead of using frontpage". They respond "that looks crap" (talking about the HTML displayed in notepad) and I respond by hitting alt+tab and showing them the result in a browser.

     

    Then they accuse me of going online during a lesson (a great sin in that school!) and tell the teacher, result being that the teacher demands I "get back to work" using frontpage. I continue by using frontpage's HTML pane instead.

     



  • @GarethNelson said:

    More to the point - what's wrong with using an image map?

     

    The main issue would be compatibility, at least a few years back. The immediate workaround was what you saw, a  "table layout". Dreamweaver even has a function for converting divisions/imagemaps to a "table layout". You can imagine how "easy" that is to maintain afterwards!



  • Reminds me of a story in high school IT lessons.

    ...

     You win this thread, sir.  +1 internets!
    TRWTF is your colleagues tipping you off before you could explain what are you doing.



  •  That reminds me a class at my old college.

    We were assigned to write some basic html (no wtf so far), but the teacher had chosen an arbitrary set of required tags.

    After arguing over whether "meta description" and "meta author" were obligatory, we had to write frames (sic!) with some well known portals in each frame. Things got messy, when the sites decided the would not stay in the frames but opted to use some clever javascript and get rid of the frames. There was no way we could complete this assignment.

    The last insult - Frontpage Express (I believe that's the name) and pages generated by Word were accepted.

    I quit.



  •  Needs more napalm.



  •  @GarethNelson said:

    <snip>demands I "get back to work" using frontpage.

    Teacher: "Hey, what are you doing?!"

    GarethNelson: "Writing the page in notepad"

    Teacher: blank stare "get back to work!"

    GarethNelson: "I am working, I'm just using notepad instead of Frontpage"

    Teacher: presses Independent Though Alarm button

     

     



  • Independent thought alarm



  • yoink



  • I remember being told off for "hacking" a computer in class for simply changing the default foreground and background colours of a word processor. (Acornsoft View -- just used ctrl-S to remap the MOS colour palette. For the unawares, the entire text and graphics API in MOS was effectively nothing more than one API call that used ASCII control characters (and successive characters as parameters) to position the cursor, change and remap colours, draw lines and triangles, redefine character shapes, toggle printer echo, set up scrolling windows etc. Very strange. You could issue any call straight from the keyboard, with ctrl-@ generating a null for zero-value parameters.)

    A friend got told off for writing an Excel macro in class by our injured sports teacher cum IT head who likely had no idea what he was doing and considered it bad. I remember her once giving me some discs to reformat, and one of them was bad. Apparently she had the ability to tell from the far side of the room that I'd issued the format command wrong, since obviously she can't have given me a knackered disc. You learn very little about computers from staff who can't tell hacking from proficiency and who'd still be better off with a manual typewriter.

    [Edit: Doh, forgot I had to put raw HTML into here!]


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.