HNHacker News
TopNewBestAskShowJobs

genezeta

1,671 karma · joined September 1, 2010

Just a random person who failed.
submissionscomments
genezeta··on Named element IDs can be referenced as JavaScript globals
This is one of those things that pops up every year or two years. Unfortunately, the person writing about the new discovered weird trick almost always fails to precede the article with a big, red, bold "Please don't ever do this".
genezeta··on Get in zoomer, we're saving React
This article is kind of sad. In part because it comes from its author, who usually writes interesting stuff. But this one is ranty -and no, it doesn't make me angry. It's ranty and also fluffy, light in content, scarce in any arguments or conclusions other than "youth these days! they don't even try!". I'm not young and I still find this article poor.

After going through the first two thirds of the article with mostly uninteresting "I'm old; I know better" detours, the author seems to sort of relate React to "reactive", and goes on yet another detour on unrelated architecture. So, we're now reaching the end of the article and the only conclusion we get is... hey, stuff is hard, you need to do the work, you can't avoid putting in effort. And... that's it. That's all there is to the article. Eh.

genezeta··on Ask HN: What language do you have the most fun writing in, and why?
English.

I do write quite a bit in Spanish too, sometimes Italian and French. But usually I tend to have more fun with English. Though I do confess that I quite enjoy mixing up two of them for stupid jokes because it opens more possibilities.

genezeta··on Twine is an open-source tool for telling interactive, nonlinear stories
Also https://itch.io/games/tag-twine since it gives different results.
genezeta··on Twine is an open-source tool for telling interactive, nonlinear stories
I've been on the receiving end of that.

Place I worked at a few years ago, used to have some mandatory courses about various of the company's concerns, like security practices, contract handling, or various other stuff. They decided to make it "fun" by having the courses done as some form of interactive thing which could certainly be done with Twine/Sugarcube.

It was hit and miss. I think there's a very thin line between writing something "entertaining" and something "awfully cringe". Some of the stuff was ok, but sometimes they veered a bit too much into writing some weirdly fantastic story over explaining whatever it was they wanted to explain.

So I'd say it is a valid tool in itself; it can work. But as with any other tool, the result depends a lot on how you use the tool.

genezeta··on Ladybird: A new cross-platform browser project
This is a completely different thing.

The "super duper secure mode" is not at all about you accessing or modifying the JS code from a website you are visiting. What it is about is trying to protect against some piece of JS code bypassing the security of the browser sandbox and accessing stuff it shouldn't ever have access to.

:)

Edit: Also, in general, no, disabling JIT would not prevent any particular JS code or extension from running. At most, it might mean some code would run slower. But that's what they claim, that it isn't noticeable.

genezeta··on Ask HN: Does https://github.com/klauspost/compress returns 502 for you?
I get a 502.
genezeta··on The probability that SARS-CoV-2 is A genetically modified virus
Probably the key point is here.

> The probability is calculated based on the neutral theory of molecular evolution and binominal distribution of non-synonymous (N) and synonymous (S) mutations.

This means (ELI15):

We use as a starting point the belief ("a theory" [0]) that natural mutations do not simply occur randomly, but instead follow certain rules. The fact that there are rules, makes certain combinations of mutations (i.e. not just single mutations but the case where mutations abc1234, xd456, er6523, and sdf374 happen together) more or less likely than other combinations of mutations.

Given that theory, we calculate how likely the particular combination of mutations included in the Omicron variant is to occur naturally. It turns out it's quite unlikely.

---

Not defending or attacking the paper or its conclusions, as I haven't read it. Just explaining the difference to randrange(1000000) which is a. just one single item; b. all items equally likely even if called repeatedly.

---

[0] https://en.wikipedia.org/wiki/Neutral_theory_of_molecular_ev... - "A neutral mutation is one that does not affect an organism's ability to survive and reproduce. The neutral theory assumes that most mutations that are not deleterious are neutral rather than beneficial."

genezeta··on Show HN: I made a modern web UI for Hacker News
Why not make this a user-style? [0]

