Readit News logoReadit News
david422 commented on Tell HN: Azure outage    · Posted by u/tartieret
Jamie452 · 2 months ago
Currently standing in a half closed supermarket because the tills are down and they cant take payments
david422 · 2 months ago
IIRC, the grocery chain I worked for used to have an offline mode to move customers out the door. But it meant that when the system came back online, if the customers card was denied, the customer got free groceries.
david422 commented on Ask HN: How do you say “I don’t know, but I’ll get back to you” confidently?    · Posted by u/AbstractH24
david422 · 3 months ago
"That's a good question, let me do some research and I'll get back to you"
david422 commented on Organize your Slack channels by "How Often", not "What"   aggressivelyparaphrasing.... · Posted by u/todsacerdoti
david422 · 3 months ago
I don't want to organize ... I just want a filter on the channel sidebar!
david422 commented on Python developers are embracing type hints   pyrefly.org/blog/why-type... · Posted by u/ocamoss
david422 · 3 months ago
I used python on a large code base for quite a while. Many team members did not like type hints, and a codebase that doesn't maintain type hints makes it harder to use them.

However, if I had a choice, rather than use typehints in python, I would much rather just use a statically typed language. Short, tiny scripts in python? Sure. Anything that grows or lives a long time? Use something where the compiler helps you out.

david422 commented on Python developers are embracing type hints   pyrefly.org/blog/why-type... · Posted by u/ocamoss
coldtea · 3 months ago
>you better believe that every single admissible type will eventually be fed to this function

That's your problem right there. Why are random callers sending whatever different input types to that function?

That said, there are a few existing ways to define that property as a type, why not a protocol type "Indexable"?

david422 · 3 months ago
Yes. It's not the type system that's broken, it's the design. Fix the design, and the type system works for you, not against you.
david422 commented on Ask HN: What trick of the trade took you too long to learn?    · Posted by u/unsupp0rted
david422 · 5 months ago
When you buy a house and get a mortgage, you are going to be paying MUCH more in interest (than expected). Over the course of the mortgage, you are going to be paying MUCH more than the sticker price. Between closing costs and taxes and fees maintenance, you will need more cash than you think.

My advice is look at the numbers very carefully and choose something that is (below) or fits your budget. Sudden financial issues like the loss of a job or new vehicle purchase can put a big strain on all this.

david422 commented on The Ski Rental Problem   lesves.github.io/articles... · Posted by u/skywalqer
theoreticalmal · 5 months ago
I just scrapped an ICE mower for a battery powered one. No more winterizing, changing oil, or worrying about filling with gas. I still don’t like mowing, but it sucks a little less now
david422 · 5 months ago
That's actually the situation I was in though. When your electric mower breaks you're probably on your own. I would not want to go back, but going forward definitely has it's own issues.
david422 commented on The Ski Rental Problem   lesves.github.io/articles... · Posted by u/skywalqer
massung · 5 months ago
This feels very similar to the “radio” or “restaurant” problem:

You’re driving down the street trying to decide which restaurant to stop at (or scanning through the radio trying to decide which song to stop on).

If you stop at the first, there’s a good chance something better is ahead. But if you wait too long then you risk getting stuck with something you don’t really like (the problem assumes you can’t go back).

If I remember correctly, mathematically you skip the first 1/3, but keep track of your “best”. Then stop at the next option that’s >= than your current best or maybe the next thing you like.

With respect to skis, I have the same issue every year with a ride on lawn mower. Do I just pay someone weekly or buy one outright and do it myself? In this case I loathe mowing, so I don’t mind paying. But with skis it’s a question of just how much I’ll ski after this stretch, regardless of whether or not this stretch is 1 or 20 days. Because there are additional costs (and benefits) to ownership beyond the initial purchase.

david422 · 5 months ago
> I have the same issue every year with a ride on lawn mower. Do I just pay someone weekly or buy one outright and do it myself? In this case I loathe mowing,

I bought mine, ran great for 4 years, then ran into a bunch of trouble, which made me recognize the other hidden cost of ownership is simply just maintenance. A very expensive mower just sitting there, nearest potential repair shop far away, no idea how I'd even get it there let alone the cost. And if I decide I don't want it, I've got to pay to get rid of it now too.

Luckily I was able to watch a bunch of youtube videos and order myself some parts to get it up and running again, but definitely sunk quite a bit of time and energy into it.

david422 commented on Design patterns you should unlearn in Python   lihil.cc/blog/design-patt... · Posted by u/zeitlupe
crgwbr · 5 months ago
Python type hints are hugely valuable both as a means of correctness checking, but also just as a means of documentation. It strikes me as incredibly shortsighted to say you can forget about types just because it’s a dynamic language. The types are absolutely still there and need thought about. They just aren’t defined or used in terms of allocation and management of memory.
david422 · 5 months ago
> The types are absolutely still there and need thought about

Yes, if they aren't in the code, it just means the programmer has figure out and carry that around mentally when reading or writing code.

u/david422

KarmaCake day1239August 5, 2019View Original