Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
The Media The Internet

NYTimes.com Hand-Codes HTML & CSS 496

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.'"
This discussion has been archived. No new comments can be posted.

NYTimes.com Hand-Codes HTML & CSS

Comments Filter:
  • Yes, and? (Score:1, Informative)

    by Anonymous Coward on Tuesday April 29, 2008 @10:45PM (#23247578)
    This is the case for almost any dynamic website. There's no story here.
  • W3C (Score:5, Informative)

    by FST ( 766202 ) on Tuesday April 29, 2008 @10:49PM (#23247596) Journal
  • by menace3society ( 768451 ) on Tuesday April 29, 2008 @10: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.
  • Doesn't everyone? (Score:4, Informative)

    by consumer ( 9588 ) on Tuesday April 29, 2008 @11: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?
  • Re:W3C (Score:5, Informative)

    by Bogtha ( 906264 ) on Tuesday April 29, 2008 @11: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.

  • by Animats ( 122034 ) on Tuesday April 29, 2008 @11:45PM (#23248012) Homepage

    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.

  • by Anonymous Coward on Wednesday April 30, 2008 @12:01AM (#23248140)

    Posting anonymously just to just to protect myself from my friend. *wave*

    They use a CMS of course. Probably developed in-house. My friend works for NYT and worked on the relaunch of the site. Based on her previous work experience and her skillset, I would say the bulk CMS was coded in java. I don't think she's going to tell me what she worked on however. I would wager a guess that they were previously using some kind of open source solution before she got hired, then migrating over to their in-house platform in order to accomodate scalability, but this is all speculative based on her working hours and the stuff she mentioned.

    What suprised me was that they used wordpress for their blogs, likely modified to it can be integrated with their backend. Wordpress was probably used for two reasons 1)the editors (esp the less tech saavy) would find the interface appealing, and 2)developer resources to create one from scratch would be a waste of time, if a good solution already exists.

    I don't think it's all that suprising that more and more publishing companies are using open source solutions. I myself work for a publishing company, and we developed our own CMS based on the business requirements given to us using perl mason.

    Most large scale solutions are seperated into 3 parts: the CMS itself, the templating system and editorial content. This is a clean seperation so the three parts can maximize their skillset, the three parts being 1) the editor creating the content 2) the designer creating the front-end look and 3) the developer(s) creating the system that bridges both the content and design to deliver something that looks nice and is rich in content.

    I work on templating system, we hand-code everything as well. Of course, some people on the team are more proficient than others. Some are extremely procifient js coders, others are employed for their flash, but pretty much all are required to know their html and css if they expect to keep their job. We're a pretty good group of geeks, we mock each other for being unaware of certain browser quirks caused by unsupported css features or wacky inheritance issues, or writing something that isn't ecmascript compliant. Keeps us pretty sharp.

    that being said, I'm would have expected that NYT handcoded their html and css, if anything to control the pagewieght.

  • Re:W3C (Score:5, Informative)

    by Bogtha ( 906264 ) on Wednesday April 30, 2008 @12:02AM (#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 &amp; instead of &?

  • Re:W3C (Score:5, Informative)

    by Bogtha ( 906264 ) on Wednesday April 30, 2008 @12:06AM (#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:2, Informative)

    by Rhapsody Scarlet ( 1139063 ) on Wednesday April 30, 2008 @12:36AM (#23248384) Homepage

    What is the correct value of the alt attribute for the CAPTCHA image in a "free registration required" form?

    If all else fails, you could just specify alt="", which will satisfy the validator. Not every image needs alternate text.

  • Re:W3C (Score:4, Informative)

    by Bogtha ( 906264 ) on Wednesday April 30, 2008 @12:36AM (#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.

  • by Bogtha ( 906264 ) on Wednesday April 30, 2008 @12:53AM (#23248482)

    An & sign in a link to a URL isn't a syntax error

    Yes, it is. Don't just take my word for it, take a look at what the HTML specification has to say on the matter [w3.org].

    treating it as such would nullify all GET parameters after the first one.

    You are confusing a URI with the representation of that URI within an HTML document. Just because it appears as &amp; in the document, it doesn't mean that's what you end up with after it has been parsed.

  • Re:W3C (Score:4, Informative)

    by beav007 ( 746004 ) on Wednesday April 30, 2008 @01: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.
  • by yotto ( 590067 ) on Wednesday April 30, 2008 @01:27AM (#23248656) Homepage
  • Re:W3C (Score:5, Informative)

    by Bogtha ( 906264 ) on Wednesday April 30, 2008 @09: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.

  • Re:Works for me too (Score:3, Informative)

    by mweather ( 1089505 ) on Wednesday April 30, 2008 @11:00AM (#23250880)
    Not really, unless you're using tables for layouts. CSS layouts don't look right.
  • Re:Yes and, err, no? (Score:3, Informative)

    by Bob The Cowboy ( 308954 ) on Wednesday April 30, 2008 @12:04PM (#23251782)
    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 credit, you can even figure out how to commonly accessed remote directories in the left-hand sidebar.

    Bill

The key elements in human thinking are not numbers but labels of fuzzy sets. -- L. Zadeh

Working...