10 ms·
"CSS is dramatically more difficult than learning assembly language" [audio]
- surprisetalk 3y agoHere's a timestamped link to the rant: [1] http://overcast.fm/+2tVlX5FNg/1:12:12 http://overcast.fm/+2tVlX5FNg/1:12:12
- stevemk14ebr 3y agoAssembly is not trivial lol. The instruction set is easy to learn yes, but the kind of bit manipulations that occur at ASM are not easy or simple. Look at optimized division sometime. Try reverse engineering, it's an art that takes decades to learn. I do agree with "Anyone who can learn CSS can learn assembly" though, anyone can learn pretty much anything with enough time and effort.
- HPsquared 3y ago"Anyone who can learn, can learn."
- ajsnigrutin 3y agoI mean.. technically it's still a simple, easy to learn language,... but doing stuff with it, requires a lot of knowledge about 'stuff' (mostly math in your case). To steal from some other comments here... a (wood) chisel is an easy tool to learn and use.. a lot easier than a CNC machine... but building a wooden boat with a chisel is still hard.
- VeejayRampay 3y agosensationalist title, ASM is much more complicated than CSS
- nineteen999 3y agoRight. At least there's only one CSS specification isn't there? There's a whole heap of different assembler languages for different ISA's out there. It's like comparing one apple with a bunch of oranges.
- cylinder714 3y agoPlease forgive me for straying off topic a bit, but: - I just picked up Jeff Duntemann's newest Linux assembly book, x64 Assembly Language Step By Step —get it from your local indie bookseller - I want to get Dennis Yurichev's book Reverse Engineering for Beginners, a.k.a. Understanding Assembly Language, at https://www.beginners.re/ https://www.beginners.re/
- throwup238 3y agoI'd rather spend the rest of eternity doing CSS nonsense than have to look at another line of AT&T syntax. I have several percent signs permanently seared into my retinas.
- Vanderson 3y agoAdvanced results require advanced skills. CSS is one of my favorite languages. And the only way I can consider CSS to be difficult is if you have no experience with HTML. If you try to do HTML by hand, then doing CSS by hand on top of HTML by hand is really easy and wonderful. And this is truly where you gain the fundamental framework for "getting CSS".
- eviks 3y agoGreat design is precisely what allows lifting the requirements for advanced skills. Poor design resorts to manual editing of ugly markups
- marssaxman 3y agoMy experience was completely the opposite. Learning HTML was effortless, and I had a great deal of fun writing pages by hand, easily creating whatever I could imagine through a straightforward hierarchy of nested tags. When CSS came along, it added a slippery, inconsistent layer of confusion where spooky action at a distance was the order of the day; nothing ever worked completely right, no matter how much time I spent grinding on it. I never could get comfortable with CSS and eventually gave up web development rather than continue fighting with it.
- PointThink 3y agoYeah CSS is a complete nightmare. Nothing works and you never know why. The only thing you can do is to randomly change attruibutes randomly until something happens. I remember working on a simple website and i had to do a gradient banner. The gradient was relatively simple but the true challenge was making it stretch edge to edge. No matter what i did there was always a little bit of padding or the layout was completely off. I don't even remember how i solved it.
- init2null 3y agoHandcoding/server-generation HTML running CSS via SCSS with no frameworks is a truly fulfilling experience. Especially if I get to mix in some SVG. I'm one of the few that outright hates JS, so I'm always glad when I get a chance to get back to my favorites.
- ecshafer 3y agoWhat does learning assembly language mean? So right now, learning CSS is pretty difficult. But luckily CSS specs have gotten pretty similar over different browsers, so its not terribly difficult even though some things are not exactly perfect. But Assembly Language is rather straight forward, but the difficulty is that "assembly" is really a hundred different languages that depend on the specific processor architecture you are running on, and how that platform operates. They are really orthogonal issues in the end, and comparing them is like comparing apples with automobiles.
- recursive 3y agoPedantic nit: CSS specs are consistent across everything, because there's only one spec. (ignoring previous versions) Specs generally aren't the problem. It's implementations. But those are mostly pretty good now too.
- bavell 3y agoWhen I started in webdev around a decade ago I remember having to work around all sorts of annoying cross-browser inconsistencies (floats, margins, box-sizing, etc). I haven't kept up with all the latest updates (need to brush up on grid layout) but I feel like I rarely if ever find myself in those situations anymore.
- fatnoah 3y agoYeah, I've authored assembly and CSS professionally (not at the same time) and would choose CSS all day long.
- dieselgate 3y agoI've never written assembly but would assume CSS has better tooling available? browser dev tools for example
- fatnoah 3y agoIn many, many ways, assembly is more straightforward, but I went with CSS just because of the ability to see the results and to poke & prod with browser tooling.
- marssaxman 3y agoAs a counterexample, I have also authored both assembly and CSS professionally (not at the same time), and I chose to completely abandon web development after endless battles with kludgey, inconsistent CSS vacuumed all the fun out of it. (I imagine the situation may have improved over the last 15-odd years, but I'm not going back in to find out.) I still enjoy assembly programming, though opportunities to use it have become a very rare treat.
- leptons 3y agoI've done both CSS for about 26 years (since its first release) and Assembly language for about 35 years, and I love both of them - for different uses and different reasons. They are both great for the job they were meant to do. I even once wrote a JSON parser/serializer in 8-bit Assembly so the embedded device I was building could easily communicate with the browser front-end I had built. It was all pretty fun to me.
- LordDragonfang 3y agoThis feels kind of like arguing that python is more difficult than brainfck because most people couldn't name all the ways to mutate a python object, and brainfck only has a handful of operations. CSS isn't (that) hard*. Modifying someone else's CSS and tracking down what selectors apply what styles is hard - but that holds true for any language, understanding code is harder than writing it. *(other than positioning, that still kind of sucks, even with flex/grid)
- oldstrangers 3y agoI don't understand the CSS confusion. Maybe because I've been doing it for 15+ years but it's extremely intuitive to me and I love working with it. Tailwind annoys me because it removes some of that flexibility / freedom for me to just solve a problem immediately with a new class or something.
- meheleventyone 3y agoThe point wasn’t that CSS is necessarily confusing but that if you can learn CSS you can learn assembly and by implication write better performing software.
- paulddraper 3y agoIt's because of the inconsistency. For example, `margin: auto` expands left/right margins but not top/bottom margins. ....and 50 other such cases.
- bavell 3y agoNot a CSS guru but I'm pretty sure that's because display: block (the original document layout strategy?) grows vertically, so it doesn't really make sense to have an auto value for top/bottom. And I believe margin:auto only applies when there is a width constraint in the element.
- paulddraper 3y agoThere are Reasons(TM) for it. And yet when flexbox was created, there was no horizonal/vertical difference.
- bavell 3y agoI'm not sure about that, flexbox has a major and minor axis, which you can define with flex-direction.
- 3y ago
- ctenb 3y agoListened to this episode the other day. I can recommend, its funny and gives a fresh perspective, even if I don't agree with everything
- fifilura 3y agoOk I dont have time to listen to the podcast, and could not figure out which one it refers to. But I'll bite on the headline. CSS is difficult because it was not designed with logic as input as a programming language. It was designed from expected print output. "I want to do this thing that is popular in New York Times magazine". Floats, run-in, first line, multi column. Static papers that were never meant to move around. And you were never meant to have floats in a float or first line with a different font size inside an auto width table. This is why it is so riddled with edge cases.
- Osiris 3y agoThis is a really interesting perspective. It does seem like CSS is "reverse engineered" from expected output rather than the other way around.
- richardwhiuk 3y agoThat's not at all true - it took ages before CSS added multi-column layout.
- fifilura 3y agoBoth can be true. It took long to make it into the specification yes. But I am certain it was part of the original drafts. Just hard to implement so it got no extra push from the implementation side.
- pphysch 3y agoIf you are trying to "learn" a living language cover-to-cover, so to speak, you are doing software engineering wrong. Is the tome of CSS more pages than the tome of x86? Maybe, but I'm not gonna read either cover-to-cover.
- paulddraper 3y agoThis just in: learning to use a CNC is more difficult than learning to use a saw. --- > Learning CSS is dramatically more difficult than learning assembly And styling with assembly is dramatically more difficult than styling with CSS.
- deleted 3y ago[deleted]
- Hammershaft 3y agoThe point of Casey's rant in the OP is that CSS is incredibly complex with a poorly defined spec, and yet at the same time its also a terrible layout engine.
- paulddraper 3y agoAssembler is kinda outta of left field
- deleted 3y ago[deleted]
- marstall 3y agothere's CSS and there's CSS. macro layout stuff with complex component structure, shape changing web components, multiple scrolling divs, sticky footers, animations, lotta state changes, cobranding, 5-10 year old code base? Yeah it starts to take a dedicated expert vs a dev who "knows CSS"
- thomastjeffery 3y agoThat contributes to the overall difficulty. Where do you draw the line between CSS and CSS?
- Waterluvian 3y agoI think the fundamental lesson for me was to utilize the cascading nature in small, very clear logical units of tags. And don’t try to implement a grand unified theory of style for your website where everything is based on a brittle chains of selectors. It’s okay to give tags ids and select by the id instead.
- bavell 3y agoCSS definitely gives you plenty of rope to hang yourself with if you aren't careful about how you choose to apply it! I've been in a few codebases with lots of !important overrides and deeply nested selectors which quickly becomes unmanageable.
- CM30 3y agoEh, as someone who's used both I'd probably disagree with that. CSS is at least a hell of a lot easier to debug than assembly, depending on the device you're writing the code for. But it's a weird comparison anyway. The difficulties in CSS aren't using it to begin with, they're about all the edge cases, browser compatibility issues (for the more modern stuff) and its limitations for handling layout setups other tools have handled for years. Meanwhile, assembly's challenges are often that you have too few tools, and a lot of the language patterns you're used to in modern day programming languages are nonexistent. Like the type you write for the SNES lacks for/foreach style loops, so something that's a two line piece of code in Java/PHP/JavaScript/Python/whatever can be like 15 lines in assembly there.
- Osiris 3y agoI cannot look at a UI design and intuitively know what CSS attributes would generate that exact output. I think part of it for me is that I do not have an intuitive understanding of the box model and how layouts are calculated. On top of that, since CSS cascades, you have to be able to mentally keep track of all the parent attributes to understand how they affect a specific element on the page. I was working on a React Native project the other day and I could just not get flexbox layout to do what I wanted. I ended up just playing around with putting attributes on various components until I found what worked. I have an ADHD brain that quickly discards information I don't use frequently, so since I don't use CSS often, I never remember it well enough to be good at it.
- bavell 3y ago> I ended up just playing around with putting attributes on various components until I found what worked. It's sometimes hard for me to wrap my head around flexbox as well. If you haven't already seen it, this page [0] is imo the flexbox bible. There's one for grid [1] too. [0] https://css-tricks.com/snippets/css/a-guide-to-flexbox/ https://css-tricks.com/snippets/css/a-guide-to-flexbox/ [1] https://css-tricks.com/snippets/css/complete-guide-grid/ https://css-tricks.com/snippets/css/complete-guide-grid/
- deleted 3y ago[deleted]
- antoniuschan99 3y agoAlso add in flexbox froggy and css grid garden
- moritzwarhier 3y agoBox model + flex box + the display modes + "positioning" (stacking contexts) are typically the most confusing parts of CSS, I feel. Add maybe margin and padding, and how they interact (margin collapse, no margin collapse in flex or grid context, box model again, auto values). But then, that's basically all the hard conceptual parts. But they are mostly intuitive and well-designed! I know I'm alone with this opinion. Naming + global scope is the rest of the problem, but even without this, here is where the problem of creating design system shows up, too. Harder than CSS probably :)
- h4l 3y agoI can imagine it's very hard if you don't know how to use browser dev tools to see the style properties being applied to elements.
- wubrr 3y agoAll of CSS may or may not be more complex overall than x86 assembly, but learning CSS is waaaayyy more immediately accessible and simpler. Write a bit of code, immediately see results in your browser and play around/iterate. To be an effective assembly programmer you need to understand computer architecture to a decent extent, be familiar with assemblers and related toolchains, be able to debug and reason about code execution, etc.
- gingerlime 3y agoslightly OT but can someone recommend how to learn CSS in 2023 for a backend web developer, who 30ish years ago grokked mainframe Assembly reasonably well (and since then developed in c, php, python, ruby, bash, etc etc)? Can/do I start with tailwind? Do I start with old-school CSS or jump straight into flexbox? Do I need to care and learn about BEM, Sass, etc? Do I start with an empty page and build it? Do I need to copy a design? Can I jump into an existing page and tweak it? Not trolling. It’s the kind of stuff that stumps me. Or am I just making excuses to myself why I can’t figure CSS out? (beyond tweaking margins, padding and maybe background-color and the real basics)
- h4l 3y agoI would probably start by opening the browser dev tools on web pages and use inspect element to see how an element in the page has been made to look the way it is. You can edit properties to see what effect they have when changed. The domain of styling html is so large that there's no chance of learning everything in theory then applying it, I think it's best to learn by doing.
- gingerlime 3y agoI’ve been doing that for over a decade, without making tangible progress.
- h4l 3y agoYou've probably accumulated a lot of relevant html knowledge which will help you. I presume you have some css-related projects/tasks in mind that you'd like to be able to tackle yourself. I would pick one of those and jump in at the deep end. Although a small goal like restyling something that already works is probably better than starting from scratch. For a completely abstract task, you could try developing a stylesheet for markdown html output. Vanilla CSS is good enough (and browser support consistent enough) now that you don't need to use any compilers/frameworks to get started. If you find yourself struggling for design inspiration, try to re-produce an existing design without seeing how they did it.
- 3y ago
- chx 3y agoTo join the chorus: I have learned assembly on the Z80 still behind the Iron Curtain. It was long ago. It's logical and as such it's real easy. Sure, it's a bit more tedious than higher level programming languages but oh well. Now, what little I know of CSS made me very firmly refuse to work with it. I do backend work, I let the frontend people make their magic.
- ww520 3y agoCSS is difficult because the complexity and inconsistency of mixing the intrinsic styles of HTML tags and CSS styles. For example, width can be set on <div> but has no effect on <span>. You have to set its display to inline-block. Another example, <a> has its default colors. Setting CSS colors on the parent element has no effect on the <a> colors, which defeats the CASCADE nature in CSS. You have to apply the styling on <a>. But some styles like font-size does get through from parents. Another example, text overflows out of bound by default. You have to do the trick of turning off overflow. It feels like setting the bound has no effect. CSS just has lots of inconsistencies and requires knowing many little tricks to use it effectively.
- Terretta 3y ago> inconsistency of mixing ... width can be set on <div> but has no effect on <span> One of these is a division of layout, one of these spans the thing it wraps. The <span> should span the span of the content. The affordance of an anchor hypertext reference <a href> was supposed to be consistent for usability, and the <a> is on the link aspect, not on the text. The text that's inside the <a>here</a> is part of the text on either side of the anchor, and should of course reflect the font size etc., because the font applies to the text, while the <a> style applies to the indication/affordance of anchorness. And, you can pick what you want the a to be given which division or span of content it's in, and the most specific style will apply: https://jsfiddle.net/mD5us/4/ https://jsfiddle.net/mD5us/4/ Arguably, both of these are not just consistent, but the way it should work in principle given the apples and oranges you're comparing.
- ww520 3y agoYes. All these are "supposed" to work the way they are and they are given good reasons, but it still doesn't negate the facts that the same CSS style has different effects on different tags. The <span> tag is a good example. As a user of CSS, when I apply a width to a span, I want its width set. I don't care it spans items. If I want span to have no width, I would just leave it alone. The fact that setting the width spells my intention clearly to restrict its width. In regarding to the selective application of colors and font-size on <a>text</a>, both the colors and font-size are styles that affect the text of the link. Why does one go through and the other doesn't? Don't you want consistent appearance of the link both in colors and font-size, in the name of affordance?
- kazinator 3y agoHere is the thing. In declarative languages, you generally specify what you want, rather than how you want it calculated. Not so in CSS! It's thoroughly declarative, but in a way where you're fiddling with a whole lot of "how", whereby the "what" disappears in the fray. Differential equations are declarative too, but likely a bad way for most users to be asked to specify how something should move across the screen.
- kazinator 3y agoHow do you create a mouseover effect for every third child of some element in assembly language, and is it as easy as CSS? :)
- microflash 3y agoAs with any other technology, difficulty is relative and a function of experience. For me, CSS is easy even though I rarely work with it professionally (I mostly work on backend and infrastructure these days). Yes, there are scenarios where I get stumped but a vast amount of literature and helpful community gets me to places I need to be, just like many other technologies.
- commandlinefan 3y agoI understand assembler. I still don’t understand CSS.
- paleface 3y agoA rather ridiculous assertion, if you ask me. CSS is quite easy to grok, if one already knows HTML. Now, if one’s using some sort of “framework”, rather than iterating from scratch - then I could agree - but then one has to blame the framework, not the language. Too many people introduce unnecessary complexity, flinging on framework, after framework, when their time would be better served, learning CSS from first principles.
- mediumsmart 3y agoThe whole of css is difficult but it’s a non issue because you leave all the obsolete stuff out when using and learning css. Grid is for placement, box-model is border-box, flex you don’t use and !important means your css is too complicated so go back and fix that. Of course your html does not have a single div, you don’t put nav into ul etc. and all is good.