HNHacker News
TopNewBestAskShowJobs

gurkendoktor

3,602 karma · joined August 11, 2011

submissionscomments
gurkendoktor··on The recycling myth: A plastic waste solution littered with failure
A good cost/benefit analysis would have to include this. And yes, I personally think that the developed world can drive change in other countries, otherwise I wouldn't donate to an NGO that attempts to do just that (not for plastics though).

One problem is that what I'm saying could easily be framed as "white people telling brown people what to do", and then everyone would drop it like a hot potato because it smells like colonialism. So it's politically safer to stay in my lane and buy a MacBook pouch made from recycled PET bottles instead.

(What I agree on is that the developed world should not export its trash or otherwise sabotage foreign countries.)

gurkendoktor··on The recycling myth: A plastic waste solution littered with failure
> Why does the fact that you have bigger problems in your backlog negate working on the smaller, quicker wins first?

One should pick the tasks with the best cost/benefit ratio first. It seems intuitive enough to me that the same amount of $ will go much, much further around the Ganges than in an effort to ban plastic straws in developed countries, or whatever else I see political capital being burnt on.

gurkendoktor··on “Safari's buggy” is valid criticism, “Safari's behind Chrome in features” is not
Exactly. And I don't even think the separation would be hard on a technical level.

I spend a lot of time on websites where I rely on JavaScript (Google Maps, navigating GitHub etc.), but it's always the same handful of sites. Having a "Trust this Website" button to whitelist these places would totally work. Everyone else can serve me static HTML or lose me as a visitor. (I realize that's kind of what NoScript extensions achieve, but they're not a standard with enough momentum.)

gurkendoktor··on Swift Protocol Oriented Programming and Testing
I don't think splitting up the controller part into multiple classes is a break from MVC. Nobody would demand that the view or model layer consists of a single class per screen, why should the controller layer follow this rule?

I actually agree with what you said in some way. Projects should start with whatever is the most boring, straightforward architecture possible, and then evolve it organically.

But for UIKit projects, that boring foundation is to vaguely follow Apple's idea of MVC, at least so that JSON parsing and font size adjustments don't happen directly in an IBAction.

gurkendoktor··on Swift Protocol Oriented Programming and Testing
Even when you are in a situation where most of your code belongs in the controller layer, nobody forces you to put it all in one class.
gurkendoktor··on Duolingo reaches $6.5B valuation on day of IPO
Duolingo's loading screen regularly highlights that:

"Did you know that most people learning Swedish on Duolingo are in Sweden (refugees)?" (quote from memory)

gurkendoktor··on Funding GIMP developers for sustainable development
If it's any consolation, "Blender" is a actually negative word in German ("deceiver"; someone who blinds others).
gurkendoktor··on Pronouncing non-English names for English speakers
I've never learned bopomofo in earnest, and for pinyin I just memorized everything that felt like an exception to me, even though it might have some internal logic. For example, I guess that the "a" in "yan" is different from "lan" because "yan" is its own coda, whereas "lan" is "l" + "an"?
gurkendoktor··on Pronouncing non-English names for English speakers
Pinyin is predictable if you memorize every single syllable that exists, it is not logical on a letter-by-letter basis.

For example, "liu" should be pronounced "liou" and "shui" should be pronounced "shuei", but the "o" and "e" are omitted in Pinyin for brevity. Similarly, the "u" in lu and mu is different from the "u" in "ju" and "qu"; the latter is actually "jü" and "qü" as in "nü" and "lü", again the diareses are omitted purely for the convenience of the writer. The "a" in "yan" and "ya"/"yang" is completely different, etc.

I like Pinyin as a reasonably concise input method, but it's not great for romanizing names.

gurkendoktor··on No More Movies
I can only offer counter-anecdata, but whenever I see a kid wearing Star Wars merchandise, it is from the original trilogy. I think the last trilogy will have even less cultural impact than episodes 1-3.
gurkendoktor··on Duolingo S-1 IPO
Just going through the Mandarin onboarding in Duolingo again, and one of the common errors is that 得 is pronounced de2 in sentences where it should be dei3.

There are also common words like 星期 where the characters are the same in SC/TC, but the tone would be different in a hypothetic Duolingo TC class (xing1qi1 vs xing1qi2), and I don't recall ever hearing "下星期" in Taiwan, it was usually 下禮拜. Erhua such as "小一點兒" is also not something that feels natural in TC.

But I think you are specifically asking about characters where the mapping from SC to TC is not 1:1. This StackOverflow answer has a few examples and a link to an exhaustive list on Wikipedia: https://chinese.stackexchange.com/a/38707

I sometimes read TC clickbait articles, and when they use 后 where it should be 後 that's usually a sign of a crappy machine conversion from SC. 發髮 and 干乾幹 are two more really common character groups that map to a single SC character.

The rabbit hole goes even deeper because the same Unicode character can have typographic differences by region. Just today I learned that Apple's PingFang SC and PingFang TC fonts use a different "roof" on the character 龜, even though it is the same traditional character in both cases. More examples here: https://en.wikipedia.org/wiki/Variant_Chinese_character (but that wouldn't be an issue for a TC Duolingo class)

gurkendoktor··on Duolingo S-1 IPO
Offering Traditional Chinese would require a lot of review work to catch character mapping errors and phrases that are not idiomatic in Taiwan. Given the low quality of Duolingo's existing Chinese sentences, I wouldn't hold my breath. (I've played around with the Mandarin class last year and immediately ran into some mistakes; not sure how much bad luck was involved.)
gurkendoktor··on Duolingo S-1 IPO
> Why they don't offer this in the app is beyond me.

Lesson instructions are even weirder:

When you take the Japanese class in English, you can read the explanations for each lesson in the app. However, when learning French in German, the instructions _only_ exist on the website. If you use the app exclusively, you'll have to guess all the grammatical special cases through trial and error.

gurkendoktor··on New network of European sleeper trains planned
It depends. I've just been looking for (non-sleeper) tickets from Germany to Prague and back, found some for a group of five adults for 149€ one-way, three months into the future.

The last sleeper train I took was Berlin-Budapest and that was 39€ in a six-bed room, which I personally prefer to economy flights, where the cheapest option is usually somewhere between 10pm and 7am. I can't wait to take another NightJet train.

Of course, just going from any place in Germany _to Berlin_ for that sleeper train can cost you upwards of 100€ if you don't book in advance.

gurkendoktor··on Doom Running on an IKEA Lamp [video]
> ...but 6/4 cores, respectively, were defective, so they get disabled. I don’t think they’re crippling fully functional hardware.

Hmm, but what if 3 cores are defective? If that can happen(?), then it seems one extra functional core is disabled to get to an even core number.

Apple's M1 GPUs are the first where I've seen the choice between 7 and 8 cores (as opposed to 6/8 or 4/8).

gurkendoktor··on Germany warns: AI arms race already underway
I suspect that this is because games have fixed rules: you can't use a hammer to smash the enemy's chess king. Reality is a lot more flexible.
gurkendoktor··on Writing books is not really a good idea
Great comment!

> A hundred years ago, most people didn't even think of becoming an author.

The following is a bit tangential, but I keep thinking about it:

I was watching this video on the Barnum effect recently, which basically says that people are likely to believe in the accuracy of vague descriptions of their personality (think horoscopes; "Libras need security").

https://www.youtube.com/watch?v=si2HoscBLIw&t=4m23s

The super-vague personality assessment, which was tailored to describe as many people as possible, included the wish for writing a novel (at 4m23s). That's how common this desire is/was? I wonder if the modern version of it would say "you have considered opening up on YouTube".

gurkendoktor··on Elementary OS 6 beta
I'm a iOS developer and don't mind Vala at all. The language directly encodes the GTK object model, and I'd rather pick up a boring C#-ish language on a weekend, than learn GTK and then understand how it is bridged into a language which already has its own conflicting object model.

JavaScript is way more popular than Rust, and I don't feel gjs projects are doing much better than elementary OS.

gurkendoktor··on Elementary OS 6 beta
Agreed on the need for fractional scaling, there is no escape from 13" 1080p and 27" 4K screens. Dell used to sell some laptops and monitors that worked well at 200% zoom, but even they stopped. I've rolled my eyes at the "What is HiDPI" blog post for so long.

However, there has been some movement on this issue! Search for "fractional" in this recent blog post: https://blog.elementary.io/look-and-feel-changes-elementary-...

gurkendoktor··on Spotify is killing the open podcast ecosystem (2020)
Good point. Honestly, in Spotify I don't even want to see political content from people I agree with. Sometimes I just want to take a break from my European duty to care about US politics 24/7, but it's getting hard to do so anywhere on the internet.
gurkendoktor··on Apple TV 4K Gets A12 Bionic
I had an Apple TV 4K and a couple of compatible gamepads, and I loved some of the early tvOS games! Rayman, Icycle (!!), Alto's Adventure, Badlands...

Then I tried Apple Arcade and it's just terrible. First, performance for all the 3D-heavy games is exactly what you would expect on a 4K screen with an iPhone 7 GPU. The iPhone XR GPU won't solve that.

But I'm also convinced that Apple fundamentally doesn't get games. A lot of the content was just interactive storytelling. With a few notable exceptions, I felt like a suit who never owned a console or Steam account had picked games for me based purely on the marketing materials.

gurkendoktor··on iPad Pro M1
The SSD can be replaced. I loved my 2015 MBP to death, but the CPU has not aged well for heavyweight languages like C++ and Swift. Switched to an M1 Air with the same 1 TB of storage and 16 GB of RAM.

https://www.ifixit.com/Guide/MacBook+Pro+15-Inch+Retina+Disp...

gurkendoktor··on Spotify is killing the open podcast ecosystem (2020)
Podcasts have really ruined Spotify's mobile app. The worst part is that there is space for a "Podcasts" tab in the bottom bar that would have made everyone happy by clearly separating types of content.

Apple has gone a similar route recently with reducing the Activity/Fitness app to just two/three tabs, mushing all sorts of content together. I hope this doesn't become another user-hostile UI trend.

gurkendoktor··on GitHub, fuck your name change
Yes, pretty sure that this is a reference to the professional-managerial class. It's a common refrain on the populist left/"dirtbag left" that identity politics are often dishonest class warfare. (I agree.)
gurkendoktor··on Wayland in 2021
Besides security concerns, mixed-DPI setups are such a major pain point with X11 that many people who use a laptop with additional screens would probably switch to Wayland just for that alone. That's a large demographic.
gurkendoktor··on -2000 Lines of Code
There are many things that the complexity calculator could take into account: the specifics of the language, the libraries that are used (which could start threads or contain hidden conditionals), the kind of project (following a spec vs. explorative programming), and so on.

I think it's easy to come up with an algorithm that's better than a coin flip or counting LOC. But to be useful, the algorithm has to be on par with the judgement of the developers who check in the code and review it. Otherwise the false positives will take time away from other bug-reducing activities like code reviews and writing tests.

Of course I don't have data to prove it, but I'm convinced that every complexity checker I've encountered in the last 15 years has been a (small) net negative for the project. Maybe machine learning will improve the situation.

gurkendoktor··on -2000 Lines of Code
> It kind of encourages you to use a lookup table or polymorphism

And I think that is a problem. switch()ing over an enum will give you a warning about unhandled cases in some languages. But if you start building your own lookup tables, you will be just as prone to typos like mine, except with more code, and less static analysis.

Yet the cyclomatic complexity drops from 16 to 1. I don't think that's a healthy incentive.

gurkendoktor··on -2000 Lines of Code
Using a map also completely sidesteps the point of cyclomatic complexity because there are no code paths to count anymore; now they're data. And even though the function does the same as before, the linter will congratulate you on the reduced complexity.
gurkendoktor··on -2000 Lines of Code
Ouch, sorry for the typo. But I'll double down on this: The fact that the typo is so obvious underlines that the structure is easy to review :)
gurkendoktor··on -2000 Lines of Code
The code was inspired by a piece of Java code that rendered geometric primitives. It was basically case "box": return parseBox(); as you suggested in your other post.

Turning "box" into "parseBox" using string operations and then using reflection to call the right method is an approach I'd consider in Ruby, but not in Java. It breaks IDE features like "Find Usages" and static analysis, and the code to dynamically invoke a Java method is more annoying to review than the boring repetition in my posted snippet.

← PreviousPage 4 of 34Next →