HNHacker News
TopNewBestAskShowJobs

Merad

2,800 karma · joined March 14, 2015

submissionscomments
Merad··on Richard Stallman reveals he has cancer in the GNU 40 Hacker Meeting talk [video]
Well, RMS tirelessly advocates for his beliefs, but sometimes his beliefs are regressive and outdated. In particular I remember a debate perhaps 8-10 years ago when the gcc team wanted to expose more info from the compiler back end to enable better support for editor integrations and similar tools, because gcc simply couldn't compete with LLVM in that department. IIRC RMS stepped in with a unilateral decision blocking the effort, saying that it wasn't a big deal anyway because editor integration wasn't an important feature. RMS, a guy who (AFAIK) hasn't done any serious coding in 30 years.
Merad··on The SR-71 Blackbird Astro-Nav System worked by tracking the stars
Lots of aerial refueling. 10 hours in the air, yes, but not on a single tank of fuel.
Merad··on Netflix prepares to send its final red envelope
We're only talking about the discs, right? Maybe they've changed in the last 10 years but IIRC the envelopes were all paper. One disc probably contains less plastic than the average Chinese takeout order, and surely even at Netflix the lifetime of that disc is measured in years. That's downright eco-friendly compared to all the disposable plastic consumed by our society.
Merad··on Google sued for negligence after man died following map directions
See my other comment WRT to ownership: https://news.ycombinator.com/item?id=37602718
Merad··on Google sued for negligence after man died following map directions
The road is pretty steep on either side of the bridge and it's a small one lane (IIRC) bridge. At night I definitely think it could be difficult to see that the bridge was out until it was too late.

Edit: According to articles linked elsewhere in the comments the bridge was privately owned and the owners are being sued along with Google.

As far as ownership, I am no expert but I think the land under the road would be government owned (not sure if state, county, or city) because there's a public right-of-way to ensure houses in the subdivision have access to public roads. However in the absence of a HOA the property owners within the subdivision are collectively responsible for road maintenance. It's part of the paperwork when you buy a house. But I don't know if they're required to maintain it to a specific standard... And in this particular case the neighborhood in question is pretty middle class (middle class in a LCOL area). I'm guessing a bridge repair isn't cheap, so it's very plausible that the neighborhood literally couldn't afford it. This definitely seems like a thorny topic, not something where it's easy to lay the blame at the feet one individual or entity.

Merad··on Google sued for negligence after man died following map directions
The bridge in question is about a mile from my house. I'm pretty sure the road it's on is not publicly maintained, as it's just a street within a neighborhood. And that's a neighborhood that doesn't have a HOA, so I don't know if anyone is actually legally responsible for maintaining the road or bridge.
Merad··on 64-bit bank balances ‘ought to be enough for anybody’?
> I would just do the billing in thousandths of a cent, rather than make "leap cents" appear every couple of bills

Again, that was not something we could control.

Merad··on 64-bit bank balances ‘ought to be enough for anybody’?
> Oh, the business teams found the approach puzzling---but what do they know, right? If they were smart, they would be software engineers.

Well in this case the business teams selected the 3rd party payments gateway that the company would work with, negotiated the contracts with them, and worked with the 3rd party to set up how the customers would be charged. They and/or the product team determined that we'd use the 3rd party system to handle the billing because building it in house wouldn't generate any new revenue. They weren't stupid, but they choose an approach to payments processing that was pretty low level (because it generated more revenue, of course), without anyone at the company having a good understanding of low level payment processing details. The engineers learned because we kind of had to, but three years into the project (when I left) business/product would still routinely struggle with the details.

So anyway, WRT to billing, the task handed to engineering was: pull the billing detail from the 3rd party's API and assemble it into a statement that can be handed to a client. We had zero control over how the charges were generated or applying any rounding to the total.

Merad··on 64-bit bank balances ‘ought to be enough for anybody’?
> Why was it listed separately at all?

Because the bill included a detailed breakdown of all the fees by type and transaction. Typically our clients were charged a fixed monthly fee, a fixed authorization fee charged every time a payment was attempted (even if it was declined), and a fee applied to successful payments that was a percentage of the payment amount. There were other fees for things like processing chargebacks, but IIRC they were the same for everyone.

