Thank you!
I firmly believe this is how we wound up with tabs as a feature in the first place.
Honestly, this is why I tell developers that work with/for me to build in logging, day one. Not only will you always have clarity in every environment, but you won’t run into cases where adding logging later makes races/deadlocks “go away mysteriously.” A lot of the time, attaching a debugger to stuff in production isn’t going to fly, so “printf debugging” like this is truly your best bet.
To do this right, look into logging modules/libraries that support filtering, lazy evaluation, contexts, and JSON output for perfect SEIM compatibility (enterprise stuff like Splunk or ELK).
Heisenbugs are the worst. My condolences for being tasked with diagnosing one.
Last time I did anything on the job with C++ was about 8 years ago. Here’s what I learned. It may still be relevant.
const
, constexpr
, inline
, volatile
, are all about steering the compiler to generate the code you want. As a consequence, you spend a lot more of your time troubleshooting code generation and compilation errors than with other languages.valgrind
or at least a really good IDE that’s dialed in for your process and target platform. Letting the rest of the team get away without these tools will negatively impact the team’s ability to fix serious problems.1 - I borrowed this idea from working on J2EE apps, of all places, where stack traces get so huge/deep that there are plugins designed to filter out method calls (sometimes, entire libraries) that are just noise. The idea of post-processing errors just kind of stuck after that - it’s just more data, after all.
Oh. That’s good.
I now endorse my idealogical rival.
I’m confused. Who is endorsing Trump? Clearly you don’t mean wishing the man well or condemning this attempt on his life?
Imagine someone competent filling his shoes with the unprecedented powers that were recently granted by the supreme court and the rabid MAGA fanbase behind them.
During the early pandemic, I was 100% convinced he was going to declare a national state of emergency as a pretense for a kind of coup. It would have been easy to have disproportionate military occupation of population centers like NYC, enforcing curfews, enforcing distancing and masking, while generally fomenting unrest through non-military groups. Throw in some old-fashioned resource scarcity by restricting shipping in the name of quarantine and, baby, you have a stew going. Once people are incited to riot, martial law is easy to justify.
Instead, the Republican party doubled-down on the dumbest plan possible - literally betting on the stupidity of their base - to secure political power. The sheer greed, ego, and narcissism in the upper echelon of their leadership has them stepping on their own feet half the time, and I’m convinced we’re lucky for that.
also libs: I stand with trump after this appalling act
Hard disagree. From what I’m reading, politicians are condemning an attempt at homicide, nothing more. Voters are following suit.
I’ll preface this by saying this shady shit gets all my hate.
It’s tempting to opt for telematics/black box insurance because of the initial cheaper prices but the privacy violations and potential downsides make it not worth it.
The overall problem here is that human psychology tends to frame this difference as a loss not a gain. Given the choice, people will see the cheaper option as the baseline, and then ask “can I afford to pay more for privacy?” instead of affirming “my privacy is not worth this discount.”
Also, those of us that have paid for insurance without such a “discount”, are likely keenly aware of the difference. For new drivers, from now to here on out, the lack of past experience presents a new baseline where this awfulness is normalized. Competition between insurance providers won’t help us here since the “privacy free” option is still profitable and is enticing for new customers (read: younger, poorer). So it’ll take some kind of law, collective action, or government intervention to make this go away.
Have fun fighting with your insurance to get them to remove anything from your record. […] If I had spyware insurance they would’ve dinged me for it.
I think this is the bigger problem. If someone has the data an insurance company wants, you probably agreed to an EULA or signed something that makes their ownership, and its sale, legal. With the “yeah go ahead and use my data” option on the table, the machinery to do this without your knowledge is already in place. All the insurance provider has to do is buy the data from someone else. When the price is right, 1st party spyware isn’t required at all.
The problem is that requirements refinement has been unceremoniously dumped in your lap. The failure here is organizational; maybe you have a design person involved, maybe devs are expected to do this. Either way, your job now also includes communications.
One strategy I’ve used is to draw a low-fi example of what they’re going to get - Figma is great at this these days. Then I add it to the issue and push the whole thing back for early approval in order to suss out these finer points.
Not to come off as misanthropic here, but many people are hot garbage at describing what’s in their head. Most of the time, it’s all abstract concepts up there until you start asking the real questions. They really do need a whole-ass conversation to sharpen that mental image. Or in this case, what they want that feature to look like. Incidentally, this is also the reason why therapy is a thing, and why it takes people years to make sense of themselves, and that outcome is usually far more crucial than anything we’re doing at the keyboard.
Honestly I don’t mind the indentation since C isn’t going to give us many ways to address this with as little code.
That said, with compilers that are good at inlining trivial functions, I really do appreciate the “it does what it says on the tin” approach to using functions on things like this. Even if they’re only used once. Comments would help too.
The logic in these if statements is inscrutable on a cold read like this. To me, that’s a maintenance risk; imagine seeing a snippet this size on a PR. Having functions that name what the hell is going on could only help.
In a one-liner competition, sure.
In my codebase? I’d pull a “let’s linger after standup about your PR” and have the coder sweat through a 10 minute soapbox about nothing before laying down the law.
One nit: whatever IDE is displaying single-character surrogates for ==
and !=
needs to stop. In a world where one could literally type those Unicode symbols in, and break a build, I think everyone is better off seeing the actual syntax.
On the one hand: kind of sad since this isn’t too far removed from some workplaces. The hardware and furniture could be sourced from any number of places.
On the other: hot damn. We can get the same kit NASA uses at home. Welcome to the future.
All your codebase are belong to us.
Hot take: As a VM with only eight instructions, it’s very easy to code and securely sandbox. Maybe BF has utility as a compilation target?
For the programmer? Very no.
For saving space if run via interperter? No.
For running compiled for conventional CPUs? No.
Compared to CISC instruction sets? Absolutely no.
BF might be highly efficient if crunched down to a bit-packed representation (3 bits per instruction) and run on an FPGA that understands it.
They could save so much money by not mailing every day and hiring people to hunt me
At the scale these mailings are conducted, it all averages out into a net win for Spectrum. It suggests that enough people really do suck it up with the rate hike for some reason or another. Otherwise, they wouldn’t do it. Also, from their perspective, the wasted time, energy, and paper is all someone else’s problem.