Live data from Hacker News

Don’t Make Me Write HTML

linux-mag.com

1–10 of 36 posts

Re: Don’t Make Me Write HTML

#4
I wouldn't feel comfortable using something like markdown until I had a firm grasp of how it works and the kind of html it writes.

And at that point, I guess I might as well write good ole html... Unless browsers _universally_ supported a new better language, I'd hate to have to think of browser nuance in two different markups...

Re: Don’t Make Me Write HTML

#5
I agreed completely with the first comment:

Please don’t make me write in any of these simplified markup languages, either. And, really please, don’t ask me to embed code in the language, or one of these languages in code.

Re: Don’t Make Me Write HTML

#6
post #4

I wouldn't feel comfortable using something like markdown until I had a firm grasp of how it works and the kind of html it writes. And at that point, I guess I might as well write good ole html... Unless browsers _universally_ supported a new better language, I'd hate to have to think of browser nuance in two different markups...

I use Markdown when I'm writing content-heavy prose, like wiki pages or READMEs. When I need more control over the exact classes and tags, HAML is a good alternative to HTML.

In the case of Markdown prose, I don't /care/ what kind of HTML it writes. Headers, paragraphs, links, all taken care of. I write text, it gets run automatically through a parser/html generator (I use maruku), and I don't think about it. HAML is great for templates & layouts, when I care about DIVs and ids and classes, without being the wordy, ugly HTML itself.

Re: Don’t Make Me Write HTML

#7
Oh please. The time you spend learning HAML or Markdown (and all their potential intricacies) could be better spent learning to write clean HTML. I'm sure that both of those "alternatives" have their own quirks that must be worked around, not to mention the fact that you don't know exactly what HTML the parsers will spit out (yes, you can learn the output, I suppose, but why?).

I can see these tools being useful in certain circumstances, such as a way to provide HTML-esque markup somewhere where you don't want to bother cleaning up someone else's potentially malicious HTML (a wiki, a comment form, etc.). However, for building actual websites, just do it the right way.

Sure, these alternatives are nice in that you can avoid the scary HTML, but in the end it is all HTML anyway -- so why not learn it from the start and produce better code than what a parser will spit out based on your abstraction?

Re: Don’t Make Me Write HTML

#8
I'm not a big fan of using markdown for creating HTML, but using a CSS compiler has definitely been helpful for me in writing CSS. Nested styles makes your code much more maintainable, and makes inheritance easier. Plus, variables and basic arithmetic operations are nice.

CleverCSS is a CSS compiler pretty similar to Sass, which I tend to prefer for the simple reason that Sass requires my indents to be two spaces, and it doesn't matter in CleverCSS. The only problem is that it doesn't seem to be maintained anymore, and there are a couple of annoying bugs in the official release. I submitted patches but to no avail, so I'm hosting the patched code here: http://django-css.googlecode.com/files/CleverCSS-0.1.2.zip

I was so pumped on CSS compilers that I wrote this so you can use them in your Django projects: http://django-css.googlecode.com

Re: Don’t Make Me Write HTML

#9
post #7

Oh please. The time you spend learning HAML or Markdown (and all their potential intricacies) could be better spent learning to write clean HTML. I'm sure that both of those "alternatives" have their own quirks that must be worked around, not to mention the fact that you don't know exactly what HTML the parsers will spit out (yes, you can learn the output, I suppose, but why?). I can see these tools being useful in c…

You are completely missing the point of HAML.

HAML is for people who know and use raw HTML, but who would rather not spend time on typing closing tags and all other syntatic sugar and line noise. HAML allows writing pages using leaner and more concise markup, all the while improving its readability.

Re: Don’t Make Me Write HTML

#10
post #7

Oh please. The time you spend learning HAML or Markdown (and all their potential intricacies) could be better spent learning to write clean HTML. I'm sure that both of those "alternatives" have their own quirks that must be worked around, not to mention the fact that you don't know exactly what HTML the parsers will spit out (yes, you can learn the output, I suppose, but why?). I can see these tools being useful in c…

I would agree with you if you were talking simply about Markdown, but it seems you don't understand the point of HAML. Markdown is a complex syntax that loosely translates to half of HTML. It's good for user-input, because it's designed to be written like users already write stylistic formatting when the result will be plain ASCII, but it's not HTML.

HAML is HTML—it's a one-to-one conversion—but it's simpler and more concise to write. It's what HTML should be: no closing brackets, no line noise, and simple syntax to access DOM-relevant attributes (class and id). If I had the option of immediately converting all HTML worldwide into HAML, and all HTML parsers into HAML parsers, I'd sign up in a second.

Also, I don't need to see the raw HTML any more, because that's not the point: it's like looking at machine language instead of assembler. They're equivalent, so why read it the painful way? When debugging a page layout in HTML, I actually find it more useful to convert it into HAML first.

Post reply on HN