> If the month's charges were 406.783228 and I get a bill for 406.79 then that seems perfectly good.

Yeah, we definitely weren't allowed to round up and keep the change. I can't claim to know all the details involved but I suspect that doing so would've at least violated our contract with the payments gateway. Might've actually been illegal.

> If I get a bill that says 406.78, plus a separate 0.01, that's weird.

That's not how it worked. For the sake of simplicity let's assume that your activity is always the same, therefore you have new charges totaling exactly $406.783228 every month.

* Month 1: You owe $406.783228, your bill is $406.78, a balance of $0.003228 rolls over.

* Month 2: You owe $406.786456, your bill is $406.78, a balance of $0.006456 rolls over.

* Month 3: You owe $406.789684, your bill is $406.78, a balance of $0.009684 rolls over.

* Month 4: You owe $406.792912, your bill is $406.79, there's a $0.01 "other fee" line item on the bill, and a balance of $0.002912 rolls over.

Merad··on 64-bit bank balances ‘ought to be enough for anybody’?
A shocking number of people who work with software that handles money are just winging it. I worked on a project once that handled payment processing functionality for other products at the company (it was a B2B SaaS where clients could take payments through our software). We also handled payments related billing, since the clients would owe fees to us and to our payments gateway for their transactions.

The payments gateway we worked with calculated their fees to a thousandth of a cent, but of course we could only bill whole cents. So basically every billing period there would be a < $0.01 balance due that carried over to the next bill, and every so often the carryover would add up to a full cent that needed to be charged. When we implemented our MVP we (engineering) explained this to the product and business teams, and it blew their minds. Our suggestion was to have a tooltip on the 1 cent charge with a link to a help article explaining how the accounting worked, but they were strongly against it and had us list the 1 cent as something like "other fees" with no explanation. They seemed convinced it was a thing that would happen only rarely, even as we were telling them otherwise. Anyway, that 1 cent charge just infuriated clients for some reason, and every month or two we'd get bug reports about it or requests to explain why it kept showing up. Fun times...

Merad··on Skip the API, ship your database
Heh, the last company I worked for had a (very popular, very successful) 20 year old desktop app that worked by downloading the client's entire database on login, then doing regular syncs with the back end and sending batch updates as the user made changes. It was an awful system that everyone hated, and the company was desperately trying to figure out how to move away from it without doing a complete rewrite. Maybe I should let them know that they're actually ahead of the curve if they can just hold out for a few more years...
Merad··on Things I wish I knew before moving 50K lines of code to React Server Components
I find it curious that we always see these opinions expressed about front end frameworks, but no one seems to have much problem with all of the complexity in back end frameworks like node, Python, Java, .Net... I have a sneaking suspicion that people are just more used to having complexity hidden from them behind a framework install, whereas front end puts everything front and center since it's all delivered to your project via npm.
Merad··on Real-world ranges for Teslas 50-60% of EPA Range
My Toyota RAV4 Hybrid provides a distance to empty number that "learns" based on your driving habits (probably just averaging your MPG over the last 3-4 tanks, or something like that) and IME at least it's usually extremely accurate. Several times I've driven the car down to just 5-6 miles left on the DTE. When I did that it took almost exactly 12.5 gallons to fill up, and the car has a 14.5 gallon tank with 2 gallons held in reserve.

If Toyota can manage do it, I'm pretty sure that Tesla can. I'm just not sure that they want to.

