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
tak
Jan 31, 2003

lol demowned
Grimey Drawer
Splitting up code into classes by separation of concerns / business domain (sounds like that's what you did) and then defining a controller/service class solely responsible for orchestrating them together works pretty well IME.

That way you can unit test the individual components and integration test the controller while keeping the intent of each of them clear, and there's still 1 single place someone can look at to understand how it all fits together, without needing a giant unreadable unmaintainable god class

It sounds like a good coaching opportunity though, maybe best done in a verbal conversation. Sounds like there's a misunderstanding somewhere

Adbot
ADBOT LOVES YOU

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Are you able to go into more detail about why encrypting a specific thing and uploading a specific thing are complex enough operations that they call for their own classes? Or did you write a generic uploady bit class and a generic encryptiony bit class to handle these concerns?

Pollyanna
Mar 5, 2005

Milk's on them.


Vulture Culture posted:

Are you able to go into more detail about why encrypting a specific thing and uploading a specific thing are complex enough operations that they call for their own classes? Or did you write a generic uploady bit class and a generic encryptiony bit class to handle these concerns?

It wasn’t that abstracted, that’s way overkill. The partitioning was just to keep related logic together while still making it easily digestible since we’ve had a spate of PRs languishing in review because of how chonky they get. :shrug:

Either way it’s been resolved so problem solved.

Edit: in case you’re wondering, there’s one class for the CSV we build, one class for the data type that each CSV row represents, and a composition class for queries and overall logic. It’s not a great architecture, but it did the job.

Pollyanna fucked around with this message at 22:14 on Oct 16, 2019

PhantomOfTheCopier
Aug 13, 2008

Pikabooze!

Volmarias posted:

2) If there's a particular style in your codebase about this and you aren't ready to push for change, just follow the style in the codebase
What's amusing about this is that there's a very, very high chance it's terribly substandard. I trust "follow existing style" as much as I trust "use existing repository" or "existing standard X" at this company.

Consider: On how many projects have you established style afresh at the beginning? Now then, how did you establish that? Right, you just copy/pasted it from somewhere else. Guess where they got it: Yes they copy pasted and bastardized it too.


In any case, Pollyanna is lucky. My project is ready to release the first main component of three and, because a generally-disconnected manager happened to be walking through when I was explaining existing limitations, now gets to rollback months of standing design decisions. "Oh but we're going to do this" is not very aglie when that thing is months away, we have a vetted solution now, and it's consistent with the existing architecture. Just because you never did it is not enough justification to prevent us from doing it.

Volmarias
Dec 31, 2002

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

PhantomOfTheCopier posted:

What's amusing about this is that there's a very, very high chance it's terribly substandard.

That's already all of my code though, so... :shrug:

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

PhantomOfTheCopier posted:

My project is ready to release the first main component of three and, because a generally-disconnected manager happened to be walking through when I was explaining existing limitations, now gets to rollback months of standing design decisions. "Oh but we're going to do this" is not very aglie when that thing is months away, we have a vetted solution now, and it's consistent with the existing architecture. Just because you never did it is not enough justification to prevent us from doing it.

This is the part where I say: "Agile does not mean we change directions every few weeks." and release as intended to gather metrics on use.

Wallet
Jun 19, 2006

Keetron posted:

This is the part where I say: "Agile does not mean we change directions every few weeks." and release as intended to gather metrics on use.

I'm pretty sure agile means "We reassign the entire team every time management experiences an issue that is impacting exactly 0% of real users." and you're doing it wrong.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Wallet posted:

I'm pretty sure agile means "We reassign the entire team every time management experiences an issue that is impacting exactly 0% of real users." and you're doing it wrong.

In my vocabulary agile means whatever as long as it allows me to do whatever I want.

Volmarias
Dec 31, 2002

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

Wallet posted:

I'm pretty sure agile means "We reassign the entire team every time management experiences an issue that is impacting exactly 0% of real users." and you're doing it wrong.

This is every management style though, not just agile.

Cancelbot
Nov 22, 2006

Canceling spam since 1928

Speaking of agile; what tools/processes do you have in place for change management: requesting poo poo gets released, approvals, denials, incidents etc.

Is it a bespoke application written in ASP.NET and loving Angular 1 with a 12 week backlog of work and no people available to update it? I want to drown it in a loving bath and have them buy something, or use something someone who spends their time building this corporate enterprisey poo poo instead. I've got 4 weeks of my notice period left and in that time I want to see it burning in a ditch, this craptastic app was built by developers who got bored doing their normal work as well and have long since gone.

