Hacker News new | past | comments | ask | show | jobs | submit login

Unfortunately I feel like there are too many different philosophies behind web design right now to point you to any given site. Mostly because any popular and complex site is going to use some levels of abstraction, i.e. React or Elm or similar. And so a lot of well-programmed websites don't have readable user-facing code. Or, on the other side of the spectrum, there are plenty of sites that value simplicity to the point that they have no-JS, minimal CSS, and super readable HTML. But that's not exactly hard to do.

One of the ways that I learn is by picking out a given HTML tag, for example, from the soup of a website's source code. And then reading the MDN page for that tag, which has information on the idiomatic ways to use it.




> And so a lot of well-programmed websites don't have readable user-facing code.

What does it means "well-programmed" if the end product isn't:

- accessible

- semantically correct

- light (no unnecessary javascript bloat, no unnecessary chains of dozens of divs, no cascading !important, very good performance)

?

I don't buy much the "well-programmed" fable of applications that don't show that in the end result.


My rails app has really nice HTML and CSS. All the class names are logical and lovely to code in.

My rails app takes that lovely HTML and CSS, and (in the middleware) it makes it look really ugly. It removes all the sugar, white space, newlines and SCSS niceness. It replaces all the lovely class names with numbered class (c1, c2...). It removes unused classes from the CSS.

So... it's well programmed, and very ugly when viewed by the user. It's smaller and semantically correct, but reading it client side is not really possible for a human, or a scraper (because the class names change)

Now the ugly HTML/CSS is displayed rather nicely, so the end results are (to the user) nice.


I’m arguing that at a certain scale, writing HTML by hand is unmaintainable, and so the best option is to use a framework like Elm. Elm is going to compile and minify into unreadable JS that then generates likely-unreadable HTML. (I’m using Elm as an example since its syntax is so different, but the same applies for Reactor whatever the kids are using these days.)

I’m not disagreeing with you so much as giving my own tangential perspective.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: