4 ms·
Working with HTML/CSS has made me feel like I've got a Chronically poor knowledge of the platform's features. In 6 years I've not been able to form a coherent m
by afarrell 12y ago
Working with HTML/CSS has made me feel like I've got a Chronically poor knowledge of the platform's features. In 6 years I've not been able to form a coherent mental model of how it works that lets me actually go "oh, I need to do Foo? I'll just do Bar and Baz."
Is this a sign that I should stick to working with scheme, Python, Go, JS and other actually Turing-complete tools and my mind isn't made for layout languages? (I have the same problem with Tex.) Or is there something I can read that will finally help this make sense? Or do I just need another 4 years?
- olavk 12y agoI think you should teach yourself the fundamentals of HTML and CSS. It is not magic and its not even that complicated. But if you have worked in frontend development for years, with frameworks, browsers specific workarounds and so on, you tend to miss the forest for trees. If you can program, you can definitely learn to understand layout languages. The problem is perhaps that we are aware that programming is challenging, while layout languages are considered "easy" so never really studied in depth.
- afarrell 12y agoRight, that is what I'm getting at: How does one actually teach oneself the fundamentals of HTML/CSS though? Off the top of my head, I know I've read through - http://learnlayout.com/ http://learnlayout.com/ - http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/ http://www.html5rocks.com/en/tutorials/internals/howbrowsers... - http://htmldog.com/guides/html/beginner/ http://htmldog.com/guides/html/beginner/ - http://htmldog.com/guides/html/intermediate/ http://htmldog.com/guides/html/intermediate/ And long ago did the same with w3cschools. But it feels like the box model only accurately describes how browsers work about 70% of the time. How do I learn to be able to predict at least 95%? I have suspected that the right approach is actually to take 50 or so layouts sketched on paper and do them. Is that actually reasonable?
- Elrac 12y agoI half-agree with your other respondent, olavk. If you're deeply entrenched in imperative-style coding and are just missing familiarity with - what's that other word? Prescriptive programming? - then by all means, you want to get down with it and get some practice. Set yourself some "toy" tasks and learn by doing until you're familiar with the concepts and effects. But meh, maybe after 6 years you've been way down that route. Something I've found helpful is to interact with a good HTML/CSS debugger such as the one in Chrome. You can highlight a chunk of your output page and see how the CSS comes together at various levels to create the final look of it. IIRC Chrome even lets you change those settings on the fly in the browser to experiment. On the other hand, you have my complete sympathy insofar as I find that model very cumbersome in a few places. It feels to me like something designed by a committee, and one very intent on reducing CPU load. There are things I can do with the table model, especially stuff like proportional columns or regions whose dimension is a constant +/- a product, that are like pulling teeth with the CSS layout model. There's a reason there are huge collections of "tricks" advice on how to do these things, which should IMO be obvious to a "programmer" type if they actually were. On the other hand, maybe you just need to let go. TeX especially is highly opinionated about how it slaps text on a page, and allegedly those are the opinions of experts in the field. So if your output is not looking like your mental model of the expected output, maybe your mistake is being so specific in your expectations? Both CSS and TeX allow you to micromanage your output more or less down to the pixel level, but very often I'm quite glad to let the layout engine do its job while I do the rest of mine.