- carlmr parentThe within settlement window might still be a good addition to the method name. Since that is something I can at least Google.
- >It is generally desirable to keep invalid objects properly typed
I think that's the bigger issue in Java. `int` can't be used in generics, so now you use the boxed type `Integer` which needs to be checked on each use, which depending on the usage is a lot of work.
If Java had proper generics without this workaround, we wouldn't have nearly as many issues.
- >I find that the years that I spent on art (playing around, learning new things, not taking other peoples' orders) lasted longer than the ones I spent doing software development for money.
>I personally don't find the logarithmic experience theory convincing.
I think this tracks though. When you do art or other things you can explore different things. Doing the same thing for 40-60h per week is just not such a varied experience.
- >Higher incomes have historically been a symptom of productivity
If I go to Zürich I get a burger for 30Fr that I can get in Southern Germany for 15€ and in Berlin for 8€. That is with roughly the same quality.
I'd say past productivity leads to network effects and investments in one area that boost local salaries and decouples them quite strongly from current productivity.
My previous company had a per-dollar extremely unproductive location in silicon valley. The people there weren't at fault. You don't magically become more productive because you live next to SF.
- >the possibility of it being software, hardware or QC
There's a certain overlap here. It's not completely orthogonal. Having worked on safety critical systems before a lot of effort is put into detecting hardware errors in the software. E.g. random bit flips, ALU hardware issues, RAM writability issues, hash check of the loaded software being ok, plausibility check with (partually) redundant sensors.
You can detect a lot of hardware/QC issues on the software level. While it's still a hardware issue, better software can sometimes at least detect it
- >it turns out that they got dozens of speed camera tickets per year
To me the answer is quite simple for any of these. Treat repeated small infractions like bigger and bigger infractions. E.g. double the cost every iteration if it happens within a specific time frame.
Ok, you speed once? $100. Twice $200. Thrice $400. And so on. We only reset if you don’t reoffend for any speeding in 5 years. If you want to speed 20 times in 5 years, ok, go ahead. You pay $52,428,800.
Bonus points for making it start at something relative to your salary. People will stop at some point out of self-preservation.
If you don’t believe high fines work, drive from Switzerland to Germany. In Germany the Swiss have no problem speeding, because the fines are laughable. While south of the border they behave very nicely on the street.
You could extend this to other crimes. Google and Microsoft happily pay fines, since it’s cheaper than what they make from breaking anti-trust regulations. If you doubled it on each infraction they would at some time start feeling the pain.
- >enjoy and appreciate something on a daily basis is beneficial to overall satisfaction with life.
I'll couch this in a warning that you need to have the money for it, but for me an espresso machine and good grinder was such a great investment.
It's this thing I appreciate a lot every day.
If you're a drip coffee person I guess this won't apply and you can save a few thousand. Although I'd still recommend getting a grinder (not necessarily an expensive espresso worthy one) and good beans then.
- This is also why I kind of hate it when rich people say that money doesn't make you happy. It's true, it doesn't but if you don't know how to pay for your next meal or worse your kids next meal, or you're sick and can't afford good care, then money does make all the difference.
In mathematical terms money might not be sufficient to make you happy, but it's a necessary condition indeed.
- >You get memory safety. That's about it for Security
Not true, you get one of the strongest and most expressive type systems out there.
One example are the mutability guarantees which are stronger than in any other language. In C++ with const you say "I'm not going to modify this". In Rust with &mut you're saying "Nobody else is going to modify this." This is 100x more powerful, because you can guarantee nobody messes with the values you borrow. That's one very common issue in efficient C++ code that is unfixable.
Sum types (enum with value) enable designing with types in a way otherwise only doable in other ML-based languages. Derive macros make it easy to use as well since you can skip the boilerplate.
Integers of different sizes need explicit casting, another common source of bugs.
Macros are evaluated as part of the AST. A lot safer than text substitution.
Further the borrow checker helps with enabling compile time checking of concurrency.
The list goes on, but nobody that has tried Rust properly can say that it only helps prevent memory safety issues. If that's your view, you just showed that you didn't even try.
- Depends on the language and the available formatters really, I find the black/ruff formatting style in Python to be very consistent, which helps with git blame. For C++ there's no good default formatter for "small diffs" since they all, as you say, add random line breaks dependending on position of parameters and such.
With style you can do better, but having style is impossible in anything except single developer projects.
- Yeah, I was going to say, if anybody with distributed systems knowledge actually thought about this code, it wouldn't have happened.
If you added model checking to it you could have prevented it though, because people that know how to program a model checking program, will see the error right away.