Merad··on Why do shared hospital rooms not violate HIPAA?
The last time I was in the hospital (2022) the portions weren't terrible, the main problem was that the food was so damned bland. The first few days it doesn't seem like it's that bad, but by the time you've been eating it a week you just lose your appetite because the food is so unappealing. Not to mention that if you have a test or procedure at the wrong time and miss placing your order (IIRC they stopped taking orders at like 4 PM) you're going to get whatever the cafeteria feels like sending you and it will have been sitting at the nurses station for hours. Yummy.
Merad··on Why do shared hospital rooms not violate HIPAA?
I was in the hospital for about two weeks at the beginning of 2022. It was awful. The nurse would come in for evening meds and checks around 10-11 PM. When I was lucky enough to have neighbors who weren't trying to die all night it was usually relatively quiet from midnight to 4 AM. Then things would start to pick up. Phlebotomists making rounds to draw blood before 5 AM. Morning meds between 5-6 AM. Nursing shift change at 7 AM. Doctors doing rounds mid morning. Breakfast mixed in there somewhere. Of course I couldn't actually _do_ anything all day except try to read or play around on my phone, so I spent a lot of time dozing.

I wasn't so lucky for the first week of my stay. I was on IV meds that pushed my BP up significantly, to the point where every time the automatic hourly BP reading was taken it would set off alarms. During the day the charge nurse would usually silence the alarm (from the nursing station) immediately but at night they were understaffed (this was during a covid wave) and the nursing station often wasn't manned. So sometimes the alarm would sound for 20+ minutes. Every hour... all night... Eventually I found a sympathetic nurse who actually knew how to adjust the settings on the machine and disabled the alarm entirely.

At least I didn't have to share a room. That would have been misery.

Merad··on Sync Gear: How World War I Fighters Avoided Damaging Their Own Propellers
I think a real consideration is how fragile those early airplanes were. Machine guns are heavy, their ammo is heavy, and you need heavy mounts to absorb the recoil of firing them. The wings of WW1 fighters are basically made out of toothpicks and tissue paper (an exaggeration, but not by much). I wouldn't be surprised if they simply couldn't handle the load of wing mounted guns.
Merad··on NASA mistakenly severs communication to Voyager 2
> Is it possible to launch a little cheap rocket with a transmitter just to correct Voyager's position?

Possible, maybe. Little or cheap, definitely not. Both Voyager probes relied on a unique alignment of the planets in the outer solar system that allowed them to get a series of speed boosts using gravity assists from the gas giants. If we wanted to launch a rocket anytime in the near future that would be able to catch up with Voyager 2 we'd probably have to rely on good old fashioned brute force (rocket power). But then if you want the rocket to catch up in the next thousand years it's going to need REALLY big ass rockets to catch up with Voyager... and if you want it to rendezvous with Voyager instead of just zipping past, it will need to haul more rockets all the way out to Voyager so it can slow down and match speeds (which means even bigger rockets to launch from earth, etc.).

tl;dr - space is big and the rocket equation is brutal.

Merad··on Walmart didn’t kill the small town, it is the small town
> Why even own a lawnmower at this point-- just pay someone to mow your grass for you.

I don’t disagree with you about waste, but I’m assuming you haven’t priced lawn services lately. Even with a small yard and fairly cheap service you’ll be spending enough to buy a (cheap) mower every 4-6 weeks.

