Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Erg
Oct 31, 2010

meatbag posted:

I flubbed an interview recently, the task was to implement a game of battleship. I'm not a great developer by any means, but the vast majority of my time is spent fixing bugs and tweaking existing code, so making something cohesive from scratch was a surprisingly difficult context switch.

The place I work has a question like that in the interview bank and I’ve resolved to never ask it. Pretty sure I’d poo poo myself on the spot if someone led in with “we’re making a game in the next 45 minutes”

This poo poo’s high pressure enough, I don’t need a curveball like that

Adbot
ADBOT LOVES YOU

Xguard86
Nov 22, 2004

"You don't understand his pain. Everywhere he goes he sees women working, wearing pants, speaking in gatherings, voting. Surely they will burn in the white hot flames of Hell"
Y'all should try some of these product manager interviews. True pinnacle of theater, the difference between what you're asked to do and expected to know VS the job you'll be doing.

I actually question if it's some kind of tacit collusion, making these processes so onerous.

downout
Jul 6, 2009

epswing posted:

I don't think not saying "write a function with a good function name that takes in the right parameter(s) and returns the right type" makes it a trick question. It's an interview, clearly whatever tasks are performed will be evaluated. (In your last interview, were you explicitly told that you should write good function names?)

If the candidate does everything else reasonably well, but e.g. names their function MyFunction, I'd just tell them "that's not a great function name, could you rename it?" and they do, and we move on.

Yes, if a candidate cannot add some numbers without help, I end the interview. I do mean 'gently' for what it is, not condescendingly or anything else. I do it gently and with empathy because, regardless of age, maybe they are new to the industry, fresh out of school, looking for their first job, etc, and I don't want to discourage them. I was a TA for many years at school, before and after I graduated, I thrive on learning and seeing others learn and asking the questions that lead to the light bulb turning on, etc.

I agree that interviews are typically cruel and unusual punishment for interviewees. I'm trying to express a strategy that I personally as an interviewer have found to put good candidates at ease early in the interview process.

Edit I re-read your post. No, it's obviously not the end of the interview if someone runs the code, spots the bug, and fixes it, that’s just Normal Programming Things.

Ya, I think seeing that mental wheel of running the code, recognizing a mistake, communicating it, then correcting it is by far a more important part of interview. I need to see people's troubleshooting and execution process with "correctness" becoming less of the focus.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Erg posted:

The place I work has a question like that in the interview bank and I’ve resolved to never ask it. Pretty sure I’d poo poo myself on the spot if someone led in with “we’re making a game in the next 45 minutes”

This poo poo’s high pressure enough, I don’t need a curveball like that

I actually had something similar asked to me recently, which was "please write me a function which allows me to play Tic Tac Toe. It should accept the player and returns information about the board state or the winner. How you want to do this is up to you." I felt it was actually an excellent question. It was simpler than Battleship, got into aspects of design, testing, interface / injection, etc. I was permitted to use an IDE while screen sharing so I didn't have to try to remember what things were called or notice a compile error. It felt very collaborative, and 45 minutes was a good amount of time for it.

I'm generally pretty happy to ask and be asked "hey, I want to do a thing, here's the details / constraints, wyd?" since it's not "I hope you know how to write a red black tree by memory" trivia question, but it also allows for discussion and back and forth. IMO a good interviewer and candidate could get a lot out of something simple.

brand engager posted:

Every time interviewing comes up in here it reveals that most of you are testing for "can this person read my mind" rather than anything useful.

I think you'll find that mind reading is actually an excellent skill for a candidate to have!

Canine Blues Arooo
Jan 7, 2008

when you think about it...i'm the first girl you ever spent the night with

Grimey Drawer

epswing posted:

Yeah, it's tough. On one hand, without writing code in the interview, it's very hard to gauge if they can do the job. On the other, it's hard to write code and think straight under pressure which you'd almost certainly never experience on the job.

My strategy is to start from the very ground floor. I'll just say "write a function that adds up a collection of numbers" with no further details, and they could write this in 1-2 minutes:

[Code and Stuff]

