HNHacker News
TopNewBestAskShowJobs

Kwantuum

346 karma · joined December 7, 2019

submissionscomments
Kwantuum··on What's Inside the EU Green Pass QR Code?
Your id does not contained a cryptographically signed vaccination status, which this is.
Kwantuum··on Advanced console.log Tips and Tricks (2020)
console.dir does the same thing as console.log in every modern browser. I'm tired of seeing this "tip", and it's a pretty clear indication the article is poorly researched, the only difference is that it pre-expands the object.
Kwantuum··on Choose Boring Technology (2015)
The thing is, if you have any sort of front-end that is not entirely server-side rendered, you're going to have to work in JS at least some of the time. If your back-end is also in JS, you now get the benefit of isomorphic code for things that you may want to do on both front-end and back-end.

Then there is also the fact that JS is actually a pretty great language if you know how to avoid the footguns. Granted that's not always easy, but it's a language with lexical closures and easy and familiar syntax, it's also very expressive and has a vast ecosystem supporting it. And you can even add the typescript compiler on top if you want compile-time type-checking.

It's also async out of the box, and while that doesn't solve all problems, it scales surprisingly well with no performance tuning whatsoever, it even has decent asynchronous primitives that make it easier to write correct code.

Kwantuum··on Choose Boring Technology (2015)
That repo is interesting. A quick ctrl+F seems to indicate that pretty much every instance of "MongoDB" is "Moving from Mongo to Postrges or DynamoDB" (there is one single entry of moving to Mongo from MySQL). Almost as if Mongo is just not a good database (or people are too eager to use it for things which it does not do well).
Kwantuum··on Github1s – One second to read GitHub code with VS Code
Search appears to only work once the files are cached, if you open a file then close it, search will find it.
Kwantuum··on An experiment in teaching a language without relying on translation
> Spoiler: it takes children years and years of near-constant, directed input to acquire their native language to a high degree

You seem to be contrasting this with the implication that it doesn't take adults years of near consta

Kwantuum··on Gary Taubes: 'Obesity isn’t a calorie problem, it’s a hormone problem'
Just wanted to let you know, although it's been a few days, that I genuinely appreciate this reply. I am curious why this got downvoted. It adds context to one of my uncertainties (the exact mechanism for increased satiety under keto) and adds more context as to why obesity is unhealthy in the first place and how the original article is extremely reductive. I don't know of any way to enable notifications for replies to my comments (be it via email or on HN itself) so if anyone knows please let me know!
Kwantuum··on Software engineering topics I changed my mind on
In javascript it's pretty easy to write a function for partial application in either order, you can curry functions forward or backward.

    const map = (arr, mapper) => arr.map(mapper); // Non "traditional" order for arguments
    const curry = f => (...first) => (...second) => f(...first, ...second); // Classic currying: partially apply arguments to the start
    const reverseCurry = f => (...second) => (...first) => f(...first, ...second); // You might want to reverse() first and second depending on the desired syntax
    const arrayMapper = curry(map)(array); // Usually not that useful, more common to map over many arrays with the same function than to map over the same array with many functions
    const funcMapper = reverseCurry(map)(func); // Same benefits as having the classic argument order in the first place
If you're working in a code base that doesn't already implement "most specific argument last", or does so inconsistently, it's very easy to write partial application functions for both cases. If your functions aren't variadic you can even get over the clunky double call syntax by checking the total number of arguments passed thus far, and if it's greater than or equal to the function's "length" (the number of named arguments that it takes) call it, otherwise return the partially applied function, something that is sometimes known as "autocurry".
Kwantuum··on Gary Taubes: 'Obesity isn’t a calorie problem, it’s a hormone problem'
The entirety of the comments seem to be either saying "This guy is a genius and is 100% right" or "This guy is talking out of his backside".

The scientific consensus on weight loss is pretty clear: all forms of diets are similarly effective when you control for calorie intake. Low carb diets work, low fat diet work, intermittent fasting works, plain old fasting works, McDonald's diet and Twinkie diets work. This is nothing new and calorie deficit is always the best predictor regardless of the diet type.

He seems to make the argument that high insulin causes fat to accumulate and as such reducing carbohydrate lowers insulin and increases weight loss, but I have yet to see any evidence that a high-calorie keto diet will result in weight loss.

The general consensus as to why keto works for some people is that it makes hunger management easier, although AFAIK there is no mechanism that has been clearly identified as being the main responsible, people who succeed on keto report higher levels of satiety after meals, but the same can be said of many other diets for people on which they work.

There's a paragraph in there about keto being restrictive and he's basically dismissing the claim with "it feels less restrictive for people who feel less hungry on keto", which, fair enough but I don't think that enough evidence to say "promoting the keto diet will address the obesity problem". There may well be tons of people for whom keto is too restrictive, because they won't feel less hungry after meals.

In the end, the best diet is the one you can stick to. For some people that's keto, for most people it's portion control, for others it may be intermittent fasting, for others it may be offsetting their food intake with exercise. In the end, I think it's harmful to promote any specific diet as "the cure to obesity", and it's far better to encourage people to try out different diets rather than giving them the idea that "if this diet won't work, nothing will". Try different things out and see what works for you.

Kwantuum··on 20 months, 2K hours, 200K € lost. A story about resilience and sunk cost fallacy
What the comment you're replying to is saying, is that if you were deeply obsessed with the problem, you wouldn't have to think twice to make trade-offs. If the problem you're solving really needs solving right now, you will always make the trade-off that gets your solution into the world faster. You're not obsessed with the fact that teams all over the world could have less sucky meetings if they had an even incomplete version of your product in hand right now.
Kwantuum··on Learnable Programming (2012)
> To be fair "seeing" doesn't necessarily mean drawing vector graphics, any advance helping reveal hidden structure of a codebase or generate better documentation would also allow us to better "see" the working of the code... I'm all for that!

This is basically what a good debugging environment is. Some of the best tooling out there is the dev-tools of modern browsers: you get a regular debugger where you can step through code and see the state, you also get some performance and memory visualization tools, you get an interactive html editor in which changes are reflected in real time, you get color pickers when modifying css colors, you can visualize the timing of requests, and you get autocomplete propositions all over the place.

Kwantuum··on Learnable Programming (2012)
This comment completely misses the point. The article's title is "Learnable Programming: Designing a programming system for understanding programs"

This is not an article about how to teach or learn programming, this is about creating an environment inside of which learning is made easier.

Try giving a freshman a binary search program with an interactive visualization like the ones shown in this article that they can play with, and see if they still struggle with it. Same goes for the permutations. You don't have to teach anything when you can let someone experiment and teach themselves how something works. At the end of the day, true learning always hinges on personal insight, and the best teaching methods are those that make it easiest for a person to extract insight.

Kwantuum··on This electrical transmission tower has a problem
Fires can start from natural causes too. It's ignorant to say that this sort of disaster can be prevented by fixing behaviour, and it's a special form of hubris to think that you can "unstupid" everyone. This is the worst plan you can have. Relying on all individuals not doing something stupid for a long time is a lost cause, just look at the state of covid in the US. There are people literally throwing parties or sending their kids to school while they know that they have covid.
Kwantuum··on On finally learning to program at the age of 40
Isn't ActionScript just a dialect of EcmaScript? I would guess transitioning from that to Javascript would be pretty easy.
Kwantuum··on Most common mistakes during interviews
I've recently started doing interviews for my company, and while there are definitely candidates that we have been on the fence about accepting that would probably have been a great fit, in the end, the false positive rate is more important to us than the false negative rate. Maybe we missed out on some great candidates but the criteria we used to evaluate them also allowed us to avoid a lot of very bad candidates. The perfect interview process doesn't exist, we have to make do with the fact that whatever the interview process is, we will miss out on great candidates and end up making an offer to candidates that will not work out. But indeed: for candidates, this means that you shouldn't take rejections to heart too much: you might have been a great fit for the role and a bad fit for the interview process. If you're consistently getting rejected for positions for which you believe you are qualified, maybe you need to get better at interviews, or maybe you're not as qualified as you may think.
Kwantuum··on Scrollbar Blindness
> One demographic I would expect traditional mouse usage from would be gamers.

Why would you expect that? What concrete advantage does a mouse have over a trackpad for gaming that doesn't translate to regular use?

Kwantuum··on Scrollbar Blindness
To equate lack of peripheral support to "bugs" is hilarious.
Kwantuum··on Pure Skill Minesweeper
Crashed with "Error: Infinite loop suspected while learning"
Kwantuum··on Write Your Own Virtual Machine
they're the odd days except for 2.
Kwantuum··on ‘AeroNabs’ – Inhalable Protection Against Covid-19
Right, but they do have the potential to also be used as treatment then? Considering they're easier to manufacture than synthetic antibodies.
Kwantuum··on ‘AeroNabs’ – Inhalable Protection Against Covid-19
Since you seem well informed: does the research mention anything about use as an aerosol and why that might be considered before internal use?
Kwantuum··on We quit our jobs to build a cabin
Same. Video game development is some of the hardest, most thankless, woefully unstable software job there is. It's not worth it.
Kwantuum··on Why forgiving someone else is about you
> When do I just call it quits?

Ten years ago. The second best time is right now. You do not have to take abuse from them because they are family. "the past is the past, people have flaws" is only valid for things that are actually in the past. Sounds like your parents' abuse would be much easier to deal with if it was a part of the past.

Kwantuum··on Remote work is not necessarily a good thing for the worker
> they have to write an email detailing what work they actually want done, not walk over and reel off half a dozen brain farts leaving no evidence of what they asked for

This has still been happening where I work, instead of walking over they hop on the voice channel, same old.

Kwantuum··on The Art of the Interpreter (1978) [pdf]
The paper is dense with ideas and 70 pages long, had I found it the minute it was posted, I still would not have been done reading through it and understanding its contents by the time you posted your comment. And I just don't have that kind of time to spend when I'm browsing hacker news.

Considering this is also a "news" site, I would guess a lot of people (I know I do) simply browse it quickly to keep an eye on the technical landscape as well as for ideas for future technical exploration.

I think if you want engagement on "non-scannable" pieces like this one, you would be better served by a sort of "book club" system, where people can submit long-form content and vote on it to pick one for discussion a week later. This seems like a cool idea actually. Might have to play with it.

Kwantuum··on Code only says what it does
Self-documenting code is not a judgment that you can pass on your own code: that's the role of code review.

95% of the code you write day to day should be clear enough that someone who didn't write it can understand it on first read (the reviewer). If they can't, you probably need to rewrite the code so that it is clearer, not comment it. That's what self-documenting code is.

Instances where the code needs comments to be understandable are rare.

Kwantuum··on Brython – A Python 3 implementation for client-side web programming
> people coming from Python that don't wish to learn an entire new language

I see this argument all the time but I just don't get it. Python and Javascript are remarkably similar, they have different syntax and the metaprogramming side of things is quite different but aside from that, it's really not a big jump.

Kwantuum··on What is the core of the Python programming language?
Just as a curious reader, what exactly is it that makes you very much prefer Python to JS? As someone who uses both professionally I rarely if ever miss Python features in JS (or vice versa for that matter, aside from the lack of multi-line anonymous functions or block scoped variables in Python)
Kwantuum··on 11 Foot 8 – The Can-opener Bridge
From the video, it looked like the truck braked faster than I would expect a human driver. I wonder if that water-curtain stop sign tripped up the truck's anti-collision braking system, that sounds like it would be a good target for such systems!
Kwantuum··on One word in PostgreSQL unlocked a 9x performance improvement
Well it's not just the obvious behaviour, it seems like the only useful behaviour, just like the default is returning the number of affected rows (which for insert, would be the number of inserts). You know ahead of time how many items you're trying to insert, it would be completely pointless to return that.
← PreviousPage 2 of 4Next →