Merad··on Tesla created secret team to suppress thousands of driving range complaints
There's no reason why Tesla can't calculate the accurate range in both places, is there? My 2022 Toyota RAV4 Hybrid has a "distance to empty" number that "learns" based on your driving habits and typical mileage. It's not perfect, for example going on a road trip can throw it off (the hybrid gets significantly lower highway MPG than around town), but most of the time it's very accurate.
Merad··on Twitter has officially changed its logo to ‘X’
That's hilarious. I honestly wonder if Elon decided to do this change on Friday and had people rushing all weekend to push it out the door.
Merad··on Moneyball for Software Teams: Quantifying Dev Performance
I don't know if the author intentionally omits it or failed to think about it, but sabermetrics (moneyball) is possible because literally everything a baseball player does is tracked. I can't say how players actually feel about that, but their job is to perform in front of millions of people and they're being paid millions of dollars per year (often 10s of millions) to deal with it. White collar workers have no incentive to put up with that kind of crap, especially not ones in high demand like SWE's.
Merad··on YouTube is testing a more aggressive approach against ad blockers
They've become increasingly hostile about ads in general. I sometimes watch youtube on my TV via Roku, which sadly doesn't have ad blockers, and there's been a noticeable rise in long ads that can't be skipped. It's pretty routine now to get 30s long ads that are unskippable, and just a few days ago I got one that was nearly 90s.
Merad··on Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
I don't know go, but in C# I'd probably do something like the code below. The object really only needs to carry the uuid/guid, let the language type system worry about the difference between a user and post id. We just need a generic mechanism to ensure that UserId object can only be constructed from a valid type id string with type = user. For production use you'd obviously need more methods to construct it from a database tuple (mentioned elsewhere in the comments), etc.

    interface ITypeIdPrefix
    {
        static abstract string Prefix { get; }
    }

    abstract class TypeId<T>
        where T : TypeId<T>, ITypeIdPrefix, new()
    {
        public Guid Id { get; private init; }

        public override string ToString() => $"{T.Prefix}_{Id.ToBase32String()}";
        // Override GetHashcode(), Equals(), etc.

        public static bool TryParse(string s, out T? result)
        {
            if (!s.StartsWith(T.Prefix) || !TrySplitStringAndParseBase32ToGuid(s, out var id))
            {
                result = default;
                return false;
            }

            result = new T { Id = id };
            return true;
        }
    }

    class UserId : TypeId<UserId>, ITypeIdPrefix
    {
        public static string Prefix => "user";
    }

    class PostId : TypeId<PostId>, ITypeIdPrefix
    {
        public static string Prefix => "post";
    }
Merad··on Fast machines, slow machines
> I think it's insane(?) to give developers top-of-the-line hardware, because such hardware is not representative of the user population

But a developer's needs are radically different from the user's needs. In typical web dev, the developer's machine is playing the role of the client machine, web server, and database server, all in one. On top of that you'll probably be running multiple editors/IDEs and other dev tools, which are pretty much always processor and memory hungry. Even for desktop development the dev needs to be able to run compilers and debuggers that the user doesn't care a thing about. If you truly care about the low end user experience then you need to do acceptance testing against your minimum supported specs. It's pretty crazy to intentionally hamstring the productivity of some of your most expensive employees.

Merad··on Fast machines, slow machines
> We have the exact same machines, yet mine somehow basically never has its fan on running Linux and compiling Rust, whereas theirs is often audible while running Windows with a couple of chrome tabs open and outlook.

I think some of this is just poor defaults. Every windows laptop I've had in the last 10 years has defaulted to a thermal management profile that ran the fans aggressively. Usually you have to install some crapware from the manufacturer (it's "Dell Optimizer" on my current machine) that allows you to change the thermal profile to quiet mode, and it's totally fine after that.

Merad··on Is ORM still an anti-pattern?
Linq is really just a high level abstraction for querying any data that can be queried. EF adds some more abstractions mostly related to mapping C# objects to database tables. Then it adds database specific query providers (implementations) that combine the (abstract) linq query and the mapping to produce sql.

You can really use linq to query anything (APIs, for example), including databases without using EF. It's just not very common because building a custom query provider is a lot of work.

Merad··on Debris Field Confirmed as Titan
The pressure at that depth is something like 5000 psi. You're literally dead before your brain has time to comprehend what's happening.
Merad··on TypeScript 5.2's new keyword: 'Using'
Your code is destructuring two properties and discarding one of them. It doesn't work with a single property: https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwAICYAMBYAUBgRj2Nw...

I think that records don't generate a deconstruct method when they only have one property, but even if you manually define one you'll get an error on `var (varName) = ...`

Merad··on TypeScript 5.2's new keyword: 'Using'
C# doesn't allow you to destructure a single property and as far as I can tell based on a quick test it doesn't allow you to combine a using declaration with destructuring. I agree that this is surprising syntax... as a C# dev my first interpretation of that code would be that connection is the thing being disposed since it's the variable being declared. I wonder if js/ts destructuring has always silently held a reference to the containing object or if they added that behavior to make this use case work?
Merad··on Reddit App – Suspicious high number of recent 5 star, one word reviews
Even if Condé Nast has any influence over the situation, do you really think the "adults" there know anything about the situation beyond the status reports they're getting from Reddit leadership?
← PreviousPage 6 of 26Next →