|
vOv posted:I think you could use Fizzbuzz as a 'how well does this person know how to maintain code' test if you keep adding more requirements like 'bazz if it's divisible by 7, fizzbazz if it's divisible by 21, blarg if it's divisible by 35' and see how long it takes for them to stop using an if-else and come up with some kind of 'rule engine'. Most definitely. A 10X programmer shows how it's done here: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition If there aren't at least 5 classes and 3 interfaces per logical function, you're not doing it right.
|
# ? Apr 2, 2017 14:08 |
|
|
# ? May 30, 2024 20:56 |
|
B-Nasty posted:Most definitely. A 10X programmer shows how it's done here: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition A pile like that landed on my desk last week. Except it presumably eventually potentially likely may do something in some circumstances under appropriate conditions given certain input.
|
# ? Apr 2, 2017 14:17 |
|
Dex posted:what if i can't? do you want your solution or a solution? I don't interview people but if I did, and I asked you for a Fizzbuzz, and you gave me this, my first comment would be "ok now do it over the range 1 ... 1,000,000,000 instead of 1 ... 100"
|
# ? Apr 2, 2017 19:56 |
|
Not quite code, but... https://twitter.com/amolrajanBBC/status/848153909130665984
|
# ? Apr 2, 2017 20:31 |
|
Hmm... it seems the site I was asked to take a look at because it was "loading slow" has a 1.1MB stylesheet (after being minified). Do you suppose that could have something to do with it? I can't even... How the gently caress do you do that??? Like, at some point, you must realize something has gone very wrong when you're dealing with that size of CSS file.
|
# ? Apr 2, 2017 21:20 |
|
PT6A posted:Hmm... it seems the site I was asked to take a look at because it was "loading slow" has a 1.1MB stylesheet (after being minified). Do you suppose that could have something to do with it? I was curious, so I looked and this page, showthread.php, pulls in about 110kB of CSS not including that from jQuery. So it's only one order of magnitude more than the forums...
|
# ? Apr 2, 2017 21:30 |
|
PT6A posted:Hmm... it seems the site I was asked to take a look at because it was "loading slow" has a 1.1MB stylesheet (after being minified). Do you suppose that could have something to do with it? Some automated tools will create a whole separate CSS class for every single object on a document, even if most of them share identical characteristics. And some particularly dense coders will do the same thing by hand (what if I want to change every single thing later? )!
|
# ? Apr 2, 2017 21:36 |
|
I suspect a lot of people who use CSS preprocessors never even look at the final CSS or how big it is.
|
# ? Apr 2, 2017 22:40 |
|
Harkening back to FizzBuzz chat, about ten years ago I was a co-op rotating between school and work every few months. I went to my university to take part in a job fair looking to hire someone on the opposite rotation from me and gave an even simpler test: in whatever language you choose, swap the values of two variables. 30+% of the CS and CE majors I spoke to failed.
|
# ? Apr 3, 2017 01:18 |
|
Stylesheets tend to get monotonically larger over the life of a web site because it's incredibly difficult to determine which rules are actually doing anything.
|
# ? Apr 3, 2017 01:19 |
|
Nth Doctor posted:in whatever language you choose, swap the values of two variables. 30+% of the CS and CE majors I spoke to failed. Do you mean without using a temp variable? In a high-level lang like C#, for instance, using some XOR trickery would be awful code style.
|
# ? Apr 3, 2017 01:33 |
|
B-Nasty posted:Do you mean without using a temp variable? In a high-level lang like C#, for instance, using some XOR trickery would be awful code style. Unless it's POD you really don't want to use a XOR trick anyway. You'd probably want something like this for C++ (11+) C++ code:
|
# ? Apr 3, 2017 01:42 |
|
B-Nasty posted:Do you mean without using a temp variable? In a high-level lang like C#, for instance, using some XOR trickery would be awful code style. Temp variable usage was what I waa looking for. Anyone who knew enough of the math to do an XOR swap would have probably landed the job anyway. Most people immediately wrote "a = b;" realized they hosed up and gave up without trying anything else. E: I'm pretty sure I also told them a and b were integers, too, so no worry about pointers / object fuckery.
|
# ? Apr 3, 2017 01:47 |
|
Plorkyeran posted:Stylesheets tend to get monotonically larger over the life of a web site because it's incredibly difficult to determine which rules are actually doing anything. I'm not a "front-end" person but how is this true? You can inspect the element and get the exact combination of attributes that makes it look the way it does.
|
# ? Apr 3, 2017 02:28 |
|
Pie Colony posted:I'm not a "front-end" person but how is this true? You can inspect the element and get the exact combination of attributes that makes it look the way it does. It's easy to look an element and tell what rules it uses. It's hard to look at a rule and say which elements use it, especially if it's overly broad or there's no agreed upon "way to do things" for the project (there never is this)
|
# ? Apr 3, 2017 02:31 |
|
1) Grep for it in your codebase (if it's a generic term, make the regex match "id"/"class") 2) Render the HTML page that contains it 3) Inspect element ??? What am I missing
|
# ? Apr 3, 2017 02:47 |
|
Absurd Alhazred posted:Unless it's POD you really don't want to use a XOR trick anyway. You'd probably want something like this for C++ (11+) std::tie(b, a) = std::make_pair(a, b); someone tell me what the assembly for this looks like and if it's a savage optimization, I don't know how to do that
|
# ? Apr 3, 2017 02:51 |
|
Fergus Mac Roich posted:std::tie(b, a) = std::make_pair(a, b); It seems like it would be creating the equivalent of two temps instead of one. Of course after compiler optimization, all bets are off.
|
# ? Apr 3, 2017 02:57 |
|
Pie Colony posted:1) Grep for it in your codebase (if it's a generic term, make the regex match "id"/"class") People make really dumb selectors, or sometimes they may even be needed. You cannot really grep for them.
|
# ? Apr 3, 2017 03:01 |
|
B-Nasty posted:Do you mean without using a temp variable? In a high-level lang like C#, for instance, using some XOR trickery would be awful code style. You guys are way overthinking it. The few times I've had to hire other developers the majority of applicants were completely inexperienced and flat out lying on their resumes and had no real understanding of the basics. Questions like this and Fizzbuzz are quick ways to eliminate those people if they somehow made it far enough to get a phone or in-person interview. Though if I were asked if that was a limitation that would be a good sign. From an interviewee side, if they start throwing trick questions at you that's usually a bad sign and the times I encountered it, the person doing the asking was using them more as a brag than an actual serious question. "Yeah, our guy found a way to do that in a single SQL statement!" Ok, you asked me to fix the broken code, not try to figure out some novel but pointless optimization of something that already runs in a MS or less with no performance requirements given. Thankfully that company decided to pass on me because I "wasn't object oriented enough". Personally I think it had more to do with me asking about their environment and not being able to hide the shock when I found out they weren't using any SCM at all for their commercial B2B banking software, then making several recommendations. Pie Colony posted:1) Grep for it in your codebase (if it's a generic term, make the regex match "id"/"class") Occasionally you run into specificity issues where it looks your HTML should be applying styles from a certain class but is overridden by another and it's not obvious why or you can't isolate a good way to prevent classA from overriding classB. Which is why !important is still part of CSS. Though it's probably most typically used by people who didn't even bother to look into the problem that far and take the time to fix it and just want their entire page flashing red so !important to the rescue!
|
# ? Apr 3, 2017 03:44 |
|
Pie Colony posted:1) Grep for it in your codebase (if it's a generic term, make the regex match "id"/"class") Web sites usually aren't just static HTML these days. Are you going to manually inspect every possible configuration that this particular page can end up in? How are you going to make sure you haven't missed one?
|
# ? Apr 3, 2017 03:45 |
|
Pie Colony posted:1) Grep for it in your codebase (if it's a generic term, make the regex match "id"/"class") You're missing that literally the entire history of front end development is dumbasses throwing up their hands saying "it can't be done" and then inventing batshit insane ways to do the thing in the most roundabout way possible.
|
# ? Apr 3, 2017 05:06 |
Absurd Alhazred posted:It seems like it would be creating the equivalent of two temps instead of one. Of course after compiler optimization, all bets are off. It looks like the generated assembly with gcc is identical. Neat! (I tried it out with icc and clang as well--same results.) VikingofRock fucked around with this message at 06:03 on Apr 3, 2017 |
|
# ? Apr 3, 2017 05:52 |
|
Pie Colony posted:1) Grep for it in your codebase (if it's a generic term, make the regex match "id"/"class") For: code:
code:
|
# ? Apr 3, 2017 11:52 |
|
Absurd Alhazred posted:Unless it's POD you really don't want to use a XOR trick anyway. You'd probably want something like this for C++ (11+) Fergus Mac Roich posted:std::tie(b, a) = std::make_pair(a, b); std::swap(a, b); e: If someone tells you not to use std::swap, tell them no.
|
# ? Apr 3, 2017 11:57 |
|
leper khan posted:std::swap(a, b); When I ask a candidate to reverse a string, and I disallow .Reverse(). I'm expecting one of three responses: -Can't do it -Can do it -Discussion about concerns over non-English character diagraphs and how simple char-array logic would break for most languages. At which point I'll hypothetically accept the risk and still want one of the other two outcomes. The thing is there's plenty of people who can talk about and know plenty of reasons WHY standard library functions exist and they should be used - but if you rip them away, they are helpless to solve even trivial problems on their own.
|
# ? Apr 3, 2017 12:21 |
|
Cuntpunch posted:-Discussion about concerns over non-English character diagraphs and how simple char-array logic would break for most languages. At which point I'll hypothetically accept the risk and still want one of the other two outcomes.
|
# ? Apr 3, 2017 12:28 |
|
Cuntpunch posted:When I ask a candidate to reverse a string, and I disallow .Reverse(). I'm expecting one of three responses: I guess I've never understood why you would ask a problem whose minimal solution is "use the standard library function"
|
# ? Apr 3, 2017 12:43 |
|
A fun variation on asking intervewees to write code is to give them short programs and ask them what they do. It isn't even necessary to create weird gotcha programs whose behavior relies on bizarre quirks of the language. Most candidates can manage to read something like:code:
code:
|
# ? Apr 3, 2017 12:55 |
|
Kazinsal posted:The real question is, has anyone written FizzBuzz in Malbolge? What if you've written a native-code compiler for a language you've designed yourself, and then write FizzBuzz in that language?
|
# ? Apr 3, 2017 13:11 |
|
Internet Janitor posted:A fun variation on asking intervewees to write code is to give them short programs and ask them what they do. It isn't even necessary to create weird gotcha programs whose behavior relies on bizarre quirks of the language. Most candidates can manage to read something like: Do fizz buzz, but middle out.
|
# ? Apr 3, 2017 13:12 |
|
leper khan posted:I guess I've never understood why you would ask a problem whose minimal solution is "use the standard library function" You keep getting caught up on this idea of 'minimal solution'. It's not about that, it's about some baseline proof that a candidate can actually write functioning, complete code. If I give someone Fizzbuzz, I'm doing an internal checklist: -Can they understand basic functional requirements? -Can they pseudocode the solution? -Can they write actual code in a language of their choice? -Does the solution function? -How do they respond to me asking particulars about their implementation? -During questioning, are they giving the impression they understand the code, what it's doing, why it's doing what it's doing? (aka, did they think about their solution or just wing it) Ditto with any other trivial exercise. It's a way to bootstrap a conversation, because if someone flounders before even writing functional code, it drastically changes the overall conversation.
|
# ? Apr 3, 2017 13:50 |
leper khan posted:I guess I've never understood why you would ask a problem whose minimal solution is "use the standard library function" Imagine interviewing for a position as librarian at a general public library, but two thirds of your applicants would fail to arrange a stack of ten novels in alphabetical order by author's last name.
|
|
# ? Apr 3, 2017 14:55 |
|
Cuntpunch posted:You keep getting caught up on this idea of 'minimal solution'. It's not about that, it's about some baseline proof that a candidate can actually write functioning, complete code. If I give someone Fizzbuzz, I'm doing an internal checklist: I'm more hung up on asking someone to do something you explicitly never want them to do. Implementing a simple state machine is about as complicated as fizz buzz and is something I've needed to do numerous times over the course of my career. The correct way to sort something in most languages I use is to provide a comparison function (if the default isn't suiting) and call the sort method. Unless you're dealing with a large distributed data set, in which case you probably want to distribute the set across however many nodes, use whatever general sorting technique on them (call language's sort), and merge the results. If you are asking me to write a custom sorting algorithm, I'm going to need to waste 10-15 minutes figuring out why you would want me to do such a thing when the fact is that you probably don't care or want to go into cache locality at that point. Irrespective of the likelihood that the provided algorithm addresses those concerns better than whatever I'm going to vomit onto you in 3-5 minutes.
|
# ? Apr 3, 2017 14:59 |
|
nielsm posted:Imagine interviewing for a position as librarian at a general public library, but two thirds of your applicants would fail to arrange a stack of ten novels in alphabetical order by author's last name. Good, they should stack them based on their Dewey Decimal code.
|
# ? Apr 3, 2017 15:00 |
|
Hammerite posted:I don't interview people but if I did, and I asked you for a Fizzbuzz, and you gave me this, my first comment would be "ok now do it over the range 1 ... 1,000,000,000 instead of 1 ... 100" i'd ask if your company routinely screws up basic requirements that badly
|
# ? Apr 3, 2017 15:06 |
|
leper khan posted:I'm more hung up on asking someone to do something you explicitly never want them to do. Implementing a simple state machine is about as complicated as fizz buzz and is something I've needed to do numerous times over the course of my career. This sounds a lot like asking someone to pass a driving exam with a manual, and having them take their ball and go home because IN THE REAL WORLD they drive automatic.
|
# ? Apr 3, 2017 15:37 |
|
leper khan posted:I'm more hung up on asking someone to do something you explicitly never want them to do. Implementing a simple state machine is about as complicated as fizz buzz and is something I've needed to do numerous times over the course of my career. It really feels to me like you're misunderstanding the point of this sort of interview question. I've asked people to sort a list in an interview before. I've also asked them to swap variables, or reverse a string, or implement FizzBuzz. There are lots of ways to accomplish these tasks. As an interviewer, I do not care even in the slightest how they go about it. If a candidate sorts a list by calling the standard library function, that's fine. If a candidate sorts a list by manually implementing a bubble sort, that's also fine. Hell, if a candidate wrote some client to a JobInterviewOMatic web service that automatically solves inane interview questions for them, that would also be completely fine. The point is not to critique the candidate's choice of methods. If I ask someone to sort a list, then I don't really care how they go about it, and to be honest I don't even care if the list actually gets properly sorted. If they have an off-by-one error that causes them to not include the last element of the list or something then I'm not going to hold that against them. If they try to use std::sort but forget what it's called and write std::sort_list or something instead, that's still successful enough. The point is that more than half of the candidates that I have interviewed were completely, totally, 100% unable to write any code whatsoever. All that I want is for a candidate to demonstrate that they have some sort of solution in their head, and they are capable of somehow conveying that solution to a computer. If a candidate can't even get a recognizable start on "sort a list" then I'll try to be generous and move on to a different simple test like "swap these two variables" or "reverse this string" or "count the number of words in a string" or whatever. Sometimes a candidate just blanks on a particular problem for some reason, or they panic, or something. It happens. But I want to reemphasize, for more than half of the interviews that I have conducted, we went the entire technical interview period going over CS 101 style problems and the candidate was completely unable to produce anything resembling a solution. I have no idea why these people want to interview for coding positions, because they appear literally unable to code. Once I have a candidate that has apparently actually touched a programming language at some point in their life prior to the interview, I'll start asking them more real questions, and I'll probably use their solution to the inane filter question as a jumping-off point. But these aren't, like, trick questions where I'm going to fail someone because they did/did not use the "right" way to sort.
|
# ? Apr 3, 2017 15:42 |
|
leper khan posted:Good, they should stack them based on their Dewey Decimal code. Dewey Decimal doesn't apply to fiction works.
|
# ? Apr 3, 2017 15:45 |
|
|
# ? May 30, 2024 20:56 |
|
Cuntpunch posted:This sounds a lot like asking someone to pass a driving exam with a manual, and having them take their ball and go home because IN THE REAL WORLD they drive automatic. If someone will only ever in their lifetime use an automatic, yeah it seems nonsensical to test them driving a manual. I bet far more than 50% of drivers today have never used a manual transmission. They're not even easy to buy anymore. ShoulderDaemon posted:It really feels to me like you're misunderstanding the point of this sort of interview question. I understand what the point of the questions is supposed to be. I've also seen interviews conducted where the interviewer did not.
|
# ? Apr 3, 2017 15:50 |