Better HN
topnewbestaskshowjobs
Log inSign up

LocalPCGuy

1,031 karma · joined Jul 24, 2011 (15y ago) · 619 submissions

Submissions

comment 7y ago · link · parent

> Are you positive that all the rules in your component's CSS file only affect that component?

Absolutely

comment 7y ago · link · parent

Yes, it's dismissing the root of the problem because I am not convinced the "cost of doing CSS" is enough to justify moving to something like CSS-in-JS. Again, as I said above - it's a strong opinion, but weakly held - given enough evidence, I'd reconsider my position.

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

> The only people advocating for css only are privacy freaks.

This just is not true. It may be your opinion, but it is objectively false, particularly in the context of this discussion.

comment 7y ago · link · parent

I agree with you re: the task comment, there is a difference between JavaScript developers and Front End UI developers. It's almost like the full stack discussion but just in the front end ecosystem.

comment 7y ago · link · parent

CSS isn't a programming language, that is the fundamental difference and explains a LOT of the debate surrounding it.

comment 7y ago · link · parent

> I never was able to learn how the damn thing works

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

I take issue with your assertion about how IDs "are intended". I think that idea (and CSS being taught that way) is one of the reasons people have trouble with CSS.

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

That's an interesting use case for IDs. I'll have to keep that in mind.

comment 7y ago · link · parent

Because one is an extension of the underlying technology, and the other one changes the technology out altogether. I still believe CSS is a vital part of the web ecosystem, and we should work to fix the underlying issues rather than just try to work around it via JS.

comment 7y ago · link · parent

Why wouldn't the CSS file be deleted? It should be co-located with the widget, so you just delete the entire widget folder.

comment 7y ago · link · parent

I understand the "pit of success" idea, particularly when it comes to more junior devs. But I don't necessarily agree that you need stringent processes to get most of the gains you cite from using something like SCSS or even regular CSS these days. It's really easier than ever.

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

> setting up publishing and formatting abilities way beyond the average cookie cutter CMS. Investing in their own production processes and technology...

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

As a counterpoint, I use NYT + uBlock Origin and never see a banner about disabling the ad-blocker.

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

I still pay for cable TV because

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

Operating costs going up makes sense if FB is hiring in order to attempt to address many of the issues that were highlighted throughout the year. I'd venture to say they will continue to grow this year, I think I just heard them mention that during the call.

comment 7y ago · link · parent

I'd say to test what makes the most sense and works best financially for you. Test your conversions and optimize for better conversions over what a handful of people online say they like or don't like. Particularly when their opinion could cost you $$.

comment 7y ago · link · parent

I know this may be a minority opinion among developers, but I'm ok with them trying to make money. And if the optimal way to do that is to ask 35% of the way through, then that's what they should do. I don't view that as a dark practice or bait and switch. I don't think there is an obligation to be super clear that there is a paid version.

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

For a slightly different reason than many I've seen here - double-quotes require the shift key to be depressed on standard keyboards. So programming with double-quotes doubles the number of keystrokes you need to type any time you quote something. Pretty sure the person that told me that was a Vim fanatic as well.

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 TARP program was 800 billion dollars, not in the trillions. Not sure where you are getting the 4.7 trillion figure from.

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

As a counterpoint to your counterpoint, at least Facebook's default setting is friends and friends of friends (I believe, it's been a while since I've had mine on the default setting). By default a personal website is public, and it'd be pretty difficult to setup authentication and user accounts for the people you want to be able to see your content, keeping it secure and preventing it from leaking. That is a pretty huge difference. Not arguing Facebook has been perfect, obviously they've had huge blunders, but it is vastly simpler and more secure (most of the time) for the average person compared to them trying to do it themselves.

comment 7y ago · link · parent

> I think its pretty straightforward to host things yourself.

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

Bodies can run on ketones (byproduct of breaking down fats) or glucose. I'm not sure where you got the information that T2 is related to fat heavy diet, that is not true at all. It can be related to bring fat, for to complications with obesity. It is related to glucose spikes, which causes insulin spikes, but the T2s body is insulin resistant and so sugar and insulin stay in the blood stream and can't be utilized. High sugar in the blood is the cause of most T2 chronic issues.

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

That's a bad example. There are many jobs where men clean female locker rooms/restrooms and visa versa. But I agree with others (and I think you) that it isn't Facebook's responsibility legally to ensure it isn't possible for companies to break the law. Might be able to make a moral argument, but that's a different argument.

comment 8y ago · link · parent

Calories in calories out over simplifies what is a complex issue. It is not "just" that. You even kind of contradict that statement yourself by your later paragraph.

comment 8y ago · link · parent

While moving more is important for overall health, specifically to weight loss it isn't the answer. What and how much a person eats is going to affect their weight much more that how much they move, barring someone running marathons or similar extra ordinary exercise routines.

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

It's also important to remember we have the benefit of hindsight and the information that has come out since then. Which said CEO didn't have at there time of that call.

comment 8y ago · link · parent

That...just isn't true. Missed sleep costs millions of dollars a day and worse, numerous human lives in sleep related accidents (car, medical and more).

comment 8y ago · link · parent

The difference is, the newspaper paid professional reporters to write the news. They did a fantastic job (in most cases) of making sure they had their facts straight, and local news broke most of the big stories you eventually heard about on national news sources. Even today, a LOT of the national news starts at local news sources, either papers or local channels, but that is getting worse all the time due to the cuts.

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

Negative. An opinion from someone who finds the value in GUIs despite knowing about the alternatives. Use what makes you productive, but for MOST people, that is going to be a well done GUI over a text based solution. For me, I don't want to spend time configuring or fixing my email solution, I just want to login, get/read/reply to my email, and move on to real work. Don't confuse your opinion with what is "best" or "most effective" for most people, even developers and those ultra-familiar with the terminal.

comment 8y ago · link · parent

Or rather --- the age of text-based email clients has really come and gone. The world has moved on. Web or GUI based PRs are accessible to all developers of many different levels and experiences, that is why they have (and will continue to) be the winners.
1
141516
21