HN user

Francute

102 karma
Posts1
Comments22
View on HN

But you can achieve the same thing (1:1 style:class mappings without hidden structures) using other libraries, like the ones mentioned here; styled components and vanilla-extract. You can even achieve that natively with web components.

So, I truly agree with this blog post, and I even wanted to rant the same things showing that you should not compare tailwind against classic CSS stylesheets from 2010, but against how different solutions looks like using different tools the community seems to have thrown away or forgot.

And I know is not relevant to your comment, but I will add that "but you will have to maintain more files instead of just a single HTML file" is not a valid argument for me. If that were something good, then just put everything into a single giant server.<your_language> file + separated lib dependencies.

We want maintainable easy to follow and understand files. Having a clean html with no cluttering + intuitive CSS styles being applied where we expect them and looking exactly as we expect them while reading the html, is the big win for me, and Tailwind definitely does a step back on this, especially when other tools can achieve that. (Lastly, we have set multiple projects with different tools, and the amount of "wtf"s we've seen with tailwind is way higher than just styled components to give one example)

I agree that the only good thing Tailwind achieves, is setting a default convention on having a single config file where you can set everything that you will need on every design across all your html files

I think I don't fit in either of your groups.

I’m not against Tailwind, but I didn't used it yet because I struggle to see why it's a better approach compared to other options like Web Components or React Styled Components.

The biggest issue I have with Tailwind is how it clutters the HTML with a ton of utility classes making the HTML harder to read and maintain. Of course I see Tailwind being better than using large global CSS files with the classic CSS approach of naming html tags. But we do have ways where the CSS is scoped to a component without polluting the global namespace. Like Web Components and Styled Components. Both keep styles tied directly to the component (or more general, a specific group of html tags), making it easy to see which styles apply where.

And yes, with them there’s no need for global class names, without having to worry about unwanted side effects or clashes. If I remove a component, I also remove its associated styles without worrying about unused CSS being left behind since both are tied together. Plus, there’s no risk of one component's styles unintentionally affecting another (thanks to shadow DOMs).

I really value keeping HTML very short and readable by not mixing presentational styles directly in the markup. Tailwind’s approach, where the styling is all in the class attributes, makes the HTML feel cluttered, especially when you have long class lists on a single line, and GOD forbid you have actual class names to use there. It’s harder to understand what styles are applied at a glance since you cant even have it well indented, and it clearly reminds many reasons why we moved away from the inline style attribute in HTML in the first place. (Yes, we didn't left it for its limitations like pseudo classes and @media queries, they didn't even exist, we didn't add those new features because no one wanted to get back to those inline styling)

So, while I don’t hate Tailwind, I just don’t see the clear advantages over Web Components or Styled Components in terms of readability, maintainability, and separation of concerns, while I do have important unanswered important concerns about using it...

Yes, I've read the docs but never tried it out, I don't hate it, but I can't understand why I would choose it over other options. The fact of having a million classes in the middle of plain HTML makes them both unreadable for me.

And No, I don't like huge CSS files either, or the classic approach of using them. But it is hard for me to see why tailwind is a better approach than working with Web Components, or React with Styled components.

These two approaches allows me to not have to read presentational things in the middle of my html, and allow my html to be more clear and readable. I don't have to use CSS class names, it's easy to identify which CSS applies where, so, if you remove the component, you remove the CSS too, you don't end serving unused CSS rules. Each can have CSS not leaking to the global scope, and there is no risk on changing styles of another element...

So, there is no hate for me, but it is very hard for me to see the benefits of tailwind over these two approaches, and I really dislike the idea of having to read html elements with huge styling rules cluttering my html files, and worse, having all of them in a single line makin it hard to understand all the applied styling.

We left using style tag from HTML mostly for that reason, and not because of its current limitations (like not being able to use pseudo classes, media, etc)

Github.com is down 3 years ago

Issues like this are happening almost every 2 weeks. What has been happening to GitHub lately?

I will wide this question a little bit based on my own experience...

1. Some people report that they can have multiple conversations at the same time in their minds. I find that really hard to do. For example, if I simulate a conversation between two people in my mind, I can't easily make one interrupt the other (and make both to talk at the same time). Is this an easy task for you? (However, I can think on a song and put that as a background music while I'm talking without losing any thread)

2. About the comment in this blog of "I saw in TV and would wish that to be a thing", that kept me thinking; I'm not good at drawing, can you "draw" in your mind? (In my case, if I start with a face, I make the hair, then their eyes, then the nose, but I started to forgot how the hair was drawn. Can't keep my draw in my mind...)

