128 karma · joined July 18, 2017
You: the two Brits were risking their lives.
Me: Not really, they'd have been following standard cave diving safety protocols.
You (effectively): Well, a Navy Seal just died, so that proves that it's dangerous.
Me: There's evidence that the Navy Seals weren't trained cave divers - they certainly didn't seem to be equipped as such - so all it proves is that cave diving is dangerous to those without specific training and/or proper equipment - navy seals or otherwise.
You: you'll change your tune if one of the brits dies!
W-T-F?
Here's a short list of how the diving equipment in some of the photos is absolutely noncompliant with proper cave diving equipment. This implies to me that they are not trained cave divers, and consequently, the risks they unknowingly took were enormously greater than the risks the two brits took:
(1) Single tanks! Fine in recreational diving, because if something goes wrong with your air supply (tank valve fails, hose bursts, regulator falls apart, whatever), you can go to your buddy for air, or at worst, bolt to the surface. No good in cave diving, where there isn't any air at the surface, and your buddy might be 20 meters away at the other end of a tight restriction. So all cave divers use twin tanks. We also follow gas management rules designed to let us survive the following two scenarios: (a) At the point of maximum penetration, you get separated from your buddy, and simultaneously, one of your two tanks completely fails; and (b) at the point of maximum penetration, you're still with your buddy, but both of your (or his) two tanks fail. Diving on a single tank is fundamentally noncompliant with all those standard safety protocols.
(2) Hoses curving out around their heads. These are common in recreational diving, but a serious entanglement hazard in cave diving. Cave divers route all their hoses tight-in, to reduce entanglement risks. This is especially important in low or no visibility diving. No properly trained cave diver would leave the house with hose routing like that in some of those photos. Even if an experienced cave diver was forced to use that gear by circumstance or in a dire emergency, she'd fix that up before she got in the water.
(3) K-valves! The top of each tank has a valve, onto which you attach the first stage pressure reduction regulator. Those valves come in two styles: K-valves, and DIN valves. Each style has a rubber O-ring to seal the regulator onto the valve. With K-valves, the O-ring can squeeze out, causing the attachment to fail. That's rare, but can happen. Bad luck if you're a kilometre into the cave - on a single tank - with your buddy at the other end of the restriction!! With DIN valves, the O-ring is trapped entirely within the valve body, so it can't pop out. For that reason, few if any properly trained cave divers would use K-valves.
(4) Funky hand held torches! They probably throw a nice wide beam, which is good for recreational dives. But cave divers need narrow beams (to cut through the murk, and facilitate signalling); with multi-hour durations, and hands-free attachments so you can use that hand for other tasks.
In summary, someone who is an experienced brain surgeon, gets into a Formula One car, prangs it, and kills himself. To me, that doesn't say much about the safety of properly trained and qualified Formula One drivers.
But you say that the death of a person, who may have had zero formal training in cave diving, says something about the safety risks the two brits took? Perhaos two of the most experienced expedition cave divers in the world?
I think you do not understand the issues. I don't intend to reply again.
Looking at some of the photos, lots of the gear they are wearing is ordinary recreational gear - nothing like what an experienced cave diver would use. So it raises the question, in my mind, as to whether their navy seals actually do have any formal training in advanced cave diving. Combat diving is unlikely to be the same thing.
So the very unfortunate incident might actually support my previous comment, not contradict it. Cave diving is very dangerous to the untrained or improperly equipped. But proper training and equipment can mitigate those dangers. The two brits would not have been wearing anything like the kind of gear in the photos :-(
Again, kudos to the people on the spot, doing their best.
Too right. I'm a reasonably experienced cave diver, and regularly dive in a system of 11km of intersecting fully-underwater tunnels, with the single entry/exit being a small pond, a few feet across, in a small, underground air-filled cave. I'd typically go 700-800 meters out, with a dozen navigational decisions along the way (left? right? straight ahead?), then have to reverse all that to get back out. But a few years ago I had an MRI, where you're wheeled into a narrow metal tube, on your back, with your arms pinned to your sides, with the tube an inch away from your face. Result: GET ME OUT!! GET ME OUT!! I had to be wheeled back out & take a break, before I could grit my teeth and try again. I absolutely hated it. I told them I was an active cave diver, but I don't think they believed me :-)
Scuba stores have traditionally survived on markups from equipment sales. Everything else is a loss leader. But now, people can get a wider range, of better equipment, delivered faster, at half the price - via the internet! Yet STILL, bozos like those guys can not be bothered to service someone who's made the effort to walk in the door!
It makes me wonder how many small businesses go under because of good ol' garden variety hopeless customer service, rather than anything else.
I posted a detailed exposition of my own approach to interviewing. I expected nothing more than some intelligent comments thereon.
In response, someone says I'm "prejudiced", and why would he "give a fuck" about my concerns; another says my concerns exist "in a parallel universe"; and another says my views are "religious"!
Equeeze me if I don't take well to copping random insults in what is meant to be an intelligent discussion forum. Particularly from people who've contributed zero to the discussion so far - like you! I suggest you get out of the basement and get some exercise. Maybe ask your mum for a bike?
No. Because I'd expect the candidate to focus on subtle issues, and not waste time on bleeding obvious ones!
Of course f() might be undefined. Blind Freddy knows that. But Blind Freddy can't necessarily see the other (much more subtle) problems in those 4 lines of code.
I want to know, is this candidate more than Blind Freddy? Does he inhabit what some of us call "the real world", where things like division by zero are things to be consciously managed by proper coding practices?
(Edits for clarity)
There we agree!
Isn't that the whole point of an interviewer writing code on the whiteboard? To see how the applicant would view that code if hired to work in the offered position? Why would an interviewer want the applicant to view that code in any other way? Is an interviewer likely to think, "I'll treat the interviewee's comments as if he was just writing the code as a hobby throwaway, nothing to do with the offered position"?
> the variable names and magic numbers are bad practice / but it's on a whiteboard. I'm not going to waste time writing long descriptive names out by hand on a whiteboard
Great! But in my post the interviewer wrote the code on the whiteboard. The interviewer did not ask the interviewee to write any code on the whiteboard. Where did you get the idea that the interviewee was to write on the whiteboard? Software development requires attention to detail, yes?
First, if you truly believe that the code I showed is "a snippet of code completely made up or taken out of context and then anonymized by renaming variables", I can only say that I don't believe you've ever worked on large codebases. There are millions of lines of code, in hundreds of thousands of application, in dozens of different languages, all over the world, precisely like the snipped I showed. If you've been coding for 20 years, as you say you have, and haven't seen snippets like that on a thousand occasions, you must have worked in very strange environments. If you really want me to, I'll spend 5 minutes and give you multiple links to exactly similar snippets in various large open source projects.
Second, I'm mystified by your comments regarding my trivially simple code question. that "Interviewers come up with their games with their arbitrary rules and a bunch of prejudice about how a good or bad candidate should react".
Wut? Let's make the question even simpler:
X := Y / Z
Would you not expect an applicant to say, "What if Z is zero?" ? Would you actually expect the candidate to say - quoting you:"This looks like a snippet of code completely made up or taken out of context and then anonymized by renaming variables. I have no idea what it's supposed to do, I have no idea why I'm looking at it, and I have no fucking idea what you want from me, and I don't play guess-the-rules type of games."
Are you seriously telling me that you'd hire a candidate who said that? Over one who said, "What if Z is zero?" ?
I think one of us is missing something...
"I'm going to write a few lines of code on the whiteboard, tell me what you think of them." The code would be something like this:
If f(a,b) then
X=6
Elseif flag1 then
X=8
Endif
My bet is, people would fall into one of three camps.(1) The Bemused :-)
These people would have no idea what to say. That would be fine for a new developer, I'd just prod them in the right direction. For example, "what do you think about inline constants?" But if an experienced developer had nothing to say about that code, that would be a big red flag for me.
(2) The Defiant!
These folk would say, "Gee that looks like very old code, I'm really more interested in functional languages, do you guys do any Haskell?" This would also be a big red flag. First, he's saying that he has no interest in my priorities as the interviewer, he'll just ignore my questions and substitute his own. Second, he shows that he's not really interested in code as such. It's like a guy who says he likes cars, you take him around the corner and show him your one-off Porsche EVO hybrid, and he says "Wow, an infinity pool! What did that cost?" Fail.
(3) What I'd Expect
Here's what I'd expect from an experienced developer, off the top of his/her head:
"Ok, I see in-line constants, and short variable and function names. Those are often undesirable, I can talk about that more if you like.
But the more interesting thing, is that X is only set if one of the two conditions is true. If neither condition is true, X does not get set to anything.
That might be a bug: the programmer meant to initialise X before the first test, but forgot. Or perhaps X is initialised much higher up. But if that was the case, I'd like to refactor the code to bring that initialisation closer to the code on the whiteboard; and/or rename X to something less likely to be used by mistake in the middle; or at least, add a comment saying "X initialised above". Or you could just add an else branch to the code on the whiteboard, to ensure that X gets set even when both conditions are false.
Another slight possibility is that when the first condition is false, the second condition is necessarily true, and the developer has written in the second condition as a form of comment. But in that case, I'd rather make it more explicit, by changing "Elseif flag1 then", to "Else /* flag1 must be true */"; or even asserting that, just to be sure.
Also, if the code in question is really complex, or just messy from years of maintenance, there might still be cases where X does not get set at all. In that case you could initialise it to an impossible value, say NULL, right at the start, then assert not null at the end. Or you could even re-write the code in truth table style, which I can talk about more if you'd like."
Me: "The truth table approach sounds good. How would you do that? What kind of data structures would you use?"
And so on.
Does everyone really use CS-type questions these days? Does anyone take the different approach displayed above?