Don’t know who this guy is, but I’m glad I never interviewed with him. This is language-version-specific behavioral minutiae that anyone can look up in 5 minutes in the rare case it matters, and is otherwise irrelevant to engineering software at a senior level.
This article is a junior engineer’s idea of what a senior engineer should know.
This feels like an overly negative comment. language specific minutiae is interesting to a lot of developers, and this kind of stuff is exactly what you'd ask if someone claimed to be an experienced C++ developer. You're not going to decide not to hire them based on them not knowing this specific thing, but if you ask them 5 different questions about specific behaviour/edge cases/whatever and they don't know any of them it's probably a bad sign.
(Although "this is bad practice, I've never done it, I didn't care to look up details" would be a perfectly fine answer to me if I was the interviewer)
I am an experienced C++ developer, I know what happens in this particular case, but this type of minutiae are only interesting to the developers who have never had an actually hard problem to solve so it's a red flag to me as well. 10 years ago I would have thought differently but today I do not. High performance teams do not care about this stuff.
It's as close as you can get to useless knowledge. It's like asking a pilot "exactly how will the aircraft break apart if you nose dive it at high speed into the ground?"
This analogy makes a lot of sense until you need to deal with an exception emanating from a destructor... then it looks a lot more like "what's the proper way to hold a chainsaw"
I want to play a game. In your hands is a chainsaw about to be destructed. Another exception is already in flight. Live, or std::terminate. Make your choice. -Jigsaw
If you noticed, the article did not actually tell you what happens when destructor throws. It was only about double-exception case and throwing in nothrow() function (both perfectly valid things to know when jobbing).
What state are members left in when destructor throws? If exception happens in virtual base? If member destructor throws, what other class members have they destructor executed? will delete[] be called?
The author possibly does not care to know themselves! As you say, totally irrelevant to any normal programming. Unless you are writing clang or gdb
> This is language-version-specific behavioral minutiae that anyone can look up in 5 minutes in the rare case it matters, and is otherwise irrelevant to engineering software at a senior level.
The fact that C++ programming books have entire sections about destructors (see: Effective C++) shows that this is very much not irrelevant minutiae. C++ forces you to deal with this kind of detail all the time.
Now, we can have a much more interesting discussion about whether C++ is a disaster of a language precisely because you are forced to deal with this kind of minutiae by hand. We could also have an interesting discussion about whether RAII is the "object oriented" of our time. We could even have an interesting discussion as to why so many companies ban constructors/destructors in their C++ programming guidelines.
However, irrelevant minutiae C++ destructors are not.
What book covers in depth *throwing* from destructors? Even more sane thing — throwing from constructors and function arguments — is mentioned in passing ("unwind will take care of everything, don't think too hard about it") unless you are in a language lawyer mailing list. But exceptions *during destruction*? What book discusses that? That's like covering use of NaN values as map<> keys...
Chapter 2: Constructors, Destructors, and Assignment Operators
Item 5: Know what functions C++ silently writes and calls.
Item 6: Explicitly disallow the use of compiler generated functions you do not want.
Item 7: Declare destructors virtual in polymorphic base classes.
Item 8: Prevent exceptions from leaving destructors.
Item 9: Never call virtual functions during construction or destruction.
Item 10: Have assignment operators return a reference to *this.
Item 11: Handle assignment to self in operator=.
Item 12: Copy all parts of an object.
This stuff is bread and butter of C++ (or at least it used to be; perhaps this is different in "modern" C++) and lots and lots of grist for people like Scott Meyers and Herb Sutter.
"Prevent exceptions from leaving destructors." — thank you for providing well known sources that support my point! Although sadly we all have to eat Sutter Meyers bread, at least it explicitly tells you to not worry about the way exceptions are handled during object destruction — by simply avoiding such exceptions.
No C++ "bread and butter" I have seen so far goes into depth on this subject.
Because the two go together. If you have to ban one, you pretty much have to ban both.
Although, I guess if you only statically allocated everything once at startup, you could use constructors without destructors? Presumably using the placement versions would also let you use constructors without destructors.
I'm generally talking about systems that are <64KB. You basically don't get heap and determinism is really important.
350 was late last year. The text at the top of the linked page says prices are up about 30% over the past month. Directly prior to the war starting the price was about 470
Yeah, if you haven't used a social network for years, and nor do your friends, and you log in to the social network, you get pretty trash content. This shouldn't be surprising.
Studies have all come out clean on pacemakers and mmWave. No detectable interference in the hardware or on an EKG while in a mmWave scanner.
I could imagine other conditions potentially but pacemakers have been ruled a non issue for mmWave by academic studies (albeit I can understand still exercising caution despite that).
Tbh I'm not sure but they've done accelerated dosage testing to simulate long term use by repeatedly exposing people to use of the machine over a more frequent period of time.
But mmWave really just is not dangerous. Current generation 5G cellular and WiFi standards are mmWave and they are just as harmless.
Molecular damage just starts showing up with THF/terahertz emissions band but mmWave is in the EHF and is has more than 10x the wavelength of THF (i.e. it is far wider/more gentle than THF). In a very real sense mmWave can't even interact with most of the molecules in your body.
mmWave can interact with the water in your body but at the levels it's being used it's only really useful for seeing the water. You'd needs orders of magnitude more powerful emissions than what these scanners use to actually cause damage at that frequency.
i.e. It's the difference between using the flashlight on your phone to see in the dark and using the concentrated light from solar-thermal heliostats to boil water or heat molten salt. No matter how hard you try, your flashlight is never gonna boil water.
Ridiculous nonsense. Boycott Fedex because of a $2.3M delivery contract with ICE? Cancel Spectrum internet because there is an ICE field office in Texas that uses them? Cancel Comcast because they provide cable TV? Unsubscribe from Netflix because...no reason?
No wonder it is organized by a professor of marketing who has been building a personal brand of hating the tech companies for a decade.
You can measure my productivity by how slouched I am.
Sitting up straight at my desk, chair locked, perfect posture? I’m doing nothing, maybe looking through System Preferences to change the system highlight color.
Sliding down in my chair like jelly, with my shoulders where my butt should be and my head resting on the lumbar support? I’m building the next iPhone and it’ll be done by 2 AM.
Funny, I’m the same. I also like taking walks to think but I’ve found that I must have my head pointing almost directly down (I.e. looking at my feet). It’s also how I stand thinking in the shower, with the warm water hitting my angled neck. Maybe something beneficial about that position of the neck, or maybe just habit!
I will also have conversations in my head during my walk, I’ve done this my whole life and I’m not sure to this day whether my lips move during these or not. In any case, I must get some funny looks with head bolted to the ground mumbling to myself…
As for the software. I would not want a camera on 24/7 (on any device, a compromise being my doorbell, which isn't cloud connected). It'd defeat the small LED which informs you it is on (since it is always-on), and if the machine is compromised this is a method to receive personal data.
Actually, I'd prefer a hardware killswitch on things like camera and microphone.
Alas, I'm not alone in meditating and thinking while taking a shower.
It's one of the moments of my day when I recollect what happened, what I need to do, and what not to do.
The problem is that I can get quite lost during this phase, and hot water isn't cheap, so my SO is always threatening to put a big timer in the bathroom.
My pet hypothesis about why shower is often praised to be such a mindful place is that it has not so much to do with water and more to do with the fact that for many people life alternates between 1) constant social interaction and interruptions from other people and 2) bathroom time.
How many people these days have a dedicated home office, off limits to anyone else? How many partners sleep in different rooms?
Sure, perhaps the sensory experience plays some role, but if your bathroom is reliably the most interruption-free place for you, naturally you’d form a habit of catching up on all the “slow thinking”, most negatively impacted by interruptions, during shower.
I’ve seen people with interruption-free solo hobbies (be that hiking in the woods, motorcycling, rock climbing, etc.) describing similarly mindful experiences, but unlike those shower is the lowest common denominator and perhaps one that happens most routinely.
In my case, though walks help declutter my mind somewhat, for deeper thoughts, I have to write it down sitting or laying in the bed in the worst of positions. Thinking too deeply while walking only leaves me anxious in the end as I tend to get sidetracked a lot in conversation and always have to restart the conversation over and over again.
I tried doing the same. Sometimes it made my understanding of things much clearer. However most fimes, I found it worked best when I had a clear idea on paper, either to validate the idea or when I needed to an opinion. Otherwise, ChatGPT in my case, built upon my idea that I hadn't thought through well and confuse the shit out of me.
This is how things get built for me as well. I have a standing desk and like using it occasionally but if you see me standing at it you can bet I'm doing something typical like emails or chat and not thinking deeply.
If you delete social media, and leave your phone away from your person all day with notifications turned off, you can have these moments all the time it turns out.
Considering how much more productive these moments are for me than the bullshit I used to do on my phone and social media, it was an easy decision to make.
Oh, lol, now I get your question. Yea, it turns out the silence and lack of distractions are what produce "shower thoughts", more so than the act of showering itself.
Doing any relatively rote act like washing dishes, walking places, etc can also give rise to them. Not having a device in your hand to constantly steal your attention really helps though.
Showers are generally considered to be relaxing separately from the “shower thoughts” phenomenon.
Couldn’t the relaxation be a factor in generating shower thoughts?
I suspect that essentially none of our non-ancestors were predated in a hot spring, unlike walking etc, so there may be an environmental cue driven induced relaxation that doesn’t exist for many other activities.
Yea, you relax, and then your brain produces random thoughts about things.
I suspect it's just about getting the space to relax, which is why I frequently have thoughts when staring at the wall, or taking a walk, or washing dishes, or doing any other myriad activities which are relatively easy on brain processing.
I find pacing to be helpful. As long as there’s not a lot of poles to walk into accidentally. So while outside walks can be more focused you do get the odd head bang.
I never understood this. Is this why the cubicles are always full in the office? WTF I go in there take a dump and leave while the people on each side are just silent the whole time. I can think of much better places to think.
This is interesting, because in many ways I’m almost the exact opposite.
If I’m slouched in my chair, then I’m either completely disengaged or doing something mundane like dealing with email. If I’m upright or sat forward then I’m engaged and executing, but maybe not thinking deeply - I’m doing something I’ve already thought about and decided on. And if I’m on my feet and moving around, often doing some mundane chore like emptying the dishwasher, then I’m likely thinking.
It’s actually a really good illustration of why one size fits all solutions when it comes to work environment and conditions are often so unsatisfactory.
Exactly what I came here to say. I've been programming for 40 years, 35 professionally, and I didn't find my ergonomic, no-pain, no-RSI happy place until I stopped following advice to sit up straight. I set my chair with just enough resistance, set the head rest where it puts my eyeline directly on my monitors, which are set considerably higher than average and about a metre from my head. I can work for hours like this now, with no pain.
I could never use an app like this. Maybe I should write one that blurs the screen when I don't slouch.
it will be interesting to see as these tools emerge to what extent the undercontrolled behavior is a piece of a larger cycle of attention and context mgmt, or if all of that time can be nudged back into the zone
In a previous tech bubble I figured out that the Aeron chairs were great - if you were using good posture. Slouch at all and they'd hurt you. The humanscale chair was the one that was actually good for feet-on-desk, keyboard-in-lap, staring out the window while rotating data structures in my head...
This article is a junior engineer’s idea of what a senior engineer should know.
reply