Live data from Hacker News

Ask HN: Is HTML broken as it is, so why Jade?

news.ycombinator.com

1–7 of 7 posts

Ask HN: Is HTML broken as it is, so why Jade?

#1
Just to get something clear, i am a self taught web developer and i love learning new USEFULL technologies, recently i have been assigned to work on a project and it uses Jade, its a MEAN stack project and since i started using Jade, it just sucks for me, so my question is why Jade, what is worng with HTML as it is? if its not broken then why try to fix it? I feel like learning the shity Jade is like a waste of time and mental effort.

Re: Ask HN: Is HTML broken as it is, so why Jade?

#2
Personally, I prefer HTML too. That’s the reason I enjoy Angular so much. It essentially allows you to use an enhanced version of HTML, so you keep the strengths of a DSL without the limitations of basic HTML.

But in pure HTML, how do you do something like ng-repeat?[1] You can’t. You have to either use a template language or you have to construct the HTML in the code. Both have goods and others. A template language allows you to keep an HTML like format that non-programmer’s can possibly understand and contribute to, and that can help separate the view from the business logic, but it comes at the cost of having to learn a new language / framework and the hurdles that abstractions sometimes create.

Similar question on Quora. [2]

[1] https://docs.angularjs.org/api/ng/directive/ngRepeat [2] http://www.quora.com/What-are-the-pros-and-cons-of-using-a-t...

Re: Ask HN: Is HTML broken as it is, so why Jade?

#3
HTML is too slow. My web dev method is so streamlined at this stage, if I'm writing individually, I'm spending too much time on stupid shit that doesn't really interest me.

Consider this takes me 45 seconds to write:

    
      
        #{item.title}
      
    
Versus 15 seconds:

    .container
      .container__item(data-id=item.id)
        h1.container__item__title= item.title

Re: Ask HN: Is HTML broken as it is, so why Jade?

#4
post #3

HTML is too slow. My web dev method is so streamlined at this stage, if I'm writing individually, I'm spending too much time on stupid shit that doesn't really interest me. Consider this takes me 45 seconds to write: #{item.title} Versus 15 seconds: .container .container__item(data-id=item.id) h1.container__item__title= item.title

If you are hand typing each and every one of those characters by hand you're doing it wrong. There are a lot of projects out there aimed at making writing HTML faster.

For example, http://emmet.io/

The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a

? ? ? I think you're losing a lot more by trying to gain 30 seconds of time.

Re: Ask HN: Is HTML broken as it is, so why Jade?

#5
post #4
post #3

HTML is too slow. My web dev method is so streamlined at this stage, if I'm writing individually, I'm spending too much time on stupid shit that doesn't really interest me. Consider this takes me 45 seconds to write: #{item.title} Versus 15 seconds: .container .container__item(data-id=item.id) h1.container__item__title= item.title

If you are hand typing each and every one of those characters by hand you're doing it wrong. There are a lot of projects out there aimed at making writing HTML faster. For example, http://emmet.io/ The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? I think you're losing a lot more by trying to gain 30 seconds of time.

> The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a

? ? ?

It takes 2 seconds to learn and forever on know that Jade defaults non-specified tags to divs.

For me Jade is faster to both write and read.

Re: Ask HN: Is HTML broken as it is, so why Jade?

#6
post #5
post #4

Earlier quoted context omitted.

If you are hand typing each and every one of those characters by hand you're doing it wrong. There are a lot of projects out there aimed at making writing HTML faster. For example, http://emmet.io/ The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? I think you're losing a lot more by trying to gain 30 seconds of time.

> The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? It takes 2 seconds to learn and forever on know that Jade defaults non-specified tags to divs. For me Jade is faster to both write and read.

Sorry, but my, and most people's, thoughts, is that code should be easy to read and understand what's going on. Jade does not do that. It might take "two seconds" to learn, that's extra time that you're wasting going and looking it up. It's much simpler to just write , that way everyone who knows HTML and looks at your code will know what's going on. Jade is bucking a standard for no real added benefit.

Re: Ask HN: Is HTML broken as it is, so why Jade?

#7
post #6
post #5

Earlier quoted context omitted.

> The problem with your "15 seconds" example is that it is almost completely unreadable. .container? Ok, .container what? Is it a ? ? ? It takes 2 seconds to learn and forever on know that Jade defaults non-specified tags to divs. For me Jade is faster to both write and read.

Sorry, but my, and most people's, thoughts, is that code should be easy to read and understand what's going on. Jade does not do that. It might take "two seconds" to learn, that's extra time that you're wasting going and looking it up. It's much simpler to just write , that way everyone who knows HTML and looks at your code will know what's going on. Jade is bucking a standard for no real added benefit.

i totally agree with you