Live data from Hacker News

It takes a PhD to develop that

blog.royalsloth.eu

331–340 of 429 posts

Re: It takes a PhD to develop that

#331

This is both annoying and understandable. For the dev team, to dive into this performance optimization would mean punting something else from their roadmap. I suspect they weighed their perceived chances of success against the projected cost and reached a certain conclusion which in retrospect seems wrong. The independent developer did not have that "hurdle" as he simply did this at the expense of whatever other fun…

I remember clearly when I first gained a real appreciation for the importance of measuring and considering your actual data. I was trying to optimize a slow project doing some polyhedron dissection on large (~1M polyhedrons) meshes in real-time. As a first attempt I had my sights set on a function which tried to find a certain point on a surface by making an educated guess and then iteratively bumping its estimate in…

> I realized my constant time solution required a number of expensive operations including sqrt and the iterative approach ran on average ~1 iteration

Yeah! It's deeply unsatisfying to forego algorithmic optimization but it often isn't necessary.

EG, when I do Advent of Code, I often write a naive algorithm that works correctly on the sample input, and then runs a really long time on the actual problem input. Before I go redo the algorithm, I often run it with PyPy instead of the standard Python, and 80% of the time it terminates quickly enough.

Similarly, whenever I happen to do AoC in C++, my naive algorithms happen to magically be fast enough out of the box so I don't even think about better algorithms. It's unfortunately counter to the intuition that you get from a CS programs that obsess with Big-O notation rather than implementation speed.

Big-O is really important but it seems like the input size where it starts to dominate implementation is much larger than our intuition suggests.

