HNHacker News
TopNewBestAskShowJobs

davidhyde

2,818 karma · joined April 7, 2016

Curious software developer
submissionscomments
davidhyde··on What do Americans think about plastic waste in 2024?
An even bigger issue is educating people that plastics (that can be recycled) can only ever be recycled once and not over and over again like glass and tin.

https://www.plasticexpert.co.uk/how-many-times-can-plastic-b...

Once they know that they can decide for themselves if it’s ok for their take away food container to end up as a park bench at best.

davidhyde··on You'll regret using natural keys
A natural key is what I would normally call unique index. Say first, surname and date of birth in an employee table as a bad (poor design) example. As opposed to a surrogate key like personId being an auto incrementing ID which is the norm since it can be easier to use when joining tables. I wish articles like these would explain terminology up front. I found it irritating to wade into the anecdotal trivia and not know what I was reading about and I’m very familiar with how databases work!
davidhyde··on The reason the Internet sucks now
There is nothing wrong with the internet. It is operating as intended, completely out of control like it should be. Big corp has created an easy mode (which is criticised in tweets like this) but the all the interesting stuff is still there. And a lot more of it now too. You’ve always had to actively look for stuff instead of expecting it to come to you.
davidhyde··on It's OK to feed wild birds – here are some tips for doing it the right way
You're confusing, pandas with marsupials ;)
davidhyde··on Think Twice, Code Once
> "When I review code from more junior developers or even tenured developers, I find a tendency to either overengineer or overcomplicate solutions"

The article then launches into recommendations about requirements gathering and writing down your thoughts (functional specs anyone?) which kind-of sounds a little bit like the waterfall method to me. I believe the waterfall method has a bad reputation for overengineered and overcomplicated solutions. We have come full circle, again!

No matter the methodology there seems to be this behavior in the industry that as soon as some code does the job, regardless of how terrible it is, it must not be touched again and we must move on. Whether it was over-engineered because of bloated requirements gathering or because it was hacked into some sprint period the end result is the same.

My recommendation is this: Don't discourage people from refactoring code that already works. Good code will survive refactoring or even rewrites.

davidhyde··on [dead]
Agreed, blogspam indeed!

Anecdotally, I have been impressed by the RFID system the the Decathlon sports store uses. Used it myself and it works a treat. Throw all your items into a bucket, tap your payment card on the normal card machine (or use apple or google pay), collect your stuff and walk out.

