News for hackers. Stuff that matters.
Re:Ask HN: How does HN manage to be always online? by kasey_junk on Tuesday June 21, 2022 @06:57AM (#31822487)
HN is perhaps the most user friendly site I go to with regularity.

The idea that a website needs to be “rich” to be usable is one of the dumbest things the industry has convinced itself of in the last 20 years (following only ‘yaml is a smart way to encode infrastructure’).

Re:Ask HN: How does HN manage to be always online? by ASalazarMX on Tuesday June 21, 2022 @02:06PM (#31827121)
To be fair, it's not as much user-friendly as it is simple, and simple tends to be easier to understand.

For example, if it was more user-friendly, it could have links to jump between root comments, because right now very popular top comments tend to accumulate most interactions, and scrolling down several pages to find the next root thread requires effort.

Re:Ask HN: How does HN manage to be always online? by howenterprisey on Tuesday June 21, 2022 @02:50PM (#31827579)
Is that not what the "prev"/"next" links do?
Re:Ask HN: How does HN manage to be always online? by Terretta on Tuesday June 21, 2022 @04:46PM (#31828928)
User on this account since 2010, 12K karma, and I just learned what next does.

TY!

Re:Ask HN: How does HN manage to be always online? by ASalazarMX on Tuesday June 21, 2022 @09:57PM (#31831231)
Duck me sideways, they were always there, but I was blind.
Re:Ask HN: How does HN manage to be always online? by smitty1e on Tuesday June 21, 2022 @07:27AM (#31822669)
Compulsive over-engineering is by no means an IT-centric problem.

It takes substantial wisdom to arrive at an 80% solution and cease fannying about.

Re:Ask HN: How does HN manage to be always online? by xyproto on Tuesday June 21, 2022 @10:34AM (#31824405)
And the people that brings this wisdom also brings few or no metrics that are appreciated by management.
Re:Ask HN: How does HN manage to be always online? by fisf on Tuesday June 21, 2022 @12:53PM (#31826197)
The people who push the other direction also bring few or no metrics. I.e. there is often no reason to add <bag of features>, except a customer (who didn't buy the product yet) mentioned them as nice to have during initial sales talks.
Re:Ask HN: How does HN manage to be always online? by laputan_machine on Tuesday June 21, 2022 @07:53AM (#31822841)
I prefer YAML to JSON for our infra. I know some people do not like the whitespace.

What do you prefer?

Re:Ask HN: How does HN manage to be always online? by ElectricalUnion on Tuesday June 21, 2022 @10:49AM (#31824581)
JSON:

* doesn't encode Norway to false;

* most formatters for JSON are deterministic.

* doesn't deserialize into arbitrary objects;

YAML, in in constrast...

* YAML is insecure by default and will deserialize into arbitrary objects;

* YAML knows that there's no such thing as wall clock time, there's only number of seconds since midnight;

* YAML has 22 ways of writing true or false, and the parser will silently replace your "strings" with false.

* There are 63 ways of writing multi-line strings;

* A truncated YAML file is still a "valid" YAML file.

https://noyaml.com/

Re:Ask HN: How does HN manage to be always online? by hombre_fatal on Tuesday June 21, 2022 @01:38PM (#31826828)
IMO the solution to YAML-as-config is a strict subset of YAML.

JSON is one strict subset, but one that makes smart trade-offs for strictness and machines like error detection and syntax-typed types.

We decided on a different subset of YAML for our users that were modifying config by hand (even more strict than StrictYAML). Some of the biggest features of YAML are that there is no syntax typing, and collection syntax is simple (e.g. also true for JSON, false for TOML).

For example, a string and a number look the same. This seems bad to us developers at first, but the user doesn't have to waste 20 min chasing down an unmatched quote when modifying config in a <textarea>. Beyond that, it's the same amount of work as making sure the JSON is `"age": 20` instead of `"age": "20"`, one just has noisier syntax.

I think the StrictYAML docs have a great breakdown of the advantages: https://hitchdev.com/strictyaml/why-not/

We decided against TOML because nesting is too confusing. https://github.com/toml-lang/toml/issues/846

Re:Ask HN: How does HN manage to be always online? by withinboredom on Tuesday June 21, 2022 @08:16AM (#31822967)
Declarative code. CSS is better than YAML for describing a desired state.
Re:Ask HN: How does HN manage to be always online? by jjeaff on Tuesday June 21, 2022 @06:44PM (#31829954)
Not on mobile.
Re:Ask HN: How does HN manage to be always online? by manojlds on Wednesday June 22, 2022 @12:18AM (#31831975)
Thanks for the downvotes everyone, else wouldn't have even known there were so many replies to my comment.