HNHacker News
TopNewBestAskShowJobs

hamstergene

1,307 karma · joined May 9, 2012

submissionscomments
hamstergene··on Better Error Handling
Returning error codes was actually the first approach to error handling. Exceptions (try/catch) became widespread much later. The article got it backwards calling try/catch "traditional" and Go's approach "modern".
hamstergene··on Zack: A Simple Backtesting Engine in Zig
I can't help but notice how these studies always ignore that one's presence on the market changes the market. Past data without your bids is a slightly different data set than the same data with your bids. Every trade you would have got would mean someone didn't get it and instead tried some other trade, which isn't in the data set that is being trained on. Or maybe it would be your strategy that would fail a desired trade: market isn't a grocery store, bids are not guaranteed to be fulfilled. The difference is more and more the bigger amounts of money one flexes.

Perhaps this effect is ignorable if one trades insignificant volumes, but then, one can't get rich on trading insignificant volumes, so what's the point.

hamstergene··on SQLite File Format Viewer
This is super cool and will really help anyone studying how to build their own storage engines.

A note: the table that describes the data structures (Field # | Description | Value) should also list the data type (uint8 uint16 int32 text etc.). If it's an enum ("Table Leaf"), reference other possible enum values. If its length depends on another field, reference that field No.

hamstergene··on Capitol Trades: Tracking Stock Market Transactions of Politicians
Publicly announcing trades many months ahead should be enough, without having to get too radical about it.

It pretty much prevents benefiting from "subtle insider" trading via being lobbied by corporate officials or getting any friendly hints from them. The problem with "follow Nancy's trades" idea is that by the time the trade is known, the price has already corrected. The first one to complete the trade is often the only one to collect a significant benefit, the followers get scraps.

And it indirectly disincentivizes owning individual stock because prearranged trade of one stock carries a risk of being screwed by market manipulators, while prearranged trade of a broad index fund is not a problem.

hamstergene··on Dijkstra On the foolishness of "natural language programming"
They do way more than that. For example they won't allow you to have Foo-1 that depends on Qux-1 and Bar-1 that depends on Qux-2 where Qux-1 and Qux-2 are incompatible and can't be mixed within the same static library or assembly. But may allow it if mixing static-private Qux inside dynamic Foo and Bar and the dependency manager is aware of that.

A native submodule approach would fail at link time or runtime due to attempt to mix incompatible files in the same build run. Or, in some build systems, simply due to duplicate symbols.

That "just in a recursive way" addition hides a lot of important design decisions that separate having dependency manager vs. not having any.

hamstergene··on Dijkstra On the foolishness of "natural language programming"
Reminds me of another recurring idea of replacing code with flowcharts. First I've seen that idea coming from some unknown Soviet professor from 80s, and then again and again from different people from different countries in different contexts. Every time it is sold as a total breakthrough in simplicity and also every time it proves to be a bloat of complexity and a productivity killer instead.

Or weak typing. How many languages thought that simplifying strings and integers and other types into "scalar", and making any operation between any operands meaningful, would simplify the language? Yet every single one ended up becoming a total mess instead.

Or constraint-based UI layout. Looks so simple, so intuitive on simple examples, yet totally failing to scale to even a dozen of basic controls. Yet the idea keeps reappearing from time to time.

Or an attempt at dependency management by making some form of symlink to another repository e.g. git modules, or CMake's FetchContent/ExternalProject? Yeah, good luck scaling that.

Maybe software engineering should have some sort of "Hall of Ideas That Definitely Don't Work", so that young people entering the field could save their time on implementing one more incarnation of an already known not good idea.

hamstergene··on Apple needs a Snow Sequoia
I keep being tempted to write same post but named "Does all software work like shit now?", because I swear, this is not just Apple. Software in general feels more bugged as a new norm.

Most websites have an element that won't load on the first try, or a button that sometimes needs to be clicked twice because the first click did nothing.

Amazon shopping app needs two clicks every now and then, because the first one didn't do what it was supposed to do. Since 3+ years ago at least.

Spotify randomly stops syncing play status with its TV app. Been true for at least a year.

HBO app has subtitles for one of my shows out of sync and it has been for more than a year.

Games including AAA titles need few months post-release fixing before they stabilize and stop having things jerk themselves into the sky or something.

My robot vacuum app just hangs up forever once in a while and needs to be killed to work again, takes 10+ seconds after start to begin responding to taps, and it has been like that for over 2 years of owning the device.

Safari has had a bug when opening a new tab and typing "search term" too quickly, it opens URL http://search%20term instead of doing a Google search. 8 years ago I've opened a bug for that which was closed as a duplicate, and just recently experienced this bug again.

It really seems that criteria for "ready for production" is way lower now. If my first job 13+ years ago any QA noticed any of that above, the next version wouldn't be out until it is fixed. Today, if "Refresh" button or restarting the app fixes it, approved, green light, release it.

hamstergene··on Rod Serling on Doomsday
A lot more than conspiracy theories is explained by that. Why people join religions and cults despite obvious huge gaps in their worldview. Why people follow political leaders while being aware of their reputation of lying and/or lacking reputation of being successful at what they claim to do.

Ever since I discovered the concept of emotional neglect I am growing in belief that problem is a lot more pervasive in society than a few therapy patients. Just because most people have no complaints doesn't mean they were not affected.

Our culture has made rational behavior such a huge virtue that seeking good emotions became something that needs to be pointed out as a revelation, even though seeking to feel good is literally the biggest and maybe the only motivation people have. The default assumption when understanding other people is to expect them to prefer what makes sense over what feels good, which is not true.

Metaphorically, if one has a culture that teaches people to believe that body temperature is fundamentally unimportant and mostly random noise, would it really be a surprise that people ignore your attempt to convince them in diagnosis A over B when the only difference between those two were the presence of fever? That will be like convincing to choose A because it's summer, people will just shrug it off.

In your example, when you shout about "seeking satisfaction and comfort" the receiver instantly skips that because "no way that is important enough to be the true reason". Maybe it's not as hopeless, one just needs to focus less on shouting messages and more on ensuring the receiver has enough fundamentals to get them.

hamstergene··on Russian family lived alone in the Siberian wilderness for 40 years (2013)
It's because the current state propaganda pressures people with constant "they are same bad just hide it better" rhetoric, which itself is copied from Cold War era whataboutism.

My parents and relatives say the phrase "America has all the same..." literally every time anything political comes up, which is a pretty odd thing to say for people who aren't even able to read English-language media, least of all been here, which they admit but the next time say it again anyway. It intensified after 2013-2014 and hasn't been true at all during ~1995-2010.

It clearly comes from Putin's government insecurity about their comparative performance, rather than from any Russian cultural trait.

hamstergene··on OpenAI is good at unminifying code
Why not count the fact that humans created a tool to help themselves at unminifying towards human score?

Having a computer multiplying 1000-digit numbers instantly is an example of humans succeeding at multiplying: by creating a tool for that first. Because what else is intellectually succeeding there? It’s not like the computer has created itself.

If one draws a boundary of human intelligence at the skull bone and does not count the tools that this very intelligence is creating and using as mere steps of problem solving process, then one will also have to accept that humans are not intelligent enough to fly into space or do surgery or even cook most of the meals.

hamstergene··on Creativity has left the chat: The price of debiasing language models
Saying biasing implies infinite possibilities to which the data can be made biased towards. It instantly raises the question why bias towards this and not something else. It almost sounds like a bad thing.

Saying debiasing implies there is a correct result which needs to be achieved by removing bias. It raises no questions, we want correct, we don’t want incorrect. Doing a good thing implied.

Don’t misinterpret me, I don’t think public models should spew commonly harmful content out of the box. Just explaining the PR trick, which is what the word “de”biasing de-facto is in this context.

hamstergene··on Simple sabotage for software (2023)
Not sure about the entire list, but I've seen 4 of those many times. They are common techniques of impostor-employee to fool an impostor-manager:

1. A person who knows little of the topic assumes that talking a lot means knowing a lot. Hence long ChatGPT-like speeches. This has been my personal number 1 red flag since long before LLMs became a thing.

2. An incompetent manager is helpless in a situation when "everybody screwed up a little bit" as they don't pay attention to ownership or don't even understand its importance. Hence creating groups/committees to blur personal responsibility.

3. "Bring up irrelevant issues" is natural consequence of not understanding the topic very well, combined with forcing oneself to take part in the discussion. Pretty sure it's not even intentional. But either way, it's irrelevant from your point of view, but not from the the manager's, so it works.

4. Advocate caution at everything is because if the team screws up and attracts attention from higher ups, people at the most risk will be the lowest performers and the manager. It's a shared interest.

hamstergene··on Don't Worry about LLMs
Unless I missed something, X has owners who can be coerced by a government and moderation instructions are not publicly open.
hamstergene··on Don't Worry about LLMs
My (easy?) answer: blockchain-based owned by no one news/discussion platform a-la Reddit/HN, moderated by AGI instructed for fairness, fact-check, against private-interest propaganda and deceit.

Can’t imagine any way to make any money on that, though.

hamstergene··on Sampling: What Nyquist didn't say, and what to do about it (2018) [pdf]
I detect some fallacy here.

The real benefit is not using 6x network bandwidth, storage, memory, processing power and more battery of the mobile device. That benefit is not going anywhere, no matter what.

Post-processing is applied to the signal which is physically impossible to distinguish from the source. It is true that it often needs higher resolution, and DSPs will upsample internally and then back and operate on floats. But to claim without evidence, that post-processing may give human listener back the ability to tell apart whether 192/24 medium was used instead of 48/16, would be to reintroduce the same quality-loss paranoia, just with an extra step. If one couldn't hear the difference before an effect was applied...they won't hear it after.

As for DJs, they do use high-res assets when producing mixes. That's still mastering stage, technically.

hamstergene··on Sampling: What Nyquist didn't say, and what to do about it (2018) [pdf]
This could be a useful disclaimer, to say "we are talking about recording and processing and NOT about playback".

Audiophiles demand streaming services to provide 192/24 because they see the music being originally mastered at high sample rates, and from that conclude that listening to 48/16 is a loss of "original recorded quality".

I can totally envision audiophiles picking up the Wescott's article and using it as "scientific" argument to distribute more Hi-Res music, and some half-technical manager buying that. They won't even read it.

hamstergene··on How to fix the disastrous new Xcode 15 console
I work on a multi platform library so I have to use Xcode, Android Studio and Visual Studio regularly all at once. Android Studio has been the worst for me all this time. The IntelliJ interface is better than Xcode but I swear every time I touch Android Studio there is something new broken. Every single time.
hamstergene··on A BART seat-slashing gang that was part of an upholstery racket (2019)
When the only measure of success is cashflow, things are doomed to converge on ugly messes sometimes, because that is what max cashflow randomly happened to produce, and no one has ever promised that max cashflow == peak social development.
hamstergene··on LLMs confabulate not hallucinate
There are plenty of examples, yes. Abstract art: a bunch of meaningless color patches in which certain viewers manage to find something "deep". Other examples are audiophiles and sommeliers. All those are well known to pay solid sums of money for something they are just imagining, to sellers who managed to exploit this effect.

But creating a new cult (let's call them all "cults") is rare. It takes a person with a unique combination of skills and talents, I bet most of us can't start a religion or succeed at selling snake oil at will. But with help of LLMs...

hamstergene··on LLMs confabulate not hallucinate
Some of the most annoying moments in my career were occasional coworkers who talked a lot without making a point. They just invoked topics loosely related to the problem at hand, like stories from previous jobs or what they've read on the internet about this problem, until the manager said something like "are you trying to say that..." and then formulated what they thought the point was, except that the speaker clearly never intended to say anything like that. All the other engineers in the room are giving each other side eye but the manager thinks they've just got "a valuable input".

The tactic is simply to talk relevantly until the listener fools themselves into thinking they understand you, except that "understanding" will be an illusion and 100% manager's own analytical effort. And it's honestly embarrassing how often and well that works. Quite a few of those guys were promoted first, too.

I'm pretty sure our upcoming future with AI will be like that quote from forest ranger at Yosemite National Park, on why it is hard to design the perfect garbage bin to keep bears from breaking into it: "There is a considerable overlap between the intelligence of the smartest bears and the dumbest tourists."

The whole idea of a criteria to separate humans from AI is a misconception. I think any human who confuses smooth talking with making sense will be ruthlessly exploited in relatively near future. There are humans who already do this successfully to other humans, what do you think will happen when they get to automate their efforts.

hamstergene··on A small number of companies are colluding to cheat H1B visa lottery, US says
This could be just the reason why Congress is turning their attention to work visas.

IIRC green card problem began simultaneously with H1B problem, between 2005-2008. It makes sense: if the major entry to the immigration pipeline ends up 75% of Indian nationals, of course the exit for India-born (due to per-country diversity rule) is jammed.

I know backlog growth has a few unrelated causes adding up together, but at least 90% of the mess correlates very well with overuse of H1B and L1B (transfers) by odd consultancy businesses. Other factors don’t seem as important, for example, China has the same population size as India, but its wait time has been growing several times slower. Both problems are clearly connected.

hamstergene··on FBI chief says TikTok 'screams' of US national security concerns
Neither of the mentioned China/Russia/Turkey allow only state-controlled apps. They allow everything, but ban unwanted or noncompliant ones.

What does state control look like in your head? Putin sending an email “please disregard your manager’s orders and do this instead”? Such thing has never existed because it is physically impossible to micromanage thousands of companies.

State control is monetary handouts or fines, bans and coercion under a threat of those.

Kinda like you’re staring directly at state control and can’t recognize what you’re looking at.

hamstergene··on Why is Rosetta 2 fast?
Could it be simply because many binaries were produced by much older, outdated optimizers. Or optimized for size.

Also, optimizers usually target “most common denominator” so native binaries rarely use full power of current instruction set.

Jumping from that peculiar finding to praising runtime JIT feels like a longshot. To me it’s more of an argument towards distributing software in intermediate form (like Apple Bitcode) and compiling on install, tailoring for the current processor.

hamstergene··on Muon: GPU Based Electron on a Diet
> Ultralight is free for non-commercial use, educational use, and also free for commercial use by small indie developers making less than US$100,000 a year.

I feel like the reason we have ended up with Electron is that well-funded developments from large companies (like WPF, SwiftUI) always seek to lock-in developers to their single platform, well-funded from independent ones (like Qt) cost $$, and the rest just stays permanently underdeveloped from lacking dev resources.

The result is that the lowest common denominator wins: free and standardized web tech, repackaged as desktop apps. I haven't seen any older desktop UI developer who'd like Electron, yet I bet every one of us has at least a couple of Electron apps installed as they're reading this.

Let me ask this question: what is the luckiest, ideal scenario for a project with such license, if it takes off and everyone loves it and everything goes well? Probably displacing Qt and taking over their market share? That doesn't sound anywhere close to Electron killer potential to me.

hamstergene··on Your online identity is owned by your email provider (2019)
But what credentials do you use to log into the personal domain name provider, to manage it? Another email?

Unless there is state-guaranteed ownership of a domain name, this will remain to be chicken-and-egg problem: to manage a domain one needs an account with an email, and to have an independent email one needs a domain. Even then, moving between countries is normal now which poses a huge challenge to the concept of "online identity", because what one state guarantees is not necessarily what another recognizes.

hamstergene··on Why did Airbnb dump React Native? (2021)
> But wouldn't knowing that require that you investigated the tech choices of all the apps you are using?

I did investigate every app I ran, because I was programming UIs and was interested in all tech that was there. To the point of being able to tell whether the app was written with Delphi or Qt or MFC/ATL by just playing with it.

Qt apps on Mac always stand out, being "OK" is the top they achieve.

Windows is less offended because it has never had a stable style, but still, there are always tiny details like context menus or not responding to Ctrl+Arrows that give non-native away.

hamstergene··on Why did Airbnb dump React Native? (2021)
I have never seen cross-platform UI that would work and/or look close enough to native. It has always been classic "choose any two": cross-platform, UI, great.

There were many people who claimed they have achieved all three, but at the close examination all of them, 100% without exception, were missing many little things like standard shortcuts, respecting color preference in user settings, or just couldn't see the difference between 11pt and 13pt fonts while looking directly at them.

10 years ago I worked on rewriting Qt interface of a desktop app back to native for a similar reason, and now I am reading all the same story except it's about React Native in mobile apps.

hamstergene··on Reference count, don't garbage collect
For a unifying term I prefer Automatic Memory Management.

One reason is that GC is already universally used to mean only tracing garbage collection, and trying to defend its wider meaning is a pointless uphill battle.

Another is that is suits the job much better, because not every AMM technique works by producing garbage then collecting it, you know.

hamstergene··on 'I want your Instagram account': a deadly campaign over coveted handles
I think a lot more important part of the problem is getting SWATted and potentially killed by the police. For which they will also receive minimal to no punishment, so no change in future behavior either.

It wasn’t spoofing per se that caused the word “deadly” appear in this article’s title.

hamstergene··on Arabs believe economy is weak under democracy
Economy is strong under competent management, and weak under incompetent management.

Under democracy, the incompetent officials call be changed to let others try.

Under authoritarianism, those who speak again incompetent officials get silenced, and the everyone is stuck.

Democracy is not about being strong all the time, we already know such thing is impossible due to external events: trade partners recessions, trade disruptions, trade partner currency swings, large natural disasters. It prevents anyone from monopolizing power and using that to have everyone suffer from their incompetence for lifetime. (Also known as “Bad Emperor Problem” in context of Chinese history).

← PreviousPage 2 of 7Next →