1,031 karma · joined Jul 24, 2011 (15y ago) · 619 submissions
comment 7y ago · link · parent
My point with the examples I gave was just to show that it's possible to handle the issues the author wrote about. I'd prefer to see efforts to fix the issues in CSS instead of discarding it completely in favor of a JS solution.
I'm not saying I can specify how to "solve" CSS issue in a couple paragraphs. As regards #3, that's specific to the kinds of dynamic styles I find most often in web apps. Very rarely do I see styles generated dynamically where it isn't effectively a choice between a couple of options (in my experience, of course). And when you do, you can just write out styles from the JS into the template (and I've definitely done fully dynamic styles in that way when it is necessary). Dynamic styles would be a place where I could see a fit for CSS-in-JS, btw.
The global namespacing this is something I believe is being worked on in the CSS Modules specification, but again, that is really easily solved. I can say loading external libraries can mess that up (i.e. Bootstrap and the ilk).
I don't care what people use, I'm glad the argument is what the author (who co-wrote the styled components lib) was what he liked. But I am really concerned that some proponents promote their way as the only way forward. Personally, I haven't found a situation yet where CSS-in-JS would materially benefit the application over a careful, convention-based approach. And I want to make sure people know there are other options that work.
comment 7y ago · link · parent
People not taking the time to learn is not a reason to throw an entire building block of the web out.
(Yes, I realize there are a lot of people who know CSS and still choose CSS-in-JS, but I'm specifically referencing the point re: not learning CSS.)
comment 7y ago · link · parent
There are quite a few reasons for preferring to not use IDs, here's two:
1- specificity of IDs always trumping things
2- having to change it from an ID to a class later on if it becomes a reusable item (which in a widget, is almost always the case). There is no reason a class cannot apply to just a single item, where an ID is by its nature limited.
comment 7y ago · link · parent
1- append only? No, each module/feature/widget gets its own CSS file, imported to the main app CSS file. Delete the widget? Delete the file.
2- Specificity issues? Never use IDs, stop using tag names and simple classes and adopt a simple naming structure (doesn't have to be BEM, it could literally be ".widgetName-header")
Since I adopted those 2, I've almost never had dead CSS from deleting features or collisions in my CSS. I do still have a small base set of styles that are shared but it's small enough to be easily manageable.
3- dynamic properties? CSS variables. Not an option? Child classes that apply the dynamic styles serve most use cases. Truly dynamic styles are rare, in my experience.
I'm still keeping an open mind about the possibilities, but my strong opinion (weakly held) is that I still don't see CSS-in-JS as more of a bandaid for people that like CSS and (for many, not all) those that don't have an in-depth understanding of it.
comment 7y ago · link · parent
I need to point out that the NYT is doing this. They probably have one of the more advanced CMS setups and their tech team puts out some really interesting things as well.
As to your other point, I want to see good, factual, long form content, but a lot of people will not read that. They only want the headline and bullet points. So newspapers need to adapt to that and ensure the main facts are presented right up front, but then have the detail and back story for those that want to do a deep dive.
comment 7y ago · link · parent
In general though, I agree that paying customers should not be subjected to ads. But as someone who worked in the news industry (quite some time ago now) I don't think newspapers have learned that lesson yet or can afford to do that.
comment 7y ago · link · parent
1) its my cheapest option to have local channels
2) of the DVR options (so I don't deal with those ads), it still has the best experience (tried Hulu, DirecTVNow, YouTubeTV) - YouTubeTV was the closest, but they inject ads you cannot skip in on demand programs and replace your "recordings" with on demand programs as soon as the network makes them available.
comment 7y ago · link · parent
It's something the owner should test, and see if it puts people off or if it converts better. Maybe it puts off 10% more people, but 30% more convert? Good on them for finding that out and optimizing accordingly.
We in the dev world expect way too much for free. Not that I complain when I find something for free, but people deserve to be compensated for their work also.
comment 7y ago · link · parent
Not saying that it's a strong reason to use one over the other, but it is an objective reason that doesn't rely on style or preference.
comment 7y ago · link · parent
The problem wasn't really the bad debt. The problem was one of confidence, and putting the money into the banks restored that confidence.
As repugnant as it seemed, and still seems, to give that money to the bankers that created the problems, it was likely the right move at the time. We'll never really know since we can't go back and try the other way, but things were grinding to a halt, and putting money in people's hands was it going to move things quickly enough.
comment 7y ago · link · parent
comment 7y ago · link · parent
Said as a true developer who no longer realizes how hard some of the things we do are to the average person who can barely operate their computer or smart phone.
Think of all the things you have to learn in order to host your own site. I still have to explain the basics of what a domain name is to potential freelance customers, and why they need hosting in order to have a website online. This is knowledge that is not common outside of the developer ecosystem.
comment 8y ago · link · parent
Also of note, a recent study has found that ingestion of cholesterol does not correlate with how much is in your blood.
comment 8y ago · link · parent
comment 8y ago · link · parent
This is pretty well established science at this point. Again, like you said, I'm not going to go into details on the things people should eat. I think different people need to find what works for them, their body, palette and schedule.
comment 8y ago · link · parent
Instead, on Twitter, Facebook, Instagram, Reddit, etc. you get a flood of "news", but you have to vet it all yourself to see what is true and what isn't. And many many people don't do that - if they trust the person sharing, they trust the "news". Or if it agrees with their world view, they trust the "news". Sometimes amazing things are covered - live Reddit threads have broken some amazing stories, with details from local residents. Same with Twitter, etc. But for every one of those stories there are 100s that are fake, or actually pushing alternative narratives that are not based in reality for their own ends. And that flood is just too much for the average person to actually separate the fact from the fiction.
Social media does not equal journalism. That isn't "old industry" thinking. That is just a sad fact.
comment 8y ago · link · parent