ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Code Validation

May 01, 2008 1:15pm

Subscribe [12]
  • #1 / May 01, 2008 1:15pm

    adamwiggall

    178 posts

    When to validate other people’s code?

    Jeff Croft put it this way

    I sometimes wonder whether it should be considered ‘good etiquette’ to validate other people’s code unless they have a problem that they want help fixing?

    We all code differently, and validation guarantees very little (semantics not at all), should we move on from it as a measure of quality of work?

  • #2 / May 01, 2008 1:24pm

    Lisa Wess

    20502 posts

    I used to be pretty hardcore on the validator.  I still am as I build a site, in order to flesh out any bugs that may occur during the building.  That can save hours of searching for a misplace semi-colon, for instance.

    And yes, I will point to the validator as a troubleshooting tool when someone asks for assistance.  Especially if I’ve seen errors that could potentially cause their problem.

    Otherwise I don’t have the time to go validating other people’s code.  That’s their problem, not mine.  Seems odd to go randomly validating people’s code… 😉

  • #3 / May 01, 2008 1:27pm

    Daniel Walton

    553 posts

    Well, it’s certainly necessary since invalid code is the root of many problems that we face when developing a website. To use that as a measure of quality? To a point, sure. That’s like getting a birthday cake with no candles on it - you’d be pretty peeved with whomever gave you the cake, thoughtfulness aside. Still the cake could be delicious. So, decoration or taste? I prefer pie.

  • #4 / May 01, 2008 1:51pm

    Ingmar

    29245 posts

    I agree. A few stray entities won’t give me sleepless nights, but generally I consider valid code a must, and a sign of quality. Simply less problems that way.

  • #5 / May 01, 2008 4:50pm

    ak4mc

    429 posts

    I recently inherited a couple of non-profit websites that were designed by others, and they worked well enough even before I migrated both to EE Core 😉 but one of them was built using the kludgiest HTML editor I have ever seen. Trying to rearrange design elements on those pages was a real headache when I first took on the project because I felt like I needed to clean out every gratuitous tag.

    Once I gave up on that I was much happier—but it helped confirm me in my dislike of HTML editors. I like source HTML that I can read almost as easily as the page itself.

    And sometimes I can even make it validate…

  • #6 / May 02, 2008 3:56am

    JT Thompson

    745 posts

    I’ve found through experience that when I adopt a site that’s been coded with some strange editor it’s easier to just start from scratch, build the design elements in CSS and rebuild the site to look the same, but with valid code. Most of those editors use things like inline css code, and not clases which makes cleaning it up a big chore.

  • #7 / May 02, 2008 7:52am

    Sean C. Smith

    3818 posts

    I like validators because they are helping me to learn.

  • #8 / May 02, 2008 8:37am

    Andy Harris

    958 posts

    If it isn’t valid, it’s wrong!

    That’s how I look at it anyway - wouldn’t stand for a “that’ll do” attitude from someone working on my car so I don’t have that attitude towards our clients.

  • #9 / May 02, 2008 10:30am

    ak4mc

    429 posts

    I’ve found through experience that when I adopt a site that’s been coded with some strange editor it’s easier to just start from scratch, build the design elements in CSS and rebuild the site to look the same, but with valid code. Most of those editors use things like inline css code, and not classes which makes cleaning it up a big chore.

    Yes, inline CSS is the bane of one of the inherited sites, and that’s the worst one for kludgy code too.

    Now that I’ve moved the sites to EE Core I am going to have to go in and clean up the code sooner rather than later. If I were getting paid for either of them I would have done that first thing.

    Update, many days later: I got all the kludgy code cleaned up. It turned out that in tinkering with the pages over the months previously I’d been removing the bad code from nearly all the pages as I went, and there were only two or three pages I hadn’t touched that were still a mess. One of them I just dropped altogether as the information it was written to impart was both out of date and non-update-able.

    The others I just did as JT said and rewrote from scratch.

    The nightmares, they have abated somewhat—but they tell me I won’t be free of them for a long time to come.

  • #10 / May 02, 2008 10:31am

    Bruce2005

    536 posts

    I sometimes wonder whether it should be considered ‘good etiquette’ to validate other people’s code unless they have a problem that they want help fixing?

    Valid code is essential.
    When I hand a site over, the code is valid. The validator is your friend.
    However, I know the client will likely add stuff that doesn’t, and if someone goes to the site afterwards. and checks the code and says my work isn’t valid code, then what Jeff said in the above article fits perfectly 😉

    One shouldn’t be religious about it, but it is a definite guide to good practices and essential. As much as possible, I attempt to educate clients about it and the benefits, “PLease don’t do that, you will screw up your rss!” is a common one lol

    I’ve found through experience that when I adopt a site that’s been coded with some strange editor it’s easier to just start from scratch

    That’s a definite. Even inline javascript is a nono much less inline css. This isn’t the 90’s.

  • #11 / May 02, 2008 12:01pm

    PXLated

    1800 posts

    If your trying to help someone solve a problem then valid code is a good place to start. Randomly checking a site for validity and scolding is not in my cards though. I do like my code to be valid, personal pride I guess.

  • #12 / May 02, 2008 12:39pm

    John Fuller

    779 posts

    Edit:  Whoops, didn’t read the article.

    Validating other peoples sites?

    That is like going to someones house and commenting about how the paint is chipping.  Who does that?  I have enough things to waste my time.

  • #13 / May 02, 2008 1:10pm

    Ingmar

    29245 posts

    I think it depends. If somebody asks for help or advice, I generally run a site through the validator, just to take a look. I might not comment on it, it depends. Validate random sites as I surf along? Sounds as much fun as trainspotting.

  • #14 / May 02, 2008 1:12pm

    Crssp-ee

    572 posts

    Ok I’ve read the article now too, I guess I’m an A-hole. lol.
    I’ve nudged a few people around here, when I think there site is CSS gallery stuff.
    Myself, I try to leave a site validating, but then someone else edits the site, and it is forever wrecked. I don’t go fixing someone elses font tags and MS tag mess:
    <span lang=“EN” [removed]Trebuchet MS”;mso-ansi-language:EN”> what is all that stuff anyhow, the stylesheet had everything required.
    Why does everybody wreck my code!!!

  • #15 / May 02, 2008 4:30pm

    hothousegraphix

    851 posts

    I sometimes wonder whether it should be considered ‘good etiquette’ to validate other people’s code…

    I’m not too sure this stoops to the level of peaking at what’s inside a strangers medicine cabinet.

    I suppose if you’ve gotten to the point of validating you’ve probably already peaked at their source too.

    I guess, for me, it ultimately boils down to motive. Are you looking at someone else’s work because you’ve observed something new and you’re interested in understanding how it works? Or, do you fall into that “Validation Zealot” mind set and feel a need to shout about it. :shut: never really been a fan of that approach.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases