HNHacker News
TopNewBestAskShowJobs

Kwantuum

346 karma · joined December 7, 2019

submissionscomments
Kwantuum··on The boring technology behind a one-person Internet company (2018)
Who the hell would consider this stack to be boring? There's so many moving parts for a single person operation, seems pretty insane to me that anyone would consider this boring.
Kwantuum··on Next dream job can be in an HTTP header
Even some electron apps have this. Discord is one I can think of off the top of my head.
Kwantuum··on Show HN: This Word Does Not Exist
Well, first word I had actually exists: cyanoplast.
Kwantuum··on Revisiting the Business Card Raytracer
> that textarea is so perfect!

There are no textarea on that page. The code sections are using a <pre>

Kwantuum··on Show HN: Layer – Get a dozen staging servers per developer
So i'm a new dev and we have a system like this at work, I had kind of assumed it was standard in the industry but clearly, considering the replies that is not the case. You can check it out here:

http://runbot.odoo.com

(it's an internal tool, don't look for a pricing page)

Kwantuum··on Rules of thumb for a 1x developer
There are only wrong ways to go about it, and you will only discover them by doing it.
Kwantuum··on Rules of thumb for a 1x developer
From the article:

> So I’m going to try to bootstrap my software engineering longbeard wisdom in the following manner:

> 1) Write out my inane thoughts on some software engineering topics.

> 2) Share out my thoughts to people smarter than me and invite vicious critique.

> 3) Update based on #2.

> 4) Attempt to come up with a methodology for finding and prioritizing useful information to read about software engineering, or reflections based on new projects, and integrating into #1.

Kwantuum··on Eloquent JavaScript 3rd Edition (2018)
I'm failing to see how async/await has more promises than your implementation.
Kwantuum··on Eloquent JavaScript 3rd Edition (2018)
ES6 came out 5 years ago
Kwantuum··on Eloquent JavaScript 3rd Edition (2018)
Javascript code doesn't just stop executing for no reason, if the callback needs to stop executing, it should reject the promise or throw an error. Or resolve with an error value. That's like saying "in sync programming, if you don't check for error conditions, your code continues humming along happily just the same".

If there is an error when reading a file or accessing a database, unless the file or database API is horrendously designed, it will reject the promise or throw.

Kwantuum··on Make Linux Fast Again (2019)
there is nospectre_v1 and nospectre_v2 written in there, unless you've been living under a rock you should get a pretty good idea that this is not a very safe thing to do.
Kwantuum··on Make Linux Fast Again (2019)
Considering it takes all of 15 seconds to setup (5 minutes including reading), it's really not a matter of if it's worth your time, but if it's worth the risk, since it disables mitigations for hardware vulnerabilities.
Kwantuum··on Userdir URLs like https://example.org/~username/ are dangerous
Here's a threat model. My university used to give students /~s123456 folders. On the same domain as the main student platform, and as the main university site. I'm not sure if they still do this but it was less than 3 years ago. Considering the age of the infrastructure, there's even a good chance that session cookies were not marked HttpOnly. Even if they weren't, I can put a login form on my page, and even if the user doesn't get tricked into using it through phishing, if their browser autocompletes it I now have their username and password.

Now yes, our uni probably shouldn't be giving out userdirs to all students, much like wifi, you should only let in the people you trust. But that's exactly the point of the article.

Kwantuum··on Google allows G Suite administrators to monitor and audit user emails
Also likely illegal in most of the world.
Kwantuum··on Configs suck? Try a real programming language
You can add eslint to the things that allow scripts as config files, just like webpack. I found this very useful because I just started a full-stack javascript project, and I need most of the linting config to be the same (tab-width, syntax, etc.) but then node and browsers don't have the same syntax for imports, don't have the same globals, etc. so I want to reuse a part of the config. And because you can write the config in js, it's trivial to import the result of the common config file (which is also used for isomorphic code, which should have no client/server specific code) and just add or remove what I need from that to return a different config for linting client and server files.
Kwantuum··on How to manage HTML DOM with vanilla JavaScript only?
Hey, never used python's http server, that's just as nice and easy as the two solutions I proposed, thanks for the tip!
Kwantuum··on How to manage HTML DOM with vanilla JavaScript only?
Honestly, while axios is nice to have on the server side, the websocket API in the browser is very simple to use. Which IMO is a consistent theme with modern browser APIs.
Kwantuum··on How to manage HTML DOM with vanilla JavaScript only?
Alternatively, you can use a simple web-server without needing all of webpack:

using npx (included with npm):

    npx serve .
using the php CLI:

    php -S localhost:5000 -t .
You weren't hitting the limits of vanilla JS, you were hitting the limit of reading files directly from disk instead of through a web server.
Kwantuum··on Ask HN: Have you been laid off?
Sorry to say, your online presence is dreadfully low for a web developer.
Kwantuum··on This PIN can be easily guessed
> prevents passcodes with ascending or descending numbers adjacent to each other

That's just silly. Assuming it also disallows duplicates next to one another, that means that there is only 7 valid digits for position 2 through 4, aka 10 * 7 * 7 * 7 = 3730 possible combinations, less than half the search space.

Kwantuum··on An ultra-simplified example of a modern compiler written in JavaScript
Reminds me of this old screencast about writing a compiler in ruby:

https://www.destroyallsoftware.com/screencasts/catalog/a-com...

Kwantuum··on Stages of denial in encountering K
Except in K all the idioms are laid flat. As pointed out in the article, the K code is the equivalent of range(100).reduce(operator.add), it encapsulates the entire meaning, there is no need for an intermediate function definition because that would be longer than the code itself.
Kwantuum··on Please stop recommending Gitflow
That would qualify as a filter...
Kwantuum··on Perch: a really little CMS
"backed by git" doesn't mean the user has to interact with git at all. The user makes a change in the interface, the CMS creates a commit and pushes to the repo.
Kwantuum··on Perch: a really little CMS
If the site is small enough, you could use something like this: https://github.com/weixsong/elasticlunr.js

Basically compile the text content of all your files into a JSON file, and search over that in JS. If the site is not small enough for this approach, go with an external search provider or don't make it a static site.

Kwantuum··on How to write the perfect pull request (2015)
Or formalize phrases. The Google review guide [1] defines some phrases and as such there is no question about the tone of it. Prefix comments on non-essential parts of the commit with "Nit:", approve the changes with "LGTM" (looks good to me).

[1] https://google.github.io/eng-practices/review/

Kwantuum··on The specification for native image lazy-loading is merged into HTML standard
As the first reply in this chain remarks: this is not available without Javascript.
Kwantuum··on Microsoft begins showing an anti-Firefox ad in the Windows 10 start menu
> put it in a pinned taskbar position with a new icon and a notification bubble [...] less annoying

I have to disagree here. Messing with people's pinned taskbar icons is much more intrusive than a suggestion (which anyone sane has already disabled)

> why are they so heavy handed on the windows side of things

I'm sorry but that's pretty funny right before suggesting to literally change users settings without their consent.

Kwantuum··on Pygame Zero: Creating games without boilerplate
Depends on what you mean by decent complexity:

https://lk-games.itch.io/citizen-of-nowhere

This game is made using love2d

Kwantuum··on PHP in 2020
> That script tag alone isn't going to do much without a backend.

When you're starting out, you're not going to do much in the first place

> the language itself has at least as much WTF as php does

Oh absolutely! My argument was mostly that for getting started, JS has actually less setup than PHP, not that it's a better language, or that it's a better learning language (although I happen to also believe both of those things but for different reasons, mostly because of the easily available REPL and debugger available in browsers, whereas debugging PHP is much more involved)

> Most people starting from zero should be able to build & deploy a todo list app in 1-2 days

and you can make a (local) todo list app in JS in the same amount of time without installing anything (because let's be real, setting up a database and web server, even bundled solutions like XAMPP can be a real challenge when you're starting out if anything at all goes sideways), and you can deploy it for free by just uploading the files to github from your browser. And if you feel that doing this without a framework is too hard there's a slew of tutorials to do it with jQuery (in the old and outdated category) or React/Vue (which don't have the added typescript complexity of Angular)

I am not saying that PHP isn't great to start with, but I feel like more and more JS can really compete in that space, and has some key advantages for further progression.

← PreviousPage 3 of 4Next →