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.
Yeah, I know that the super-flat planar look was the intent, but there’s a reason why you don’t see much in the real world that resembles the cybertruck. It turns out that the non-planar features of typical car panels are there to add rigidity. Flat sheet metal wants to bend, twist, wave, and even flap in the wind. So there are probably internal supports or struts welded to the panel backsides, in order to keep them flat. Problem is, that process tries to distort the panels due to heat from manufacturing.
And since they opted for stainless, this adds additional problems. In this case: you can’t hide imperfections with bondo and paint. The panels have to be perfect, every time. It requires tolerances that belong on a sports car, not a pickup.
Oh no, I have to press up
200+ times if we’re counting all the detritus and failure in my command history.
There is an advantage to this approach though: fewer errors. You’re plucking a known working command from a list instead of manually typing a (possibly) broken version of it. Worse yet is when it’s a command where typematic mistakes cause unintended side effects like data loss. So, mashing up
100 times can be pretty smart, especially if you’re not a great typist.
Upvoted for the dancing and singing emoticon. Nice art.
This man is a menace and must be stopped.
Eh, I’m used to it.
everything is covered in a thin layer of goopy brine
Ah, that explains the extensive use of wood and plastic. That environment would be a nightmare for anything made of steel.
So people keep asking me: “why build a massive research facility at the bottom of a salt mine?” Well, I’ll tell you: science! That’s why. Those safety-obsessed, bureaucratic government types are always slowing things down. Better to move this operation indoors so we can get to work. And that’s where you come in: get your assignment at the desk, and let’s make history.
but here we are, back there.
The upside is that if you’re ever prompted to install a thing to your browser to use a site’s features, it’s because the built-in sandbox is too restrictive for what they want. It’s an immediate red flag.
I also view prompts to “use our (phone) app” the same way. I’m already seeing your site, in my browser, with ten different kinds of adblock and tampermonkey scripts running. I already have what I want, and I’m not letting you anywhere near my data plan.
Clearly, it’s time for a “no means no” extension.
Cut out soft-drinks in general.
They are not only packed full of sugar, but some very popular ones contain phosphoric acid. If you had to invent an combination of edible ingredients designed to damage tooth enamel, you couldn’t do worse. The fact that this is a diet-friendly option is almost a side-benefit. It’s that bad.
This is fine.
Good fences make good neighbors.
Corollary: server-side commit hooks make good teammates.
Oh. That’s good.
NPM ruin dev
is a new advanced feature that endorses opinionated “extreme programming” techniques. First it gets to work rebuilding node_modules, but with all the least compatible module versions in order to accelerate testing. It also minifies your .js code in place, to save you some CPU cycles later. Lastly, it squashes your entire git history on all branches, to save space.
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.