If you think CSS interferes with structure, you don't understand what structure is. CSS is only about how things look, nothing more. HTML used to do style too in a distant past and there are a few remains of that still in there (some form elements for example have their own style which can't really be changed through CSS). But the other way around? No way.
Forget about IE7. Apart from some corporate environments with which you don't want to have to deal with anyway, nobody is using that browser anymore. IE8 is the absolute minimum these days. Just another year and non-HTML5 compliant browsers will be a thing of the past. Finally.
Yeah, over a decade ago. How is that even remotely relevant to the modern web?
And there's no reason it still can't.
All the formatting tags are dropped in the latest versions of HTML. You can only use them if you're stuck in the past.
Please feel free to give the exact reason for CSS having an entirely different syntax and structure to HTML when XML which can store far more complicated data than CSS manages to have a pretty similar one.
XML has a lot of cruft. Look at the difference in size between a JSON file and an XML file containing the same data. The same thing would apply to style sheets written in XML.
Also: why do you think it would be beneficial to have more or less the same syntax for two completely different things? What would you gain by doing that? The fact CSS has a different syntax than HTML underlines the difference between the function of the two things. Isn't that a good thing?
Css has been around for 16 years and it still lacks the ability to easily declare a completely separate layout based on display height or width, something like "If width is less than _x_, use this css
Erm... heard of media queries? They do exactly this.
@import url(narrow.css) (min-width:800px);
This loads stuff from narrow.css and applies it if your window is less than 800px wide.
You can't deny there's a very similar syntax going on (blocks of key:value pairs encapsulated by curly braces). I believe Crockford himself even said he came up with JSON after staring at a CSS file and realizing it looks a lot like a Javascript object.
Sure, HTML used to include tags for styling in the past. There was a time before CSS was invented and people wanted to make things look pretty after all. But these sort of tags have been regarded deprecated for at least a decade now.
I know you're mocking, but in Javascript a function is a first class citizen. You can pass functions as parameters, return functions, keep them in a variable, create them at run-time. The fact Javascript has a curly braces syntax doesn't mean it can't be a functional programming language.
I guess you're right. I was thinking of things like Turing-completeness, but I agree that is not actually necessary to make something a programming language. A player piano isn't a computer, but making a piano roll still is a form of programming.
Javascript is much more a functional programming language than a procedural one. It's by no means as pure as Haskell, but this also allows it to be useful.
I suggest you read up on some of the articles by Douglas Crockford, who does an awesome job of explaining the true nature of Javascript to the world. This is a good starting point.
If you don't believe Javascript is indeed a functional programming, here is a Google Talk by the same Douglas Crockford explaining how to do monads in Javascript: http://www.youtube.com/watch?v=b0EF0VTs9Dc
It sounds like your'e confused. And I can't blame you, because there are *a lot* of different languages and syntaxes involved in creating a web application these days and it can be challenging to grasp it all. It helps to separate things in your mind. Even though the syntax of e.g. a JSON file may look a bit like a CSS file, they are completely unrelated. Make sure you know what you're working on (structure, style, client side logic, server side logic) and only concern yourself with the things that are related to that, nothing else. PHP for example has nothing to do with anything on the client, so don't even realize it exists when you're working on something in the client:-)
You're crazy. CSS and HTML are completely unrelated languages and technologies. None is a hack on top of another. HTML describes the structure of a document, CSS defines how things look. It's that simple. They require a different syntax because they are used for different things. And they're both very successful at what they're trying to do. Sure there are problems, sure there are things wrong with it, but show me something perfect. There are two types of languages you know: ones everybody complains about and ones nobody uses.
I have no idea what you mean by "embedded Javascript", but Javascript is the programming language of the web. Contrary to HTML and CSS, Javascript is a "real" programming language by any definition. Without it web applications would not be possible and the web would merely be a document system. Instead its the world's largest application platform, allowing users on any device to use your applications. If you are a web developer and you think that's not exciting then maybe you should think of switching careers.
Why has functional - which is only midly declarative anyway but we'll let that slide - taken over the world like its proponents constantly tell us it will?
Don't you mean "why *hasn't* functional programming taken over the world"?
Anyway, it has. It's called Javascript and it's *huge*.
That makes no sense. CSS could easily be fixed by a lot of the things that are already in SASS and LESS. They are not different tools for a different job.
Things like SASS and LESS point out where the big flaws of CSS are. It's crazy we still don't have variables in 2013 by default, this has been at the top of the requested features list for what, 15 years now?
...anybody who has used jQuery will know how powerful they could have been if only browsers had implemented them completely and consistently.
This used to be true a few years ago, but all modern browsers nowadays parse selectors quite similar. Even IE8 is not so bad (it understands CSS 2.1 selectors like:first-child and [attribute] etc.).
Of course things keep evolving all the time, so if you want to use cutting edge stuff, you might run into some things. But in general I think especially the selectors are amongst CSS' least problematic areas.
You have no idea what you're talking about. CSS (and HTML for that matter) have *nothing* to do with programming. CSS is merely a way for designers to code a layout, nothing more, nothing less.
I do agree CSS could have been a lot better and there are definitely some errors which needs fixing, but the general idea of separating mark up and layout is a sound one and selectors is one of CSS' best features.
Putting your password in an e-mail during the registration process doesn't mean they store it in plain text in their database. If they can come up with your password at a later point (like when requesting a "lost password"), THEN you know they are storing their passwords in plain text.
And who's fault is that? Here's a hint: not mister Brendan Nelson's.
And by the way, I don't think most of Facebook's employees are technical staff at all, they're probably mostly sales people. All over the world Facebook has opened offices to get local businesses to advertise on their website. I think most of Facebook's people work in one of those.
It's a good practice to get a new computer every three years or so even if the old one works just fine because you might end up with a computer for which it'd be difficult and/or expensive to get replacement parts.
What? That makes no sense at all. Why would you preemptively purchase a new machine because your current one might break in the future? What do replacement parts have to do with it? Why not simply keep the computer until it breaks and then replace the machine entirely?
If you think CSS interferes with structure, you don't understand what structure is. CSS is only about how things look, nothing more. HTML used to do style too in a distant past and there are a few remains of that still in there (some form elements for example have their own style which can't really be changed through CSS). But the other way around? No way.
Forget about IE7. Apart from some corporate environments with which you don't want to have to deal with anyway, nobody is using that browser anymore. IE8 is the absolute minimum these days. Just another year and non-HTML5 compliant browsers will be a thing of the past. Finally.
HTML used to do presentation
Yeah, over a decade ago. How is that even remotely relevant to the modern web?
And there's no reason it still can't.
All the formatting tags are dropped in the latest versions of HTML. You can only use them if you're stuck in the past.
Please feel free to give the exact reason for CSS having an entirely different syntax and structure to HTML when XML which can store far more complicated data than CSS manages to have a pretty similar one.
XML has a lot of cruft. Look at the difference in size between a JSON file and an XML file containing the same data. The same thing would apply to style sheets written in XML.
Also: why do you think it would be beneficial to have more or less the same syntax for two completely different things? What would you gain by doing that? The fact CSS has a different syntax than HTML underlines the difference between the function of the two things. Isn't that a good thing?
Css has been around for 16 years and it still lacks the ability to easily declare a completely separate layout based on display height or width, something like "If width is less than _x_, use this css
Erm... heard of media queries? They do exactly this.
@import url(narrow.css) (min-width:800px);
This loads stuff from narrow.css and applies it if your window is less than 800px wide.
Yeah, I suppose you could do that. Or you could just use LESS or SASS, which basically do the same thing and give you a whole lot more.
On the other hand, this really forced devs to include the proper doctypes in their work, which is a good thing!
You can't deny there's a very similar syntax going on (blocks of key:value pairs encapsulated by curly braces). I believe Crockford himself even said he came up with JSON after staring at a CSS file and realizing it looks a lot like a Javascript object.
This post is awesome! I'm saving it for later, thanks!
Sure, HTML used to include tags for styling in the past. There was a time before CSS was invented and people wanted to make things look pretty after all. But these sort of tags have been regarded deprecated for at least a decade now.
I know you're mocking, but in Javascript a function is a first class citizen. You can pass functions as parameters, return functions, keep them in a variable, create them at run-time. The fact Javascript has a curly braces syntax doesn't mean it can't be a functional programming language.
I guess you're right. I was thinking of things like Turing-completeness, but I agree that is not actually necessary to make something a programming language. A player piano isn't a computer, but making a piano roll still is a form of programming.
How so? Care to elaborate or provide an example?
Javascript is much more a functional programming language than a procedural one. It's by no means as pure as Haskell, but this also allows it to be useful.
I suggest you read up on some of the articles by Douglas Crockford, who does an awesome job of explaining the true nature of Javascript to the world. This is a good starting point.
If you don't believe Javascript is indeed a functional programming, here is a Google Talk by the same Douglas Crockford explaining how to do monads in Javascript: http://www.youtube.com/watch?v=b0EF0VTs9Dc
It sounds like your'e confused. And I can't blame you, because there are *a lot* of different languages and syntaxes involved in creating a web application these days and it can be challenging to grasp it all. It helps to separate things in your mind. Even though the syntax of e.g. a JSON file may look a bit like a CSS file, they are completely unrelated. Make sure you know what you're working on (structure, style, client side logic, server side logic) and only concern yourself with the things that are related to that, nothing else. PHP for example has nothing to do with anything on the client, so don't even realize it exists when you're working on something in the client :-)
I don't think so. The fact that it's code doesn't make it programming.
You're crazy. CSS and HTML are completely unrelated languages and technologies. None is a hack on top of another. HTML describes the structure of a document, CSS defines how things look. It's that simple. They require a different syntax because they are used for different things. And they're both very successful at what they're trying to do. Sure there are problems, sure there are things wrong with it, but show me something perfect. There are two types of languages you know: ones everybody complains about and ones nobody uses.
I have no idea what you mean by "embedded Javascript", but Javascript is the programming language of the web. Contrary to HTML and CSS, Javascript is a "real" programming language by any definition. Without it web applications would not be possible and the web would merely be a document system. Instead its the world's largest application platform, allowing users on any device to use your applications. If you are a web developer and you think that's not exciting then maybe you should think of switching careers.
Why has functional - which is only midly declarative anyway but we'll let that slide - taken over the world like its proponents constantly tell us it will?
Don't you mean "why *hasn't* functional programming taken over the world"?
Anyway, it has. It's called Javascript and it's *huge*.
That makes no sense. CSS could easily be fixed by a lot of the things that are already in SASS and LESS. They are not different tools for a different job.
Things like SASS and LESS point out where the big flaws of CSS are. It's crazy we still don't have variables in 2013 by default, this has been at the top of the requested features list for what, 15 years now?
...anybody who has used jQuery will know how powerful they could have been if only browsers had implemented them completely and consistently.
This used to be true a few years ago, but all modern browsers nowadays parse selectors quite similar. Even IE8 is not so bad (it understands CSS 2.1 selectors like :first-child and [attribute] etc.).
Of course things keep evolving all the time, so if you want to use cutting edge stuff, you might run into some things. But in general I think especially the selectors are amongst CSS' least problematic areas.
You have no idea what you're talking about. CSS (and HTML for that matter) have *nothing* to do with programming. CSS is merely a way for designers to code a layout, nothing more, nothing less.
I do agree CSS could have been a lot better and there are definitely some errors which needs fixing, but the general idea of separating mark up and layout is a sound one and selectors is one of CSS' best features.
Putting your password in an e-mail during the registration process doesn't mean they store it in plain text in their database. If they can come up with your password at a later point (like when requesting a "lost password"), THEN you know they are storing their passwords in plain text.
And who's fault is that? Here's a hint: not mister Brendan Nelson's.
And by the way, I don't think most of Facebook's employees are technical staff at all, they're probably mostly sales people. All over the world Facebook has opened offices to get local businesses to advertise on their website. I think most of Facebook's people work in one of those.
Facebook is a low margin business that survives by not having much staff. Complaining to Facebook is complaining to a software program.
In 2012 Facebook had 4,619 employees. I'm sure they have more now. Surely one of those people could answer mister Nelson's e-mails?
It's a good practice to get a new computer every three years or so even if the old one works just fine because you might end up with a computer for which it'd be difficult and/or expensive to get replacement parts.
What? That makes no sense at all. Why would you preemptively purchase a new machine because your current one might break in the future? What do replacement parts have to do with it? Why not simply keep the computer until it breaks and then replace the machine entirely?