613
Find yourself (lemmy.ml)
submitted 1 year ago by coja@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Zagorath@aussie.zone 17 points 1 year ago* (last edited 1 year ago)

Well, the question sort of implies that you're needing to implementing Math.max yourself, for whatever reason. Probably as an exercise. It doesn't make sense to reuse a library that implements the feature if you're explicitly being asked how you would implement it yourself.

[-] demonen@lemmy.ml 14 points 1 year ago

This is why I think school and interviews are like a whole different universe from the one where actual work gets done.

[-] Zagorath@aussie.zone 8 points 1 year ago

In some ways they can be wholly different, but I don't think this is a good example of it.

Any programmer who cannot implement "take two numbers, return the larger one" is clearly not very competent. Even though you're never going to literally need to implement Math.max yourself at work, you are going to need basically the same types of skills. Probably 95% of the work I do day-to-day is stuff you'd learn in your first year at uni, and this just shows that you've got that ability.

In practice, the best interviews I've had usually set a slightly more complicated task as a do-in-your-own-time problem and then go through what you did in the actual interview. Problems like "read a list of names in the form , each name on a separate line, from a text file. Sort the names by last name, then by other names. Output to another text file. Include unit tests." They wouldn't then expect you to re-implement the sorting algorithm itself, but more want to look at the quality of code, extensibility, etc.

More basic questions like the one in the OP, or fizzbuzz, are decent as well, and a big step up from lame questions like "what does SOLID stand for? What does the Liskov substitution principle mean to you?" Even if they're not quite as valuable as a miniature project.

[-] demonen@lemmy.ml 1 points 1 year ago

For me, a good interview is a dialogue where the company representative shows me as much about the company as I do about me as a candidate. Take-home tasks are okay, I guess, but I suspect they might balk at me requesting they handle a mock HR issue, or whatever, for me!

load more comments (3 replies)
load more comments (3 replies)
load more comments (3 replies)
this post was submitted on 22 Oct 2023
613 points (95.7% liked)

Programmer Humor

32461 readers
449 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS