HNHacker News
TopNewBestAskShowJobs

stinos

5,971 karma · joined July 26, 2012

submissionscomments
stinos··on Home Assistant: Three years later
I mean, why not just have HA just control a hardware thermostat that has different mode settings (home, away, etc.)? Plenty of them exist and its, honestly, easier than trying to make HA into a thermostat.

Wel yes, that's exactly my point: when done like that there's a watchdog in place. My issue (or rather reluctantce to use it) is that HA and the likes provide as far as I'm aware no watchdog features for systems which don't yet have it. Think some hardware AND-style gate which is only going to apply HA's last state if, say, HA can prove it is up and running properly.

stinos··on Home Assistant: Three years later
This is the thing, and the main reason I only played around with HA but never fully implemented it. Ideally for things which are controlled in 'absolute mode' you need a watchdog. Like something implemented in hardware to keep it from misbehaving. On the other hand many crucial devices have this built in. But obviously plain lights don't. What I mean is e.g.:

- having HA control your heating's on/off hours, where the watchdog is the heating's thermostat making it stop heating when it's warm enough or forces heating if it gets too cold. So HA crashing and leaving the heating in heat mode might be just a waste but not a serious issue.

- having HA control the wanted temperature on the other hand is more problematic, because for all I know it could misbehave and make the heating want to go to 30 degrees Celcius or to a value so low that there's no frost protection anymore, then crash and never get it out of that state anymore. And there's no watchdog anymore correcting for it. Potentially this can cause issues. Chances are small, but I don't like the idea that AFAIK these chances are much larger than standalone heating acting up like this.

Likewise we can now opt for a dynamic electricy tarrif, basic idea being that for instance when you now the prices are going to drop below a certain threshold during the night you're going to tell your home battery to charge at that time. Of course the thing acts like a watchdog for itself in that it stops charging when full, but there is no watchdog keeping it from charging continuously. In other words: if it's put into charging mode and HA crashes and leaves it in charging mode then it will happily continue charging during peak hours. Not 'serious' per se but pretty stupid.

stinos··on Why is the mouse cursor slightly tilted and not straight?
So the more reason to move it away if it's over things which matter?
stinos··on Why is the mouse cursor slightly tilted and not straight?
This was my first reaction as well, but checking how I actually use a mouse I don't think it makes sense. Curious if it's jut me though.

For starters for normal desktop usage like >95% of the time the thing I want to click on isn't under the mouse yet so it doesn't obscure anything. Instead I move the mouse to it and by the time the mouse is there I don't care what is under it anymore because the decision to click it was made already.

Second when the mouse is over something I need to be able to read it seems I tend to move the mouse away (even when it's over text and turns into a straight cursor). The reason being that no matter what cursor is used its lines are typically wider and higher than the lines in rendered characters underneath so always obscures something. In other words: even if the cursor weren't tilted it would still obscure the same amount of surface, but just in a slightly different location. And that's really only slightly so for practical use won't matter.

Wrt where something is approached from: that depends on where the cursr is and where the target is. It would be really interesting to put this in a heatmap from daily usage, but I quickly checked some of the things I access often, like in my bottom taskbar and browser tab bar at the top, and since the things clicked often are both left and right of the screen and my cursor can be seeminlgy anywhere there might still be one approach direction used more but only by some marging.

Lastly most software I checked where obsucring could actually matter (e.g. CAD) uses custom cursors like 1 pixel wide crosses etc, not something tilted.

stinos··on Study finds that once people use cargo bikes, they like their cars much less
I don't need scaling

Well, ok, then I simply misunderstood the intent of your comment.

Normal people hate

I have no idea where those claims come from, or what you mean with normal people. Source?

E.g. wouldn't normal people rather just ignore articles about stuff they do not care about instead of hating it?

stinos··on Study finds that once people use cargo bikes, they like their cars much less
While this might be true, you'd have to study that as well to be sure. So essentially the question is what would happen if you for instance in a city take people from across the population and force them to use a cargo bike.
stinos··on Study finds that once people use cargo bikes, they like their cars much less
Sure, but the land use for donkeys' housing and especially for their food makes it so that it doesn't quite scale. Unlike bicycles.
stinos··on Why flying insects gather at artificial light
bugs are attracted to light

Isn't the takeaway from this study that they aren't really, but rather that once they happen to come close to it they cannot get away from it anymore?

stinos··on Ubuntu Looking at Applying Low-Latency Optimizations to Its Generic Kernel
Thanks, sounds promising actually, or at least: not at all as I once experienced.
stinos··on Coding on Copilot: Data suggests downward pressure on code quality
for the first time we got to the point that people can create software that "works" but they cannot fully grasp why exactly it works.

The huge amount of times I saw

    //This makes everything work somehow
    sleep(1)
begs to differ
stinos··on Ubuntu Looking at Applying Low-Latency Optimizations to Its Generic Kernel
Are there distros for which this is fixed out of the box already? About 20 years ago we were writing a cross-platform application which required relaltively low latencies (2-5mSec IIRC) for audio with some of the RME interfaces. On Windows (with ASIO) and MacOS (don't remember) this basically just worked and we'd only have to take care not to run too much other heavy bandwith applications at the same time. On any of the *nixes out there it was completely hit or miss. Even after the struggle to get the correct drivers working, it required a myriad of seemingly obscure tweaks and kernel builds only to result in a system which was usually rather unstable at best. Plus the realization that it would be pretty much impossible to ship this because it would require the other party to also apply similar tweaks specific to their distro. I would have thought 20 years would be enough to mature this especially in major distros like Ubuntu but appaprently that is not the case?
stinos··on Each Facebook user is monitored by thousands of companies
Following the instructions I get "You have no available activity to show at this time.". Even when downloading my data I get nothing under sections like "Connected apps and websites". So it looks like opting out of everything possible and running FB in a dedicated FF container only seems to do something.
stinos··on When Optimising Code, Measure
How to decide whether it's worth measuring without measuring?
stinos··on Get a Windows 11 development environment
With slmgr /rearm you can extend the license period. IIRC a couple of times but not unlimited, but I definitely got more than 2 months out of it.
stinos··on The young people sifting through the internet's worst horrors
visiting enough forums

That's sort of the point though: we do that, but whereas around y2k forums were the online communities, I don't exactly have the impression that is still the case. And it's not like you're going to see much NSFL content on, say, TikTok.

stinos··on Heat pumps, more than you wanted to know (2023)
Sorry but no. Then it wasn't a perpetuum mobile. There's no way to violate the laws of thermodynamics. Likely the video was not showing everything, and/or giving a false impression/explanation. Typcial example are those toy birds picking water: it looks like a perpetuum mobile, but it in fact uses the energy present in the water. Once the water evaporates all it stops. Adding new water constantly makes it run forever, but that's by the grace of adding energy into the system hence defeating the idea.
stinos··on The young people sifting through the internet's worst horrors
In this case I was actually wondering about the urologist, not the patients themselves. The latter is a situation I've been in myself so it's easier to relate to and reason about.
stinos··on The young people sifting through the internet's worst horrors
Honest question: do you have such job yourself? Or do you intimately know multiple people who do? Or does this come from research? Because if not, that would just sound like how you'd want it to be. Not necessarily what it is like in reality.

But in any case: yes, I know it's a different context, but that's not the question. Rather: is it realy that easy to just separate context 100%, and at will?

stinos··on The young people sifting through the internet's worst horrors
> I am absolutely certain this has shaped my world view to some degree

On the other hand many people, if I had to guess I'd say the vast majority, have not seen any of that stuff on the internet. I have, but because I actively went looking for it. Likewise if I ask around amongst friends the only ones who saw the real gore all admitted having actively searched for it. In other words: even before we saw it there might have been something different in our world view already.

stinos··on The young people sifting through the internet's worst horrors
That's your opinion, here's mine: I found it sort of funny, plus it actually raises an interesting point (definitely not useless, plus bonus points for such humor btw): I always wonder how gynaecologists, urologists, ... mentally deal with this exact aspect. For instance: what is sex in the evening like if you've seen x different genitals during the day? How easy is it to separate that? Or is there no separation perhaps?
stinos··on Heat pumps, more than you wanted to know (2023)
No because that doesn't exist in practice. The losses of converting the generated energy back into electricity make that impossible.
stinos··on Heat pumps, more than you wanted to know (2023)
the technology is in some aspect particularly impressing

Yes, because for every unit of energy you directly put into it (in the form of electricity) it outputs more energy (in the form of heat). Which is unlike any other typical heating system, which usually puts out less or at max the same amount.

stinos··on Heat pumps, more than you wanted to know (2023)
No. They are not unique at all.

In my opinion they still are pretty unique because their efficiency is higher than 100%. Which was what I thought the sentence would continue with when I started reading it. Cannot be stressed enough. It's like magic :] Sure your LED is more efficient than your incandescent light bulb, but it still produces heat which is not intended nor really wanted. In my book there's no comparing that to a heat pump. That being said, not really a fan of such sentences either.

stinos··on Bad scientific code beats code following "best practices" (2014)
They

Who are these people, really? I mean, I was that for a rather brief period of like a year, somewhere 3-4 years into programming IIRC. I met others like it. But in the end people seem to learn and grow out of it, and rather quickly so, because it becomes clear what the issues are quickly. Really good learning by mistake though, wouldn't have wanted to miss out on it.

mantra

That's imo just another mistake to make: wrapping a rather strict and narrowly scoped principle in a paradigm-like-must-be-followed mantra hurts the right-tool-for-the-job idea, which feels vastly superior.

Firstly the idea that unmaintainable code is necessarily an issue is already wrong to start with, in my book. Obviously it's not ideal and where appropriate - meaning nearly always - should be avoided at pretty much all cost, but I have enough examples where it does not matter at all. As in: code which hasn't been touched in 20 years and probably won't ever be touched. Does it look like a nightmare? Yes. Does it work correctly? Yes. Does it need changing? No. So, is it an issue where spending time (or having spent time) on it would make anything other than the programmer's peace of mind (well, or ego perhaps) better? Clear no.

Secondly: of course I get where you're going with such definitions but it again lacks the very much needed nuancing. I can write unmaintainable code in one file but where you need to change 20 different locations. You could than claim that your mantra still applies because the code should have been split over 20 files, but yeah, that's what you get with mantras :) Likewise depending on the feature it's perfectly possible many files have to be changed but that doesn't necessariy mean the code is hard to maintain. Could try to claim that it wasn't very well architected to start with, maybe, but welcome in the real world where not everything can be thought of from the very start except in small toy applications.

stinos··on 50 Algorithms Every Programmer Should Know (Second Edition)
I came across concrete examples like this before, and solved them, so here's a slightly different take: I'm principally an engineer. In general it doesn't even matter what topic though obviously there are some which I know a lot more about because of experience. Programming is one of them. I don't have a CS degree, I've seen terms like b-tree a ton of times but couldn't even begin to explain what it is, you get the point.

Now: the way I approach an example like this is similar to what you do, but the difference is that I'm merely aware there's a bunch of different containers out there which behave in different ways wrt lookup/add/remove/... and for the vast majority of them I have no clue about the implementation. I don't need such implementation knowledge to realize that another container might be the trick here. I also don't really need that knowledge to decide which container that eventually might be, nor to come to conlusions fast (since you're stressing that): that's a couple of minutes to lookup moreover the final decision stage will be through performance testing anyway, because measuring under actual usage is the only way I'll ever be convinced one is effectively better than the other. That's usually what is going to take time, not picking one out of x. In the extreme it might even be so that I'd first need to write a wrapper to then have a configurable container type just to be able to have people test it under different workload types, etc.

Obviously I've been through this a couple of times and by doing so did become aware of main traits of various containers/algorithms/... and yes that will be somewhat faster in the decision process. Likewise there have been certain domains in which I did dig down all the way to the very bottom and obviously having to sort out problems in that domain will be faster for me. But in the end: for me personally 'x algorithms programmers should know' is useless. Job-dependent perhaps, on the other hand I've seen enough people struggle to come up with actual and practically useful software aspects exactly because they kept on getting lost in implementation details.

stinos··on Making my own bed sensor
Ok but can you tell them 'go to state x when HA is down'?
stinos··on Making my own bed sensor
Bit off-topic, but having played with HA a bit I always wonder if there is a general strategy on how to deal with failures, i.e. is there a way to make everything go to the default/safe mode in case things stop working? A watchdog-like backup system? And another backup for that :) I get that it's unlikely to happen, but still.. Like:

- some sensor triggers lights on via impuls relay (that's what I have to happen in my home), HA stops functioning, lights remain on. How to make sure instead they're turned off? I get that not using impuls relays but relays which need to be driven high constantly might be one step in the right direction, but that would still assume whatever line the relay is driven with is pulled low when HA stops functioning.

- you setup HA to instruct your home battery to charge during off-peak hours, HA stops functioning during off-peak, battery is left in 'charge as much as you want' state. Unless battery has functionality to tell it 'charge max x hours' it will try to keep charging, whereas it would be nicer if it wouldn't

- same for heating: leave for vacation, tell HA to put heating in low power mode but to start heating the house again in normal mode 3 days before I'm back (because that's roughly the amount of time needed with low temp heating to get everything warm again). HA stops, I come home to a cold house.

stinos··on Why a spritz of water before grinding coffee yields better results
More like in the 24*60 - 5 minutes between brewing and grinding again the next day. In all seriousness: it can takes surprisingly little time for ground wet coffee to form mold. Think 48h range especially when it's relatively hot.
stinos··on Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
Add the preview to see what you're actually stashing:

   git ls-files -m -o --exclude-standard | fzf -m --print0 --preview "git diff {1}" | ....
And that's just the start: it could even be that by binding a key to the fzf reload command to then display the diff in it's finder, and in turn a key to stage the selected line, you could turn that into an interactive git staging tool.
stinos··on Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
This might make me finally embrace powershell

Yeah, I have a bit of a love-hate relationship with it. But I actually have that with all shells out there. I don't know if it's just me or the shells, or (the most likely I think): a bit of both. But PS is available out of the box and using objects vs plain text is a major win in my book, and even though I still don't know half of the syntax by heart it feels less of an endless fight than other shells. And since I use the shell itself for rather basic things and for the rest only for tools (like shown here), we get along just fine.

← PreviousPage 4 of 34Next →