News for hackers. Stuff that matters.
Re:Ask HN: How does HN manage to be always online? by arnaudsm on Tuesday June 21, 2022 @06:48AM (#31822418)
Weird, I thought you needed 1024 Kubernetes nodes, a 70mb React bundle and 200 engineers to host 50M monthly sessions.
Re:Ask HN: How does HN manage to be always online? by Aeolun on Tuesday June 21, 2022 @06:56AM (#31822470)
How do you host 50k monthly sessions per node?! That’s like 0.02 sessions per second.
Re:Ask HN: How does HN manage to be always online? by yuppie_scum on Tuesday June 21, 2022 @07:27AM (#31822670)
I see what you did there!
Re:Ask HN: How does HN manage to be always online? by goodpoint on Tuesday June 21, 2022 @07:20AM (#31822623)
Hire 200 engineers and they'll find a way to justify 1024 k8s nodes.
Re:Ask HN: How does HN manage to be always online? by highlytedious on Tuesday June 21, 2022 @12:21PM (#31825720)
HN is a very simple application. Handling a high volume of traffic for a simple application is a very different problem from scaling a highly complex application.
Re:Ask HN: How does HN manage to be always online? by sumy23 on Tuesday June 21, 2022 @11:28PM (#31831709)
HN is simple, yes. But it could be made more complicated. Personalized feed and data analytics are two complicated things that come to mind. Staying simple is often a choice, and it’s a choice not many companies make.
Re:Ask HN: How does HN manage to be always online? by krapp on Wednesday June 22, 2022 @05:03AM (#31833555)
YCombinator doesn't need to run a Google Analytics script to have all the analytics they want.
Re:Ask HN: How does HN manage to be always online? by postalrat on Tuesday June 21, 2022 @12:34PM (#31825902)
What would make hn a simple application and reddit a highly complex application?
Re:Ask HN: How does HN manage to be always online? by hombre_fatal on Tuesday June 21, 2022 @01:26PM (#31826648)
HN is a straight forward forum. Reddit is one level above that: generalized forums as a service.

Anything HN has had to implement, Reddit has to implement at a generalized, user-facing level, like mod tools.

Frankly, we underestimate how hard forums are, even simple ones. I learned this the hard way rebuilding a popular vBulletin forum into a bespoke forum system.

Every feature people expect from a forum turns into a fractal of smaller moving parts, consideration, and infinite polish. Letting users create and manage forums is an explosion of even more things that used to be simple private /admin tools.

Re:Ask HN: How does HN manage to be always online? by systemvoltage on Tuesday June 21, 2022 @01:54PM (#31826986)
Mod tools are not accessed and used by all users. So the load of mod-tools on the servers is probably negligible.

I agree, most software is deceivingly simple from the outside. Once you start building it, you become more humble about the effort required to build anything moderately complex.

Re:Ask HN: How does HN manage to be always online? by vel0city on Tuesday June 21, 2022 @03:14PM (#31827895)
Mod tools aren't used by the majority of users, correct. But the existence of mod tools does make the logic and assumptions of the application different. Now you've got a whole set of permissions and permissions checks, additional interfaces, more schema, etc.

Its not that the mod tools are constantly being used, its that there's now potentially far more code complexity for those tools to even exist.

Re:Ask HN: How does HN manage to be always online? by lifthrasiir on Tuesday June 21, 2022 @12:41PM (#31826008)
User interaction, moderation, embedded media, a way more subreddits and different opinions they have, and so on.
Re:Ask HN: How does HN manage to be always online? by lma21 on Tuesday June 21, 2022 @01:14PM (#31826493)
is reddit really a complex application (regardless of how they build, scale, or deploy it)? Although that makes me wonder, what makes an application complex?
Re:Ask HN: How does HN manage to be always online? by butterNaN on Tuesday June 21, 2022 @01:36PM (#31826797)
I'll start with a crude metric: Number of bubbles in the use-case diagram
Re:Ask HN: How does HN manage to be always online? by eejjjj82 on Thursday June 23, 2022 @09:17AM (#31848658)
Hiring 200 engineers
Re:Ask HN: How does HN manage to be always online? by fsociety on Tuesday June 21, 2022 @01:55PM (#31827001)
Because HN hasn't changed in forever, and behind the scenes the Reddit codebase is constantly evolving and growing.
Re:Ask HN: How does HN manage to be always online? by krapp on Tuesday June 21, 2022 @03:52PM (#31828349)
Hacker News changes more often than people think, just not the layout because people here are weirdly fetishistic about it.

Since I've been here they've added vouching for banned users (and actually warning people beforehand) thread folding, Show HN, making the second chance pool public, thread hiding, the past page, various navigation links and the API. They've also been trying to get a mobile stylesheet to work. They've also mentioned making various changes for spam detection and performance. And the url now automatically loads a canonical version if it finds one, and the title is now automatically edited for brevity. And I've probably missed a few things.

And HN isn't a simple application by any means. Go look at the Arc Forum code - it isn't optimized for readability, or scalability or reliability, but joy - for the vibe of experimental academic hacking on a Lisp. It's made of brain farts. Hacker News is probably significantly more complex than that for being attached to a SV startup company and running 'business code' and whatnot.

Re:Ask HN: How does HN manage to be always online? by orf on Tuesday June 21, 2022 @04:18PM (#31828642)
I mean, that’s not really that much is it. And that’s the point, HN really doesn’t change much. Whereas Reddit, for better or for worse, has a much higher output of new user facing features.
Re:Ask HN: How does HN manage to be always online? by mr_toad on Tuesday June 21, 2022 @10:48PM (#31831496)
> What would make hn a simple application and reddit a highly complex application?

Engineers.

Re:Ask HN: How does HN manage to be always online? by Shounak on Tuesday June 21, 2022 @12:37PM (#31825946)
Running ads, for one
Re:Ask HN: How does HN manage to be always online? by numpad0 on Tuesday June 21, 2022 @07:46AM (#31822797)
Is the configuration stupid, or, is it somehow imperative that work is distributed over 200 local engineers + over 70MB of externalities?
Re:Ask HN: How does HN manage to be always online? by nikanj on Tuesday June 21, 2022 @07:50AM (#31822816)
When a VC gives you a giant boatload of money, they insist you "scale up" the company overnight. So you go on a massive hiring spree, and get triple-digit team of engineers before having any market traction.

And they're tasked with building a product that can handle Google-levels of demand, though they currently only have two customers, neither of them paying.

It indeed is imperative, but not for technical reasons.

Re:Ask HN: How does HN manage to be always online? by cosmodisk on Tuesday June 21, 2022 @01:59PM (#31827047)
And then when the stock market drops by .1%, you lay off 30% of the workforce because that's what's needed for its survival.
Re:Ask HN: How does HN manage to be always online? by rafale on Tuesday June 21, 2022 @12:41PM (#31826019)
I would take the money then do none of that. And now I got a 5 years runway, enough time to build a product people like and use, and by then the investors won't be angry anymore.
Re:Ask HN: How does HN manage to be always online? by pharmakom on Tuesday June 21, 2022 @05:47PM (#31829477)
You would never get the money with this plan.
Re:Ask HN: How does HN manage to be always online? by 10000truths on Wednesday June 22, 2022 @04:06AM (#31833242)
If the money comes with a stipulation that I have to spend it all in such a way that I screw myself and my company over, then I don’t want the money.
Re:Ask HN: How does HN manage to be always online? by numpad0 on Wednesday June 22, 2022 @12:05AM (#31831906)
And is it because those strawman VCs are all stupid, or, is it somehow ...
Re:Ask HN: How does HN manage to be always online? by thirtyfivecent on Tuesday June 21, 2022 @07:57AM (#31822866)
They do that so you're screwed later on without them when that first bit of money starts to run out and boom they own your company
Re:Ask HN: How does HN manage to be always online? by manojlds on Tuesday June 21, 2022 @06:51AM (#31822439)
HN is not user friendly. Better comparison is Stack Exchange which is way more rich and runs on small (relative) infra.
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.
Re:Ask HN: How does HN manage to be always online? by spinningslate on Tuesday June 21, 2022 @06:58AM (#31822490)
>Stack Exchange which is way more rich and runs on small (relative) infra.

Yes, I've heard that SO runs on relatively simple and modest infra. And agree that would be a good example.

>HN is not user friendly

How so? I find the HN UX a refreshingly simple and effective experience. It might not have all the bells and whistles of newer discussions fora, but it doesn't obviously need them. I'd say it's a good example of form/function well suited to need. Not perfect perhaps, but very effective.

YMMV of course.

Re:Ask HN: How does HN manage to be always online? by withinboredom on Tuesday June 21, 2022 @08:18AM (#31822972)
Try loading it on a 2G (2 bars = 128kbits per second — those are bits not bytes) connection. It loads almost instantly with no fuss. Now try loading virtually any site on the same, if it ever loads at all without timing out, you’ll be waiting over 10 minutes.
Re:Ask HN: How does HN manage to be always online? by twistedpair on Tuesday June 21, 2022 @08:05AM (#31822912)
There was a YT preso from several years back where the StackExchange founder explained how it ran off just ~10 servers, and could run on half that many if needed. He stressed the simplicity of their arch, and that their problem space was massively cachable, so the servers just had a few hundred GB of ram, and only had to do work to rerender pages, but could store them in cache most of the time. It was a C#.Net app.

So, I think there is a lot more in common than you think between HN and SO.

Re:Ask HN: How does HN manage to be always online? by laputan_machine on Tuesday June 21, 2022 @06:57AM (#31822483)
What about HN is not user friendly? I think it's a breath of fresh (stale?) air.
Re:Ask HN: How does HN manage to be always online? by dividedbyzero on Tuesday June 21, 2022 @08:27AM (#31823027)
My pet peeves: No dark mode, sorely lacking for me for reading in the dark, then there is no indication at all that you've got replies (at least a tiny number next to threads perhaps?) and the up/downvote buttons are too small to reliably tap on mobile. Oh, and enumeration support would be fantastic, the workarounds tend to be hard to read.

Other than that, I think it's delightfully ugly and lightweight.

Re:Ask HN: How does HN manage to be always online? by kazinator on Tuesday June 21, 2022 @12:35PM (#31825917)
I use the Dark Reader extension for Firefox; HN looks fine under that.

Having to separately configure individual sites or web apps for dark mode is a nonstarter anyway; if you could do that, would you really want to?

Ideally, you should be able to set your device to dark mode, and everything would follow: every app, every site in the browser.

Some combination of setting your OS to dark mode and using a dark mode extension in the browser sort of approximates that, imperfectly.

Re:Ask HN: How does HN manage to be always online? by SirAiedail on Tuesday June 21, 2022 @06:01PM (#31829592)
No need to set it per individual page. There are (arguably easy to use) ways for a web page to know the user's OS-level color scheme preference [0].

We still need the workaround via extensions or Userstyles for the ones that don't implement that, sadly.

[0] https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...

Re:Ask HN: How does HN manage to be always online? by PickledHotdog on Tuesday June 21, 2022 @08:33AM (#31823077)
You may not be down for an app/mobile experience, but Harmonic is beautiful and has a dark mode
Re:Ask HN: How does HN manage to be always online? by dividedbyzero on Tuesday June 21, 2022 @09:15AM (#31823539)
I can't seem to find Harmonic in the iOS App Store, is it Android-only?

Also, HN apps tend to make it harder to send interesting things to Roam or the laptop or Safari's reading list, the website makes that really convenient.

Re:Ask HN: How does HN manage to be always online? by russelg on Tuesday June 21, 2022 @09:51AM (#31823952)
Thanks for the recommendation, just switched to it!
Re:Ask HN: How does HN manage to be always online? by muzani on Tuesday June 21, 2022 @07:11AM (#31822567)
I believe the internet term is dank air.
Re:Ask HN: How does HN manage to be always online? by FerretFred on Tuesday June 21, 2022 @07:21AM (#31822633)
Yeah! I really miss all those ads (not!)
Re:Ask HN: How does HN manage to be always online? by arnaudsm on Tuesday June 21, 2022 @06:56AM (#31822467)
I agree HN could be improved with small CSS changes, but no backend change would be required.
Re:Ask HN: How does HN manage to be always online? by lm28469 on Tuesday June 21, 2022 @07:12AM (#31822576)
Well the good thing with CSS is that you can override it with your own stuff locally if you wish to
Re:Ask HN: How does HN manage to be always online? by frosted-flakes on Tuesday June 21, 2022 @07:51AM (#31822823)
Tough to do when the entire layout is built with nested tables, like it's still 1999.
Re:Ask HN: How does HN manage to be always online? by D13Fd on Tuesday June 21, 2022 @07:35AM (#31822715)
Tougher to do on mobile though
Re:Ask HN: How does HN manage to be always online? by aaaaaaaaata on Tuesday June 21, 2022 @10:48AM (#31824564)
How does anyone use anything aside from Materialistic?!
Re:Ask HN: How does HN manage to be always online? by stefanvdw1 on Tuesday June 21, 2022 @07:07AM (#31822544)
I wouldn’t say it’s not user friendly but I understand where you are coming from. I also missed some more modern features/looks and decided to build my own open source client [0]. Feel free to give it a go to see if it’s more your taste!

0. https://modernorange.io

Re:Ask HN: How does HN manage to be always online? by SMAAART on Tuesday June 21, 2022 @06:55AM (#31822466)
Re:Ask HN: How does HN manage to be always online? by azangru on Tuesday June 21, 2022 @07:36AM (#31822725)
I love Hacker News. It is very friendly to my phone.
Re:Ask HN: How does HN manage to be always online? by Ologn on Tuesday June 21, 2022 @11:41AM (#31825213)
By rich do you mean popping up a captcha every time I search for something?