Recent submissions

Comment · 7 days ago
Latinx appears to be on the way out now as well, to be replaced by Latine, for exactly the situation you described. "Latinx" didn't come out of the broader community of native speakers, and was seemingly rejected due to that fact.
Comment · 7 days ago
Loan calls have filled out my voicemail inbox to full. I get anywhere from 1-5 a day. I've considered disconnecting my phone service at this point.
Comment · 17 days ago
I've read the Murderbot series through a few times now. It's basically easy-to-consume comfort food.
Comment · 17 days ago
There's no sure fire option for making sure you don't run out of money, as nothing can 100% predict the future. The best we have is the assumption that the future will look kinda like the past over long periods of time.

If you acknowledge that assumption, then you have to choose what model of the historical market you want to use a predictor for the future.

You can use exact market data, test retiring out at every single possible year at every possible asset allocation and see what happens. This is the basis of the 4% rule from Bill Bingham.

You can pull random years out of history and string them together a bunch of times and see what happens with a given asset allocation. This is a naive Monte Carlo simulation.

You can pull blocks of years and string them together, to acknowledge that there are repeating trends in years (what happens in one years influences the next) and do a Monte Carlo simulation which is a bit less naive.

There are more esoteric models overly smart people have constructed, each of which will give you slightly different answers for a safe withdraw rate.

At the end of the day though we are all just crossing our fingers, and hoping for a black swan catastrophe to not happen.

Comment · 3 months ago
Snarkiness aside, this is hardly a static type check. This appears to be a runtime argument check, somewhat akin to the following python:

  def foo(*, a, b): return a+b
which errors out at runtime if `a` or `b` are omitted, despite being keyword arguments which are usually optional.
Comment · 7 months ago
As a long time Django user that wants to start using typing, can you elaborate on why mypy is still the way to go?
Comment · 1 year ago
Decoupled Django usually means that you are providing a client SPA with a API, such as a DRF powered REST API.

If you are using something like token auth (you mentioned JWT), then you are not using cookies, at which point CSRF is not needed. This is because the user's browser isn't automatically sending the cooking containing a session ID on every request to the server.

That said, you can implement session auth with DRF REST APIs, which accept a session cookie on requests. For this, I believe you would receive/send CSRF tokens via HTTP headers.

XSS is not something you would worry too much about in an API endpoint. It is something you should worry a lot about in your client side SPA though. If using something like React, your templates will be auto-escaped, and thus you have to go out of your way to make it a problem.

Comment · 1 year ago
It's a bit apples to oranges to compare mean to median? Or at least Honeycrisp to Gala...
Comment · 1 year ago
This is one of my favorite software development books of all time. It's the book that finally offered straight forward guidance and wisdom on how to properly utilize OOP language features.

I'm very happy to see it out for Python!

Comment · 2 years ago
Other languages do sometimes implement this at the library level. Clojure's core.async comes to mind (though there are subtle differences). There's downsides to this approach though.

The data going into each "mailbox" either needs to be immutable, or deep copied to be thread safe. This obviously comes at a cost. Sometimes you just have a huge amount of state that different threads need to work on, and the above solution isn't viable. Erlang has ets/dets to help deal with this. You will notice ets/dets looks nothing like the mailbox/process pattern.

Erlang is great, but it is hardly the "one true way". As with most things, tradeoffs are a thing, and usually the right solution comes down to "it depends".

Comment · 2 years ago
QQQ has done great the last decade, but that's no guarantee it will outperform the next decade. Make sure you understand what you are getting yourself into by overweighting in the tech sector, and that it's a plan you can stick with during the hard times.
Comment · 2 years ago
I don't quite see what the outbox pattern has to do with the two generals problem.

The point of the outbox pattern is that a durable record of the need to send an event is stored in the DB as part of the DB txn, taking advantage of ACID guarantees.

Once you have that durable record in your DB, you can essentially treat your DB as a queue (there's lot of great articles on how to do this with Postgres for instance) for some worker processes to later process the queue records, and send the events.

The worker processes in turn can decide if they want to attempt at least once, or at most once delivery of the message. Of course if you choose the later, then maybe your event is never sent, and perhaps that was the point you were trying to make to the interviewer.

They key takeaway though is that you are no longer reliant on the original process that stores the DB txn to also send the event, which can fail for any number of reasons, and may have no path to recovery. In other words, at least once delivery is now an option on the table.

Comment · 2 years ago
The killer feature for me that Slack has over Discord is the ability to hide images, so I'm not stuck being distracted by some random person's obnoxious animated meme.
Comment · 2 years ago
Not judging here, but that’s some serious consequence tax fraud if caught.
Comment · 2 years ago
There are extensions to hide the Shorts. I’ve been using one for a month now and it’s been great.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton