Traps to Developers

33 qouteall 8 8/16/2025, 10:34:35 AM qouteall.fun ↗

Comments (8)

skobes · 14m ago
The first "trap" on the page says "min-width: auto makes min width determined by content", but this is false outside of flex/grid.

From MDN: "For block boxes, inline boxes, inline blocks, and all table layout boxes auto resolves to 0."

https://developer.mozilla.org/en-US/docs/Web/CSS/min-width

diggan · 2m ago
I guess the first trap should really be: "You cannot read any CSS property in isolation, as just like what the name implies, defaults and what values end up doing cascades through all the rules your document ends up using"
ngruhn · 33m ago
A recent trap for me:

Regex semantics is subtly different across languages. E.g. a{,3} matches between 0 and 3 "a" characters in Python. In JavaScript it matches the literal string "a{,3}".

danhau · 14m ago
I always use regex101 to develop my regexes. It allows you to switch between different engines.
skydhash · 25m ago
Regex is more a technique than an actual specification. It would be best to find the time to go and read an introductory book about Theory of Computation where they explain the underlying mechanism.
andunie · 38m ago
That's a nice compendium of tips and useful information.

I wonder if anyone can learn from this. I feel like I only understood what I already knew, or at least was very close to knowing. That's the same thing that happens with teaching manuals about any topic: they're organized in a way that makes sense and it's easy for people who already know the topics, but often very bad at teaching the same topics to an audience that doesn't know anything.

skydhash · 29m ago
> with teaching manuals about any topic: they're organized in a way that makes sense and it's easy for people who already know the topic

I think that the reason for a manual existence. To have a written record so we don't have to trust our memory. This is what most unix manuals are. You already know what the software can do, you just need to remember the specificity on how to get something done.

> often very bad at teaching the same topics to an audience that doesn't know anything.

What you need then is a tutorial (beginner seeking to learn) or a guide (beginner/intermediate seeking to do). Manuals in this case only serve to have better questions (Now you know what you don't know).

QuadmasterXLII · 26m ago
CSS and C++ both have the “pick a subset and enforce that, or suffer” nature. On my to-do list: make a github action that requires manual override to merge any pull request with a css attribute not already present