|
pretend i posted some inline assembly using XCHG here im too lazy to look it up
|
# ? May 7, 2013 03:16 |
|
|
# ? Jun 5, 2024 09:19 |
|
I've found that you don't have to ask people about code in order to figure out that they can't code. You can weed them out before that. Ask them to explain some projects on their resume, their role on those projects, and describe a code problem they encountered.
|
# ? May 7, 2013 03:21 |
|
Bunny Cuddlin posted:pretend i posted some inline assembly using XCHG here im too lazy to look it up Its xchg eax, eax of course! But uh, seriously don't write xor swap or inline asm for this poo poo. If its even a correct answer its likely not faster than what the compiler has for swap and a rather extreme example of premature optimization.
|
# ? May 7, 2013 03:27 |
|
Dren posted:I've found that you don't have to ask people about code in order to figure out that they can't code. You can weed them out before that. Ask them to explain some projects on their resume, their role on those projects, and describe a code problem they encountered. This doesn't work, at least not for us. We get people who talk a great game but literally cannot code anything.
|
# ? May 7, 2013 03:28 |
|
Commit Message Generator Heh. Why produce bad commit messages when the computer can do it for you?
|
# ? May 7, 2013 04:33 |
|
Doctor w-rw-rw- posted:Commit Message Generator "For real, this time." is one I've found myself using once or twice. Forgetting to add something to the commit
|
# ? May 7, 2013 04:42 |
|
'You have a conveyor belt that periodically brings you boxes of different colors. You need to open the purple ones and hold the red boxes aside until they can be paired with a matching blue box. There converyor also periodically produces rocks, which can be ignored entirely. How would you model this using objects?" (We need a fizzbuzz question to weed out people who write insane OO inheritance models)
|
# ? May 7, 2013 04:49 |
|
Dren posted:I've found that you don't have to ask people about code in order to figure out that they can't code. You can weed them out before that. Ask them to explain some projects on their resume, their role on those projects, and describe a code problem they encountered.
|
# ? May 7, 2013 05:00 |
|
bucketmouse posted:'You have a conveyor belt that periodically brings you boxes of different colors. You need to open the purple ones and hold the red boxes aside until they can be paired with a matching blue box. There converyor also periodically produces rocks, which can be ignored entirely. How would you model this using objects?" class Rock extends Box {
|
# ? May 7, 2013 05:05 |
|
class Rock {} class RedBox extends Rock {} class BlueBox extends Rock {} class PurpleBox extends RedBox, BlueBox {} Pretty sure that's how OO is supposed to work.
|
# ? May 7, 2013 05:20 |
|
Clearly you need multiple inheritance, since a purple box is both the descendant of box and of the color purple.
|
# ? May 7, 2013 05:29 |
|
I prefer to view the purple box as a descendant of the red box and the blue box since it has the qualities of both redness and blueness (and boxness). Edit: damnit someone already made the same joke
|
# ? May 7, 2013 05:39 |
|
Plorkyeran posted:class Rock {} interface IColoredObject {} interface IConveyorObject {} abstract class AbstractConveyorObject implements IConveyorObject {} final class Rock extends AbstractConveyorObject {} abstract class Box extends AbstractConveyorObject {} final class RedBox extends Box implements IColoredObject {} final class BlueBox extends Box implements IColoredObject {} final class PurpleBox extends Box implements IColoredObject {} and then refactored into interface IColoredObject {} interface IConveyorObject {} interface IBlueObject extends IConveyorObject, IColoredObject {} interface IRedObject extends IConveyorObject, IColoredObject {} interface IPurpleObject extends IBlueObject, IRedObject {} abstract class AbstractConveyorObject implements IConveyorObject {} final class Rock extends AbstractConveyorObject {} abstract class AbstractBox extends AbstractConveyorObject {} @Deprecated final class RedBox extends AbstractBox implements IColoredObject {} @Deprecated final class BlueBox extends AbstractBox implements IColoredObject {} @Deprecated final class PurpleBox extends AbstractBox implements IColoredObject {} class BlueBoxImpl extends AbstractBox implements IBlueObject {} class RedBoxImpl extends AbstractBox implements IRedObject {} class PurpleBoxImpl extends AbstractBox implements IPurpleObject {} Remember, sometimes purple boxes gotta do what only purple boxes can.
|
# ? May 7, 2013 05:39 |
|
Doctor w-rw-rw- posted:interface IColoredObject {} That should be IAfricanAmericanObject.
|
# ? May 7, 2013 07:03 |
|
Doctor w-rw-rw- posted:No, no. That's clearly inadequate. This makes me feel violent towards you.
|
# ? May 7, 2013 07:21 |
|
Thermopyle posted:This makes me feel violent towards you. Only because it's so disgustingly plausible, am I right?
|
# ? May 7, 2013 08:39 |
|
Jewel posted:"For real, this time." is one I've found myself using once or twice. Forgetting to add something to the commit What's wrong with git commit --amend? Is this not a common feature?
|
# ? May 7, 2013 09:28 |
|
Otto Skorzeny posted:There was a place that a coworker of mine interviewed at that had everyone take a two hour personality test during the interview, and all the employees cubicles had color-coded signs with their Myers-Briggs type and a blurb on how to interact with them based on their being an INTJ or whatever At one place I worked at, every interview was special. They'd hired someone who'd previously worked on a 'personality test horoscope' thing, http://en.wikipedia.org/wiki/DISC_assessment and so everyone who joined was asked to pick from a series of Forer Sentences to see if they were a fighter, a mage, or a priest, etc. They also asked people to do a "mental agility" test, which involved simple "A is to B as B is to C" and tests that measured how fast you could rotate shapes in your head. They also liked to ask "impossible gimmick" questions, including "How much teflon is there in the universe", you know, to see how well you knew XML and Xpath.
|
# ? May 7, 2013 10:30 |
|
Jabor posted:Be careful with fizzbuzz, because it doesn't really help with screening out the degree mill graduates who study those "interview questions" and can regurgitate an answer, but still don't actually know how to program. Fizzbuzz, but with 5 and 7 instead of 3 and 5.
|
# ? May 7, 2013 10:44 |
|
Doctor w-rw-rw- posted:Commit Message Generator How did you find our repository?! Get out of there you do not belong shoo go!
|
# ? May 7, 2013 12:17 |
|
tef posted:everyone who joined was asked to pick from a series of Forer Sentences to see if they were a fighter, a mage, or a priest, etc. Just run everyone through the character creation questions from Ultima, problem solved.
|
# ? May 7, 2013 12:40 |
|
I stumbled across this thread on another forum that's from a year and a half ago so it's kind of old, but it's too good not to share. Your opinion on the functionality of a template dynamic list Basically, a clueless C++ guy ranting for several pages about how terrible the standard library is (while completely misunderstanding it) and showing off his crazy hand-rolled replacement where pretty much every function is called operator=. Some choice excerpts: quote:For example, some time back I had a linked list that took probably about 2000 - 3000 lines of code riddled with memory allocation crashes and various pitfalls. C++ code:
C++ code:
quote:I had the last iteration code up to the point where, barring some optimisation, this would have been valid: quote:I am not sure what there is to maintain? It's straight forward enough to use - assignment operators mostly.
|
# ? May 7, 2013 12:52 |
|
seiken posted:
Am I interpreing this correctly: The first assignment opens a file, the second sets the file's mode to write and the third assignment is written into the file? Well that's just genius.
|
# ? May 7, 2013 13:09 |
|
Wheany posted:Am I interpreing this correctly: The first assignment opens a file, the second sets the file's mode to write and the third assignment is written into the file? Perfectly intuitive.
|
# ? May 7, 2013 13:13 |
|
seiken posted:I stumbled across this thread on another forum that's from a year and a half ago so it's kind of old, but it's too good not to share.
|
# ? May 7, 2013 13:22 |
|
Crazy man posted:Std::list requires log(n) time to get the size of the list, when it's perfectly possible to get a log(1) return, including iterator numeric position. quote:Given how I have no idea how it operates under the covers
|
# ? May 7, 2013 13:23 |
|
I'm speechless. The dude not even once explains why he needs to call size() so often that it's a bottleneck. Or why he wants to read a file into a linked list in the first place?? Or was he trying to save a linked list to a file?? Or?? I'm so confused
|
# ? May 7, 2013 13:24 |
|
Volmarias posted:Perfectly intuitive. s/operator=/operator<< congratulations you're now in the C++14 standard kiddo.
|
# ? May 7, 2013 13:25 |
|
Jewel posted:"For real, this time." is one I've found myself using once or twice. Forgetting to add something to the commit git commit -a --amend git push -f origin master has your back.
|
# ? May 7, 2013 14:16 |
|
kitten smoothie posted:Are you in the US? From everything I've read, administering a general intelligence test in an interview is asking to get yourself sued. Skill-based testing is one thing, as it demonstrates that the test is relevant to the critical skills necessary to do the job. But a plain old IQ test means you have to show that the IQ cutoff you choose means nobody below that can do the job, and that the test is professionally developed and not biased against people in protected classes. Yes I am, and I didn't think about that for a second. It wasn't administered by a licensed psychologist though. They just threw a test in front of me that had a bunch of weird spacial reasoning and math problems in front of me, and said I had a time limit. So thinking about it, while it probably wasn't really an IQ test, it sure as hell felt like one to someone who has never done anything like that before. I wonder if there's a thread for wacky interview poo poo people have had to go through.
|
# ? May 7, 2013 14:22 |
|
Hughlander posted:git commit -a --amend Both people replied with a git command but I wasn't using git. I haven't gotten a chance to use/learn it yet vv (I do most of my personal work in class where we use perforce so I just use it because it's there, and use it at home because I have to use it for class. I used to use TortoiseSVN when I did the majority of work on my own projects from home though. I tried out git for the first time about.. 2-6 months ago, and I liked it! I don't know any of the commands yet, but I definitely can see why it's liked, and will try to learn it thoroughly when I get the chance (probably after uni or during a break). Jewel fucked around with this message at 14:27 on May 7, 2013 |
# ? May 7, 2013 14:25 |
|
Jerry SanDisky posted:s/operator=/operator<< C++14? Yeah right, just start calling it C++2x now so it's not as embarrassing when it's formalized in 2031.
|
# ? May 7, 2013 14:30 |
|
hobbesmaster posted:C++14? Yeah right, just start calling it C++2x now so it's not as embarrassing when it's formalized in 2031. And libstdc++ will still be missing <regex>
|
# ? May 7, 2013 15:14 |
|
Mogomra posted:Yes I am, and I didn't think about that for a second. It wasn't administered by a licensed psychologist though. They just threw a test in front of me that had a bunch of weird spacial reasoning and math problems in front of me, and said I had a time limit. One of the worst things I've been asked was the Brown Eyes/Blue Eyes logic puzzle. Except it wasn't posed to me correctly and was rendered impossible to solve. They asked me "how would everyone know what color their eyes are?", and left out a bunch of other pieces of information. My ultimate response (after eliminating all of the "reflective surfaces" options) was to suggest that every person on the island pull out one of their eyes. This met with a horrified expression. I did not receive an offer. Even if they had posed it to me exactly as worded in that article, I doubt I'd have been able to solve it. [edit] This thread is turning into the "interview" thread somehow.
|
# ? May 7, 2013 15:19 |
|
Hughlander posted:git commit -a --amend Isn't it a bad idea to force push when you've changed the history? I mean I force push all the time but that's cause nobody ever pulls from my repos so I don't care. Though I do try to hold off pushing until I'm at least partially sure that I won't have to rebase or amend anything.
|
# ? May 7, 2013 15:53 |
|
Jewel posted:Both people replied with a git command but I wasn't using git. I haven't gotten a chance to use/learn it yet vv You should definitely learn it. After coming from P4 and SVN it's like a breath of fresh air wrapped in diamonds inside of a TARDIS Also, for those suggesting that he rewrite history, I'm sure you're all aware that this is a bad thing when others have pulled that commit already.
|
# ? May 7, 2013 15:54 |
|
Gazpacho posted:What are you looking for with that last bit? Because people who have a poor grasp of programming language semantics can tell you about encountering code problems all day. From asking them about a code problem they encountered I hope to figure out A) What they consider to be an interesting and non-trivial enough problem to bring up in response to that question during an interview and B) A hint as to where their interests lie. The question is meant to be innocent enough that they won't attempt to hide their enthusiasm for terrible crap. E.g. Maybe they would talk about how they wrote this incredible OO rock/box/color object model with fifteen interfaces. Or maybe they will talk about how they wrote a badass test automation system by following industry best practices. Who knows! Either way, you can ask follow up questions to try to ascertain if they really know their poo poo or if they were the guy sitting in the corner while everyone else did the work. That operator= guy is awesome! Sort of reminds me of when I found a co-worker's copypasta implementation of std::vector.
|
# ? May 7, 2013 15:55 |
|
Volmarias posted:You should definitely learn it. After coming from P4 and SVN it's like a breath of fresh air wrapped in diamonds inside of a TARDIS Any good resources to learn it easily with no prior knowledge in anything of the sort? I know what a commit, a checkout, and a branch is. That's about it. I usually only use the bare minimum when it comes to SVN/Perforce, and I do it all visually, so going to a command line interface like GIT is daunting. Also, using Windows 7, if that means anything.
|
# ? May 7, 2013 16:09 |
|
Carthag posted:Isn't it a bad idea to force push when you've changed the history? I mean I force push all the time but that's cause nobody ever pulls from my repos so I don't care. Though I do try to hold off pushing until I'm at least partially sure that I won't have to rebase or amend anything. Don't force push public branches is generally a good rule of thumb, though.
|
# ? May 7, 2013 16:10 |
|
|
# ? Jun 5, 2024 09:19 |
|
Doctor w-rw-rw- posted:Only because it's so disgustingly plausible, am I right? Anytime I encounter code along those lines I shake my fist at the sky. I don't encounter other people's code that often as I usually work by myself, but the frequency with which I do encounter such a mess makes me wonder how any of you working in teams can handle it.
|
# ? May 7, 2013 16:14 |