Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

NYTimes.com Hand-Codes HTML & CSS

Posted by kdawson on Tue Apr 29, 2008 09:43 PM
from the all-the-finest-sites dept.
eldavojohn writes "The design director of NYTimes.com, Khoi Vinh, recently answered readers' questions in the Times's occasional feature 'Ask the Times.' He was asked how the Web site looks so consistently nice and polished no matter which browser or resolution is used to access it. His answer begins: 'It's our preference to use a text editor, like HomeSite, TextPad or TextMate, to "hand code" everything, rather than to use a wysiwyg (what you see is what you get) HTML and CSS authoring program, like Dreamweaver. We just find it yields better and faster results.'"
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • But don't your hands get tired?

    • by RuBLed (995686) on Tuesday April 29 2008, @10:31PM (#23247894)
      Overhead at an outsourcing facility:

      Hand-coding agent: I hate this guy, he's refreshing his browser every minute on the same news. I can't keep up.

      Hand-coding supervisor: PrintScreen it!

      Hand-conding agent: Brilliant!
  • I find that hand-coding works for HTML/CSS, provided of course you include it in a scripting language like PHP.

    It's less work than it sounds and the results DO look better - you get a more original look and things can be made to look exactly how you want, instead of being restrained by the wysiwyg software's design limitations.

      • Re: (Score:3, Interesting)

        It makes it easier to switch back and forth between the code and the design. However, once you do that, you're just spending a bunch of cash for a tool that lets you switch between windows.
        But tools like dreamweaver are good at showing layout of not yet completed code, it can be really useful sometimes.
  • Great idea! (Score:5, Funny)

    by Anonymous Coward on Tuesday April 29 2008, @09:47PM (#23247586)
    Maybe we can use this idea to write programs, too.
  • by bennomatic (691188) on Tuesday April 29 2008, @09:48PM (#23247590) Homepage
    The badge [dimspace.com] I used to put on all my sites...
  • W3C (Score:5, Informative)

    by FST (766202) on Tuesday April 29 2008, @09:49PM (#23247596) Journal
    • by DigitalisAkujin (846133) on Tuesday April 29 2008, @10:48PM (#23248036) Homepage
      While the purists are going to argue that valid markup defines the quality of the code on a given website the reality of the real world always tends to rear it's ugly head and debunk that fantasy.

      In the real world us web developers have to deal with interoperability on many different levels. We have to make sure the layout looks the same on Internet Explorer, Firefox, Opera, and Safari with Windows XP & Vista, OSX, and Linux using the same code base. Most of this however has a lot to do with how talented your CSS developer is. And unfortunately for you kiddies, any less isn't perfect.

      So to spell it out for those that don't know, here's the real difference between WYSIWYG and pure text:
      In a WYSIWYG editor you tend to do everything the same way every time you do it. That means that all your links, images, and code snippets come from the same code base and therefore have all the same pitfalls and good points. Unfortunatly the wonderful world of DOM doesn't work that way. HTML, CSS, JavaScript, and objects like Flash, Quicktime, and Java have very specific ways that they interact with each other and the browser and so what you generally find is that the reason you code by hand is not for the specific reason of coding by hand but simply put you really can not build good, quality websites with WYSIWYG editors. At some point you will most assuredly find yourself digging in the HTML.

      Finally, on the topic of validating your markup. The Markup validaters that are out there are only good as tools of the trade and shouldn't be used as the end-all be-all certification of quality markup. They are tools that should be used by a web developer to run through and make sure they can be as close to valid as possible but I am willing to bet that out of the top 100 sites on the internet, the front page of all of them will produce Markup validation errors. The reason is simple: The validation rules are so restrictive that there is no point even worrying about them. It would be impossible to make a working website by being totally loyal to the markup rules.

      Especially with the validator's stupidity in treating & signs in the href attribute of my a elements as the beginning of an entity which it's not! /rant >.>
      • Re: (Score:3, Interesting)

        I am willing to bet that out of the top 100 sites on the internet, the front page of all of them will produce Markup validation errors. The reason is simple: The validation rules are so restrictive that there is no point even worrying about them.

        You're right about valid code being rare, but wrong about the reason. Sturgeon's Revelation applies to developers.

        It would be impossible to make a working website by being totally loyal to the markup rules.

        That's not even close to being true. Take th

      • It would be impossible to make a working website by being totally loyal to the markup rules.

        This is quite wrong. You absolutely can make a site that validates, and (what's more important, in fact) is actually semantically correct HTML, yet displays properly in all the major browsers out there. A good example is the Opera [opera.com] website (validates as XHTML 1.0 Strict [w3.org]). Also, if you have a browser that has such feature, try disabling CSS and JavaScript entirely, and see how it looks then - I was pretty surprised to

    • Re:W3C (Score:5, Interesting)

      by clem.dickey (102292) on Tuesday April 29 2008, @10:57PM (#23248102)
      Just what I was wondering: "Maybe, because they hand-code everything, they will pass the validation that all the fancy tools fail at so badly." Anyway, they are not alone. Here are the error couns for the Fortume top 20 companies (top of the Fortune 1000 list) manage on the w3c validator:

          53 walmart.com
          36 exxon.com
          26 chevron.com
          33 gm.com
          76 conocophillips.com
            0 ge.com
          29 ford.com
          52 citigroup.com
        105 bankofamerica.com
          26 att.com
          28 www.berkshirehathaway.com
            8 jpmorganchase.com
        148 aig.com
          55 hp.com
            0 ibm.com
        144 valero.com
            2 verizon.com
        180 mckesson.com
            5 cardinalhealth.com
      1082 www.goldmansachs.com

      • Re: (Score:3, Interesting)

        Forgetting required attributes like alt
        What is the correct value of the alt attribute for the CAPTCHA image [w3.org] in a "free registration required" form?
        • Re:W3C (Score:5, Informative)

          by Bogtha (906264) on Tuesday April 29 2008, @11:02PM (#23248150)

          fix whiney warnings that have no real world effect?

          I knew somebody would pop up with this misconception. Did you know that the web has already been through this — not once but twice — and proven you wrong?

          Netscape 2 was quite aggressive when it came to guessing when ampersands were mistakenly unencoded. Cue lots of people not bothering to do things correctly, and saying things exactly like you are — "What's the point? It makes no difference!"

          Then Netscape 3 came out. It wasn't as aggressive as Netscape 2. All those people who cut corners had to rush to fix all of their pages. All the people who did it correctly the first time around didn't have to do any extra work.

          Now Netscape 3 still guessed a little bit — if you left off the semicolon, it would pick up on it and guess correctly. So lots of the dumb people from the previous example didn't learn their lesson, and skipped the semicolon.

          Can you guess what happened? Yep, that's right, Netscape 4 came out and broke all their pages again. And all the people who did things correctly laughed at them.

          Sure, if you don't bother to do things right, today's major browsers will probably guess that you're an idiot and work around your bugs. But there's certainly no guarantee that tomorrow's browsers will do so. When you can do things correctly right now for no effort, why on earth would you risk incurring extra work in the future? Is it really so difficult to type & instead of &?

          • Re: (Score:3, Insightful)

            Sure, if you don't bother to do things right, today's major browsers will probably guess that you're an idiot and work around your bugs.

            They will try to work around your bugs. There's no guarantee that the heuristics of a given browser will succeed in correctly guessing what you actually meant in a given case.

            The best argument for writing bugless web pages is not that it takes less work (it does), nor that they works with more browsers (they do) and thus give you more customers. No, the best argument

      • Re:W3C (Score:5, Informative)

        by Bogtha (906264) on Tuesday April 29 2008, @10:36PM (#23247936)

        Also, they use <br/> in HTML 4 and it is telling them that they shouldn't do that because some web browsers will think it's wrong.

        No, it's not telling them that some browsers will think it's wrong, it's telling them it is wrong. Validators don't check to make sure browsers can understand your document, they check if you have made any syntax errors. Writing <br/> in an HTML document is wrong, regardless of any particular browser's handling of it.

          • Re:W3C (Score:5, Informative)

            by Bogtha (906264) on Tuesday April 29 2008, @11:06PM (#23248176)

            <br /> is XHTML standard and <br> is the regular HTML 4 standard. Both are correct

            No, one is correct for XHTML and incorrect for HTML, and one is incorrect for XHTML and correct for HTML. The NYTimes use HTML. That means the XHTML syntax is incorrect.

              • Re:W3C (Score:4, Informative)

                by Bogtha (906264) on Tuesday April 29 2008, @11:36PM (#23248386)

                while XHTML syntax is not strictly speaking correct HTML it is still valid HTML.

                This is simply not true. It's incorrect and invalid.

                What you may be thinking of is Appendix C of the XHTML 1.0 specification. It lays out a series of guidelines that minimise incompatibility with legacy user-agents. This means that it is relatively safe to transmit XHTML 1.0 documents following these guidelines as text/html. What it does not mean is that those XHTML 1.0 documents magically become valid HTML documents. They are not.

                  • Re:W3C (Score:4, Informative)

                    by beav007 (746004) on Wednesday April 30 2008, @12:22AM (#23248638) Journal
                    Be that as it may, Bogtha is correct. We aren't talking about what works here, we are talking about what the standard says. The standard for XHTML says to use a slash, the standard for HTML 4 says not to. That is the discussion, and really, the end of it.
          • Re:W3C (Score:4, Insightful)

            by dgatwood (11270) on Tuesday April 29 2008, @11:11PM (#23248206) Journal

            Agreed. <br /> should be, AFAIK, guaranteed to work in any working HTML parser because all HTML browsers have to ignore unknown properties in tags, including potentially that slash, in order to be forward-compatible with future changes to the specification. Assuming they included the space, then IMHO the W3C validator is being way too pedantic (as usual). If they left out the space (<br/>), then the W3C validator is right to warn about it, as that form does choke some HTML parsers, IIRC.

            • Re:W3C (Score:4, Insightful)

              by Bogtha (906264) on Tuesday April 29 2008, @11:28PM (#23248334)

              all HTML browsers have to ignore unknown properties in tags

              That reasoning would work if the people behind XML had chosen any other character to indicate empty elements. But unfortunately, they chose the slash. Not many people realise because browser support is rare, but a slash inside an opening tag means that it is the end of the tag and the contents follow. Basically, <foo/>x/ is equivalent to <foo>>x</foo> .

              So no, while parsers that don't implement HTML fully might mistakenly treat it like an attribute, a parser that fully implements HTML cannot do so, and a validator certainly shouldn't.

              the W3C validator is being way too pedantic (as usual).

              What on earth do you think a validator is for, if not to point out syntax errors? Do you complain that your spelling checker is being pedantic when it tells you that you have misspelt something?

                • Re:W3C (Score:5, Informative)

                  by Bogtha (906264) on Wednesday April 30 2008, @08:28AM (#23249724)

                  It may or may not be improper American English, but "misspelt" is certainly correct English. Consult the OED [askoxford.com] if you don't believe me.

                  This is far from the first time I've had an ignorant American attempt to "correct" my proper English into your regional dialect. It's pretty annoying and reinforces negative aspects of your national stereotype.

                  • Anyone who's read even a modicum of literature would be aware that misspelt is the older/English spelling of the "American" misspelled. Of course, for anyone educated in our school system who lacks the interest or motivation to go beyond the standard curriculum, 100% reliance on the spell-checking function of their browser would lead them to believe that misspelt is mispelled. :-)

                    I must say however, that your insistence on lumping everyone in this country into the "ignorant American" stereotype is also pret
              • Re:W3C (Score:5, Insightful)

                by dave420 (699308) on Wednesday April 30 2008, @08:15AM (#23249534)
                The two are not mutually exclusive. It's perfectly possible to make even the most beautiful sites render accurately across all the major browsers and still contain perfectly valid markup. It smacks of being lazy, or just not knowing the importance of validating code.
              • Re: (Score:3, Insightful)

                Browsers that don't comply are pretty much worthless. You can't even view the W3C specification without ignoring unknown attributes. Good luck with almost any web page on the planet. The following sites all either have nonstandard attributes or are missing required attributes:

                • www.google.com
                • www.yahoo.com
                • www.excite.com
                • www.altavista.com

                You get the picture. Good luck using the web with a browser that performs strict attribute validation.... It may technically be non-binding, but in reality, any br

  • Let's look 'objectively' at this:
    1. Handcoding takes a lot more effort and needs more 'actual' writers than before. So more techies keep their jobs in a recession.
    Score: Hancoding 1: Dreamweaver: 0
    2. Hancoding requires extensive knowledge of all CSS and DHTML codes plus javascript/JScript. So only the really good techies get the job, and not some script monkey. Survival of fittest.
    Score: Hancoding 2: Dreamweaver: 0
    3. Handcoding takes far more time than is necessary in a changing scenario of today's news. Ef
    • by rhavenn (97211) on Tuesday April 29 2008, @10:24PM (#23247828)

      Let's look 'objectively' at this:
      1. Handcoding takes a lot more effort and needs more 'actual' writers than before. So more techies keep their jobs in a recession.
      Score: Hancoding 1: Dreamweaver: 0
      No, given a good IDE with some basics it takes less effort. Every time I want to use Dreamweaver I end up losing some hair. It's a frustrating piece of software if you know what you're doing or want to do and it won't let you.

      2. Hancoding requires extensive knowledge of all CSS and DHTML codes plus javascript/JScript. So only the really good techies get the job, and not some script monkey. Survival of fittest.
      Score: Hancoding 2: Dreamweaver: 0
      This is a good thing. Your designers SHOULD know the ins and outs of 80-90% of their code and tags.

      3. Handcoding takes far more time than is necessary in a changing scenario of today's news. Effort not proportional to returns. As a shareholder, i would sue them for wasting money.
      Score: Hancoding 2: Dreamweaver: 1
      I doubt they hand code every story into the page. They have a template / publishing system for all articles / layouts. It's probably far, far faster to do it by hand then trying to wrap Dreamweaver into it.

      4. Dreamweaver allows preview easily and pretty much automates repeatable tasks. Handcoding requires a Mechanical Turk.
      Score: Hancoding 2: Dreamweaver: 2
      dual monitors, sshfs mounted file system and vim will do it far faster then Dreamweaver.. alt-tab works okay if you're stuck with one monitor.

      So its a tie.
      Nope, I would say hand-coding: 3.5 and Dreamweaver .5

      I appreciate NYTimes sticking to manual tasks for an electronic page as an end user and a techie.
      I hate them for wasting my money as a shareholder.
      I would applaud them for not wasting your money on software licenses and doing the job correctly.

  • Dreamweaver basically incorporated Homesite several years ago.

    While I do like the split development window(code/WYSIWYG), being a coder I spend most of my time in the code window and always have to check against multiple browsers.

    I think having the WYSIWYG view is a benefit, although I hate having to hit F5 to refresh the WYSIWYG continuously.
  • The title says it all, that's what's missing from the writeup.
  • by menace3society (768451) on Tuesday April 29 2008, @09:58PM (#23247660)
    How much work does that actually involve? I don't read their online edition, but I imagine that they have all their articles in a database and put its contents into an HTML wrapper. That involves coding the wrapper once, and maybe a couple of conversions in the article text to make it HTML-friendly. You can do this when the article is converted into the database, or you can do it on the fly in your scripts, but the point is it shouldn't be that difficult to do.
  • by davebarnes (158106) on Tuesday April 29 2008, @10:11PM (#23247736) Homepage
    Stupid comment by Vinh about Dreamweaver.
    1. DW lets you code at the source code level if you choose.
    2. DW is much faster--in Design View--at creating tables.
    3. DW allows for flipping back and forth or split view.
    4. DW does not rewrite your code (for the most part).

    I use DW every day. I am not even conscious of flipping between the 2 views. Some things are done better in Design View and some in Code View.

    CSS support is very good in DW.
    • Re: (Score:3, Interesting)

      Stupid comment by Vinh about Dreamweaver.
      1. DW lets you code at the source code level if you choose.
      2. DW is much faster--in Design View--at creating tables.
      3. DW allows for flipping back and forth or split view.
      4. DW does not rewrite your code (for the most part).

      I use DW every day. I am not even conscious of flipping between the 2 views. Some things are done better in Design View and some in Code View.

      CSS support is very good in DW.

      1. Why use a heavy tool like DreamWeaver if you're mostly just editing the source directly?
      2. Nobody uses tables anymore, at least not as much as they incorrectly used to before for formatting since CSS gives you a lot more control. This practice thankfully died out.
      3. Alt-Tab is just as fast if you have your browser open, or multiple browsers. I usually check IE and FF when I'm working on layout.
      4. For some people, even a little bit of code changes is too much.

      If I'm working on a php or jsp page that r

    • CSS support is very good in DW.

      Actually, no, it's not. At least through Dreamweaver 8, CSS is sort of a bolted-on afterthought. The Dreamweaver "Properties" pane and the CSS system do not play well together. Dreamweaver has a useful GUI for table-based layout, but falls down on DIV-based layout. (This isn't entirely Dreamweaver's fault. DIV-based "float" and "clear" just weren't a well chosen set of primitives. It's trying to solve a 2D problem with a 1D mechanism.)

      Dreamweaver 3 was easier to use.

  • I feel OLD. (Score:4, Funny)

    by Valdrax (32670) on Tuesday April 29 2008, @10:11PM (#23247744)

    wysiwyg (what you see is what you get)
    I remember when this acronym was so frequently used as a selling point in the 80s that you wouldn't have had to explain it.
  • Well it looks great (Score:3, Interesting)

    by grrrl (110084) on Tuesday April 29 2008, @10:16PM (#23247778)
    Personally, I have come to really enjoy reading the online NY Times (and I don't even live in the US).

    The re-design they did a couple years ago is a pleasure to navigate, to read (I love the fonts) and while the photos are always top notch, I must say the award goes to whoever makes the graphs. They have the most fantastic and unique ways of presenting data - far beyond a boring Excel bar graph. I am really really impressed by the interesting and informative graphs which are often highly interactive, and I would love to know who thinks them up.

    At the end of the day, they use templates (I believe he says as much in TFA, IIRC, I read it a week or so ago) and hand tweak the site to make it sure it stays cross-platform pretty. Each story has a similar layout so it can't be hard for them to simply tweak by hand where needed.

    • Re: (Score:3, Interesting)

      If you like cool graphs, you might enjoy this Economist article [economist.com].

      Summary: "A good graphic can tell a story, bring a lump to the throat, even change policies. Here are three of history's best."
  • Doesn't everyone? (Score:4, Informative)

    by consumer (9588) on Tuesday April 29 2008, @10:21PM (#23247812)
    He doesn't mean that they hand-code every page -- he says very clearly that they use a CMS with templates. All he said is that they don't use a GUI tool to create the templates. This is true of just about any significant site. What is the imagined news here?
  • Link Management (Score:3, Interesting)

    by joeflies (529536) on Tuesday April 29 2008, @10:37PM (#23247950)
    For all the pros/cons on using a web site editor package vs writing code in a text editor, there's one issue that's been overlooked - how to manage links in a website with a large degree of depth and complexity.

    As much as it may work in principle to build highly optimized pages by hand markup, it must be a nightmare to make any changes to something as tightly constructed as a hardwired web site.
  • by swm (171547) * <swmcd@world.std.com> on Tuesday April 29 2008, @10:52PM (#23248070) Homepage
    I hear they have people who hand-write the news stories: sentence by sentence, word by word. Can you imagine?
  • Yes and, err, no? (Score:4, Insightful)

    by stewbacca (1033764) on Wednesday April 30 2008, @07:53AM (#23249240)
    Better results? Probably. Faster? No way. Never. Not gonna happen. Maybe they mean faster in the way that it is faster for guys who hand code lines of html all day to hand code lines of html all day because they don't have the first clue of how to use a WYSIWYG editor? If they know code so well, why not use Dreamweaver in pure code mode? The management tools of the suite alone are worth the ?extra? time.
    • Re: (Score:3, Informative)

      Management tools? What, ftp? Why the hell would you run some bloated WebDev environment entirely in code mode?

      Dude. Let me help you.

      This will be KDE-specific, but I'm sure you could use Gnome programs for the same thing. For that matter, you could also setup SSHFS, or NFS.

      Open Kate.
      Click File, Open.
      In the file selector, type: fish://user@someserver/some/path/and/file.html
      Edit.
      Save.

      Marvel as your file is magically updated, without any bizarre management tools. With the benefit of being secure.

      For extra
    • Re:Yes, and? (Score:4, Insightful)

      by Jellybob (597204) on Wednesday April 30 2008, @08:47AM (#23249994) Journal
      How I wish that was true.

      It's the case for almost any *large* dynamic website, but having spent a couple of years doing web development in the design industry, I can tell you that at least in the UK, a large proportion of the small agencies are using Dreamweaver for most things.

      Fuck knows why - I'd rather be handed an Illustrator file and turn it into HTML then have the crap that Dreamweaver spits out given to me, and have to try and turn it into something dynamic.