In particular I ask this because your approach -if generally applied- means installing an extension for each single site, which feels a bit too much.

[0] https://userstyles.org/styles/browse/ycombinator

genezeta··on Why A4? – The Mathematical Beauty of Paper Size
You're absolutely right. Thanks.
genezeta··on Why A4? – The Mathematical Beauty of Paper Size
Yes. It's common in most of Europe afaik. B5 is a quite nice size for notebooks.
genezeta··on Why A4? – The Mathematical Beauty of Paper Size
Yes, but that is really rarely used -at least around here-. Most envelopes nowadays have opted for different factors. Usually you fold an A4 in thirds on the longer side and use an 110x220 envelope.
genezeta··on Why A4? – The Mathematical Beauty of Paper Size
There is a secondary series, B, in which the base size, B0, -instead of being defined for its area of 1 square meter as is A0- is defined to be 1 meter wide. A series is then 1, 1/2, 1/4, etc square meters, while B is 1, 1/2, 1/4, etc meters wide.

It's not as common as the A series but it's used occasionally and it offers intermediate sizes between those of the A series.

genezeta··on Tell HN: Unpaid home assignments are not ok
This is my experience too most of the time.

In one case, Airbus, they didn't even bother with a phone call. I applied via their website's application process. More than a month later, without having heard anything from them at all, I get an email from someone with an exercise that "should not take you more than 12 hours". They also gave me 3 days from the day the email was sent, to send my code. Eh...

Ah, there was a local company which, as part of the application process itself, would present you with a small test. First problem: it was incorrectly set up and I got some totally unrelated test about something like Excel or whatever. I added a comment to let them know that I thought it was the wrong test. Again, never heard from them for 2 or 3 weeks. Then an email addressed to no one in particular, asking to do an assignment. I replied asking for clarification. Saying I hadn't even spoken with anyone yet and the exercise felt weirdly unrelated to the position I had applied to. Never heard back, fortunately.

genezeta··on Goat Rental – Hire Goats
It does look like a bug.

Like the iframe and the parent are sending each other a message to match the heights of the content document and the iframe element but it miss-calculates producing a vertical scroll to appear, which then posts another message back to adjust again and so on, back and forth.

genezeta··on Thank You, Firebug (2017)
I do remember Venkman crashing multiple times, but to be fair it was the older "sort of stand-alone"-ish Venkman. The later version packed as an extension was a bit more stable.

But going back to the relevance subject, I don't really think it is worth mentioning. But not because of performance but because it was a fairly different thing. Mostly just a JS debugger with a couple of additional tools and little/no support. Usually you would need a bunch of other scripts such as XRAY [0] and others to reach a functionality somewhat comparable to Firebug.

[0] https://westciv.com/xray/

genezeta··on Ask HN: How do you deal with code frustration?
For me, that point of surrender is not set by the code itself but by the people involved. That is, the code may be bad, terrible, horrific even, but if the team is actually willing to make the effort of improving themselves along with the code, then we can make it work, together. On the flip side, if the team is comfortably set into bad habits, has become comfortable or accustomed to the projects quirks and kludges, and is not really interested in changing their ways, then it won't matter how much effort you, alone, make and you may be better off giving up.

As for the simpler day to day frustration... well, remember that to untangle a messy knot you will need to make a lot of very small steps before you reach a position in which you can pull this or that string and finally see a bigger advancement. But those very small, careful steps are as important -or probably much more important- as the bigger one.

genezeta··on Ask HN: Have you ever inherited a code base you thought was well done?
I once inherited a reasonably good code base. It wasn't a large project but it did have a certain complexity; it was a web application to write and manage HTML-formatted e-mail templates that the company then sent for various purposes from different applications.

It had no testing and documentation was little more than a brief overview in the internal wiki so at first it didn't feel very welcoming. But then the code turned out to be quite well organized and approachable. I added to it a couple of features that had been ignored for some time and the code really made sense. It guided you quickly towards the correct places you'd need to work on.

Ultimately the project itself was somewhat flawed because nobody wants to layout and maintain e-mail templates, specially when somebody insists that they want "100% pixel-perfect coverage on all e-mail clients including Outlook Express 5.01" -in 2014-.

genezeta··on Ask HN: How to disable right-click blocking in the browser
?
genezeta··on Ask HN: How to disable right-click blocking in the browser
I use a bookmarklet. It can be something basic, such as:

    javascript:void(document.oncontextmenu=document.onMouseDown=()=>true)
...which works for, maybe, 60% of cases. Or you can try a more sophisticated one for greater success. e.g.:

    javascript:(function(w){
        var arr = ['contextmenu','copy','cut','paste'];
        for(var i = 0, x; x = arr[i]; i++){
            if(w['on' + x])w['on' + x] = null;
            w.addEventListener(x, function(e){e.stopPropagation()}, true);
        };
        for(var j = 0, f; f = w.frames[j]; j++){try{arguments.callee(f)}catch(e){}}})(window);
Unfortunately, these don't work on 100% of the pages. Otherwise, as someone else has suggested, Firefox allows you to disable context menu hijacking for every site.
genezeta··on The PyCon Italia 2022 multiplicity
Yes, it seems that there's a similar problem on that site.
genezeta··on The PyCon Italia 2022 multiplicity
Sorry for not following up. The phone is a decent but standard Android phone. The issues are almost bearable on Chrome, and awful on Firefox.
genezeta··on The PyCon Italia 2022 multiplicity
I don't know why, but this site completely shits up scrolling on mobile. It's like trying to skate over mud.
genezeta··on FizzBuzz in TypeScript
Yes. It's fixed in this one.
genezeta··on FizzBuzz in TypeScript
The error is still there, I'm afraid.
genezeta··on FizzBuzz in TypeScript
The error about excessive/infinite type instantiation depth is still there.

I mean, yes, it does "work" and FizzBuzz gets defined as expected. But... the error...

genezeta··on FizzBuzz in TypeScript
I get...

    This version of TypeScript (4.7.4#code/C4TwDgpgB[...]t7yAA) has not been prepared for the Playground
It seems to be a problem with the encoding of # and / in the URL. Possibly other characters.

Still, when fixing that, I get an Error:

    Type instantiation is excessively deep and possibly infinite.
On this line:

    type FizzBuzz = From0To99<[0, 0], []>;
So you may want to check that, if you think it's actually worth it.
genezeta··on Taiyo No Tamago
Link is broken - remove the l at the end: https://www.atlasobscura.com/foods/egg-of-the-sun-mango
genezeta··on Copilot sells code other people wrote
About 10 years ago or so, I was working at a certain place. They put me into a small team apparently focused on some R+D project under the direction of an "architect".

Basically, the project was to package Cordova + Backbone + Marionette, plus a couple of tools, under their own commercial name. Then they'd go around potential clients presenting it as the perfect solution to build hybrid applications for web/mobile/smartTV/whatever.

A certain Monday, the "architect" arrived boasting. He did that often, but this time he was more boastful. He explained that he had spent the whole weekend coding. He had written an incredible tool that would create a skeleton for a project from zero. You would type something like `tool create` and it would create the whole project with all the scripts and some example views and whatnot.

It was Yeoman's yo CLI tool, of course. He had just changed the copyright in the comments, removed most of the comments, he had deleted any mention to yeoman or the original creators, changed the name of the executable script and that's it.

The whole thing was OS code picked up from various repos and packaged as their own. The company used it to sell development projects. The so-called-architect used it to sell himself inside the company and then jump away into a startup as CTO.

Is this common or is it just anecdata? I don't know. It's clearly not the only time I've seen something like this and I do know that in certain companies around here it isn't exactly uncommon. But I can't say how common or uncommon it is.

Would I call this "selling other people's code"? Yes, I would.

genezeta··on Shepard Tone
Even though I don't think it used this same effect but rather a simpler sound, I am reminded of MB's Star Bird, a toy spaceship from the late seventies.

https://www.youtube.com/watch?v=ORtzJ3gZ5ho

https://en.wikipedia.org/wiki/Star_Bird

← PreviousPage 13 of 19Next →