HNHacker News
TopNewBestAskShowJobs

gurkendoktor

3,602 karma · joined August 11, 2011

submissionscomments
gurkendoktor··on -2000 Lines of Code
If there is a useful metric, then I haven't found it yet. The data on cyclomatic complexity[1] does not convince me, and in practice, the linters I've seen have complained about boring code like this:

    switch (foo) {
    case KIND_1: return parseObjectOfKind1();
    case KIND_2: return parseObjectOfKind2();
    case KIND_3: return parseObjectOfKind3();
    ...
    case KIND_15: return parseObjectOfKind5();
    case KIND_16: return parseObjectOfKind16();
    }
There are 16 paths and yet this code is easy to follow. There is no substitute for human judgement (code reviews).

[1] https://en.wikipedia.org/wiki/Cyclomatic_complexity#Correlat...

gurkendoktor··on Dr. Seuss books deemed offensive will be delisted from eBay
I agree that the discussion in this thread does not lead anywhere, and I regret scrolling down all the way down here.

But being an "information libertarian" was part of the hacker spirit for me, to borrow a word from the sibling poster. I find it useful to see these headlines on HN to keep track of where tech companies stand. A recruiter tried to get me into an eBay subsidiary just a month ago! Glad I didn't have time.

gurkendoktor··on Don’t blindly prefer emplace_back to push_back
My pet peeve with all emplace functions, make_unique etc. is that CLion won't let you command-click the calls to jump into the constructor being called. Are other IDEs better at this?
gurkendoktor··on Flutter 2
And because it's built in, unlike the bolted-on Rx framework family, it doesn't bother me much. I found the language to be much more focused and pragmatic than Swift, but as I said that was just my experience after a single project.
gurkendoktor··on Flutter 2
Yes, the visual polish is what I mean. It's not rocket science to style UIButton, but the lack of a good default style means that mediocre native apps often have weird/inconsistent highlighted button states, and so on.
gurkendoktor··on Flutter 2
I am a native app developer. I have only built one small app with Flutter. Here's where I disagree:

- I've used Xcode since version 2 and like it, but in my opinion it's a worse developer experience than Flutter. Refactoring and code navigation were much better in both Android Studio and VS Code.

- Flutter's hot reloading is fantastic. Meanwhile, SwiftUI previews seem to be built on the same technology as IBDesignable, that is, they're just barely stable enough for a short WWDC demo.

- I am very sensitive to non-native controls on macOS, but UIKit doesn't even have a standard button class, the first thing that everyone has to reinvent (Apple included). I wouldn't pick Flutter for business apps with loads of text editing, but it feels perfect for social game-ish apps, like QuizUp or Duolingo.

- In my experience (German freelancing market), the typical native app developer does not care about the user experience anymore. Ever since RxJava and Swift have hit the scene, the focus has moved from impressing the user, to one-upping your coworkers with exotic language features and avant-garde architecture patterns. Dart is a dumb language like Go, and I think that's exactly what's needed to bring UX back into the spotlight.

gurkendoktor··on In Defense of Dumb TVs
I agree that you are still being tracked on an Apple TV, but that's because the YouTube app is still made by Google, and the Netflix app is made by Netflix, etc.

Apple probably has some sort of tracking system, but they're hardly a tracking monopolist, not even on their own devices.

gurkendoktor··on Why isn't Godot an ECS-based game engine?
> Physics, AI, animation, etc.

That sounds good, but how would this look like in practice? For the sake of simplicity, let's assume I write a 2D game with classic spritesheets for animation frames. With an ECS, I can pool the animation state of each object into the animation system, and basically execute "anim_frame = (anim_frame + 1) % num_frames" for all objects in one speedy loop.

But game object animations are tied to game logic, and as soon as an object depends on its anim_frame in logic that is outside of the animation system, the cache benefits are moot.

Maybe I'm not thinking big enough in terms of how many "dumb" objects are in the game in proportion to the ones that have lots of logic (like the player).

gurkendoktor··on Why isn't Godot an ECS-based game engine?
I've heard this so often, and I still don't quite get it. Let's say most of my game objects have a "Position" component, and all the X/Y coordinates are now in one big integer pool. With this setup I can now add 5 to each object's X position really efficiently. But what's the use case for that? Particle systems, and what else?

My game objects always look more like Celeste's Twitter-infamous Player class: https://github.com/NoelFB/Celeste/blob/c32f134d210fcf710d750...

Say about the length of the file what you want, but isn't it actually better for caching that all of the Player's instance variables are in one object, and not stored in components somewhere else?

(Now, maintainability is another issue. But I've always found Ruby-style mixins much easier to reason about than the toy ECS systems I've seen.)

