Fog Creek Software
Discussion Board

unindented HTML

Recently my boss criticized some Mason templates I made because the HTML was not indented, just all lined up against the left side. I understand that in an ideal world all HTML would be indented, and ok I will indent HTML in the future (I had pasted this HTML from existing pages and was in a great hurry to meet his inflexible deadline).
But I decided to look at several other web pages generated by other programs here, and guess what -- most were not indented, including the entrance page of the project my boss has been concentrating most of his maniacal energy on lately.
If he brings up this terrible fault of mine -- not indenting HTML -- again, should I point out that no one else here does it either, at least not with any consistency. I'm concerned this might come up at my annual review, because he made a big deal out of it.

The Real PC
Friday, May 21, 2004

I can't work with non-indented HTML (in my templates).  It's so much easier to place loops and conditions if *everything* is tabbed out.

Same reasoning that goes for tabbed code.

Of course, the rendered output of my sites look like they're randomly indented.  But I'm no perfectionist...

Almost Anonymous
Friday, May 21, 2004

You write HTML by hand?

Tell him you're doing it for performance reasons.

Space here, tab here, pretty soon you're talking about real bandwidth.

Yes, it's bullcrap, but maybe if you give him a steely glare and wave your hands just the right way while repeating this, you can Jedi mindtrick him into getting off your back.

HTML's pretty readable without indentation.  And who reads HTML anyways?

Friday, May 21, 2004

"""I'm concerned this might come up at my annual review, because he made a big deal out of it"""

The idiocy of the workplace will never fail to amaze me.

Friday, May 21, 2004

Well I don't mind indenting from now on. I just think it's crazy to criticize me when no one else here, including him, is consistent about it. So is it politically correct to say to your boss:
"I don't understand why you're criticizing me for not doing something that no one else here does anyway. Are you, for some reason, grasping for ways to give me a hard time?"

The Real PC
Friday, May 21, 2004

Couldn't you just run it through a HTML Beautifier and make him happy?  I would guess that is easier the listen to him complain...

Bill Rushmore
Friday, May 21, 2004

Tell him to go fuck a goat. That should get him off your back fairly quickly and permanently.

Anon-y-mous Cow-ard
Friday, May 21, 2004

You could just use HTML Tidy to do the indentation for you:

John C.
Friday, May 21, 2004

---"And who reads HTML anyways? "----

Err, people who write it or maintain it?

Stephen Jones
Friday, May 21, 2004

I use tidy built right into PHP and not only does it look nice but it makes sure everything is xhtml compliant as well.

PS. Doesn't have to be xhtml it could be html 4, 3, etc

Friday, May 21, 2004

And I would like to add, while we're on the subject of HTML, that the worst imaginable HTML comes out of programs like Dreamweaver, which are used by most page designers.

The Real PC
Friday, May 21, 2004

Real PC,

What's the big deal,  just say sorry, admit you were wrong  and from now on indent your html.  Pick your battles more wisely and no need to die on every hill. 

Friday, May 21, 2004

2 things:
* Are you using dreamweaver MX?  I've been getting great html from it (ignoring the html comments for dreamweaver templates)
* With your boss:
- either run it through an html beautifier, then later take it out and speed up the webpages and everyone will think you're great
- Explain that you did it so as not to waste bandwidth, and to save the IP of your company so people didn't steal your webpages.

Andrew Hurst
Friday, May 21, 2004

Hey, hey - why so harsh on Dreamweaver?

MX 2004 has 2 "modes" - coder and designer. I think your comment about poor looking code is probably from relying on the WYSIWYG side of the program. Now, I can't speak to the older versions - but I find the latest version to be a valuable tool for me.

Using Dreamweaver in "coder" mode - I still edit the plain text and switch tabs to see it visually when I do - and it automatically does the formatting/indenting for me.
Besides, with code completion, my hand-coding work is much faster than having to type out every single character.

I'd be more inclined to bash poor use of a tool than the tool itself :)

Then again, saving a word document as HTML is proabably about as messy as it gets - at least in 97 and 2000.

Friday, May 21, 2004

Dreamweaver broke ground as the first (I believe) WYSIWYG HTML editor that didn't insert unwanted crap into the HTML.

btw if you think unindented HTML is bad, check out the code on our site :)

Dan Maas
Saturday, May 22, 2004

"Tell him to go fuck a goat. That should get him off your back fairly quickly and permanently. "

It will also ensure that "doesn't indent HTML" isn't the primary factor in your review.


Saturday, May 22, 2004

Some managers like to make some sort of criticism, just so they can feel like they're contributing. Don't take it too seriously.

Saturday, May 22, 2004

The OP said they use Mason right? That's a templating system, so I doubt that anyone will be doing any work on the HTML after Mason has generated the the template.

Matthew Lock
Sunday, May 23, 2004

Develop severe personality defects and you'll find you can get away with anything.

Swear and fart next time he dares question your wisdom, then go to sleep during your annual review.

Mr Jack
Tuesday, May 25, 2004

*  Recent Topics

*  Fog Creek Home