The former instantly tells me not to let them anywhere near my codebase and to gently end the interview, the latter tells me they know how functions work, they can give functions reasonable names, they know what IEnumerable is, they know what LINQ is, they even know recent language sugar like expression-bodied methods. (As you can tell we're a .NET shop.) From there I ramp up bit by bit (write the same function iteratively, what about recursively, now gather your 2 or 3 implementations under an interface, etc). If they can just breeze through these softballs, then (A) maybe we're both not wasting each other's time, and (B) they've gained confidence for more complex/interesting questions, and the rest of the interview we can "work on code together" much more reasonably/amicably.

In an interview setting, I would definitely probably write out the expanded version of this with a comment saying, 'You could .Sum this, but I assume we are going to expand functionality'.

I'm more and more inclined to write increasingly verbose code that is easier to understand per line. It's easier to revisit. It's easier to train on. It's easier to expand. It's not as sexy and if your team is senior, it takes longer to write, but I'm appreciating more and more the value of writing naive code where it makes sense to do so. Writing the coolest, sexiest code in the fewest number of lines is not the way I'd choose to do thing. I need to write maintainable stuff, not win at code golf.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
I really would not want to work with someone that considers calling the standard library function which does the thing you want to do instead of manually writing it yourself "code golf".

smackfu
Jun 7, 2004

But it feels so clever to write a one-liner that does the whole function’s work! Yea, you can’t step through the code anymore but that’s a small price to pay.

Fellatio del Toro
Mar 21, 2009

if someone asks me to write a function I usually interpret that they want me to "write a function" not "call a function"

Trapick
Apr 17, 2006

Yah I'm struggling to see a huge issue with making an actual function and using a for loop...

You worried about disk space or something, can't afford the extra 5 lines?

pentium166
Oct 15, 2012
I think your best bet is to just, you know, chat up the interviewer and ask whether they want you to call a standard library function or write your own, because they could be looking for either

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

pentium166 posted:

I think your best bet is to just, you know, chat up the interviewer and ask whether they want you to call a standard library function or write your own, because they could be looking for either

No, you must be thanked for your time and hung up on!

thotsky
Jun 7, 2005

hot to trot
I generally go "Oh, you could obviously use the reverse() function of StringBuilder, but I'll write it out" because if I don't it's a goddamn guarantee that their second question is going to be "what if you couldn't use any built in functions?".

Rubellavator
Aug 16, 2007

I don't think there's anything particularly wrong with using a for-loop there but I'd be extremely concerned about someone writing a for-loop on an array that doesn't actually touch the array for anything.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
One of those cases where people expect you to use the built-in library a lot is heapq in Python. Despite actual conscious effort to cram it into stuff at work sideways, I've yet to manage to actually need it for anything in a professional context. I've only ever used it for coding puzzles and interview questions. I've used other Python collections, but not that. As a bit of a passive-aggressive gesture, I even had my hand-written toy Python interpreter project successfully run the module, but I've still never had to actually use it for work.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Rocko Bonaparte posted:

One of those cases where people expect you to use the built-in library a lot is heapq in Python. Despite actual conscious effort to cram it into stuff at work sideways, I've yet to manage to actually need it for anything in a professional context. I've only ever used it for coding puzzles and interview questions. I've used other Python collections, but not that. As a bit of a passive-aggressive gesture, I even had my hand-written toy Python interpreter project successfully run the module, but I've still never had to actually use it for work.

Huh, never heard or used this but it does seem useful.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Falcon2001 posted:

Huh, never heard or used this but it does seem useful.

poo poo, let me know if you cram it into something. Maybe I suck at finding ways to use it in the wild.

Xarn
Jun 26, 2015
There are very few things that need priority queues, the most common one is pathfinding.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Xarn posted:

There are very few things that need priority queues, the most common one is pathfinding.
You'll find them used plenty for managing resource contention (QoS, task scheduling, concurrency/mutual exclusion, etc.), but I guess these are more often in the realm of there's a library for that than various kinds of bespoke graph traversal problems

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
Management are trying to force code climate, a code analytics tool to see 'prodoctivity,' of your team.

It has such great insights such as
'Number of commits'
'Number of pushes'
'Impact' (which seems to be number of lines changed/added)

Fellatio del Toro
Mar 21, 2009

sounds like you're one vscode plugin away from being the most productive employee at the company by an order of magnitude

Macichne Leainig
Jul 26, 2012

by VG

Mega Comrade posted:

It has such great insights such as
'Number of commits'
'Number of pushes'
'Impact' (which seems to be number of lines changed/added)

But enough about my wife

The Fool
Oct 16, 2003


I'm going to make a code productivity analyzer called khorne that measures lines deleted in a pr

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
I did a single line commit yesterday with a huge impact score, so looked into why and it doesn't differentiate if a line change is actual code or white space. So rider auto formatting the bad whitespace on the page boosted my single line score to that of a 400 lines commit.

Fellatio del Toro
Mar 21, 2009

these kinds of metrics are stupid and dont really say anything about who is actually doing the most productive work

what you need to be judging people on are profiling metrics like whose lines of code are being executed the most or who is writing the highest impact code, by memory usage

your data is immediately getting "garbage collected"? sounds like your work might be "trash"!

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Fellatio del Toro posted:

these kinds of metrics are stupid and dont really say anything about who is actually doing the most productive work

what you need to be judging people on are profiling metrics like whose lines of code are being executed the most or who is writing the highest impact code, by memory usage

your data is immediately getting "garbage collected"? sounds like your work might be "trash"!

We all know this. Management only sometimes does, or doesn't want to do their actual job so they use this (or they use it to justify firing someone they wanted to anyway.

Carbon dioxide
Oct 9, 2012

Fellatio del Toro posted:

these kinds of metrics are stupid and dont really say anything about who is actually doing the most productive work

what you need to be judging people on are profiling metrics like whose lines of code are being executed the most or who is writing the highest impact code, by memory usage

your data is immediately getting "garbage collected"? sounds like your work might be "trash"!

So the solution is global variables everywhere?

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!

Volmarias posted:

We all know this. Management only sometimes does, or doesn't want to do their actual job so they use this (or they use it to justify firing someone they wanted to anyway.

Funnily enough one of our worst Devs looks like some 10x savant by his stats because he commits almost every bloody line ,writes awful spaghetti code and moves onto new tickets without properly finishing the last.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
I personally love this kind of stuff. I've used metrics on rework and concurrent open PRs to push policy changes and headcount approvals because even (specifically) people who don't understand anything about the code fully grok the storytelling

SLOC is pointless at the individual level, but across an entire company, at the scale of months, it's really good at visualizing the impact of, for example, how quarterly/annual planning cycles impact an org's throughput in aggregate

e: I did one really funny analysis showing that when teams were blocked on other teams, they generated more code than when they weren't blocked. Everyone started spinning up pet projects or working on bucket list problems, where the fluency of greenfield dev and only solving the problems you want to solve makes the SLOC count go brrrrrrrrrrr

Vulture Culture fucked around with this message at 17:36 on Aug 24, 2023

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
I was never sure wtf happened culturally at my job that everyone started being the annoying 10 nitpick comment guy on every PR. Then I found out at my mid year I dinged for being too low on our KPI for loving GitHub comments lol.

Macichne Leainig
Jul 26, 2012

by VG
Metrics by themselves are not inherently bad.

They are only problematic when applied without critical thought by useless middle management

brand engager
Mar 23, 2011

Mega Comrade posted:

Management are trying to force code climate, a code analytics tool to see 'prodoctivity,' of your team.

It has such great insights such as
'Number of commits'
'Number of pushes'
'Impact' (which seems to be number of lines changed/added)

Our lead dev turned manager gets those stats from github somehow, and complains in the 1:1 that I'm below some average LoC that supposedly people at other companies hit.

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

brand engager posted:

Our lead dev turned manager gets those stats from github somehow, and complains in the 1:1 that I'm below some average LoC that supposedly people at other companies hit.

I wrote the most code when I was intermediate, as soon as I hit senior I was writing less code and now at staff I pretty much just drink and know things.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Macichne Leainig posted:

Metrics by themselves are not inherently bad.

They are only problematic when applied without critical thought by useless middle management
Don't sell metrics short—they're also problematic when applied maliciously by management that knows what they want and absolutely knows what they're doing.

At the same time that I talk about how I use them when I have them, they sort of are inherently bad too. If your employer is collecting metrics about your work that nobody is looking at, there's zero chance that in twelve months, someone is going to look at those metrics and do something good for you with that information. On the other hand, if they want you out, there's a strong chance they're going to mine those kinds of systems for pretext.

And sure, that information is technically already available in your systems, because that is really your work, and those are really your commits. But having that information available a click away really improves a company's plausible deniability if anyone is challenged about when they started collecting and using that information.

Steve French
Sep 8, 2003

Fellatio del Toro posted:

these kinds of metrics are stupid and dont really say anything about who is actually doing the most productive work

what you need to be judging people on are profiling metrics like whose lines of code are being executed the most or who is writing the highest impact code, by memory usage

your data is immediately getting "garbage collected"? sounds like your work might be "trash"!

Nah, you really need to not be using metrics at all to judge people.

I see value in using metrics as a guide for where to start looking at someone’s work from a non metrics perspective (like, this tool says this person did barely anything! Let’s look at what they did. or the opposite)

Goodhart’s law is highly applicable here.

mariooncrack
Dec 27, 2008

Vulture Culture posted:

Don't sell metrics short—they're also problematic when applied maliciously by management that knows what they want and absolutely knows what they're doing.

At the same time that I talk about how I use them when I have them, they sort of are inherently bad too. If your employer is collecting metrics about your work that nobody is looking at, there's zero chance that in twelve months, someone is going to look at those metrics and do something good for you with that information. On the other hand, if they want you out, there's a strong chance they're going to mine those kinds of systems for pretext.

And sure, that information is technically already available in your systems, because that is really your work, and those are really your commits. But having that information available a click away really improves a company's plausible deniability if anyone is challenged about when they started collecting and using that information.

Yeah, all of this. I got docked during a performance review because I had less pull requests compared to others, even those in different job families.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Steve French posted:

Nah, you really need to not be using metrics at all to judge people.

I see value in using metrics as a guide for where to start looking at someone’s work from a non metrics perspective (like, this tool says this person did barely anything! Let’s look at what they did. or the opposite)

Goodhart’s law is highly applicable here.

Notably though, that law doesn't say you can't measure something, it says not to turn it into a target.

Fellatio del Toro
Mar 21, 2009

Steve French posted:

Nah, you really need to not be using metrics at all to judge people.

I see value in using metrics as a guide for where to start looking at someone’s work from a non metrics perspective (like, this tool says this person did barely anything! Let’s look at what they did. or the opposite)

Goodhart’s law is highly applicable here.

sorry I was hoping that "number times a line of code is executed" as a metric would very obviously be a joke

Hughlander
May 11, 2005

Mega Comrade posted:

I did a single line commit yesterday with a huge impact score, so looked into why and it doesn't differentiate if a line change is actual code or white space. So rider auto formatting the bad whitespace on the page boosted my single line score to that of a 400 lines commit.

brand engager posted:

Our lead dev turned manager gets those stats from github somehow, and complains in the 1:1 that I'm below some average LoC that supposedly people at other companies hit.

The two of you need to make a buddy on the team that just uses different auto-formatting settings and you'll both be rockstars.

Steve French
Sep 8, 2003

Fellatio del Toro posted:

sorry I was hoping that "number times a line of code is executed" as a metric would very obviously be a joke

Wow, my bad. in my defense, there do exist some really bad unironic opinions, and also I broke my arm two days ago and drugs. I clearly did not read what you said very well, or at all.

Falcon2001 posted:

Notably though, that law doesn't say you can't measure something, it says not to turn it into a target.

In my addlebrained context, "judging by a metric" was considered a form of turning the metric into a target.

Adbot
ADBOT LOVES YOU

Harriet Carker
Jun 2, 2009

I was the number one ranked for LoC in the codebase at my last job because the previous contractors didn’t use semicolons in JS and I turned on a Prettier rule to add them and committed the result.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply