Testing candidate's mettle S02E02
-
Ok, at this point, it's pretty clear he's a PHP guy first and foremost.
-
He keeps getting this
But then doesn't know to click on the error line number, to see the context.
He's just looking for errors blindly. That won't scale to a real project.
-
@cartman82 even in PHP, I find that shit ugly as hell:
$product_data_array = array( 'product' => $product, 'unit_price' => $unit_price, 'amount' => $amount );
Of course, there's probably a prettier way to do this using
explode
andarray_map
or something, but this is at least not ugly as hell.
-
Yup, if he thinks he can work in some hipsterish ES7 circlejerk environment, he's dreaming.
But he might be an OK PHP guy.
-
@Onyx E_USING_OLD_UGLY_ARRAY_SYNTAX
-
@asdf Fuck you, I have shit on 5.3 :(
-
He keeps reloading the browser confusedly.
"Oh noes! Stack Overflow copy pasta doesn't fit my data!"
-
-
@Gąska OK, I bothered to check. :p Wonder of wonders, w3schools is actually correct.
-
Most of the kids got stuck trying to parse data.
He's stuck here:
Doesn't seem to understand at all how callbacks work.
-
@cartman82 said in Testing candidate's mettle S02E02:
He's now officially 25 minutes late :/
Our last exchange:
He: So see you at 2 PM. We could stop by the local pizza place I know.
Me: Ummm.... yeah we could
He: Once you see me, you'll know whyWTF was that!?
I guess he ate too much pizza...
At least he didn't ask you out of the blue if you liked tickles. Because that's what a guy did to me once.
-
@anonymous234 said in Testing candidate's mettle S02E02:
At least he didn't ask you out of the blue if you liked tickles. Because that's what a guy did to me once.
What!? Why? Who doesn't like tickles!?
-
@cartman82 said in Testing candidate's mettle S02E02:
Agh, those braces.
At least pick a damn style.
-
@cartman82 I don't like tickles. And definitely not with a random guy I met today.
-
Looks like he'll actually push through.
-
-
@cartman82 said in Testing candidate's mettle S02E02:
Doesn't seem to understand at all how callbacks work.
Speaks well of his character, at least.
-
@Onyx said in Testing candidate's mettle S02E02:
@cartman82 I still can't get over those invalid tags...
Filed under: Unless HTML5 added shit again, in which case
Well, technically, there is a
<header>
tag in HTML5... but it has nothing to do with the<head>
tag, so, nice try on his part?
-
@Onyx said in Testing candidate's mettle S02E02:
@asdf Fuck you, I have shit on 5.3 :(
The last place I worked at had an internal app using 4.3.2 when I left 7 months ago
-
@cartman82 said in Testing candidate's mettle S02E02:
Who doesn't like tickles!?
Giving or receiving? Giving, yes. Receiving, not so much.
@anonymous234 said in Testing candidate's mettle S02E02:
And definitely not with a random guy I met today.
This. Very, very much this.
-
@cark said in Testing candidate's mettle S02E02:
The last place I worked at had an internal app using 4.3.2 when I left 7 months ago
Is there a causal relationship between these two random facts? Because if I saw PHP 4, I'd definitely run.
-
@HardwareGeek I've once tickled my then-4-years-old cousin to his tears. Like, he was then crying for the next 15 minutes. Apparently, too much tickling hurts children.
Best part? I didn't even touch him.
-
@Gąska said in Testing candidate's mettle S02E02:
my then-4-years-old cousin
He's aging rather quickly. (For those who didn't see the edits happen, he went from 2 to 3 to 4 in the space of a single post.)
-
@HardwareGeek Well, I don't have the best memory. He was anywhere from 1 to 7 years old. I'm 90% certain of the 2-6 boundaries.
-
@cark said in Testing candidate's mettle S02E02:
@Onyx said in Testing candidate's mettle S02E02:
@asdf Fuck you, I have shit on 5.3 :(
The last place I worked at had an internal app using 4.3.2 when I left 7 months ago
-
Done with the interview.
Final code.
<html> <header> <script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script> </header> <body> <table> <thead> <tr> <th>Product name</th> <th>Unit Price</th> <th>Amount</th> </tr> </thead> <tbody> </tbody> </table> </body> <script type="text/javascript"> $(document).ready(function(){ var product_data_array = new Array(); $.ajax({ url: "http://mahprivacy.com/data.txt", }).done(function(data){ var lines = data.split('\n'); $.each(lines,function(key,val){ if (key >1 ) { var tmp = new Array(); var product = val.substring(0,19).replace(' ',''); var unit_price = parseFloat(val.substring(19,40).replace(' ','')); var amount = parseFloat(val.substring(40,60).replace(' ','').replace('kg','')); if (isNaN(unit_price)) { unit_price = 0; } if (isNaN(amount)) { amount = 0; } tmp['product'] = product; tmp['unit_price'] = unit_price; tmp['amount'] = amount; product_data_array.push(tmp); } }) // Sort the product_data_array first product_data_array = sortByColumn(product_data_array,'unit_price'); // Diplsay table $.each(product_data_array,function(key,val){ if (val['amount']>17 || val['amount'] == 0) $('table tbody').append('<tr><td>'+val['product']+'</td><td>'+val['unit_price']+'</td><td>'+val['amount']+'</td></tr>'); }) }) }) function sortByColumn(a, colIndex){ a.sort(sortFunction); function sortFunction(a, b) { if (a[colIndex] === b[colIndex]) { return 0; } else { return (a[colIndex] > b[colIndex]) ? -1 : 1; } } return a; } </script> </html>
In the end, he managed to push through.
The code is sloppy and with full of bad practices. When challenged about the problem with cutting lines at fixed offsets, he offered reading the header row and figuring out the offsets from there. Ok, not bad. He knew about regex-es, said he's rarely using them due to performance concerns. Fair enough.
In the talk with him, he had all the right answers about the ideas on how to expand the application. He just didn't seem to care at all about the structure of code itself.
It seems he's mostly just hacking at his own code, shying away from frameworks. For example, he's doing a mobile app in Cordova. But instead of plugging in a real JS framework, he's doing his own custom code shuffling with jQuery. He said he started reading about React, but had no idea about redux.
Overall, he seems like a mediocre coder with lots of experience in getting shit done. But I don't think he's the right choice for a javascript heavy position he applied for. Just not enough javascript chops.
We could probably use him in for PHP work. I'm a bit sorry for not seeing him do any actual PHP coding, but I presume he'd be able to get the job done. It's just that, after 10 years of experience, he should do more than just get the job done.
-
@cartman82 said in Testing candidate's mettle S02E02:
10 years of experience,
is that ten years of experience or one year of experience ten times?
-
@Gąska said in Testing candidate's mettle S02E02:
@HardwareGeek I've once tickled my then-4-years-old cousin to his tears. Like, he was then crying for the next 15 minutes. Apparently, too much tickling hurts children.
Best part? I didn't even touch him.
My little sister is long-distance ticklish. Literally. I can stand 5 feet away from her, hold up my hands at waist-height and wiggle my fingers, and she'll squirm and giggle and go "No! Stop!"
She's in her 20s.
-
@accalia said in Testing candidate's mettle S02E02:
@cartman82 said in Testing candidate's mettle S02E02:
10 years of experience,
is that ten years of experience or one year of experience ten times?
One week of experience and 519 weeks of fucking around.
Filed Under: Or it could be like in my CV: 'I worked on it once 10 years ago'.
-
@asdf said in Testing candidate's mettle S02E02:
@cark said in Testing candidate's mettle S02E02:
The last place I worked at had an internal app using 4.3.2 when I left 7 months ago
Is there a causal relationship between these two random facts? Because if I saw PHP 4, I'd definitely run.
No, I almost never touched the code. In fact, that was the problem: it was somewhat broken, but never broken enough to fix or replace.
-
@cartman82 said in Testing candidate's mettle S02E02:
TIL you can pump up the number of languages in your CV by listing all the regional variations of your native tongue.
Why didn't I think of that!?
I must add this to my CV*:
Languages
English (Full professional proficiency)
North American (Full professional proficiency - Can translate USian and Canadian**!)
*Résumé for those of you between Russia and Ireland
**Not the French-speaking ones though
-
@cartman82 said in Testing candidate's mettle S02E02:
He thinks jQuery can convert a javascript array directly into table rows.
That seems like a good function for a javascript library to have tbh.
-
@No_1 said in Testing candidate's mettle S02E02:
*Résumé for those of you between Russia and Ireland
Now I wonder if French say CV or résumé.
-
@Gąska Dutch is CV.
-
@Gąska said in Testing candidate's mettle S02E02:
Now I wonder if French say CV or résumé.
They probably prononce "sivi", trying to sound english but failing hard at it.
-
@cartman82 said in Testing candidate's mettle S02E02:
E-business is a skill now? TortoiseSVN?
Lesson learned from resume reading:
Nobody gives a flying fucking shit what tech you've used. They only care about what you did with it.
Especially true as tech gets outdated and irrelevant.
Tell a story about a problem you solved or task you accomplished WITH the tool.
"I can drive a car"
That's nice.
"I was a stand-by driver, so it was my duty to always be the shortest distance from my boss to the car. This sometimes meant circling parking lots, or even getting donut-friendly with parking enforcement officers. I had to balance out the time table of my boss with local traffic conditions, and obviously not being a gigantic traffic-blocking asshole. Once he was in the car, I got him from point A to point B in the most efficient way possible. I got to know the city really well-- not only routes, but traffic patterns and such. Since a single accident could screw up the entire company's schedule, I took extra-curricular courses for defensive driving. That way I could get from point A to point B fast, but safely."
-
@cartman82 said in Testing candidate's mettle S02E02:
Oh God, he hardcoded offsets...
Quick, change the .txt file to use an extra whitespace while he's not looking!
-
@No_1 said in Testing candidate's mettle S02E02:
*Résumé for those of you between Russia and Ireland
Aren't those different? CV generally listing your skills and experience as bullet points, and a résumé being a wall of text describing your life.
Or at least that's how we have it in Poland. Haven't really seen a company expect a proper résumé in a while, but they still show up on those "how to get a job" sites.
-
@Lorne-Kates said in Testing candidate's mettle S02E02:
Lesson learned from resume reading:
Nobody gives a flying fucking shit what tech you've used. They only care about what you did with it.
Especially true as tech gets outdated and irrelevant.He also had a large list of projects he did, but without code samples or anything tangible, it was completely useless to me. I just skimmed through.
-
@Maciejasjmj said in Testing candidate's mettle S02E02:
Aren't those different?
It varies depending on where you are and who you ask. In Britain (in my experience) the terms CV and résumé are generally considered synonymous, although receiving a résumé can suggest that a candidate might not be from the UK.
-
@cartman82 said in Testing candidate's mettle S02E02:
He also had a large list of projects he did, but without code samples or anything tangible, it was completely useless to me. I just skimmed through.
You learned way more from watching him code for 10 minutes that you would from any amount of time with his CV.
-
@Maciejasjmj said in Testing candidate's mettle S02E02:
Aren't those different? CV generally listing your skills and experience as bullet points, and a résumé being a wall of text describing your life.
Or at least that's how we have it in Poland.Hmm, my understanding is just the opposite. In the US, a resume is bullet points, and never, ever more than two pages. We don't use CVs, but my understanding is that they are very detailed and can be nearly the length of a short book if one has a long and distinguished career. I am very thankful that we don't use them, because I don't remember a lot of what I've done in that much detail, and some of it I don't want to remember.
-
@Lorne-Kates said in Testing candidate's mettle S02E02:
@cartman82 said in Testing candidate's mettle S02E02:
Oh God, he hardcoded offsets...
Quick, change the .txt file to use an extra whitespace while he's not looking!
Hm, couple of feature requests, should @cartman82 ever get enough good candidates at a time for it to be worthwhile:
- Have the data source automatically generate a random dataset on every call, with the same general formatting, but with white space varying with the items output.
- Possible enhancement: have the white space be a random amount between the minimum needed to separate fields (1 space after the longest item) and the minimum plus 10.
- Require the candidates to output a second table containing either:
- Only the
fieldsrecords filtered out from the first table, or - All the
fieldsrecords, sorted by a different criteria.
- Only the
Modification to the second feature request (see @Lorne-Kates' post below):
- Add an additional field, which the candidate is to sort by but not show in the second table.
- Have the data source automatically generate a random dataset on every call, with the same general formatting, but with white space varying with the items output.
-
@Dreikin said in Testing candidate's mettle S02E02:
Possible enhancement: have the white space be a random amount between the minimum needed to separate fields (1 space after the longest item) and the minimum plus 10.
Also, make it a random assortment of space-whitespace and tab-whitespace.
Require the candidates to output a second table containing either: ( Only the fields filtered out from the first table, or All the fields, sorted by a different criteria. )
Oh so you mean file contains columns A,B,C,D, but they only show A,B,D?
To really blow their mind, have the file contain A,B,C,D--- have them output only A,B,D--- but have them sort on C.
=)
-
@cartman82 said in Testing candidate's mettle S02E02:
It's so wrong to have 'elementary proficiency' :(
-
@Lorne-Kates said in Testing candidate's mettle S02E02:
Oh so you mean file contains columns A,B,C,D, but they only show A,B,D?
I actually meant 'records', but I like your interpretation too :D
Edit: Liked it so much, I added it to the original feature request.
-
@Dreikin said in Testing candidate's mettle S02E02:
couple of feature requests
I agree with setting up a data generator instead of a constant .txt file. I know, sounds like work and all, but if they can't code a generic solution, they can't code shit. Give them the spec, then bend the data as much as you can while still conforming to it.
Having them generate three or so tables instead of one might be fine too, pushes them gently towards refactoring the solution into reusable parts instead of plopping it all in JS' equivalent of
main()
.
-
@Dreikin said in Testing candidate's mettle S02E02:
Hm, couple of feature requests, should @cartman82 ever get enough good candidates at a time for it to be worthwhile:
Have the data source automatically generate a random dataset on every call, with the same general formatting, but with white space varying with the items output.
Possible enhancement: have the white space be a random amount between the minimum needed to separate fields (1 space after the longest item) and the minimum plus 10.
But why only spaces, CSV is so much more flexible . Throw in some text with escaped commas and line-feeds within quoted text fields.
-
@japonicus Evil ideas thread is
-
@japonicus said in Testing candidate's mettle S02E02:
@Dreikin said in Testing candidate's mettle S02E02:
Hm, couple of feature requests, should @cartman82 ever get enough good candidates at a time for it to be worthwhile:
Have the data source automatically generate a random dataset on every call, with the same general formatting, but with white space varying with the items output.
Possible enhancement: have the white space be a random amount between the minimum needed to separate fields (1 space after the longest item) and the minimum plus 10.
But why only spaces, CSV is so much more flexible . Throw in some text with escaped commas and line-feeds within quoted text fields.
A) It's not specified as CSV.
B) We can do better than that.