The technology isn't even that fancy. Each item has a very cheap radio frequency id tag in it which has a unique number. If that doesn't work there is a handheld barcode scanner (which I've never had to use). A successful payment marks the specific item in a database (probably in-store) so the scanners at the entrance don't set off an alarm when you leave. You don't have to download an app or have an account with anyone. It doesn't need AI, special cameras, weight scales or offshore workers to run.

Here is a random article about it: https://www.nfcw.com/2019/03/19/362056/decathlon-adds-rfid-t...

davidhyde··on Oakland officials vote to rename airport despite SF threatening to sue
London Heathrow Airport, London Luton Airport, London Stansted Airport, London City Airport, London Southend Airport, London Gatwick Airport

In a circle around London with distances ranging from 8 to 40 miles from the city. Doesn’t seem that confusing for travellers, just gives them more options.

davidhyde··on What part of Rust compilation is the bottleneck?
This is true but what is really happening is that the frontend and backend cannot communicate intent effectively because of they way they are separated. The frontend doesn’t know what is important for optimisation because that’s not its job and the backend only sees the code the front gives it (never a wholistic view). So the easiest (and slowest) approach is to do everything over and over again.

Increasing Codegen units (multi unit compilation) is just the user taking a risk that splitting things up will not affect performance optimisations. Nothing smart about it.

If you had tiny compilation units and the frontend understood their significance to the backend then it would be able to build a graph of dirty code to be recompiled when a small piece of it changes.

davidhyde··on What part of Rust compilation is the bottleneck?
If you make a small change to your application, the Rust compiler does a significant amount of rework. That is, it recompiles a lot of code that it has already compiled before. There are valid technical reasons for this because of how LLVM works or that the linker needs to rewrite all addresses. Yes, incremental compilation is a thing but it’s too coarse IMO. To me it seems that taking an extremely fine grained approach to compilation would improve the ergonomics of the iterative hack-and-run method of writing software. Some sort of local database of diffs or some such.
davidhyde··on HP wants you to pay up to $36/month to rent a printer that it monitors
I wonder if anyone will print ink greedy documents like full page colour images just to mess with the economics of the system.
davidhyde··on A small Rust binary indeed (2022)
The author got 400 bytes, not 400KB though.
davidhyde··on UPSes suck and need to be disrupted
I think that what the author is really looking for is a battery inverter setup and this is quite a mature market. A lot of countries out there do not have stable electricity supply and these things work for all appliances. Something like this (https://bluettipower.co.uk/products/bluetti-ac500-b300s-home...) although there are a huge range of brands and prices in this space.

Pc UPS’s are underpowered and the market is so swamped with cheap garbage as the rant suggests that it is difficult to find anything decent.

davidhyde··on Ask HN: Lenovo encouraging Chromebook users to install Linux?
The Linux distros I have used do not seem to turn on full blast anti-virus scanning and search indexing when your laptop goes idle. Not sure about ChromeOS but this is something that causes terrible fan noise on Windows when you expect the machine to be silent. I never could get it under control way back when. Lenovo may not like the negative reviews about fan noise and battery life when it’s generally a software problem.
davidhyde··on Anon Boeing engineer reveals why the 737 door blew off
At least the front didn't fall off. https://www.youtube.com/watch?v=3m5qxZm_JqM
davidhyde··on We saw a Pi running underwater at CES in Las Vegas
Distilled water does not conduct electricity. It is the dissolved ions in the water that allow electricity to conduct. You may be able to clean the PI to such a level that nothing dissolves into the water when it is submerged.

https://techiescientist.com/does-distilled-water-conduct-ele...

davidhyde··on Software firm SAP to pay $220M over bribery charges
The article doesn't say who gets the proceeds of the fine. It's a fairly important piece of information since it is conceivable that the countries that were hurt by the corruption may not see any of it.
davidhyde··on 48x32: A 1536 LED Game Computer
Great project! One small thing that has worked well for me with led contrast is to cover the whole display in black leg stocking material.
davidhyde··on The Machiavellian Maze
> “Success inspires more devotion than friendliness and affability”

Seems to ring true with a lot of leaders.

davidhyde··on Pitivi – Free video editor with a beautiful and intuitive user interface
> “and there’s no one with the power to rebuff them”

Except for those that discover the fork button. /s

In all seriousness I think that what you mean is that people rarely have the power to fork a project and drag all the users and development expertise over to their version. Especially if they are simply users of the system and not contributors. Users of commercial software can get companies to do stuff for them with their wallets.

davidhyde··on Does uBlock Origin bypass the latest YouTube anti-adblock script?
Some people would be ok with paying but you cannot pay and still be an anonymous user. You need to be logged in and trust that Google won’t track you if you ask them not to.
davidhyde··on Seven escaped chimpanzees
I wonder if they ever considered evacuating the village of 800. Seems like default human behaviour is to subjugate rather than run and think.
davidhyde··on UniFi Express
I bought 3 ubiquity access points a couple of years ago for my parents and was shocked to find that they could only be configured by the unify mobile app which doesn’t recognise them because they’re so old. Just be aware of that behaviour when buying into this ecosystem!

https://help.ui.com/hc/en-us/articles/12594679474071-Standal...

davidhyde··on .NET Blazor
I knocked up a quick prototype for a friend about 4 years ago (client side blazor wasm .net core 3.0) and he turned it into a successful small business. About 15 simple screens communicating with restful services all in one solution. He found some cheap developers to hack on it for some extra screens but he eventually unpicked their work. The amazing thing is the system is so simple that he, a someone new to programming, could make sense of it and change it without help. I took a look at it the other day and the entire app just ticks along without a problem.

Tbh, I’ve never understood the appeal of server side blazor. High latency is too risky and you may never know that your clients are experiencing it. This hybrid approach in .net 8 is interesting but for a business app, initial load time is a once off thing and only a few seconds anyway. Kind of like an installer in a way.

I have a few criticisms though. I work almost exclusively on Linux now and it was extremely painful to try get an old .net project up and running because Microsoft aggressively sunset old .net versions. 4 years is not that long ago and I didn’t want to go through the pain of upgrading to the latest to make a few minor changes. So I had to dust off an old pc and use that. I understand that the .net core era was a turbulent time for change so maybe that’s why. But dammit, at least leave the old SDK’s up for a decade for this very reason!

Ironically, the slowest part of the system is the hosted sql server instance that is prohibitively expensive to run at a half decent speed with laughably low volumes of data. What a captured market that is when you can simply spin up a free PostgreSQL instance on the same vm and be done with it.

Anyway, to answer your question. Yes, it can be used in production. This one has 3 production instances and is used by about 30 people on a daily basis.

davidhyde··on Privacy is priceless, but Signal is expensive
Thanks, very interesting. IMO, that is an insane amount of money to pay for a non-default feature of a free product.
davidhyde··on Air Accident Investigation Branch: film lights caused window damage on A321neo
I just don't understand why all movie set lights haven't instantly been replaced by their LED equivalent. Why do people still use these things that are crazy expensive to run and can set things on fire?
davidhyde··on UK supermarket chain ditches self-service check-outs
This is a fairly obscure supermarket chain and in no way indicative of a trend moving away from self checkouts in the UK. Self checkouts are as popular as ever and some are more crap than others. This is usually down to a benign reason like price lookup latency or barcode scanning accuracy. It could also be as pedestrian as Windows running out of memory and not being rebooted regularly. Yes, supermarket checkouts use Windows.
davidhyde··on Privacy is priceless, but Signal is expensive
< "* 20 petabytes per year of bandwidth, or 20 million gigabytes, to enable voice and video calling alone, which comes to $1.7 million a year - I'd drop these features if possible, or give them to donors."

How about they pull their socks up and use peer to peer technology instead? Messages are asynchronous so they need to be temporarily stored but routing real-time audio and video is a technology problem that they have chosen the expensive way to solve.

davidhyde··on Lessons learned by a software guy venturing into hardware
This article initially upset me because it muddied my hardware honeymoon memories and attacked my perceived future. However, I’m glad I read the whole thing because I the author actually did the thing and built something and wrote about it. It is one of those rare blog posts where things don’t go perfectly well and the author is not some sort of flawless god. Experience is gold and this article lays it out raw, I love it.

I’m newish to embedded software and hardware and I find it difficult but oh so rewarding. Highly recommended.

davidhyde··on Odorant diffuser improves memory and neural functioning in older adults
> Funding: This work was supported by Procter and Gamble

Not bash the researchers or the quality of their research but I'm unsure if a negative result would have been acceptable to their continued funding. I'm sure P&G would like to use this research to sell their diffusers after all.

davidhyde··on Thread-per-core
> “The problem with work-stealing is that it means a task can run on one thread, pause, and then be started again on another thread”.

The article explains how work-stealing is a way to solve tail latency. I understand tail latency to be caused by tasks that yield (by themselves) after an unexpectedly long amount of time. This cannot be know in advance. The article explains how work-stealing results in cache misses and extra developer constraints like Send, Sync and ‘static.

What if the executor only moves a task to another thread after a timeout period has expired? This should result in no latency penalty if things are running smoothly and a constant, low, extra latency when tasks need to be stolen now and again. This would mitigate cache miss issues but alas not the developer overhead of all those multithreaded constraints.

← PreviousPage 3 of 19Next →