It doesn't help the two people who run "service delivery" seem to want all the control in the world when it comes to authorising changes. We've only just got to self-certified changes after 12 months of fighting.

Cancelbot fucked around with this message at 20:23 on Oct 17, 2019

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Our process is to push stuff to prod all the time without much oversight as all the QA is done as part of the development cycle.
I think you should check out mentally for the coming 4 weeks. What are they going to do? Fire you?

Wallet
Jun 19, 2006

Volmarias posted:

This is every management style though, not just agile.

That was me bitching about management, not about agile.

return0
Apr 11, 2007

Pollyanna posted:

Today I got a review on my code saying that I shouldn’t be creating multiple classes for a particular solution that has several problem domains (and is split up accordingly) and should instead keep all the logic (CSV generation, queries, encryption, uploading, etc.) in one class and file because it’s easier to understand. I specifically split it up like that so that each piece would be easy to understand on its own, and you didn’t have to keep the whole thing in mind when working on it, because it’s a highly business critical thing that touched several parts of what we do and has a particularly heinous handwritten SQL query that I wanted to sequester. :psyduck:

I don’t know how I feel about this, exactly, but I know I don’t feel great about it. :shrug: gently caress it, man, whatever works.

Personally I would tell the reviewer to go gently caress themselves.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I think it should all be in one function with an enum value as a mode toggle that determines whether you are preparing the data, encrypting it, or uploading it. Then you just call it three times with the different arguments. That is peak reuse!

It would be even better if all that code just reimplemented things in the standard libraries.

Ask me more about coworkers reimplementing Python file I/O this way! Or don't!

spiritual bypass
Feb 19, 2008

Grimey Drawer

Rocko Bonaparte posted:

Ask me more about coworkers reimplementing Python file I/O this way! Or don't!

That's extremely stupid and you should tell us all about it!

spiritual bypass
Feb 19, 2008

Grimey Drawer

return0 posted:

Personally I would tell the reviewer to go gently caress themselves.

:agreed:

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

rt4 posted:

That's extremely stupid and you should tell us all about it!

There was some kernel of nobility behind the whole idea because these file operations originally were also going to have to be done through things like a cable to another machine with an amount of abstraction. So if you wanted to copy a file, you'd use this to say to do it. That part was mostly fine. The bad part was instead of using abstraction in the design, it was all crammed into a giant megafunction predicated by an enum. Well, these people didn't know about enums in Python so it really was just constants mapped to numbers. Then it would fall into a pile of if-else logic to find the operation and then do whatever it wanted with the arguments that came in.

Now, we ended up not needed all that abstraction in the first place. However, the real problem then became wrapping perfectly normal Python file operations with extra handling by people who had a defect rate of one per three lines of code. You know, because none of this was being tested.

One of the people totally hated objects and using abstraction to generalize solutions to problems and would do poo poo like this instead. Given the defect rate, don't even try to act like they had a better methodology or were really into functional programming or some other alternative. They just wanted pure procedural programming and even hated break code into functions.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Rocko Bonaparte posted:

One of the people totally hated objects and using abstraction to generalize solutions to problems and would do poo poo like this instead. Given the defect rate, don't even try to act like they had a better methodology or were really into functional programming or some other alternative. They just wanted pure procedural programming and even hated break code into functions.

How long until you shot up the place quit?

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Keetron posted:

How long until you shot up the place quit?

When I win the algorithm lottery in a coding interview.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Rocko Bonaparte posted:

When I win the algorithm lottery in a coding interview.

Oh, sorry for that.
The role I'll be starting at in two weeks was landed with a single interview and some good references. Not yet sure if this is good or bad, I have seen inept developers at places with and without coding lotteries.

Hollow Talk
Feb 2, 2014

Rocko Bonaparte posted:

When I win the algorithm lottery in a coding interview.

I like this phrase and I might steal it.

M31
Jun 12, 2012

Keetron posted:

Oh, sorry for that.
The role I'll be starting at in two weeks was landed with a single interview and some good references. Not yet sure if this is good or bad, I have seen inept developers at places with and without coding lotteries.

"M31, check out this guy, he's really good. He answered all our questions correctly"

"But it says he plagiarized all of them"

"It's ok, he answered everything correctly! I'm going to hire him"

- the hiring manager of my department

(he didn't get hired because our HR is just as incapable and hasn't onboarded anyone in the last 6 months)

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
https://youtu.be/r8RxkpUvxK0