gurkendoktor··on ISO 8601: a better date format
I've learned Chinese for fun. It's great that I can now read a few more Go/C++ READMEs on GitHub, but other than that, I can't imagine what advantage it has? Maybe there'd be one if I came from a poorer manufacturing country?

even China commentators in Western media are often completely clueless about the language. If these jobs don't require Chinese fluency, then which ones do? And even then, it'd be much easier to employ the many, many native speakers who emigrate from the PRC.

gurkendoktor··on MacBook Pro M1X benchmarks have leaked
256 GB is more than enough for many people. Consider work laptops that are mostly used in meetings, or personal laptops for folks who live in the cloud.

I've recently used a 100 GB partition on my personal laptop for client work and it was fine.

(I'm not trying to defend the price of Apple's SSD upgrades.)

gurkendoktor··on Choose Boring Technology (2015)
The Java community has some great developers, but also a lot of Serious Software Engineers who will sabotage everything with extra complexity, and then everyone who learned Java in school and never felt like looking at another language (not even Kotlin).

Java is definitely "boring technology", but hiring random Java developers will probably sink a company faster than doing the same for Go.

gurkendoktor··on Show HN: Split Keyboards Gallery
If you install Karabiner Elements[1] on macOS, all modifier keys suddenly work across all keyboards.

I'm using one "TKL" Apple USB keyboard per hand when I feel like opening my shoulders a bit. Took me all of two minutes to get used to, at a fraction of the cost for enthusiast keyboards. I wonder if there are any ergonomic advantages I'm missing out on.