3. Meanwhile, I do have experience coding, and I can make some pretty persistent "sequence & activity diagrams" in my mind. I've found myself using that kind of "diagrams" in my mind to drive the thinking of other people when I try to explain myself about an idea. Now I'm thinking that is not the best way to do it... But, Can you do this also pretty easily? It is possible to sense if the other person is able to do something in his mind that you can not reproduce?

4. So, my experience is coding, what about your own experiences? What can you do in your mind related to that activity? For example, do musicians here, able to make music in their minds while keeping/updating its sheet music? What about other roles?

Basically, before finishing school, I've decided that would be better to make that choice if I had real experience first. So, I've started working on both. 8 months later I figured that I loved working as a programmer with engineers and that was my decision. As a plus, one year later I enrolled myself in university and was easier for me than most of my mates.

Nice link!. I should add that exist a correlation between objects and lambda calculus for functional programming. So, they are different perspectives of the same idea. And you have to take care of both perspectives.

How can a self-learner without access to a university or professor check their work?

Their "work" means: Find a solution, AND then check it. So, not checking it by yourself is being lazy too.

Also, if you are learning; software like wolframalpha can help you too to check your solution. [Thanks, throwawaymath for recall this basic answer].

I wouldn't want a beginner programmer writing "production ready" code without code review, so why should we expect a beginner math student to write error free proofs?

"Code Reviews" are for checking "how did the programmer solved that problem". On the other side; you know if some code is giving good or bad outputs by checking it with "Tests" (In the worst scenario; manually). So, you have to learn to "test" your solution. The creativity is in how you managed to get the solution and teachers should give insights about your way to solve it and present you easier or better ways to achieve the same. (Just change "teachers" for "senior devs" and now, that is code review).

These text seem to be designed solely for a classroom where students will get assistance and feedback from TAs and professors.

Probably that's true. You have to consider those types of books as "slides"; just like a guide for the teacher and memory refresh for students.

This is old (2013). However, i think it's really ironic to talk trash about OOP while thinking in Java and pointing Alan Kay in the same post. Alan Kay being the father of OOP always made clear Java wasn't the OOPL he had in mind.

The problem wasn't lisp... The problem was he didn't want to leave his comfort zone.

You can love lisp, Smalltalk, and all those beauty languages, but you should never stick to a single language. NEVER. Go to another, look it's strenghts, and if it's a bit weak on some sides, try to use the nice techniques you learned back to make it better.

To solve any problem, you can use different languages. Of course would be nice to use the nicest languages, but in some contexts they're not the right tool, and in others, you should have to consider outside factors like, how many people will maintain that software. All of them knows how to use the powers of those nice languages? Also, do you think would be easier to rotate people on that project using those languages instead of another ones?

Everyone can learn to use some tool, but experience using others may help you to discover better ways to use new tools.

Does anyone think this may be related to the fact that you don't have a hard goal to seek for the money you are working?

For example; I want a new PC, so I work for 6 months working and thinking on that new pc. Then finally, when I have enough money to buy it and do it, I love it. The effort that cost me gives it an extra value to me. Exactly like when you worked as a kid for the game you really wanted to have. Didn't matter if the game ended being horrible, for you that game was special, and also you could continue playing it after some years with nostalgia feelings.

If I have enough money, this effort is allmost zero. At the moment i get a new need i could satisfy it.

Of course, this is just another hypothesis, and could explain why some people says aren't happier with more money, probably they want something harder to get and still achievable with money/work.

Honestly, I have no idea about ad campaigns. However, I've felt that the ad itself wasn't good enough.

And, when you say "a typical YouTube ad is 30 seconds" doesn't mean you have to make one so long, you could have considered it more as an upper limit instead of a goal. Your message was simple, and i've felt the ad was unnecessarily slow and long. Being more specific, you lost me exactly after the first 8 seconds.

On the other hand, the ad taught me that it's possible to buy japaneses candies easily and where i could get them. If someday I, or one of my friends, want japanese candies, I could simply point to your website. (And in fact, I already made a friend interested about it before reading your post).

Lastly, the ad itself is boring, maybe with some background music or even a voice more like "Hatsune Miku" could been a little more fun to see entirely.

Not an efficient keylogger, however, if you know the pressed keys, you can just generate permutations ordered using probabilities, and that would be a lot faster than brute force.

The real deal here is, it depends on some js code updating the dom for each key press, which is BAAAD. Not an useless keylogger, because it reminds a vulnerability product of choosing a bad decision.

A Mathematician's Lament, by Paul Lockhart. Also, i'm not completely sure about this, because i had to have my eyes a bit open to understand it. But would be nice to had readed it in my sixteens.

Basically, one of the important ideas i saved was; If you want to learn something, don't just simply study. First, find a problem that care you, then try to solve it, last, study how to actually solve it, maybe existed a better way that you could use for your next try, making easier to you to understand everything related to that problem and say with confidence you learned; maybe didn't existed a better way, and you can share and discuss your solution achieving a better one.

Find problems, solve them, make them easier, learn.

Then, make that general for all your life problems, not only those science related ones.

On my desktop:

Firefox: JavaScript ~372ms, asm ~121ms, WebAssembly ~91ms, Shader ~0.1ms

Chrome: JavaScript ~115ms, asm ~150ms, WebAssembly ~105ms, Shader ~0.1ms

Edge: JavaScript ~3340ms , asm ~(230-240)ms, WebAssembly ~(160-180)ms, Shader: Broken

IE11: Broken.

Interesting values.....

Surprisingly, at least for me, i don't see here Robert C. Martin, Kent Beck or Alan Key...

Maybe they are old, and not the bussiness-succesfull-type but they are still Gods for me in the academic side. They can clarify a lot of things most people think they understood, or worst, i tought i understood.

Why? For me? Because the power they have modeling, the experience they accumulated in a lot of areas, how they move checking metrics and not only by what they feel or their instinct. And of course, because of the power of their ideas which made them famous.

You dont have to agree them 100% of the time. Of course not. But when you don't agree, check that twice, and check again after some years of earning knowledge and experience too. They deserve that.

Well, if you have 1400 lines of 100 prime numbers each one, and a last line to retrieve one of them, if i ask for the 140.000 prime, that solution would be better (in terms of speed) than 10 lines making calcs for any prime number.

If you know the possible range of accepted inputs, 1400 loc would be better than 10.

One normally think much more loc is worst than a one line solution, but that's, like most answers, always depends.

And that's a simple case. There are lot of similar cases one dont realize.

I don't know why some people love sunlight, but in my case, normally, it's make me angry, sleepy and tired.

Winter days, on the other side, make me start being productive again, start to run, have healthy food, stick with a nice routine and have a good mood, specially on drizzling days :)

And i know i'm not the only one.

Also, i enjoy night life a lot and, before starting working, always lived my life during the period from 16:00 to 8:00. I did that more than my half life. (Of course, my eating times were found weird for most people)

PS: I don't know if is unrelathed or not, but i'm diagnosed with hypothyroidism. And not, i'm not antisocial, depressive, bipolar or anything like that.

What about languages like Smalltalk and Lisp? ... Well, Lisp at least have some acknowledgments, but Smalltalk can be compared to Erlang in lot of aspects.

The common thing i can see about seniors developers are the length of his code.

A junior developer doesnt divide too much his code, repeat himself, the avg length of his code is high, etc.

A semi-senior developer knows how to divide his code, have a good analysis and design, knows some common patterns, try to have good practices, and repeat himself a little. (Sometimes takes bad decisions trying to not repeat without sawing his design) Normally have some methods with too much lines of code but not too much.

Seniors developers are embrace testing a lot, even test his tests (mutation testing), are carefull about decisions who impact on architecture, and the average of the lenght of his code is between 5 and 8 lines of code (and always simply readable). Cares a lot of dependencies and really knows how to use all of his tools. Specially when talking about refagtorings. Normally, they loved the job/books of some of these guys: Robert Martin (uncle Bob), Sandi Metz, Kent Beck, Martin Fowler, The Gang of Four, Alistair Cockburn and/or Alan Key.

Of course this seems a bit qualitative too, but its like a pattern i noticed.

Anyway, the preferred method here is: Developers categorize others. Between a team, or a company.