5 ms·
Who would be interested in inspecting the compiled code? Genuine question.
by soneca 3y ago
Who would be interested in inspecting the compiled code? Genuine question.
- diggan 3y agoI'm so glad this wasn't the prevailing opinion when they first came up with the web. "Inspect source" is how I learned how to build my first website in the newly released browser called "Firefox 1.0".
- soneca 3y agoIt wasn’t an opinion, but I think you gave me the answer anyway, which seems to be “students learning CSS”. I never learned CSS like this, so I wouldn't think of it. I started learning CSS only about 6 years ago. So I had Stack Overflow and MDN web docs for it.
- timr 3y agoThe answer, as with all code, is "you, six months from now". Anything that makes your code less readable is a fail. I understand that people want to treat CSS and HTML as assembly, but that's a leaky metaphor, and only works insofar as you never have to debug an actual webpage. Every place I've ever seen with tailwind has struggled with front end work, because the end result is so horribly abstracted from the code.
- soneca 3y agoThat code posted above is the compiled code in the browser. The developing code is not unreadable like that one. I think Tailwind is very readable during development. Even if I had only used in side projects.
- paulryanrogers 3y agoThe meaning of 'compiled' has shifted quite a bit. We used to say transpiled when the output wasn't byte or machine code.
- timr 3y agoYes, I know. Tailwind emits this kind of gibberish as a compilation step, which makes it much harder to figure out what's breaking when you're using a browser inspector or something. Which of the 83 different classes is the problem? Good luck! You have to have a certain level of discipline to write clean CSS, but it really isn't that hard. It shouldn't take a 300-character inline style to make a button, when you can use CSS as intended, and have a class named "button".
- joshmanders 3y agoI learned how to build websites in the late 90's similarly. Then progressed by reading blogs of other developers who shared their source in their posts. It made sense back then because it was all we had to learn. Today there's tons of code to learn from both in open source and resources. Lets get rid of this false dichotomy that the only way to learn is by viewing the source of websites, in the year 2024.
- diggan 3y agoIt's because of the mentality that things should be open and inspectable that we have things like browser devtools (thanks Firebug!), that is something we still use today to learn and troubleshoot. Sometimes it makes it harder when people use various compile-to-js/css languages, but also sometimes people ship their sourcemaps and again we can learn from examples. Or we try to reverse-engineer it, which is another valuable skill. I didn't mean to say this is the only way of learning, but I stand firm on that it's still a great way to learn, to look at how cool stuff was done when you come across it on real websites, not just from blog posts describing something. In addition to reading fundamentals, practicing small projects and so on, of course.
- Feathercrown 3y agoI think we've lost some of the coolness of the old web from this mentality. We turned website source code from a txt to a pdf.
- micromacrofoot 3y agoIt's how I learned web development