If you ever feel bad about the algorithm lottery, watch this video from a former interviewer at google. In it he talks about how his team was known for being tougher than normal, and one time they were sent 8 anonymized packets, and they rejected every one of them. Then the recruiter who sent them said, “these were your packets. You all just rejected yourselves.”

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

M31 posted:

"M31, check out this guy, he's really good. He answered all our questions correctly"

"But it says he plagiarized all of them"

"It's ok, he answered everything correctly! I'm going to hire him"

- the hiring manager of my department

(he didn't get hired because our HR is just as incapable and hasn't onboarded anyone in the last 6 months)

Your manager is bad for ignoring advise from the people that the new hire has to work with. A bad hire is so much worse than no hire.

Lord Of Texas
Dec 26, 2006

rt4 posted:

Sounds like the separation of concerns is useful and the lead is clueless, time to quit


return0 posted:

Personally I would tell the reviewer to go gently caress themselves.

^^^

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Hollow Talk posted:

I like this phrase and I might steal it.

You're not the first to say so and I kind of prefer people would and help me mock it a little bit. I mean not too much because I'm pretty sure whatever replaces it will be worse.


lifg posted:

https://youtu.be/r8RxkpUvxK0

If you ever feel bad about the algorithm lottery, watch this video from a former interviewer at google. In it he talks about how his team was known for being tougher than normal, and one time they were sent 8 anonymized packets, and they rejected every one of them. Then the recruiter who sent them said, “these were your packets. You all just rejected yourselves.”

Stuff like this is good ammo to keep my spouse's morale up because she's having to deal with me being cranky at my current job while being rejected elsewhere. My most paramount, personal fear though is that my current job has successfully rotted my brain and tarnished my reputation enough that everybody just thinks I can only program in Microsoft Outlook (send emails all day).

It's still really annoying to have to basically wait to retry with a fresh set of topics. I just try to set aside time to see more goofy little programming puzzles used in interviews without burning myself out. I have other personal coding projects I'd rather use and I seldom fine any of the stuff I've had to study really helped me.

Xik
Mar 10, 2011

Dinosaur Gum

Rocko Bonaparte posted:

everybody just thinks I can only program in Microsoft Outlook (send emails all day).

Have you considered a scrum master role?

(I'm joking but also maybe?)

PhantomOfTheCopier
Aug 13, 2008

Pikabooze!

lifg posted:

https://youtu.be/r8RxkpUvxK0

If you ever feel bad about the algorithm lottery, watch this video from a former interviewer at google. In it he talks about how his team was known for being tougher than normal, and one time they were sent 8 anonymized packets, and they rejected every one of them. Then the recruiter who sent them said, “these were your packets. You all just rejected yourselves.”
Still seems weird to me that Google's hiring committees don't include the interviewers.

"I've had candidates cry"! After 250 interviews I've not seen that. I guess this guy was still learning how to interview.

I'll have to watch the remainder later (it's an hour presentation) but I'm consistently amazed by the anti-whiteboard sentiment. There are some outliers but every company makes it clear that is what will happen at an interview.

Also if they didn't hire themselves... Had the company changed in the interim? A big company looks for different things year over year.

"How do you put a number on that?" "You can't put a number on that". I think the ML people would disagree. :downsgun:

Honestly, you know most teams really only need to ask a few key questions: Tabs versus spaces. Here are four code samples, which is the cleanest? Which editor/IDE do you loathe? What hours of the day do you want to work? Which software development methodology do you find most natural? It's like the modern equivalent of geekcode/queercode/purity tests. :catholic:

...

PhantomOfTheCopier fucked around with this message at 02:39 on Oct 21, 2019

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

PhantomOfTheCopier posted:

Still seems weird to me that Google's hiring committees don't include the interviewers.

It's an attempt to remove unconscious bias from the interview process, to try and be fair to everyone.

Is your perception of a candidate influenced by their race, gender, and percieved socioeconomic class? Yes it is, and if you think you're above that then it probably actually influences you even more than it does other people.

Nobody on the hiring committee knows any of that stuff, so the idea is that they can be more objective in their evaluation of the interview summaries.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


It's not clear how much of a difference that actually makes if the bias is already baked into the interview summaries.

Iverron
May 13, 2012

Pollyanna posted:

