> Instead of "the balance is the sum of the transactions", execute several transaction writes (to the database) and read back the resulting balance
Er, doesn’t this boil down to saying “not testing database end state (trusting in transactionality) is faster than testing it”?
I mean sure, trivially true, but not a good idea. I’ve seen lots of bugs caused by code that unexpectedly forced a commit, or even opened/used/committed a whole new DB connection, somewhere buried down inside a theoretically externally-transactional request handler. Bad code, to be sure, but common in many contexts in my experience.
> I’ve seen lots of bugs caused by code that unexpectedly forced a commit, or even opened/used/committed a whole new DB connection, somewhere buried down inside a theoretically externally-transactional request handler.
Yes! That's my current codebase you're describing! If you interweave the database all throughout your accounting logic, you absolutely can bury those kinds of problems for people to find later. But remember, one test at a time so that you don't accidentally discover that your the database transactions aren't protecting you nearly as well as you thought.
In fact, screw database transactions. Pay the cost of object-relation impedance mismatch and unscalable joins, but make sure you avoid the benefits, by turning off ACID for performance reasons (probably done for you already) and make heavy use of LINQ so that values are loaded in and out of RAM willy-nilly and thereby escape their transaction scopes.
The C# designers really leaned into the 'statements' not 'expression' idea! There's no transaction context object returned from beginTrans which could be passed into subsequent operations (forming a nice expression) and thereby clear up any "am I in a transaction?" questions.
But yeah, right now it's socially acceptable to plumb the database crap right through the business logic. If we could somehow put CSS or i18n in the business logic, we'd need to put a browser into our test suite too!
Contrary to popular belief, in the US there are state/federal government software jobs.
They don’t pay as well as the private sector, but it’s only a few steps down, not “get used to earning 20% as much”.
Is the bullshit rate in many of those jobs incredibly high? Absolutely. But can a talented generalist from the private sector make huge improvements for real people? You bet. So much of government IT is crippled by dated approaches and over-reliance on contractors (and the lack of knowledge of best practices that comes from very few folks transitioning from the private sector—those few steps down in salary are not a road often travelled).
As a result, someone with talent and familiarity with how much better things can be (and a willingness to push on broken rules/processes) can have a huge impact. You’ll have to do a lot of “here is a prototype nobody asked for built in a way nobody here is currently allowed to build it”-type performing in the first year or two, but at the right government agency folks who do that get to deliver massive benefits to real people every day.
There are enough sub components of government (agencies, sub-agencies, state, municipal) that you can easily find work you agree with. It’s frustrating to apply, but truly: once in the door, talented folks can achieve a huge amount.
I recommend being very honest with yourself here, whether or not you want to share it in a reply.
Is the low chance of bad consequences the only factor keeping you from talking to strangers? There’s a low chance of bad consequences when you cross a busy street, too.
Is fear of rejection by an individual or group a factor, too? There’s a much higher chance of that happening, but it’s far from life ruining.
Are you worried that you have social behaviors that make it more likely you are considered creepy in social interactions? If so, are there ways you can reduce those behaviors?
Are there other areas where acute awareness of severe potential negative consequences makes you avoid activities that lots of other people in your cohort might enjoy?
Source: it me. If you’re in a similar situation, know that it can get a lot better. Just takes time and work, like everything.
The risks and consequences of crossing a busy street are nowhere near as unknown or potentially severe. Wait until all the traffic has stopped, look to your left and your right and behind your back (typical situational awareness during bounding overwatch), cross the road. Even if something very rare and extreme happens, nobody sane will blast you on social media for failing to dodge a meteor or a suddenly exploding car.
When it comes to social context, you might miss some kind of sign and the worst cases there are pretty terrifying, might even get arrested in UK, which will lead to losing a job, failing any background checks, might even become homeless — and nobody sane will have any empathy for your mistake.
So I really do not get why people are against dating apps, when those are the best thing ever to avoid catastrophic consequences for initial approach.
I agree with the adjacent commenter: therapy would help with this.
As someone who has similar anxieties, I was pleasantly surprised in two ways when getting professional help:
Surprise one: the advice for confronting anxiety--specifically social anxiety around forming connections--was actionable and specific rather than woo-woo and "just be present/mindful/listen to your thoughts and they go away"-flavored.
Surprise two: therapists identified specific areas where I had broken or atrophied social skills and helped to build them. Just like crossing a street, most unprompted social interactions:
a) Have an expected script which, if followed, reduces the risk of severe negative consequences to near zero. If you didn't know the script you mentioned ("Wait until all traffic has stopped..."), then crossing a street would be dangerous indeed.
b) Have a higher likelihood of minor, non-lasting negative consequences: getting honked at by oblivious drivers, playing do-I-go-left-or-right chicken with oncoming pedestrians, bumping into people, and so on.
c) Have a lot of rules that are contextual (local traffic laws :: mores about what is acceptable in a park vs. in a pub). Some of those rules can be researched, but a lot of them are unspoken/gained through practice--and practice with others is most effective.
d) Are not practiced perfectly by most people. Those apprehensions you have? Those awkwardnesses and anxieties and hyper-awareness of the consequences of failure? Those are shared by tons of people! Even women in the dating scene--hell, especially women in the dating scene--are screwing up, recovering, bailing out, gathering themselves, and trying again constantly.
If you are worried about "missing some kind of sign and ... losing a job", that sounds a lot like either anxiety (therapy surprise one helps) or some missing/mis-functioning specific skills (therapy surprise two, and I cannot underline this enough, really helps here).
(Caveat: be aware that psych help, just like friends, car mechanics, or clothing stores, is variable in quality and highly preference-based; multiple selection passes may be needed before you find someone that you vibe well with).
I also really recommend Devon Price's writing on the subject. He has a few focuses that may be less relevant here (experiencing autism, being queer/trans), but also writes extensively on social/romantic interaction as a practiced, scripted phenomenon; I have found those essays to really help contextualize some of this stuff: https://devonprice.medium.com/
> I really do not get why people are against dating apps, when those are the best thing ever to avoid catastrophic consequences for initial approach.
I'm not against dating apps; I'm responding to the "unprompted social outreach is risky/a bad cost-benefit" claim.
In fact, you can get a lot more out of dating apps if you have practiced the skills required to be comfortable with ("comfortable with" is not the same as "good at") apropos in-person connection forming!
Also:
> nobody sane will blast you on social media
I agree. Raging about someone's social gaffe on social media is not sane/healthy behavior. Since jackasses raging online is nearly never as life-ruining as you might fear, framing it as "not sane and therefore not worth losing sleep over" is a good approach!
...and people on social media routinely rage about pedestrians, cyclists, slow drivers, etc. With pictures, license plates, death threats--the works. With dating, just like with crossing the street, it is not worth worrying about: be kind/do no harm, learn (potentially with help) the skills needed to progress, be willing to fail a lot while learning, and it will turn out well. I promise.
EDIT: Also, one last thing:
Avoid parts of the internet that use language like "daring to approach while ugly" and "on initial approach" when talking about dating. I've been there. I get how good it can feel to be validated by people with similar experiences, who explain that it isn't your fault/that thinking about dating as adversarial game theory is healthy. But those communities are toxic, self-hatred-reinforcing hostility factories. Seriously, go for a walk/watch TV/read a book instead.
If those are terms you came to use organically, consider avoiding them to avoid being associated with those places.
> blunt every aspect of your personality that may be an “ick.”
That’s not what was meant and you know it.
Ten years into a relationship, I sometimes leave my dinner dishes in the sink and wash them in the morning. Had I done that early on in my relationship—or had those dishes in a photo on a dating site—I’d sabotage my chances with a lot of people.
The same is true for interests. Maybe you really like guns: marksmanship, customizing them, restoring them, and so on. If you have guns front and center in your dating app pics you are going to alienate a lot of people. Plenty of those same people would enjoy being introduced to that hobby once you are in a relationship! But guns being a photographed part of your dating-site-identity is not going to help your chances. The people who swipe left are avoiding gun nuts, misogynists, etc. Putting guns in your picture only sabotages yourself.
That’s not “I have to totally be someone I’m not and remove every single thing someone might find objectionable”. That’s basic social awareness and understanding that there’s a time and a place for presenting different parts of yourself.
The zoomer interpretation of "ick" is just an extension of patriarchal attitudes. It means "anything that does not perform masculinity to an adequate degree". Fruity drinks, splitting bills, wearing strange colors or patterns, even having well-groomed nails.
It's childish, it's petty, and it's self-defeating. Most women I know are in a vicious cycle of misogyny because they actively optimize for misogynistic men without knowing it. They then come to the conclusion that men must suck, so they tighten their "standards", which inadvertently results in even more misogynistic men going for them.
We often hear about gen-z men becoming more conservative but anyone who is paying attention knows that gen-z women are also becoming more conservative. And, a lot of the conservatism in men is in response to growing conservative attitudes in women, and vice-versa. We have trad wives and bio-essentialist ideology because conservative men exist. And they exist because they meet our arbitrary patriarchal standards, even the small ones, like paying for the bill.
Sure, a choice to opt out technically exists. But that common argument ignores two things:
First, the massive asymmetry of power involved in making people choose opting in (again and again, to greater and greater degrees).
Second, the fact that unrelated penalties—severe ones—are attached to choosing to opt out, by people and systems who want to discourage this behavior. It’s not like saying “choosing to not eat means you might be hungry”. That’s an intrinsic consequence; it has to happen. It’s not even like “choosing not to eat again and again means you might stunt your growth.” That’s intrinsic too, whether or not it’s intuitive.
No, the penalties we’ve attached to opting out are more like “choosing not to eat means you might go hungry, and also the people with hammers that specifically go after people that don’t eat will break your fingers.”
WiFi routers a) do connect to the internet (as many of them are integrated modems as well as WiFi) and b) are often mentioned as “connecting” to the internet as a colloquialism that means “a device on my WiFi can’t reach the internet because the router has an issue”.
> If your modem can’t connect to the internet, something has probably broken outside your house
Of all the internet-only connectivity outages I’ve had that lasted for longer than a few minutes, nearly all of them were resolved by a modem or router reboot. These are ordinary, non-customized modem/routers from 3-4 ordinary ISPs serving ordinary apartments in a major US city, using ordinary mediums like DSL, cable, fiber.
The fact that a reboot resolved the issue means that the problem wasn’t outside the house. Of all the remaining, long and not-fixed-by-reboot outages, one was a hurricane, one was a bad amp … and all the remaining dozens were arcane technical issues with the modem, router, or devices on the network that required ISP troubleshooting to fix.
I suspect that this is not an uncommon distribution, which means that this isn’t the same problem folks in the last century faced; today, the shitware is coming from inside the house.
> If a person wants to pay attention to their lifestyle and health, then in the US he will get one of the best results in the parameters you listed. That is just a fact.
Is it? What are some obstacles to a similarly committed person attaining health/lifestyle benefits in other developed countries? What are the factors uniquely provided by the US that make this “fact” true? Are there factors in the US working against good outcomes for committed people?
You didn’t really answer GP’s point, though. What if a big, strong family is struck by disaster (multiple earners lose jobs or die, or one member develops, say, an illness or huge debt which consumes the entire family’s resources)?
Those kind of scenarios aren’t that rare even in places with very family-first social safety nets (which, incidentally, are often places with high poverty and low standard of living).
> Rust should have had _only_ panics, and panic objects should have had rich contextual information, just like Java and Python.
It could have gone that way, but that would have “fattened” the runtime and overhead of many operations, making rust unsuitable for some low-overhead-needed contexts that it chose to target as use-cases. More directly: debug and stack info being tracked on each frame has a cost (as it does in Java and many others). So does reassembling that info by taking out locks and probing around the stack to reassemble a stack trace (C++). Whether you agree with Rust’s decision to try to serve those low-overhead niches or not, that (as I understand it) is a big part of the reason for why errors work the way they do.
> There should also have been an enforced "does not panic" annotation like noexcept in C++. And Drop implementations should not be allowed to panic.
I sometimes think that I’d really love “nopanic”. Then I consider everything that could panic (e.g. allocating) and I like it less. I think that heavy use of such a feature would lead to people just giving up and calling abort() in library code in order to be nopanic-compatible, which is an objectively worse outcome than what we have today.
> debug and stack info being tracked on each frame has a cost
So add an option not to collect the debugging information. The core exception mechanism remains.
> Whether you agree with Rust’s decision to try to serve those low-overhead niches or no
It's not a matter of Rust choosing to serve those niches or not. It's the language designers not adequately considering ways to have exceptions and serve these niches. There's no contradiction: it's just when Rust was being designed, it was _fashionable_ to eschew exceptions.
> Then I consider everything that could panic (e.g. allocating) and I like it less. I think that heavy use of such a feature would lead to people just giving up and calling abort() in library code in order to be nopanic-compatible,
Huh? We don't see people write "noexcept" everywhere in C++ to be noexcept-compatible or something. Nopanic is for cleanup code or other code that needs to be infallible. Why would most code need to be infallible? I mean, panic in Drop is already very bad, so Rust people know how to write infallible code. The no-failure property deserves a syntactic marker.
In anything performance sensitive like OSes or games, C++ is compiled without exceptions. Unwinding is simply unacceptable overhead in the general case.
Rust got errors right, with the possible exception of stdlib Error types.
Table based unwinding is just one implementation choice. You can make other choices, some of which compile to code similar to error values. See Herb Sutter's deterministic exception proposal.
Your post is a fantastic example of the problem I'm talking about: you're conflating a concept with one implementation of the concept and throwing away the whole concept.
Language design and implementation are different things, and as an industry, we used to understand that.
Er, doesn’t this boil down to saying “not testing database end state (trusting in transactionality) is faster than testing it”?
I mean sure, trivially true, but not a good idea. I’ve seen lots of bugs caused by code that unexpectedly forced a commit, or even opened/used/committed a whole new DB connection, somewhere buried down inside a theoretically externally-transactional request handler. Bad code, to be sure, but common in many contexts in my experience.
reply