HNHacker News
TopNewBestAskShowJobs

Leherenn

1,266 karma · joined December 27, 2017

submissionscomments
Leherenn··on Malicious compliance by booking an available meeting room
That's the thing though, in many places Europe people usually aren't paying much for university, and higher education is funded by the state. So the state has a keen financial interest on people not failing/doing over because they can't be bothered to go to lectures, a lot more than the students themselves.

The reality in my experience is that, whilst students are on paper adults (mostly) and responsible for their own successes and failures, a significant number benefits from being forced to attend. That's unfortunate for the ones that could "safely" skip the lectures and have to go, but on average it leads to better overall outcomes. So in that regard the attendance policies are sensible.

Leherenn··on How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
My only issue with defensive codding is that often it doesn't play nice with code coverage requirements. I've been in situations where I would like to add defensive coding just in case, but then the PR doesn't pass the coverage checks. The best is when you can ensure via th compiler (e.g. via the type system) that a case is impossible, but C++ (in my case) isn't perfect for this.
Leherenn··on Testing Without Mocks: A Pattern Language (2023)
I'm all aboard this, in fact it's how I like to write my "unit" tests, but still I'm unsure about this nullable and test code with prod.

What I do is I simply mock as little as possible (leaf nodes such as timers, remote calls, sometimes RDBMS/filesystem, ...). But I'm not sure what embedding the mock in the prod code gains you? I wonder if part of it is down to the language used?

For instance it says "Put the stub in the same file as the rest of your code so it’s easy to remember and update when your code changes.". Maybe it's because they're using a dynamic language? I'm using C++, so any change in interface will fail to compile the mock, making this less important. You could change the behaviour whilst keeping the same interface, but it's very rare in my experience (and definitely should be avoided).

Nullable I could see some values in some cases where you also want to be able to disable a functionality in prod. But in that case you have a function in the interface to turn it off, so you might as well use that. I can see where using Nullable in construction avoids having to expose this method through the whole dependency tree, but at the same time you lose the ability to dynamically turn in on/off.

Leherenn··on Turkish university annuls Erdogan rival's degree, preventing run for president
I googled a bit around because I found the requirement weird, and it's slightly misleading. Candidates need to have a separate bank account for the election, so that it can be monitored (there are various limits to how much funding they can get and so on as far as I understand).
Leherenn··on All Kindles can now be jailbroken
It also has "geôle", which is also old fashioned.
Leherenn··on Cheap solar power is sending electrical grids into a death spiral
> If there is excess power at zero marginal cost someone cunning is already planning on making some coin off it.

I'm not sure it's that simple as evidenced by the ever increasing hours of negative electricity prices.

As far as I know, there are so far no good applications for short bursts of negative prices. Everything that would love those is so capital intensive/high fix costs that even 10 or 20% utilisation rates at negative prices are not enough to make it economically viable.

Season excess is also a big problem. Batteries to smooth the days/nights cycles are fine, you can use them ~365 times a year. But a battery to smooth out summer/winter cycles can only be used once a year!

Leherenn··on Trump signs executive order withdrawing from the World Health Organization
France is totally paralysed right now and in the foreseeable future by a political crisis.
Leherenn··on Software engineer pay heatmap for Europe
They're from levels.fyi, and if you look at Switzerland, something like 20% of all salaries are from Google employees. 100-110k is probably a better number.

I kinda disagree with other posters, even after CoL adjustments you're way ahead in Switzerland, especially given the usually low taxes. RE is totally unaffordable though, the rest is fine.

Leherenn··on Ask HN: How to approach first days on a new job as a senior engineer?
Something that has always been really appreciated, and can be an easy "first commit": update/complete the docs. There's always a missing step, something unclear, an outdated link, and undocumented "whys", something to automate, ...

When you've just joined from outside, you're in a unique position in that you haven't internalised yet all the little idiosyncrasies. Best to take note of them, understand the context, and maybe help change them.

Leherenn··on My little sister's use of ChatGPT for homework is heartbreaking
I think this works well with at least somewhat interested students (like in university), but I'm not so sure before.

My experience when I was younger is that a significant proportion of students don't do anything outside of school. So you're trading not doing the homework with not reading the material. And then you'll essentially have to repeat the material during class hours, unless you're willing to leave half the class totally clueless. At least with the homework at home, the ones not doing anything are only penalising themselves.

I totally agree though that homework at home is dying. It already wasn't great before for a variety of reasons, and now it's basically totally useless.

Leherenn··on Justin Trudeau resigns
And even when they're forcibly removed (e.g. via a vote of no-confidence), they often keep on doing the job until a replacement is found, albeit with limited scope/powers. See France for instance recently.
Leherenn··on Uncut Currency
Switzerland has them for supplementary health insurances.

In a nutshell, Switzerland has two types of health insurances. The basic one, which is mandatory, and whose coverage and price is set by the government. It covers more or less everything that endangers your health. Pretty close to ACA in the US if I'm not mistaken, but a lot more regulated.

And then you can add supplementary insurances, for stuff like dental, private rooms in hospitals, experimental treatments, ... It's common to be denied coverage there, especially as you get older.

Leherenn··on C++ is an absolute blast
I think it does reduce readability in some scenarios.

For instance: const auto& processes = getCurrentlyRunningProcesses(); for (const auto& process: processes) { // Ok, what do I do with process now? Is it a pair from a map? A struct from a vector? // If it's a pair from a map, is the key the pid, a unique id, something else? }

std::unordered_map<Pid, ProcessData> is more readable than auto here IMO: you don't need to open the definition (or hope your IDE correctly display the type).

Leherenn··on How WhatsApp became an unstoppable global cultural force
Free international messages/calls as well. That's how most of my friends and I started using it: studying abroad is pretty common in Europe with Erasmus, or even simply vacationing.

Before that, we were using Skype, but I remember WhatsApp being so much more convenient/better, especially on mobile.

If it would have been very costly to send an SMS/call a different US state, I bet WhatsApp would have taken in the US.

Leherenn··on C++ exception performance three years later
I have to admit I have a hard time relating your comment to my experience.

I remember a case where we were using a library throwing exceptions when it could not parse some string. I think we were parsing IP addresses, or something like this. There was a case where this was called in a hot loop (like thousands of IP addresses in a roe) and for whatever reason in some cases most of them were invalid, thus throwing. Then simple error handling: the caller catches the exception, logs the error and checks the next one.

The program was frozen for seconds. Replacing the parser with the same logic but returning a bool instead was something like 1000x faster. That was on MacOs Clang Arm.

I don't see how a few extra ifs (though none were required in this case) would change anything.

Generally I'm not a fan of exceptions, you never what something is going to throw. The majority of the crashes we see in production are unhandled exceptions. Turned out the documentation did not mention that this function could also throw std exceptions on top of the lib ones in this specific case.

Leherenn··on South Korean president declares martial law, parliament votes to lift it
Not exactly.

There was a parliament election, with three blocks each gaining roughly a third of the seats.

The block that won the most seats (but not enough to have a majority) immediately declared they would never compromise/ally with anyone else. Essentially, if they were called on to form a government, they were almost certainly going to be immediately censured.

So Macron, rightly or wrongly depending on who you ask, decided to not call on them since he estimated it was bound to fail and waste time. Instead, he nominated someone from a (now) minor political force because, at least in theory, they were enough people willing to negotiate with them to form a majority. Looks like it didn't work in the end and now France will be stuck because no one is willing to compromise.

Leherenn··on PR process killing morale and productivity
Something helpful I have seen in this situation is to require the reviewer to test the changes for long PRs, and post proofs (a screenshot, logs, ...).

Even with the best of intentions, it's easier to miss things in longer PRs, plus it gives more time for others if they want to have a look. It's not bulletproof of course, but at least it makes sure the basic functionality is working.

Leherenn··on 100-MW solar farm just broke ground in Wisconsin
As a data point from another country (Switzerland), transmission is between 1/2 to 2/3 in most places here I'd say.
Leherenn··on Google CEO says more than a quarter of the company's new code is created by AI
It's more than choosing the right function call, it goes further than that. If your code has patterns, it recognises and suggests them.

For instance, one I find very useful is that we have this pattern of checking the result of a function call, logging the error and returning, or whatever. So now, every time you have `result = foo()`, it will auto suggest `if (!result) log_error...` with a generally very good error message.

Very basic, but damn convenient. The more patterns you use, the more helpful it becomes.

Leherenn··on C++ String Conversion: Exploring std:from_chars in C++17 to C++26
I think they meant the other way around: you can have a single string in memory containing multiple numbers, and process that string as a stream.
Leherenn··on Software Engineer Pay Heatmap Across the US
No idea how it is in the US, but if you have a look at Zürich, Switzerland, something like 20% of the data points are from Google, maybe 50% from FAANG. Clearly very heavily biased towards high-paying multinational companies.
Leherenn··on California first state to ban 'sell by' 'best before' label to reduce food waste
It happens here in Switzerland. There's even an app where you reserve a "mystery" bag, you go right before the shop closes (which is usually 6 or 7pm) and you get a random assortment based on what's about to expire at a massively reduced price (like 1/3).

Of course you cannot really rely on it if you have a specific meal in mind, but it's pretty good as an add-on, and it makes you try things you wouldn't usually buy.

Leherenn··on Do AI companies work?
Like some kind of linter?

The cardiologist checks the ECG, compare with the LLM results and checks the difference. If it can reduce error rate by like 10%, that's already really good.

My current stance on LLM is that it's good for stuff which is painful to generate, but easy to check (for you). It's easier/faster to read an email than to write it. If you're a domain expert, you can check the output, and so on. The danger is in using it for stuff you cannot easily check, or trusting it implicitly because it is usually working.

Leherenn··on Why Scrum is stressing you out
I don't know, at least for my current team a lot of the stuff we complain about in the retro is beyond the team level: coordination between teams, infrastructure issues, ... The intra team issues are usually talked about before (e.g. during standup, or just asynchronously).

If the EM is not there, those are not actionable. What we try to do is: do the retro by ourselves, and invite the EM at the end of there is stuff for them. Usually they are not available though...

Leherenn··on Ask HN: Why is Pave legal?
Isn't levels.fyi or similar just the employee side of the coin?
Leherenn··on Oxford commercializes its 20% more powerful solar panels in the US
Do you have a source for your first claim? My understanding is that hydro is mostly saturated in Switzerland (https://ethz.ch/content/dam/ethz/special-interest/baug/depar...)

There's also very little appetite (and it's been the case since the 80's) for hydro anyway. Even before the biodiversity argument, simply moving whole communities is just no longer a thing.

Leherenn··on Oxford commercializes its 20% more powerful solar panels in the US
Depends where you are. It might not be a problem in Australia, but it very much is here in Switzerland. Space is at a premium, and NIMBYISM very strong (and includes not in my mountains).

Most of the costs of building a solar plant is the years of bureaucracy, and the majority of projects (the ones that get built that is) end up massively reduced in scope. So more expensive but more efficient panels are a boon, and won't change much in the total price.

Leherenn··on X ordered to pay €550k to Irish employee fired after yes-or-resign ultimatum
Short term contracts have pretty big downsides though. It's basically impossible to get a mortgage on a short term contract, or more generally any kind of loan. Even renting is difficult.

That's why many EU countries have pretty strict limitations on short term contracts, like how many you can do in a row. It results in a huge reliance on contractors.

Leherenn··on Why won't some people pay for news? (2022)
> "You can't have this paid for by taxes. [...] There's just too much weight behind the never-spoken-out-loud threat of revoking the charter"

Sounds like an implementation issue more than a fundamental truth. In Switzerland, the public broadcasters are funded by a special tax as well, but any change to it would have to be approved by the population.

At the same time, I'm not sure the SRF/RTS is actually better at reporting shenanigans.

Leherenn··on Apple has reached its first-ever union contract with store employees in Maryland
Are the railway strikes in Germany really a good example? It's a public company, no matter what happens it will be kept afloat by the taxpayers. Realistically, if DB were a private company, it would have long gone bankrupt and the strikers would be out of a job. They lost 1.3B apparently in the past 6 months, and they claim 300M were due to the strikes.
← PreviousPage 3 of 26Next →