Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
craig939393256949dSUM(items) / items.Length?
I'm missing something?
Serious question: is this a serious question?
I can only guess someone was playing stump the chump on cases where it's an evenly distributed ordered set in which case it is either the centerpoint for odd cardinality or the sum of the numbers at the floor and ceil of n/2 divided by 2. That's just a novelty though.
junon271249dTo be fair, they're not completely wrong. Interviewing university graduates at a Big Tech firm was like putting nails in my eyes.
One candidate went something like this:
ME: Okay so I have a problem solving question that you can solve in any language. Which would you prefer?
THEM: Java is my main language
ME: Okay great, so go ahead and get a hello world working and we'll go from there
THEM: *stares blankly at their screen for a minute or so*
ME: Can I help somehow? Tell me what you're thinking about
THEM: I... don't know..
ME: Okay so public static void main is what I mean, does that help?
ME: Okay let's back up a bit, can you tell me what the public, static, void and main all mean?
THEM: No sorry
ME: No problem, let's just spend a few minutes talking about your personal projects then
I was absolutely shocked. Did they not expect to... write code? To this day I still don't know how they passed the TPS. This wasn't an isolated case either, sadly.
It's always been disappointing how few people can go from nothing. Starting vim and dumping a class and a main method into a file and passing it as an argument to jvm should be old hat, but it's file under "advanced wizardry" for whatever reason. Issue there is tools dependency. Most people doing java anymore rely on an IDE or spring Boot to give them a baseline. They know java as a framework. I doubt many of them ever configure javac or jvm settings directly.
That said, I do get irritated when I get framework specific questions in any interview. That's a red flag for a shitty place to work. What those candidates train for is my personal hell.
I thought the same. Was this guy serious? Then he pointed two problems: overflows and the possibility that the sequence is infinte.
I don't wanna play smartass, it took me some time to get it.
I'd say the original statement he made lacked context. Generally a series is considered to be reasonably finite in a given domain unless otherwise specified, to assume otherwise results in horribly de-optimized code. Even with a cumulative average, you will eventually overflow whatever buffer you're using.
junon271249dI HATE trick questions in an interview. They test nothing and serve no purpose other than to weed out otherwise good practical candidates.
homo-lorens611849d@dmonkey If the point is mathematical nitpicking, the mean of an infinite series can't be determined, not even approximated by looking at any finite number of members. What he's talking about is a rolling average, a stateful program that takes numbers as input and outputs the mean of each finite subseries as elements arrive. Very different from a mean function.
d-fanelli70449dIt’s brain dead to get the average of numbers in an array. But if an interviewer were to add a mathematical twist like that I’d tell the asshole to hire a mathematician! Obscure math wiz tricks for a development position? SMH (unless you’re hiring a programmer to write algorithms for mathematical research)
Maer126949dWhat complete nonsense by that other guy.
Firstly, without context one can argue for whatever. E.g. - "who said the series of elements consists of numerical objects? Maybe I want to have the average over some CustomType, so you need to implement operators and some value function for CustomType first! Hahaha gotcha again, morons!"
But secondly and more importantly - in the industry you code defensively, yes, but in a smart fashion. You don't just defend against everything and their dog, because
* you waste your time
* you waste computing time
* you potentially mask errors by providing defaults
so this guy doesn't seem to me like someone who is already working that job. /shrug
@Maer I admit I pulled the conversation out of context. The elements were supposed to be numerical, and the guy is a phd right now and he's actually working on the field with a known competent professor (mostly app dev)
@SortOfTested The group is a university group of our computer science departmento. We are computer scientists, not engineers, we mostly study theoretical stuff, so in order to be "correct" an algorithm must behave correctly in any situation, despite the implementation complexity.
Sry for the misunderstanding and the lack of context, my fault. Still, in that context, he proved a good point.
Btw I took notes from this discussion
theothergod28Riddle time, it took my brother a whole day to figure it out.... Can you solve this?
tokumei7I've got a puzzle! How well do you know the weird GNU coreutils error messages? $ rm foo/ rm: cannot remove '...