Hacker News new | ask | show | jobs
by fy20 40 days ago
I think it's worth remembering that outside of our bubble the quality of software is pretty bad. I had a Hitachi heat pump (not recommended) installed earlier this year, and the software is pretty disappointing. It mostly works, but there are so many undocumented features and hard coded values that should be a configuration option but are not.

For example when the heat pump reaches the target temperature it shuts off, then after 3 minutes switches on again. To prevent short cycling, I'd like to decrease the time between runs (so increase the 3 minutes) but that can't be changed. Somebody decided that 3 minutes is the correct value for everybody and that's it.

I bought a €400 interface box (basically just a serial to IP interface, I guess $20 of hardware tops) to try and improve it. The €8000 heat pump doesn't come with WiFi or ethernet out of the box, you need to buy an accessory for that. It's not made by Hitachi, but it's an officially recommended accessory. One of what feature I wanted it for - which is advertised in their marketing materials - doesn't work.

I emailed them, and they said it's probably because the display I have is a newer revision and doesn't allow access to the setting I need to turn on. And without turning that setting on I can't use the feature as advertised. They said I should email Hitachi and talk to them instead as it's not their part that's the issue.

I look forward to the world where all software is either open source, or at least reverse engineerable to the point where you no longer have nonsense like this.

7 comments

> outside of our bubble the quality of software is pretty bad

It's pretty bad inside the bubble too.

I’ve probably worked on 100+ software and hardware products for consumers, military and industry

.0001% of that software had formal verification, bitwise memory management, 100% test coverage, clean documentation and specifications, a clear roadmap, long term sustainability plan and sustainable economics

Technology is like a good meal: only possible for a moment and only a moment.

too early and it’s inedible too late and it’s spoiled.

Thirty minutes spent talking to users is worth multiple percentage points of test coverage.
What if i told you

User testing is part of test coverage

I think he is talking about talking to users BEFORE coding

At least that is true for my software coding processes; I always found getting the actual coders talking directly to the actual users — not the managers talking to the managers — vastly improved the software delivered along all three axes of schedule, budget, and quality, and dramatically reduced test/redo cycles. Just having the coders in direct contact, they hear about the real used cases, edge cases, and frustrations, and so can make good judgements about many decisions, rather than blind judgements.

> 100% test coverage

I don’t believe in 100% test coverage. Especially outside some very specific cases, it just adds a lot of code with little to no value.

Also what is 100% test coverage?

If I have a function add_nums that takes 2 numbers and adds them, there are like infinite inputs that can be tested.

If I have a function shape_color that can take circle, triangle, square for the shapes and red, blue, for the colors, then there are 6 different states. But what if my function just returns if it is a circle or triangle. It only cares about 2 different color paths when it is a square. Do I test all 6 states or do I test only the 3 code paths?

I think code coverage like many things is a “it depends”.

I think 100% code coverage usually means that for every branch, there is some test that results in it going down that branch? Like, there’s no line of code (outside of potential exception handling code?) that isn’t “tested” by any test (where “tested” means “it gets run during the test”).
>> If I have a function add_nums that takes 2 numbers and adds them, there are like infinite inputs that can be tested.

That's what formal verification is for: you generate math statements from the code, and then prove them.

Testing is for covering the most common scenarios and likely edge cases. 100% coverage means every line of code in the app is executed when your test suite runs. It is useful as a bare minimum, but by itself does not guarantee that there are no bugs.

It really depends on the shape of the tests and the shape of the language. Eg: Untyped languages often have tests that effectively implement a type system as software grows and the developer count grows. That seems like a waste…

Writing a good test or good set of tests does take effort but enforcing 100% coverage often pushes some folks to just run the code in any way possible within the test subsystem.

> Untyped languages often have tests that effectively implement a type system as software grows and the developer count grows. That seems like a waste…

Nicely put. A very verbose type system that is also placed too far away from the definitions indeed

It’s a question of the degree to which you want a self audit to be native to your structure or not

if you are confident that the complexity of what you have built can be fully tracked in your head then either you are some sort of God or you’re not used to building complicated enough things with critical failures attached to them

Say we have a trivial function like this

    func below_ten()
      if 10 < x
        println(“true”)
      else
        println(“false”)
      end
    end
Now what would a test for these two paths test? It would basically be writing down the same - easy to understand logic - in a less generalized way. Good perhaps to ensure that this function doesn’t accidentally change over time but apart from that it wouldn’t add much value.
A test would possibly have caught that the condition in this trivial function is backwards.
> It would basically be writing down the same - easy to understand logic

Perhaps this is a sign that this function isn't necessary.

I also do not believe in it, rather I believe in 100% test coverage for the money-making code. Which is something like 5% of a product in reality.
.0001% of 100 projects is less than a single one of those projects. :)
Indeed ;)
Hehe thank you for that. It made me laughed. I fully agree of course.
The call is coming from inside the bubble!
Hardware companies (and Japanese hardware companies in particular) don't care for or understand the rules that govern software.

Neither do governments, incidentally. They're okay-ish at skyscrapers and bridges, but software is just beyond them.

Any take on why that is the case?
I'd say that hardware manufacturers are not accustomed to software flexibility.

They may treat changing a timeout value like changing a capacitor with one of a different value on a PCB. Doing it is slow and expensive, involving suppliers, delays, testing campaigns, etc... So that's the kind of thing that is specified up front, to avoid having to touch anything in production. If a change is needed, it will go in V2, months later at best.

It has some advantages, such as not breaking things that work, but they are also not fixing things that don't.

To add on I've seen a lot of instances where hardware people build software...like hardware people. They think in terms of relays and maybe PLCs and build their software along that model. They're sort of stuck thinking in terms of hundreds or thousands of Hertz. They don't really internalize that a little silicon bit can run at hundreds of megahertz and read sensors thousands or millions of times per second.

It's not about being dumb, I think it comes from the mental model where big electrical appliances/machines are controlled by big slow relays and switches. Changes to the state of operation involve inertia and momentum and huge power spikes and fuses that make extremely loud noises when they blow.

Doesn't need to be open source in itself, we need standards that are used and shared.

Even if its closed on their end, having standards is the key.

> Even if its closed on their end, having standards is the key.

Good standards are often (all of the time?) ignored by bad developers.

I'd say more of a commercial issue, creating your own walled garden is lucrative.
In defense of the "bad developers", many "good standards" seem to be deliberately inaccessible to anyone not joining the faith and making it their life's work to understand it. Standards that require a new vocabulary of already overloaded words and concepts are not that good. Often you can't know part of a standard and be better off for it. If you want wide adoption, don't target the narrow.

A good standard lets the bad users grow into better users. It's like the gap between novice vs pro graphics software. It's a novice trap. The novice software is so limited and "easy" that when a user needs a "pro" feature they have to jump off a cliff to learn a new universe--all at once. The "easy" novice software is good at keeping you there at that level. It often does nothing to prepare you for graduating to the next level. The gap is so wide that it hardly matters if you started off using the "beginner" software. Inaccessible pro software combined with beginner software that avoids teaching... it's just never going to be a pipeline.

Good developers are a rare resource yet we push back on efforts to improve mining them with gatekeeping. Part of the reason you are the "good" developer you are today is because there are so many tools that let you do bad things which became lessons.

If you want your blessed standards to change bad developers then you have to build in footholds for them. I think if you look at the poorly adopted "good" standards you'll find that there's a strong correlation with poor accessibility. Are you going to turn all the bad developers into good ones? No, but you might be able to elevate a chunk them to less annoying mediocre developers and I think that's worth it.

Is it really surprising that bad developers ignore good standards which ignored them? Good standards nudge rather than trap.

This subject is way off topic but let me try and bring it back in (a wee little bit). Yeah, I'm gonna coddle the common folk some more... We hate the vibe coding from the riffraff but we went out of our way to not vibe with them! I look at the vibe coding as desperate feature requests. If we want them to come to us "good" coders instead of the AI... maybe we need to meet them where the AI did. Maybe just a little? Is it taking our job away if we weren't doing that job to begin with?

The toasters be uncovering stuff and it's time to get creative... because we're the ones that are good at creative, right? TYFCTMTT.

Standards could help the vibe coders.

I've always taken it that I don't really care if someone uses a closed email client, ive already sent them data, out of my control.

Yet if you want to use IM or such, people will only talk to people with OS clients as that is all their contact is able to use on that network. Leading "all or nothing"-ness.

And to add, federation is the cherry on top.

And standards are what's going to probably fall to the wayside, since that's something that engineers care about. Vibe coders don't

Despite the fact that fundamentally vibe coding is enabled by good interface specification and design specs by engineers

Eh, I think it's a continuum , small projects don't need standards, but large projects eventually need standards.

For example, Beyond All Reason recently added code format linting errors and static code analysis just to help alleviate the load on the small group of people doing code reviews. The project had been getting along without it, but with well-meaning-but-vibe-coded PRs being proposed at an incredible rate... There was value to be found in automated (non-llm-based) code review.

https://github.com/beyond-all-reason/Beyond-All-Reason/tree/...

And standards are what's going to probably fall to the wayside, since that's something that engineers care about. Vibe coders don't
The massive category of software that companies actually don't want to write or maintain....

Now we just have to get them to expose interfaces so that we can write the software for the interfaces that we want.

To play devil's advocate, couldn't certain modifications to a heat pump damage the unit?

I'm guessing they made "happy path" decisions thinking most people aren't going to modify cycle timing, or know how to do that or what it entails. That 3 minutes was probably decided on by a group of engineers who thoroughly know the product. Especially if they provide a warranty.

You may know / understand a heat pump system but if I modified values with no safeguards on mine I'd probably break it within the hour.

they could, 3 minutes is a hard limit between reestarts to leet everything stabilize, the same way they say you shouldn't plug in a refrigerator after moving before letting it 4-6 hours still. you should be able to play with the hysteresis or with using another thermostat if you don't want it to cycle so fast.
Technically AI makes it much easier to reverse-engineer software, so long as the guardrails don't randomly kick in.
A bit harder to reverse the baked in firmware. Beyond your garden variety of hacker for sure.
Lucky for us, the embedded folks don't take security too seriously! You don't need to be a garden variety hacker when your LLM can handle the drudgery for you.
It’s getting a lot easier these days. The microcontrollers these are built on are not and have never been actually secure. But I know that because I’ve built firmware for them in production, I guess
Should’ve bought a Panasonic. Everyone knows Hitachi sucks for programmability hardware is good though.