(of course it's also easy to write really bad algos that suck even on small input)

Re: It takes a PhD to develop that

#332

Yup, this. Something I've been ranting about[0] for a while: there is no technical progression ladder. The Senior->Principal-> ... path seems to be a faux-management track, with all the managerial responsibilities and little of the authority. Software is shitty in big part because it's mostly written by juniors, as almost anyone who has any clue moves over (or gets pushed over) to managerial or faux-managerial roles.…

Juniors are beginners, learners, apprentices, and are bound to make mistakes and design things poorly. The issue is there are so few high-quality engineers relative to the demand, and it's hard to prove who is high-quality before they're onboard for a few months. So, if someone is high-quality, you really don't want to lose them, so you promote them, pay them more, try your best to keep them on-board. There's a benefit to elevating them out of the weeds, because often they can glance at the weeds and tell someone else how to clean it up easily, without spending their effort to actually do it.

Furthermore, they can glance at 10 patches of weeds, 10 junior engineers, and find the couple that need more guidance than the others. They can leverage their knowledge through others, assessing their strengths/weaknesses as coders in ways juniors never could.

Re: It takes a PhD to develop that

#333

Earlier quoted context omitted.

which is exactly the point, the amount of shortcut taken to convert code point to fast graphics make it just a nice hack thrown together and devs were right on preferring the slow but correct approach.

That is a terminal bug and not a rendering bug though, since the problem was that the terminal didn't properly fetch your user settings here. Feeding the same character into the other rendering would cause the same issue. Nobody said he made a fully functional better terminal, just that the terminal rendering was better and functional. Doing everything needed for a fully functional terminal is a lot of work, but doin…

> Nobody said he made a fully functional better terminal

> The "complaining developer" produced a proof of concept in just two weekends that notably had more features[1] and was more correct than the Windows Terminal!

easily falsifiable bullshit found to be false.

https://news.ycombinator.com/item?id=28744084

Re: It takes a PhD to develop that

#334

Earlier quoted context omitted.

which is exactly the point, the amount of shortcut taken to convert code point to fast graphics make it just a nice hack thrown together and devs were right on preferring the slow but correct approach.

That is a terminal bug and not a rendering bug though, since the problem was that the terminal didn't properly fetch your user settings here. Feeding the same character into the other rendering would cause the same issue. Nobody said he made a fully functional better terminal, just that the terminal rendering was better and functional. Doing everything needed for a fully functional terminal is a lot of work, but doin…

[deleted]

Re: It takes a PhD to develop that

#335
post #327

Earlier quoted context omitted.

You've lost the original point: everyone was pretending this refterm was ready to replace the terminal app, criticizing microsoft for taking the slow but sure approach: > The "complaining developer" produced a proof of concept in just two weekends that notably had more features[1] and was more correct than the Windows Terminal! But now apparently pointing out that "MS was right not to want to take shortcut in unicode…

>refterm was ready to replace the terminal app Considering Casey himself puts front and center the disclaimer that this is solely intended to be a reference and goes into as much detail in his videos I don't know where you got this from. I don't think anyone is under the illusion that this is could replace the actual terminal. It's just meant to show that there's a minimum level of performance to be expected for not…

> I don't know where you got this from.

from the fucking part I fucking quoted for your fucking convenience? here I'll even give you a link https://news.ycombinator.com/item?id=2874408

I've never said the claim was Casey's

Re: It takes a PhD to develop that

#336
post #262

I'm not sure "It doesn't take a PhD, just years of experience" is quite the rejoinder the author thinks it is. Aren't they both just ways of saying "It takes someone with a rare subset of highly specific knowledge to solve this problem"? The MS person was saying "Sure, there's probably a way to make this faster but I don't have anyone on my team who knows how to do that. If I had the budget to go out and hire someone…

It's not really what the MS devs said though: "I believe what you’re doing is describing something that might be considered an entire doctoral research project in performant terminal emulation" This seems to mean, nobody has ever done that, it is a research project (a doctorate thesis must be about something that has never been researched before, at least where I live). This particular problem cannot be a PhD subject…

So the comment that the 'PhD' reference was responding to was Muratori laying out how he figured a simple terminal renderer could be implemented, using two texture lookups in a single drawcall [0].

In the course of that, Muratori allowed, almost in passing, that of course you would need, in order to do that:

> a glyph atlas encoding the cell-glyph coverage in whatever way makes it easiest to compute your ClearType blending values

Now, it does not strike me as beyond the realm of possibility that that step might be suitable for academic research. It calls for an efficient encoding of cleartype-ready glyph data with comprehensive coverage of unicode glyph space (not codepoint space). That's not trivial, and - as the DHowett reply suggests - it would take a literature review to determine if someone has already accomplished this (and he also suggested that so far as he was aware this was not how any other terminal was implemented, implying this is not simply some well known solved problem).

I mean, sure, he could be wrong about that - it might be exactly how another terminal implements it; there might already be published research on the topic; or it might just be much simpler than it appears. But it's not crazy to, on glancing at that problem, consider that it seems like it might actually require genuine original high level research.

[0]: https://github.com/microsoft/terminal/issues/10362#issuecomm...

Re: It takes a PhD to develop that

#337
post #196

Earlier quoted context omitted.

Seconding. It takes doing some low-level gamedev[0] stuff, or using software written by people like Casey, to realize just how fast software can be. There's an art to it, and it hits diminishing returns with complex software, but the baseline of popular software is so low it doesn't take much more than a pinch of care to beat it by an order of magnitude. (Cue in the "but why bother, my app is IO bound anyway" counter…

I feel obliged to point out the destructive power of Knuth's statement, "Premature optimization is the root of all evil." I have encountered far too many people who interpret that to mean, "thou shall not even even consider performance until a user, PM or executive complains about it."

It's hilarious to me that people quote the person that wrote TAOCP to justify not thinking about performance at all.

Re: It takes a PhD to develop that

#338

Earlier quoted context omitted.

I remember clearly when I first gained a real appreciation for the importance of measuring and considering your actual data. I was trying to optimize a slow project doing some polyhedron dissection on large (~1M polyhedrons) meshes in real-time. As a first attempt I had my sights set on a function which tried to find a certain point on a surface by making an educated guess and then iteratively bumping its estimate in…

> I realized my constant time solution required a number of expensive operations including sqrt and the iterative approach ran on average ~1 iteration Yeah! It's deeply unsatisfying to forego algorithmic optimization but it often isn't necessary. EG, when I do Advent of Code, I often write a naive algorithm that works correctly on the sample input, and then runs a really long time on the actual problem input. Before…

Unfortunately this was a case where the naive algorithm wasn't fast enough so we needed to optimise. But this particular part of it wasn't the solution.

We instead ended up changing our data format in a way which reduced cache misses.

Re: It takes a PhD to develop that

#339

Earlier quoted context omitted.

You've lost the original point: everyone was pretending this refterm was ready to replace the terminal app, criticizing microsoft for taking the slow but sure approach: > The "complaining developer" produced a proof of concept in just two weekends that notably had more features[1] and was more correct than the Windows Terminal! But now apparently pointing out that "MS was right not to want to take shortcut in unicode…

> everyone was pretending this refterm was ready to replace the terminal app Who said that? Refterm isn't a fully functional terminal, it is just a terminal renderer bundled with a toy terminal.

> Who said that?

the fucking original post I fucking answered to? https://news.ycombinator.com/item?id=2874408

Post reply on HN