Today I got a review on my code saying that I shouldn’t be creating multiple classes for a particular solution that has several problem domains (and is split up accordingly) and should instead keep all the logic (CSV generation, queries, encryption, uploading, etc.) in one class and file because it’s easier to understand. I specifically split it up like that so that each piece would be easy to understand on its own, and you didn’t have to keep the whole thing in mind when working on it, because it’s a highly business critical thing that touched several parts of what we do and has a particularly heinous handwritten SQL query that I wanted to sequester. :psyduck:

I don’t know how I feel about this, exactly, but I know I don’t feel great about it. :shrug: gently caress it, man, whatever works.

This sounds pretty familiar. Guy I work with who writes and advocates for the continued existence of many many thousand LOC god classes broken up with regions (:barf:) but also grills prospective engineers relentlessly about SOLID and will throw around SOLID principles in defense of any bird brained decision he makes. It’s maddening.

Doesn’t help that he’s the definition of why the No rear end in a top hat Rule exists.

Volmarias
Dec 31, 2002

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

ultrafilter posted:

It's not clear how much of a difference that actually makes if the bias is already baked into the interview summaries.

The interview write-up will also contain everything the candidate wrote, so if the candidate wrote garbage code the hiring committee will still see it and vice versa. The interviewers will write their summaries and opinion but the HC still makes the final call.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
Something from that video caught me. He seemed to be pretty impressed with people that talked about the problem until they wound up with the optimized solution before coding. I had the impression that you start kind of naive and code that before advancing, and that's what I had been doing. If the fast way just kind of jumps into my head from the start, then I'll go with it, but I'm wondering if I should change my tact there.

Volmarias
Dec 31, 2002

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

Rocko Bonaparte posted:

Something from that video caught me. He seemed to be pretty impressed with people that talked about the problem until they wound up with the optimized solution before coding. I had the impression that you start kind of naive and code that before advancing, and that's what I had been doing. If the fast way just kind of jumps into my head from the start, then I'll go with it, but I'm wondering if I should change my tact there.

The interviewers want to see you solve a problem, in addition to or even instead of writing code. Talking about what you're thinking about isn't natural, but it's the best signal interviewers can get. Don't forget that the ability to communicate effectively is pretty important.

Don't start coding until you're ready, unless you can't think of a good solution yet and need to just get the juices flowing. The time you waste writing something you throw away is significant.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
If you like watching smart people talk about databases and distributed systems, join this slack: https://dist-sys-slack.herokuapp.com

raminasi
Jan 25, 2005

a last drink with no ice

Volmarias posted:

The interviewers want to see you solve a problem, in addition to or even instead of writing code. Talking about what you're thinking about isn't natural, but it's the best signal interviewers can get. Don't forget that the ability to communicate effectively is pretty important.

Don't start coding until you're ready, unless you can't think of a good solution yet and need to just get the juices flowing. The time you waste writing something you throw away is significant.

One thing you can do is to start talking through solutions and give your interviewers opportunities to cue you to turn your ideas into code. Good ones will take advantage and help you manage your time best, and lovely ones will screw you no matter what so it doesn’t really matter what tactic you take.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Good ones will give you hints, too, because you staring at an empty white board going "HMMM :thunk:" for five minutes doesn't help either of you. Better to give the candidate a small hint and see if that dislodges the rest of the problem than to assume they're a dullard for not thinking of that piece.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I don't think I have an issue with the general act of talking more so of a specific strategy of starting to code the less efficient solution and then revising for the more efficient one. I had gotten a notion that was kind of the way to go with the idea that most don't expect to code the more sophisticated solution. Now I'm thinking from hearing some more stuff that I should be talking through until I get away from brute force (usually) and then code the 2nd-level approach.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
There's only a limited amount of time in an interview, and the interviewer is going to be mindful of how things are going throughout. Generally when I'm holding an interview I'll let the candidate keep iterating on their design until they're either finished, or I feel that further iteration is going to cut too much into the time needed for actual coding or further discussion.

If you end up spending a significant amount of time on coding up a naive solution and then don't have enough time to code up the more interesting solution, you're not really putting your best foot forward.

Adbot
ADBOT LOVES YOU

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

Volmarias posted:

Good ones will give you hints, too, because you staring at an empty white board going "HMMM :thunk:" for five minutes doesn't help either of you. Better to give the candidate a small hint and see if that dislodges the rest of the problem than to assume they're a dullard for not thinking of that piece.

If you’re a candidate that stands in front of a whiteboard going “hmm” for 5 minutes, I would give you a hint but I wouldn’t hire you. At least tell me your thoughts or what wouldn’t work.

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