(Karabiner Elements is a great tool, anyway; I've been using it for a long time to map Caps Lock to something useful for programming.)

[1] https://karabiner-elements.pqrs.org

gurkendoktor··on Typing Is Hard
> And I don't even see how "decideable" is a desireable property at all. So what if the type checker can infloop? It won't in practice.

I am not so optimistic after having worked with Swift, where simple arithmetic expressions and array literals can bring the compiler to its knees: https://twitter.com/steipete/status/1361596975150493700

(As noted in a reply, this particular bug has been fixed...but still.)

gurkendoktor··on Ask HN: What are the best websites that the Anglosphere doesn't know about?
Their Twitter team(?) is also all-in on self-deprecation: https://twitter.com/ARTEde/status/928269091311296512
gurkendoktor··on Swift for TensorFlow Shuts Down
I agree about TypeScript, however this paragraph also describes Swift to a T:

> Sometime you have a library where someone a few years back tried to do something similar to your idea but never had a complete solution and stopped working on it and when you try to benefit from this work to build on top of it, you find out that you need to modify you working environment to support some spacial case of legacy code. You do that and it all falls apart, now you must choose to try to fix it or give up and restore your setup. It's just horrible.

So far Swift code has not aged well, although it's gotten better during the last two years. The perpetual brokenness has moved on to Swift's tooling (binary stability, SwiftPM etc.) which wouldn't affect serverless.

gurkendoktor··on Teardown of the Apple's A1243 Keyboard
The current Magic Keyboard has the weird arrow key layout that Apple already phased out again on its laptops. I also don't like how it feels to type on. But the ability to use a Lightning (not Thunderbolt) cable is a godsend on my Magic Trackpad 2, for some reason I'm getting a lot of lag with Bluetooth.
gurkendoktor··on Teardown of the Apple's A1243 Keyboard
The A1243 is available on eBay, but the A1242 is really hard to find here in Germany. Hence the iMac detour.

+1 for eBay, anyway. I've made an exception for my M1 MacBook, but generally I try to buy everything used.

gurkendoktor··on Teardown of the Apple's A1243 Keyboard
That model, but without the numpad, is still my favorite keyboard (the A1242). I've tried mechanical keyboards for fun, but I keep coming back to this one for the low profile.

It was only sold for a year or so before the wireless model replaced it, and it's hard to find them now. What I did was to look for used iMacs from 2010, see which ones have the A1242, then ask the seller to only sell me the keyboard.

Based on the replies I wasn't the first one to ask! Seems like there are still some fans around.

gurkendoktor··on LinkedIn’s Alternate Universe
Not just _from_ Gmail, also to it: Google+ onboarding asked me for my email credentials when I went through it for a throwaway account.
gurkendoktor··on José Valim Reveals “Project Nx” (Numerical Elixir) [audio]
Fair enough, all the OG IDEs from 2009 are still around. And on the lightweight end of the spectrum, VS Code has excellent tooling support for some languages like Dart/Flutter.
gurkendoktor··on José Valim Reveals “Project Nx” (Numerical Elixir) [audio]
> I haven't written Java since I was a freshman in college (2009) and that was like a few months. I basically know nothing about the ecosystem.

I was in love with Ruby and hated Java around 2009, but the latter has gotten so much better with IntelliJ IDEA, to the point where I have to admit that working with JavaFX from IntelliJ was likely my most serene programming job ever. To me, the whole ecosystem is only worthwhile because of JetBrains.

Robust IDE support for Elixir is probably a must-have requirement for many nowadays. I am really tempted by the design of Elixir and find Java/Go/C++ aesthetically repulsive, but I'll happily forget about that if I can keep my refactoring muscle memory.

gurkendoktor··on Reddit valued at $6B on a $250M round
Intentional or not, the word choices in your reply are the reason why my "office politics" alert goes off whenever I visit reddit (enough that I deleted my account):

The word "conspiracy" has become a way (mostly for the media) to assign low/outgroup status to unfavorable theories. In the unlikely case where something is later proven to be true, one can always just say, "okay, but isn't it GOOD that everyone was silently cooperating?" And when it works, it's a tool to move the Overton window by painting the others as loonies.

I mean, the idea that a company worth $6B has a political strategy is hardly outlandish. You can have five people working in an office and they'll eventually start to conspire against each other, power games are human nature.

"Hate speech" and "alt-right" are similar terms that are not clearly defined, but conveniently serve the dominant discourse.

reddit's tolerance for "anyone but the bad guys" was brilliantly summarized by SSC: https://slatestarcodex.com/2014/09/30/i-can-tolerate-anythin...

(I agree with the sibling thread that /r/popular looks really fun today! It was a very different place throughout 2020.)

gurkendoktor··on Change your MAC address with a shell script (2019)
When I used something like this on macOS, it confused software like OmniFocus that used the MAC address for licensing and synchronization. I'm not sure if that's still the case, but worth keeping an eye on.
gurkendoktor··on Homebrew 3.0
Homebrew was the first package manager where I actually looked under the covers because everything was pretty easy to follow. I regularly use 'brew edit <formula>' just to see how something is built. I don't see how brew obscures the internals of my computer at all.
gurkendoktor··on Changes to Homebrew adversely affect Python development
Long-term homebrew user here, I have no blog and find the homebrew naming annoying. But being developed in Ruby and on GitHub made it a lot more welcoming than MacPorts ever felt when I used it.

I also never understood the concerns about correctness. Very few people want homebrew to be an apt/rpm replacement for servers that will provide stability for decades. Most Macs are effectively single-user systems, and if something goes wrong then nuking the whole homebrew directory and starting over is not a big deal.

gurkendoktor··on A few HiDPI tricks for Linux
I liked Apple's approach when the iPhone 4 and MacBook Pro 2012 came out. Adding @2x bitmaps was easy enough for developers, and the transition was quick and painless.

Since then, however, Apple's UI has (regrettably) become less about pixel-perfect bitmaps and more about black typography on white roundrects, and almost all Macs run at a scaled resolution by default, which is then typically used to display web-based apps that support fractional scaling.

I really think that Windows' approach has aged much better. Kudos to Microsoft. We could have our cake and eat it too if Apple sold Macs with slightly higher-resolution displays, and also a 5K 27" display because other manufacturers can't be bothered.

gurkendoktor··on A few HiDPI tricks for Linux
To provide some counter-anecdata, if you are in the lucky position to have screens that work at exactly 200% (4K at 24", 5K at 27"), then Ubuntu and its derivatives will Just Work out of the box. At least that was my experience around 2017-2019. Fractional scaling factors like 150% are tricky, but macOS does not properly support them either.

The only app that didn't pick up my DPI settings on Linux was Spotify, but all web-ish apps support ctrl +/-...which honestly strikes me as a big usability win over native toolkits.

I actually found my 5K screen more enjoyable under Linux than macOS, because the performance of JetBrains IDEs on Retina Macs seems to flip-flop between okay and abysmal every year.

Mixed-DPI setups are where macOS is truly superior.

gurkendoktor··on New MacBook Pro models to feature magsafe, no touch bar and more ports: analyst
Even professionals who don't learn to touch-type should at least use an external screen if they use a computer all day, at which point they'll likely use an external keyboard without a TouchBar again.
gurkendoktor··on New MacBook Pro models to feature magsafe, no touch bar and more ports: analyst
But then why add the TouchBar to the MBP and not the MacBook Air instead? I actually think that the TouchBar would be more popular if it was a consumer thing instead of a "Pro" differentiator.

I can't be the only professional who ordered a cheaper M1 MacBook Air specifically because I want to avoid the TouchBar. If the pricing specialist is playing 4D chess then I don't get it.

← PreviousPage 5 of 34Next →