Testing a junior's mettle part 2



  • Ok, so I'll do another one of these. Not sure if I'll do the full blow by blow, but the first one was super fun, so let's see how this goes.

    The kid is coming in around 12:30 GMT. This one is actually a bit more serious than the last one, as he actually finished school and is looking for a real job, not just internship.

    He sent in his full grades, which are very mixed bag. This is not necessarily a bad thing IMO. It could mean he actually has some things he cares about and some things he don't, he's not just chasing the grades. Or it could mean he's a mediocre student.

    He also sent two school projects, one Java and one C#. The C# one is actually a nice little SOA project, didn't know they do that in school these days. His implementations are clean but mediocre. No sign of programmer's personality or any extra effort. Hard to judge him based on that.

    He also sent in a cover letter, where he says he had interned before and "worked" on a nice laundry list of technologies (probably means "been in a same room with people who did the work").

    So, I don't know. All pretty standard bag. We'll see how he does on the test.

    Ah, the test. It's similar as before. I just replaced the first question, because I wasn't pleased how it worked in the first test. Here are the questions:

    Write a function that returns the most common character in a string.
    Examplee:
    	most_common("AaBBCc") -> "B"
    	most_common("#A_1#A_1@A_1") -> "A" (or "_" or "1")
    
    Additional:
    	return ALL the most common characters as an array.
    

    http://repl.it/0Y5

    The second one is the same as before. Reminder:

    PRODUCT            PRICE             QUANTITY
    Apple              0.75                 125
    Orange             0.80                 218
    Pear               0.99                 116
    Pineapple          1.75                 45
    Watermelon         1.15                 20
    
    In a language/IDE of your choice, read in the CSV file.
    Print the contents of the file to the screen, sorted by highest price first,
    and ignoring items with a quantity less than 50.
    

    I might mix things around and switch numbers, sort order, columns order etc... He's from the same school as the other kid, you never know. The third one is my WTF table we'll try to refactor.

    I also figured out how to set up Teamviewer so I can't mess with his mouse cursor, so peeping will hopefully be smoother this time around.



  • Kid's quiet as a mouse. Likes JAVA. I had eclipse. He asked for NetBeans. Told him to install it.



  • First task: make a simple function to do string stuff

    Candidate: File > New Application > HTML Application

    Umm?



  • That's an interesting approach.



  • @cartman82 said:

    Candidate: File > New Application > HTML Application

    Umm?

    Maybe he’s going to write an enterprisey web service?



  • So he wanted NetBeans and HTML application, so he could do it in javascript...?
    I guess he never heard of online fiddles.



  • So did he get Java confused with Javascript?



  • Already stuck :-(
    And my smiley got raped too.



  • bearing in mind my previous support of your intern despite his struggling:

    This guy doesn't get the job.



  • Tried to help him. Told him the idea is to make a reusable pure function. So he's not tied to the DOM.

    Sigh.



  • Stuck here.

    I'll try to give him a hand...



  • After 5 minutes of prodding he finally realized he needed to reset the counter.

    So the next task: CSV processing.

    "Can I load the file using jQuery?"

    Oh boy...

    "I guess... you mean through the file:// protocol? Could that work...?"

    I guess we'll find out.



  • I'll be damned if he didn't find some monstrosity on SO.

    Will this work? I have no idea! Help!


  • β™Ώ (Parody)

    Seems like saying he likes java and proceeding to fail in javascript, using a java IDE, of his own accord should be a huge red flag.



  • Gave up on loading file using ajax get.
    Next step: C#


  • FoxDev

    In Chrome, not unless you set a flag

    in Firefox, a solid maybe the functionality has been turned off and on a bunch of times so it'll be whatever it settled on last update

    in IE: yes, but line endings are likely to be messed up, unless you use IE10 or IE11 in which case it's also not likely to work at all

    EDITπŸ˜„
    also C# in netbeans? this should be interesting...



  • @accalia said:

    In Chrome, not unless you set a flag

    in Firefox, a solid maybe the functionality has been turned off and on a bunch of times so it'll be whatever it settled on last update

    in IE: yes, but line endings are likely to be messed up, unless you use IE10 or IE11 in which case it's also not likely to work at all

    Thanks!

    I had no idea, never even considered doing something this stupid.


  • FoxDev

    i tried it while doing local development of a JS app and didn't feel like putting the file i wanted out on my server until it was working.

    ... yeah. that worked well. (nope, not at all, but i did learn something!)



  • @cartman82 said:

    Will this work? I have no idea! Help!

    I don’t think so...

    • He used backspaces in its path without escaping them, so JQuery will get "C:ProjectTesting ruit.csv" as a URL.
    • There should be a file:// before the path anyway (and IIRC the syntax should be file://C/Project/...) but maybe it will work anyway
    • XMLHttpRequests usually do not work at all with file://, even if the page using them was loaded with file://.
    • i doubt JQuery provides CSV loading out of the box, but maybe he’s using a plugin.

    EDIT: Hanzo’d, and I got a nice DiscoBug when posting this, for some reason:


    Filed under: FUCKING HELL WHY DOES IT INSERTS πŸ˜„ WHEN I TYPE : FOLLOWED BY ENTER ONCE?


  • OK, I've shown him how to load file into an array. He started with streams.
    Now he needs to load the items into a LISTBOX in his brand new WINDOWS DESKTOP APP.

    Hmm, nope.

    Better...

    Nope, not quite right.

    Almost there buddy!

    YES! Success!



  • Even with intellisense, it's taking him 5 minutes to figure out the .Split()...

    I think he doesn't understand the difference between char and string.



  • Oh just hire him already.


  • FoxDev

    to be fair the difference can be very subtle in a lot of languages, in particularly the ones that don't distinguish between ' and " (like JavaScript)



  • It wasn't that, he didn't realize the second Split overload required an array of characters.
    If he's this good with Intellisense, I shudder to think him working without.



  • Oh boy, he descended into "randomly change things and hope something happens" mode.



  • I asked my boss to come in and end the torture.

    Needless to say we are NOT calling back this guy.


  • FoxDev

    Aww... and he was so knowledgeable! i mean he almost used Java after he said he liked programming in Java!

    wait... noi. he went for Javascript (not Node/JS but actuall webpage javascript) then when that failed he went for C#... neither of which are much, or at all, related to java



  • Would you have allowed an Excel macro / VBA solution for the second one?



  • @Keith said:

    Would you have allowed an Excel macro / VBA solution for the second one?

    At the point where this ended, I would have allowed editing the damn file by hand.



  • @cartman82 said:

    At the point where this ended, I would have allowed editing the damn file by hand.

    Would you have accepted it if the person had installed a Linux distribution, overwriting your Windows installation, and then proceeded to code the solution in spaghettified PHP?


  • BINNED

    @Keith said:

    spaghettified PHP

    And now I'm hungry.



  • Are you sure? You gotta call is_hungry_real(), not is_hungry().


  • I survived the hour long Uno hand

    no, nono, it's is_real_hungry(), not to be confused with is_really_hungry(). is_hungry_real() returns whether or not the concept of hunger exists in this plane. Dur.



  • @Keith said:

    Would you have accepted it if the person had installed a Linux distribution, overwriting your Windows installation, and then proceeded to code the solution in spaghettified PHP?

    That'd at least require some level of competence.



  • But he did manage to install NetBeans, right? Or is that installer now so easy anyone could do it?



  • Understand, interns really don't have programming experience other than academic, which is usually terrible at best. You're looking for someone who learns quickly when given direction and is reasonably pleasant to be around. You're not looking for the next programming rock star, you're the talent scout to find new potential, mold them, and become a millionaire by proxy.

    That said, I wouldn't hire this guy, the other appears to have been quite a bit better.



  • @ChaosTheEternal said:

    But he did manage to install NetBeans, right? Or is that installer now so easy anyone could do it?

    He managed that. No offices had to be evacuated.

    @Matches said:

    Understand, interns really don't have programming experience other than academic, which is usually terrible at best. You're looking for someone who learns quickly when given direction and is reasonably pleasant to be around. You're not looking for the next programming rock star, you're the talent scout to find new potential, mold them, and become a millionaire by proxy.

    That said, I wouldn't hire this guy, the other appears to have been quite a bit better.

    This guy has finished studies with a decent average and was looking for a real job, not internship.

    The other guy starts internship next Monday. Agree, he showed some potential. I probably won't give him many programming tasks, but I'll try to get him into Linux, so he can take over some of the server troubleshooting bitch work.



  • @cartman82 said:

    Write a function that returns the most common character in a string

    A little tricky with the additional requirement, if you don't want to do two passes across the array.

    @cartman82 said:

    So he wanted NetBeans and HTML application, so he could do it in javascript...?I guess he never heard of online fiddles.

    Could be worse. Could be using Chrome console.

    The algorithm is shit. If he's going for O(n^2), he might as well sort the string.

    @cartman82 said:

    "Can I load the file using jQuery?"

    JQuery is good for everything. CSV, Big Data, microcontrollers, you name it.

    @cartman82 said:

    he didn't realize the second Split overload required an array of characters.

    It has params, so you don't need an array </pendantry>

    @Matches said:

    Understand, interns really don't have programming experience other than academic, which is usually terrible at best.

    Oh, come on. Those guys just barely know how to write code. It's something you'd expect from a guy who read "Teach yourself Programming in 24 hours" in 12 hours, not from a CompSci student.



  • That was a fun read. Keep them coming!



  • I would expect every comp-sci student at the university I went to, and the local community college to be unable to write any meaningful programs, even with things as trivial as this. You're underestimating how bad the coursework is.



  • @Matches said:

    I would expect every comp-sci student at the university I went to, and the local community college to be unable to write any meaningful programs, even with things as trivial as this. You're underestimating how bad the coursework is.

    Well, not all students are that bad. (Okay, I'm bad, but not even close to that bad). Granted, our coursework is majorly outdated and focused on useless things, but if you can't code up some really standard algorithms, you're not going to pass.

    They might be short on good coding practices, or on VCS / project management, but I'd expect CS students to solve simple programming puzzles with both hands stuck up their ass.


  • FoxDev

    i agree. the height of second semester programming at my university wasπŸ˜„

    Here's a base program. Fill in this one method here to compute the next iteration of Conway's Game of Life from an input array of booleans and return the result. Do not change any code outside this method.

    i'm not kidding: that was the level we were expected to be at after TWO ENTIRE SEMESTERS OF LEARNING TO PROGRAM

    and then third semester programming was datastructures. the first assignment wasπŸ˜„

    Using C (a language you havent been using and i'm not teaching you in class) write a full implementation of a doubly linked list. Include a test program that exercises all functionality of your implementation of a doubly linked list.

    Assignment is due a week from today. Late assignments are penalized a full letter grade per every three hours they are late.

    Fortunately i was prepared for that and taught myself basic C over the summer break. but even then i barely got through that class!



  • Why are you smiling so much?


  • FoxDev



  • I didn't learn much useful stuff in college other than database design. I had a student job as a programmer for the university and that was much more valuable than any of my actual programming classes. Algorithms was interesting, but so far rarely applicable in the real world.



  • @accalia said:

    Using C (a language you havent been using and i'm not teaching you in class) write a full implementation of a doubly linked list.

    Even if you somehow fail to google one of the gajillion implementations, it's still simple enough if you actually know what a linked list is. A week is way too much for that, especially on the third semester - for us, it'd be like "here's a Windows form, put a button on it, you have a semester for the assignment".

    Conway's GoL is much trickier - you need to handle the edge cases correctly, and it's even more fun when you're using the toroidal model.

    @mott555 said:

    I didn't learn much useful stuff in college other than database design.

    I kinda grasped that intuitively - I still don't really remember what 3NF is, but somehow always end up with it. My "useful thing" was software engineering (basically a crash course on everything enterprisey - from patterns through use-cases, agile, project management, up to acceptance testing and VCS) - but I still learned more in a month of internship.

    @mott555 said:

    Algorithms was interesting, but so far rarely applicable in the real world.

    Except for the interviews, that is.


  • FoxDev

    @Maciejasjmj said:

    Even if you somehow fail to google one of the gajillion implementations, it's still simple enough if you actually know what a linked list is. A week is way too much for that, especially on the third semester - for us, it'd be like "here's a Windows form, put a button on it, you have a semester for the assignment".

    Conway's GoL is much trickier - you need to handle the edge cases correctly, and it's even more fun when you're using the toroidal model.

    while i'm not disagreeing with you the edge cases were handled by the fact that array we were provided was guaranteed to be bordered by 1 dead cell in every direction that was outside of the range we were calculating, and we were given a 99.9999% complete solution to the problem and told to fill in one piece using Java

    The next semester we were given two days of lectures before the assignment was dropped on us with the requirement to use a language none of had used for school, with no help in learning the subtleties of pointers or anything from the teacher.

    and he would run all our programs through google and if we had used code from somewhere without proper citations that code was considered invalid and incorrect. (at least we could cite to include)

    it was hard, but not too hard. for me at least, over half the class dropped out in the first weeks.



  • @Matches said:

    I would expect every comp-sci student at the university I went to, and the local community college to be unable to write any meaningful programs, even with things as trivial as this. You're underestimating how bad the coursework is.

    This, sadly, is the state of 99.9% of code-monkey-mills out there. You pretty much have to work your tail off outside of class to get a decent CS education unless you are at a place like MIT which still has a rigorous CS program.

    Of course, it helps if you know how to program before you start college...



  • @Maciejasjmj said:

    I kinda grasped that intuitively - I still don't really remember what 3NF is, but somehow always end up with it.

    I had absolutely no concept of databases before the classes. Had I attempted anything DB-related prior to then, it would have ended up on this site. I did stuff like using several tables with identical schemas, each one to be a separate object in code. And of course no primary/foreign keys of any kind because I didn't know what they were.

    But prior to college 99% of my programming experience was BASIC on a TI-83 calculator. AFAIK nobody had ported MySQL to that platform (yet?).



  • @Maciejasjmj said:

    A little tricky with the additional requirement, if you don't want to do two passes across the array.

    Never got even close to that level.

    @Maciejasjmj said:

    Could be worse. Could be using Chrome console.

    The algorithm is shit. If he's going for O(n^2), he might as well sort the string.

    I doubt he even knows it exists. He would have gotten brownie points if he tried that.

    @Maciejasjmj said:

    It has params, so you don't need an array </pendantry>

    He thought the second argument would help him get rid of empty strings. He was mistaken.

    @Matches said:

    I would expect every comp-sci student at the university I went to, and the local community college to be unable to write any meaningful programs, even with things as trivial as this. You're underestimating how bad the coursework is.

    I'm sort of hoping to dig up a gem; someone who's actually programming on their own time and just goes to school to get the door-opener piece of paper. Not sustainable in the long term, but one can always hope.


Log in to reply