3 ms·
Agreed. To take the author's metaphor a step further: the reason the screwdriver was broken is because we're trying to use it as a hammer. So replacing it with
by ballenf 9y ago
Agreed. To take the author's metaphor a step further:
the reason the screwdriver was broken is because we're trying to use it as a hammer. So replacing it with an actual hammer makes sense. And the thing is, we still have a fully functional screwdriver at our disposal (for global styles, e.g.).
- jerf 9y agoThe metaphor is fundamentally broken anyhow. Hammers and screwdrivers are the same class of things. CSS and JS are not. One is a non-Turing-complete [1] language for declaring properties based on matching criteria. The other is a full programming language. Since metaphors are worse than useless when you already understand the thing, and I think we all understand the things in question, I won't find a better one. I'll just point out the original one is useless. I've considered JS taking over CSS more and more thoroughly inevitable for about four years now. The pressures on CSS are just too intense for non-Turing completeness to be anything but a leftover remnant of the dream of the "Semantic" web, doomed to fade the same way [2]. People want what only hooking a programming language up to the layout engine is going to give them. You can see it in CSS itself, as it grows ever more "declarative" styles that involve introspecting into the elements themselves, at their content, at their position in the tree, at their siblings.... CSS has long since let the camel into the tent. (In fact per my earlier comment today, https://news.ycombinator.com/item?id=15218359 https://news.ycombinator.com/item?id=15218359 , I would consider even CSS-in-JS to still be an intermediate phase to where we're truly going.) As for the fact that it will be a mess... well... yeah, it will. Welcome to the web. [1]: I know about the "Turing complete" CSS. It requires user interaction. Cute, but nothing more. [2]: "What? The semantic web is stronger than ever! Just look at what Google does with its search results!" ... which is a mix of some ad-hoc tags that are rarely the RDF tags the Semantic Web vision was based on, and a whole whackload of machine learning and language analysis. The Semantic Web vision was fundamentally that we can just hand tags out and everybody in the world will eagerly and accurately classify their stuff for you. It has failed (for reasons meditating on the previous sentence will make abundantly obvious), and what today seems to be the "Semantic web" is even moreso a repudiation of the original ideas, rather than confirmation.
- wwweston 9y ago"RDF" != "Semantic Web". It's certainly one vision but it's not the vision. And the Google example is relevant because the primary reason it became so useful was that the semantics of the anchor tag lent themselves well PageRank, which was useful well before they had a "whackload of machine learning and language analysis" in play. It's probably fair to say the semantic web is about trying to make your data accessible. It includes considering that you don't know what the user agent is going to be, what degree of separation there is between that user agent and the user, how the people behind it might find whatever data you're presenting to be useful, what the capabilities of the user themselves is. So you make some effort to produce a resource that's legible to person or machine guided with reasonable direction. If you know there's an existing convention for expressing semantics that overlap with your domain, sure, use that, but if not, any thoughtful reflection of the underlying data will probably be useful. This does take some effort, and there's the question of whether or not it's worth it, particularly in a business context, because the unexpected uses of your data are often opportunities for others to not only add value but capture it. The Google example is relevant here. But the other thing is, in my experience, it's useful to you. There's a dictum attributed to Torvalds: "Bad programmers worry about the code. Good programmers worry about data structures and their relationships." I've observed that when a web application project is oriented around thinking about relevant data and its semantically-accessible representation (that "R" in URL), the overall legibility of the project improves from an engineering perspective. Right now, with the approach of treating the browser as The VM That Lived™, it seems to me the gestalt is very much about worrying about the code. None of this is to say, though, that CSS is THE way to style documents. There's nothing about semantic resource oriented thinking that precludes using JavaScript or something else to control visual presentation. There's a lot of ways to use JS to do things worse than CSS, and CSS despite some serious warts does have a couple of decades of good thinking put into it as well, but I think there's a case to be made for examining approaches from JavaScript or another DSL (or DSSSL, heh).
- jerf 9y ago"And the Google example is relevant because the primary reason it became so useful was that the semantics of the anchor tag lent themselves well PageRank, which was useful well before they had a "whackload of machine learning and language analysis" in play." I'm talking about how Google now knows business hours and addresses and other such things about local businesses. It isn't because local businesses went in and labeled their HTML semantically. I was interacting with one business a couple of months ago that literally left the stock photos of restaurants up on their webpage that look nothing like their current location, and didn't care, because as far as the business owner was concerned, if the menu was up, the website was basically done. "It's probably fair to say the semantic web is about trying to make your data accessible." I'm not just using the Semantic Web in a vague way. I'm using it in the way in which the term was used ~2005 (and a few years in each direction), when the religiousity around declarative CSS and such was at its fever pitch. It was not just a vague desire that somebody find something useful; people literally thought someday you'd be able to do things like import semantic print semantic.Website("http://www.chilis.com/").Get("CEO") and that the "semantic" would not require what it does today, which is "a whackload of ML and online services", but would all work with glorious web standards. It failed. It failed hard. It failed so hard and so big that there's still people who haven't processed its failure, because they still think something like "it hasn't been tried", without realizing that that's how hard it failed... it was such a failure that it wasn't even a thing that could be tried because it was too impractical. But every once in a while the idea still pops up like a shambling zombie that doesn't realize it's been made dead twice over. CSS itself isn't vestigial, but a lot of aspects of its design are, including a lot of people's vague hopes about how maybe someday it'll sort of kinda become "Semantic" someday if we just keep hoping hard enough, despite its decade+ record of failure on that front. If somehow the web had been nothing but style tags until today, and we set out to replace CSS, I seriously doubt the result would be CSS again; it would probably be a JS extension.
- talmand 9y agoIt's more like a screwdriver with a fancy attachment that makes the screwdriver look cool but harder to use.