• 0 Posts
  • 16 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle

  • These are fun rabbit holes to go down. Everything here is true, of course: Big-O complexity isn’t everything, context always matters, and measurements trump guesses.

    But also, how many times have you encountered a performance problem with a slow O(n) solution that you solved by turning it into a fast O(n²) solution, compared to the other way around? The difference between 721ns and 72.1ns is almost always irrelevant (and is irrelevant if it’s not on a hot path), and in all likelihood, the same can be said at n=500 (even 500x these numbers still doesn’t even reach 0.5ms).

    So unless context tells me that I have a good reason to think otherwise, I’m writing the one that uses a hash-based collection. As the codebase evolves in the future and the same bits of code are used in novel situations, I am much less likely to regret leaving microseconds on the table at small input sizes than to regret leaving milliseconds or seconds on the table at large input sizes.

    As a trained practicioner of “the deeper magics” myself, I feel the need to point out that there’s a reason why we call these types of things “the deeper magics”, and that’s because heuristics like “better Big-O means better performance” generally point you in the right direction when it matters, and the wrong direction when it doesn’t matter.







  • Some questions to challenge your proposal:

    1. What test, specifically, do we implement to tell whether or not someone “know[s] the most basic of facts”?
    2. How do we make sure that this test is kept up-to-date as information changes?
    3. Who administers this test?
    4. When is the test administered?

    No matter how I try to answer these questions in a way that’s consistent with reality, all my ideas dead-end at outcomes that suck and only get worse over time.




  • The 8th amendment has a clause that disallows “excessive bail”. In Stack v. Boyle, the Supreme Court found this to mean “that a defendant’s bail cannot be set higher than an amount that is reasonably likely to ensure the defendant’s presence at the trial.” So it follows that IN THEORY, bail is SUPPOSED to be set at an amount that is consistent with the defendant’s financial resources (including, it would also follow, increasing the amount for more wealthy people to ensure that it has the same proportionate effect on the defendant’s decision-making process).

    Of course, that rule is just a bunch of meaningless words if nobody enforces it… and guess what, the main way to enforce this is by bringing a suit against the government alleging that they violated the rule. So IN PRACTICE (speculation warning here, I’m just some guy), I would imagine that they just set bail schedules at a level where anyone who can afford to pay won’t be able to win an “excessive bail” lawsuit, and anyone who can’t afford to pay it will also probably not be able to afford the cost of that lawsuit.

    And something tells me that we aren’t likely to see a wealthy person suing the government for not setting bail high enough for them.