eftychia: Me in kilt and poofy shirt, facing away, playing acoustic guitar behind head (Default)
Add MemoryShare This Entry
posted by [personal profile] eftychia at 02:27pm on 2003-10-02

Argh. I've got a site I was supposed to make several "small" modifications to by yesterday. Unfortunately the code is so brittle that the tiniest change I make -- substituting one graphic for another or adding a paragraph -- severely hoses the layout. So first I spend forever wading through table code trying to figure out what goes where so I can determine where my changes are supposed to be, and then I spend forever figuring out why my one wee change broke the page. We're talking about 1600 lines of HTML (fortunately indented a bit more consistently than the last site I had to modify, but that 1600 lines is just the first file I had to touch, and there's no use of comments and whitespace to make it any easier to tell what's logically a part of what).

Is it just me, or should web pages not be so brittle that if you touch them they shatter?

In the past I've dictated the layout of web pages very little. I used tables on a few pages on my site, but for most of what I've created, I just let the content flow from top to bottom using default-color text on default-color background and exercising control mostly in the form of simple <P> and <H#> tags and the ALIGN clause in my <IMG> tags. (I think I did something table-wise in the standard headers/footers that get included on my pages too. I'd have to go look.) These are pages somebody else designed, and there are nested tables (and frames, in that other site) to dictate the layout. A reasonably readable layout, I admit, but boy what a pain to tweak the code for.

A few comments would go a long way.

Now that I finally know CSS (as of about a week and a half ago), I'm really looking forward to the day when we can reliably do all this with stylesheets instead of tables (right now too many browsers break (for some value of "break") if you try to do that). A CSS2 solution is so much more readable and maintainable (despite having to look in two different files to work on a page). In the meantime, I'm going to start writing using stylesheets in such a way that where they break, the failure just changes the layout to something else attractive and readable rather than breaking the layout. But I can't do that where someone else says, "It has to look this way everywhere," -- no, not Exact Alignments Of Stuff a la PDF, but "navbar is a vertical list on the left" type of stuff -- and it doesn't help when I'm handed an existing page that's already a tangled nest of tables and told "replace this bit here and and a banner there".

Mood:: exasperated
There are 11 comments on this entry. (Reply.)
 
posted by [identity profile] merde.livejournal.com at 11:37am on 2003-10-02
i've worked on a lot of HTML-based documentation, and one of my primary goals is always to make the HTML clean and easy to understand, so that anyone who needs to edit it later won't have trouble figuring out where things go. any professional web designer ought to do the same. unfortunately, many people aren't that conscientious -- or simply aren't thinking about the possibility that someone other than them will eventually have to decipher their code.
 
posted by [identity profile] dglenn.livejournal.com at 12:13pm on 2003-10-02
And here we see the difference between "professional" and merely "gets paid for it". *sigh*

I expect programs to show up this hard to read -- I get angry about it, but it doesn't take me by surprise -- but a markup language shouldn't wind up as spaghetti.
cellio: (Default)
posted by [personal profile] cellio at 11:37am on 2003-10-02
Some of the worst HTML I've seen has been written by tools. Apparently the authors of such tools couldn't fathom that anyone would ever look at and hand-edit the glorious markup produced by, say, MS Word, so they didn't consider readability, brevity, or in some cases correctness to be important. Is that the sort of thing you're dealing with here? Or did someone actually hand-craft this HTML?
 
posted by [identity profile] dglenn.livejournal.com at 12:09pm on 2003-10-02
It looks hand-written to me, but it may be from a tool I don't recognize the output of. What indenting there is looks like a combination of what a sloppy program would be likely to generate and what someone might do by hand, and it doesn't have a comment identifying a tool. Also, don't most of the tools for generating HTML include a DOCTYPE header? This file doesn't have one.
cellio: (Default)
posted by [personal profile] cellio at 12:12pm on 2003-10-02
Here's a scary thought: Word cruft (or similar) that your customer then hand-edited, broke, and hired you to fix. :-)
 
posted by [identity profile] dglenn.livejournal.com at 12:19pm on 2003-10-02
Or rather, my customer's previos contractor.

Scarier thought -- my customer says that his customer (whose business the site is for) also edits the site.
cellio: (Default)
posted by [personal profile] cellio at 12:43pm on 2003-10-02
Ooh, scary. You're getting paid by the hour, not fixed bid, right? Still, you could try introducing the customer to an HTML validator.
ceo: (Default)
posted by [personal profile] ceo at 12:45pm on 2003-10-02
I once made the obervation that, if one wishes to provide an HTML version of one's resume, and HTML is listed as a skill therein, then simply exporting the Word doc to HTML and leaving it that way is a Really Bad Idea. :-)

(which, of course, pretty much means you have to maintain both versions of your resume in parallel.)
cellio: (Default)
posted by [personal profile] cellio at 01:02pm on 2003-10-02
Agreed on the Really Bad Idea! For similar reasons, I know managers of documentation groups who look at incoming Word resumes to see if the person correctly used styles and whatnot or just hacked the individual paragraphs/headings/etc. Never send source that you'd be embarrassed to have your prospective manager look at.

You don't have to maintain two versions, though. Word can import HTML, so you can just keep your source in HTML and import into Word as needed. Single-sourced documents can't get out of sync as easily, and text sources are easier to manage. (For example, diff is available.)

When I'm job-hunting I go one extra step: I send PDF, not Word. That way I'm insulated from the formatting flakiness that sometimes comes with different versions of Word (e.g. your pagination looked just fine when you sent it, but that's not what he sees). But I'm a technical writer; I'm expected to think of things like this. Most programmer resumes I've seen haven't come as PDF and it hasn't hurt them much. :-)
 
posted by [identity profile] xpioti.livejournal.com at 01:16pm on 2003-10-02
I really want to read all of your comments, but this is a major pet peeve of mine (okay, I'm this peeve's pet...) and I have to much to do to indulge in the inevitable rant that would occur. However!

Any individual who puts crap code up on the web is not a web developer, in my elitist opinion. If you want to be counted as a web developer, you need to learn the syntax, grammar, and etiquette of using HTML and associated scripting languages. I am an HTML/CF/ASP developer. I am a PHP hack. I can make things happen in PHP; I can make things happen elegantly in HTML, CF, and ASP.

Anybody who puts brittle pages online is not only not a web developer, they are not a team player. When working on a team, each individual should feel obliged to make life as easy as possible on their teammates; either comment your bloody code or make every frigging variable so specific there can be no questions as to what is happening. If you are building a page for someone else, it is part of your job to acknowledge that your masterwork may well wind up in someone's hands, and that your only chance for your layout / work to be maintained is to make it so easy to maintain, the ROI of changing it ain't there. (In other words, make it so easy to maintain your page that it's more expensive to replace it than maintain it.)

We have team coding standards. We have a QA process. We have one developer who is not a team player, so we can only gently QA his stuff. Fortunately, he seems to have been Spoken To about his attitude; either that or he's prepping the rest of the team for a major backstabbing. *laugh* The team developers tend to flock together, and it's extremely obvious; when one goes out to lunch, they are usually accompanied by at least two others. If you're not in the flock, you're probably not really part of the team. :)

Spaghetti code is the bane of my existence. I am proud to declare, however, that my skills in de-tangling it have improved dramatically over the past four years, so I can now follow a cryptic variable back through its esoteric processes to its illogical roots. (Usually. I'm not perfect.)

Excuse me while I go beat my head on my desk a couple times, just out of sheer sympathy.
 

wow

posted by [identity profile] coginthenose.livejournal.com at 04:04pm on 2003-10-02
/me stands
/me claps
/me sits down

Links

January

SunMonTueWedThuFriSat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24
 
25
 
26
 
27
 
28
 
29
 
30
 
31