Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts

    Validation - always helpful?

    Due to sidetracking another thread, further discussion is being moved here.

    I stated that:
    Citing validation errors doesn't actually "help" anyone with their problems. Furthermore, it perpetuates the myth that validated markup is the end-all solution to HTML woes.
    After seeing numerous "newbies" being blasted off these forums by overzealous members going to validator.w3.org almost before going to the very page in question, and then say that making the page validate will probably make the problems go away.

    Yes, this is often true, but it is completely unfair to lambast someone new to this for something they don't know, then refuse to help until they "pay up" and fix their markup. It's a constructive extortion, but still extortion.

    And there are massive differences between being "valid" and "well-formed", and having a stable cross-browser rendering. I know for a fact that browsers knowingly implement different means to make up for non-well-formedness, and construct entirely differently DOM's by not completing a tag or closing the wrong tag at positions in the markup. However, failing to validate against a DTD (having invalid markup) is often a "safe" mistake, putting marginleft="0" in the <body> tag isn't going to destroy your rendering in any browser, or making up tags which don't exist in the DTD will just render as unstyled inline elements (and construct identical DOMs, unless you're in IE).

    Ultimately, I think you're doing a disservice by lording validation errors over newbies. Nobody has malicious intent when they code a page, so don't act like that they do when validator.w3.org says something isn't quite right. Certainly there are cases when you can't possibly figure out what's wrong because the markup is so terrible, but this doesn't occur as often as forum members simply not caring -- and there are lots of guilty people here (myself possibly included some time ago). There is a lot more to a good page than "validation" (and remember that XML doesn't even need to be validated, for example combining XHTML+SVG+MathML works just fine with or without a doctype), so don't pretend that there isn't.

    Or, someone can convince me otherwise below. Let this be an informative thread.

  • #2
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Why validation is important
    Validation may reveal your problem.
    Validation may solve your problem.
    Valid markup is hard enough to debug already.
    Validation is an indicator of cluefulness.

    Sometimes I write off a question from someone as "go validate your code" when the number of errors, or the type of errors, make me have to fight their code to help them. Sometimes I don't want to help them fix one problem when I know they will be back soon with more questions because they have so many errors in their code. A browser may display correctly with a missing end tag, and my suggested solution to their problem may work, but then they come back an hour later with a new problem caused by the missing end tag. If only they validated their code in the first place.

    I am a C/C++/assembly programmer. I'm not allowed any errors in my code because the compiler won't produce an executable file with one. If your html/css code has an error, you may not get what you want on your browser or another browser. As we move forward toward xhtml/xml on the web, you will not be allowed errors there either.

    To say it's OK to have invalid code is dangerous and not helpful to anyone trying to learn web programming. Sometimes invalid code works. You can also take a rock and bounce it off the ground and say it works but you'd never call it a basketball.

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    I'm not saying having invalid code is a good thing. (Though there is certainly a lot more to a good site than having validated code -- try validating google.com for example.) But insulting new members because they don't know any better, and forcing them to do things which might not fix their problems before you even consider helping them is just malicious, in my opinion.

    The nature of C++/Assembly is entirely different from the nature of SGML parsing, in that one has been implemented with forgiveness in parsing in mind.

  • #4
    Regular Coder KevinG's Avatar
    Join Date
    Aug 2002
    Location
    The Matrix
    Posts
    405
    Thanks
    3
    Thanked 0 Times in 0 Posts
    thats nice to know jkd.

    in a recent post i asked for feedback on my first non table css layout website and i was told to get validated first and given a link to 'we won't help you until you help you' (or something). then someone said i should test in firefox. then slowly but surely i figured the rest out for myself.

    i think most people here just need pointing in the right direction.

    cf = everyone helps everyone

  • #5
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    insulting new members because they don't know any better, and forcing them to do things which might not fix their problems before you even consider helping them is just malicious, in my opinion.
    Are you saying I insulted someone? Show me where.
    Force them to do things that might not fix their problem? But we are to show people how to fix their problem and wade among a pile of errors to do so? I think it better for them to fix their pile of errors first which just might fix their problem.
    Since when is showing someone good programming practice considered malicious? If anything, you would be doing them a dis-service by not telling them to validate. There are many on these boards who don't even know the validator exists!

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Quote Originally Posted by drhowarddrfine
    If anything, you would be doing them a dis-service by not telling them to validate. There are many on these boards who don't even know the validator exists!
    Of course that would be a disservice. Validation is a Good Thing, and showing them the One True Way is a good step in the right direction. But, simply leaving it at that is more of a disservice to the new member than putting some time and effort into providing assistance, instead of a link with a cryptic red error box and messages which don't make sense to people without prior experience.

    I'm just saying, we should be more welcoming to new users and less adamant about forcing them to do something that they probably don't even understand the importance of yet. Tell them about it, yes, encourage it, yes, but it is much much more important to actually welcome new members and not scare them off with heavy-handed talk of w3c.

  • #7
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    So I built a shed in my backyard the other day, but for the life of me I couldn't get the paint to cover the wood grain completely.

    I asked my buddy, a contractor, what the problem might be. He says, "Oh, this building isn't up to code at all. The foundation's built wrong, there needs to be at least 6" of air space between this insulation and the retaining wall, and why is this load bearing wall in this location?"

    "Oh, I say, I'll get to those problems but I really want some help with this pai..."

    "Yes, the paint issue you're having is too hard to figure out right now. Tear down this shed and rebuild it to code, and the paint will probably work just fine."

    So I did, and whaddya know, the paint still isn't covering anything properly. So I asked another buddy of mine, a successful builder with a calmer disposition.

    "Ah, you probably just need a coat of heavy primer first."

    So on goes the primer and away goes my paint issue.

    Hope you like the allegory.

  • #8
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Good. I'm glad that we agree. Validate your code and get rid of your errors.

    rmedek, and that contractor saved you the aggravation of painting that shed then having it fall down on you after you finished. Think of all the time you wasted painting it fall apart on you.

  • #9
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    Quote Originally Posted by drhowarddrfine
    I am a C/C++/assembly programmer. I'm not allowed any errors in my code because the compiler won't produce an executable file with one.
    You can still write bad/pointless/buggy/insecure code that compiles, even with invalid markup the root of the problem is seldom that (in html). Luckily, since HTML is not a compiled language (if it even is a `language`) thats moot.

    Quote Originally Posted by drhowarddrfine
    As we move forward toward xhtml/xml on the web, you will not be allowed errors there either.
    I suspect that day is a long way away , it would be suicide for any current browser to not display invalid code....

    How much of the web validates ? I guess someone has that statistic , but if its greater than 5% I will be amazed , none of the big sites validate , google,yahoo,MS,ebay etc , its simply not the driving issue to the majority of developers whilst to some here it is more important than anything, the answer lies somewhere inbetween.

    ..........................................

    I really only posted to applaud JKD for bringing this up, its a major annoyance of mine to see noobs ignored with a link to the validator, about as much use as RTFM.

    rmedeck , good example... though not sure I want to be in your shed during a storm

    drhowarddrfine , I dont think this is all pointed at anyone in particular, this is a recurring issue as CF and has been brought up several times before.
    Last edited by firepages; 12-04-2005 at 03:18 AM.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #10
    Regular Coder harlequin2k5's Avatar
    Join Date
    Sep 2005
    Location
    Holiday, FL
    Posts
    635
    Thanks
    18
    Thanked 0 Times in 0 Posts

    I'm still a newbie (kinda)...

    I have found that since I joined this forum there are many many many "newbies" that throw a question on a board and expect an answer within minutes and haven't bothered to read a book, or read through previous threads that may cover the same topic, or just want someone else to do their work

    I have found that many "newbies" are not exhausting every option of error control - they put their html/head/body tags and expect for their page to work

    I have found that many "newbies" attempt to experiment with new types of code (I myself am guilty of this) whether its javascript or css or coldfusion - sometimes their stuck to a task because no one else was willing to do it

    When I first go into this forum I read the "sticky"s in each of the subjects I was interested in to make sure I understood what the rules of the forum are and how to pose questions, etc.

    I have never taken a computer class on any subject (I do however have a couple of thousand bucks worth of books and that many more hours learning by trial and error), but I like to think that the few things I know I know very well and that's because I take the time to try to understand my task at hand and if the task is something completely new I buy a book, try their examples and then attempt to implement what they've taught for my needs. I study all different types of websites and look at their code and see whether it's something I want to try.

    I never want anyone to do my work for me because I want the credit for myself (selfish ain't it?).

    While I agree with drhowarddrfine that it's very important that forum users exhaust every error control possible and make an attempt to learn what their problem is first, I think it's just as important to advise users in a way that empowers them to do just that.

    As I stated just a moment ago, not everyone who is building a website or web application is knowledgeable in html or any of the more intricate languages that make up an application and to just throw them to a validation site doesn't help them to understand how to correct the errors that have just been shown to them.

    Those are my 2 cents. I know I appreciate every little piece of help and I've had the validation thing thrown at me and I've found that that particular piece of advice was absolutely invaluable and in the "nominate a helpful member" thread I hope I made it quite clear that those who have helped me have empowered me to find my own answers and I'm a better coder and designer for it.

    Would it be at all possible to have a new user group for real newbies and those stuck at a task that they're not educated in? Then in the groups where it's assumed you're no longer a newbie the validation can be thrown up - afterall they would not be considered newbies and should know better.

  • #11
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts

    Warning: Big Lebowski references ahead!

    Quote Originally Posted by drhowarddrfine
    rmedek, and that contractor saved you the aggravation of painting that shed then having it fall down on you after you finished. Think of all the time you wasted painting it fall apart on you.
    Look, I'm not saying validation is unimportant. Anyone who's worked with me in a web-related context knows I'm nuts about clean, valid code. Validation is very important; as a matter of fact, a few searches here will show that I've made some pretty passionate arguments about just that.

    What I am saying, though, is that sometimes there's a helpful way to post and a rude way to post. A lot of visitors to this forum are new to the game, and have no idea what validation is. There's a nicer way to bring up the validation issue:
    “It seems your problem might be this. This code acts this way, you're doing this wrong, try this instead.

    By the way, your code doesn't validate at all. This is probably going to cause problems later, so you'll want to take a look at that before you wrap this project up.”
    See? Not so hard at all. Much better than “Validate your code before I even think about youuueeaaaaarrrrgh.” Why even bother posting in that case? You're not helping anyone in that case…in fact, it only makes it seem as if more experienced coders are rude and uppity—the fact that most people here are the contrary is why I've stuck around here for so long.

    A few things: I'm not saying there's no room to be a little rude sometimes. Lord knows I've been quite sarcastic when dealing with someone who never bothers to read the FAQs, stickies, previous posts, rules, etc. Also, I'm using “the Royal ‘you’” (as the Dude would say) in this little mini-rant—I'm not referring to anyone in particular.

    To paraphrase the Dude once more, it's not about being wrong, it's about not being an a$@hole.

  • #12
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by firepages
    You can still write bad/pointless/buggy/insecure code that compiles
    For sure that is the case, you can still have logic errors in your C++ program and it will compile just fine but when you try to run it, it is gonna malfunction.

    HTML is sorta the same way except you obviously don't need the syntax perfect and usually the problem is more of a logic error (so to speak) like you need to adjust this CSS property here or wrap these elements in a div, etc. But of course if you are having trouble locking down where the problem is coming from, validating the code is always a good idea because at least then you can rule out bad syntax as the source of the problem.

    I'm not saying everything has to validate, it certainly should if it could but some times that just doesn't happen. I've written plenty of slightly invalid HTML/XHTML pages in my professional web development career. It usually happens when I'm pressed for time or something is broken and has to be fixed like yesterday, as long as it works, that is what counts (well, not really but more or less).
    OracleGuy

  • #13
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by rmedek
    “It seems your problem might be this. This code acts this way, you're doing this wrong, try this instead.

    By the way, your code doesn't validate at all. This is probably going to cause problems later, so you'll want to take a look at that before you wrap this project up.”
    Treating validation as an afterthought can lead to problems in itself.
    The sooner on in a project you get (and keep) your code valid, the more stable you make the foundation for everything you build upon it. This is especially true if you plan to address validation towards the close of a build.
    By only addressing validation at the end of a build, you risk having further problems appear as the state and structure of your markup changes in ways that seem minor to you, but significant to the UA.
    By leaving validation till the end, you are potentially storing up problems for a point in the project when you simply don't have time or the budget to address them.
    If you are of the view that addressing validation is worthwhile advice, then it's advice that would be better suited to early on in a build - e.g. 'take a look at that before you do anything else'.

    The DiveIntoMark article sums it up perfectly.

    I'm certainly guilty of directing newbies towards the validator, though I usually try to be a bit more descriptive than simply posting a link and a sigh.
    That said, posting just that is preferable to having no-one respond at all to a newbie's query. Even just a link and a sigh is constructive.
    In future cases where I might request an OP gets their markup up to spec before I consider freely devoting any more of my time to solving the problems of a stranger, I might also start posting a link to the DiveIntoMark article.

    There are so many books and online articles available now which can usher newcomers into good practices. It is so often the case that a newcomers posts a query which demonstrates that they've not read a single one.
    I simply question that we should surpress our frustration and be all smiles and 'customer service' when a newcomers seemingly has done very little to help themselves.
    Let's not forget that even someone who posts a link to the validator and a sigh is giving up their time to point an OP in the right direction, presumably because they also feel that it's preferable to help a newcomer develop good working practices for their own sake as well as that of the industry and the web in general.
    If being 'cryptic' makes some newcomers withdraw, then imho that's not entirely a negative outcome. The web development industry is already over-supplied with authors who are either unable or unwilling to demonstrate the ability to think for themselves and unwilling to work out the usefullness of every piece of advice they are given. I personally don't think we need to be condoning a lack of initiative amongst newcomers, particularly when every piece of advice posted on this forum (and other similar forums) is done so purely out of the benevolence and good will of those who posted it.


    'God helps those who helps themselves'. Even as a devout atheist, that sounds like an attitude which I can get behind.
    Last edited by Bill Posters; 12-04-2005 at 10:16 AM.

  • #14
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Quote Originally Posted by Bill Posters
    Treating validation as an afterthought can lead to problems in itself…By leaving validation till the end, you are potentially storing up problems for a point in the project when you simply don't have time or the budget to address them.
    Yes, you're right. The professional web designer should not treat valid code as an afterthought. But we are not talking about professional web designers, we are talking about people who are new to web design.

    That said, posting just that is preferable to having no-one respond at all to a newbie's query. Even just a link and a sigh is constructive.
    Yes, it's constructive, and also annoying. You wouldn't volunteer to answer someone's question with a “link and a sigh” face-to-face, in person, would you? Why would you do it on a forum?

    Let's not forget that even someone who posts a link to the validator and a sigh is giving up their time to point an OP in the right direction, presumably because they also feel that it's preferable to help a newcomer develop good working practices for their own sake as well as that of the industry and the web in general.
    So, errr…the guy who wanted his div looking right in his MySpace account was representative of the industry and the web in general? Come on, man…that's like me saying all “weekend warrior” musicians must practice six hours a day because otherwise they're ruining the music industry.

    Maybe you forgot this one small thing…the web is popular today because damn near everyone can participate. My Grandma can get her personal AOL page online from her Web TV in minutes. Third graders are coding pages for their elementary school. Everyone and their mom has a MySpace account and a blog on the side. That's a primary reason why HTML has remained so forgiving. I know this is shocking to the web “purists” out there, but some people actually do code websites for an audience of ten close friends using Internet Explorer, and could care less if anyone else could read it. And more power to them.

    I learned HTML years ago from htmlgoodies.com. It had chapters on the <font> tag, table layout, and the benefits of not including a doctype. The web was fun, and I was interested, and that's how I learned. My first post here was for help with some Dynamic Drive script, and I know damn well nothing on my page validated, although of course back then I didn't know what validation was. No one was rude to me or pushed my weakness in my face.

    As I learned more and found myself doing this semi-professionally, I took the time to learn about the proper way to design and mark up my pages. As a professional, I believe it's absolutely necessary to produce valid, semantic, clean markup. As a hobbyist I could care less.

    So again, it boils down to two things: not everyone who touches a computer is “in the industry,” and this isn't about being right or wrong, it's about not being an asshole to those who don't know better.

  • #15
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    it would be suicide for any current browser to not display invalid code....
    The W3C has already stated xhtml replaces html. Since xhtml is xml, invalid code is not allowed.

    How much of the web validates ?
    Doesn't matter. The web is in its infancy. Only about 10 years old. It will get better just like programs for the first Windows computers got better. Can you imagine trying to sell programs like they were when Win first came out?!

    harlequin understands. One thing I will say about stickies is that I frequently forget they are there or overlook them. I'm sure many a frustrated poster overlooks them, too.

    Bill has got it right.

    As a hobbyist I could care less.
    And there the problem lies. How can you have an international network run well when the hobbyists don't care what they put on a page or anything else? The 'net is a professional operation and by not abiding by the standards set forth you are looking into total chaos. Right now I am coding a program that uses sockets and acting like a web server, a complicated precise method. Can you imagine a hobbyist throwing tons of incorrect data on the 'net because he didn't care about errors? And then complaining because his data can't be read by other computers or browsers?

    It's not like there aren't a set of rules to follow to do all this. The rules are published and freely available on the 'net and in books. So follow the rules! Why should it not be expected that everyone follow the rules?


  •  
    Page 1 of 3 123 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •