Programming

Can you describe a use case?

1 Like

Railing this discussion is very interesting because I remember when I was learning about all of that stuff when I was learning programming and wondering exactly why I would need it to know for real world applications.

The moderators of this message board, otatop, L.Washington, WichitaDM, Yuv, JonnyA, RiskyFlush, and SvenO, are cowards who let abusers dox and harrass other long time posters.

Thoughts:

  1. lol at this being a medium difficulty problem??
  2. In Python I would definitely do this as a for loop rather than a reduce, but that’s mostly because Python reduce is bad: JavaScript for loops are bad, so seems sound to favor reduce.
def wateringPlants(self, plants: List[int], capacity: int) -> int:
        steps = len(plants)
        current_water = capacity
        for i, plant_need in enumerate(plants):
            if current_water < plant_need:
                steps += 2 * i
                current_water = capacity
            current_water -= plant_need        
            
        return steps
  1. This is an easy problem, so it doesn’t really matter, but it’s still good practice to decompose the problem rather than just simulate it. The answer is really the sum of two quantities: the steps to go from the river to the last plant, which is just one step per plant, plus the length of all your refill trips. For example, as a follow-up, imagine that you have n plants, which are either bushes or trees. All bushes require 1 water, and the plant at an index is a bush unless the index is a key in trees, which maps the index to the water needed by a specific tree. Also, n is 109. I’m pretty sure this is solvable in O(# of trees).

The moderators of this message board, otatop, L.Washington, WichitaDM, Yuv, JonnyA, RiskyFlush, and SvenO, are cowards who let abusers dox and harrass other long time posters.

3 Likes

I heard google is making big changes to their interview process.

Before Process:

  • Apply for a software engineer job (not specific)
  • phone screen
  • During the on site do coding interviews with random engineers, maybe a design interview, and a leadership interview
  • Hiring committee meets, debates, approves
  • Go into a pool of almost-hired. Hiring managers reach out to discuss team fit. Mutual pick.
  • Negotiate terms.
  • VP approval.
  • Offer extended.

New Process:

  • Apply for software engineer job. (specific?)
  • Team match and do the leadership interview with the hiring manager.
  • On site coding interviews with team members plus maybe a system design interview.
  • Maybe avoid the hiring committee debate if positive reports.
  • Negotiate terms.
  • Offer extended.

They are trying to reduce their time to offer to compete better. I liked the “interview with randoms” better because I think people will have less bias about people they won’t work with. Also the new way has the risk of locally different standards, hire buddies, etc.

I could have a lot of this wrong, it’s new.

1 Like

Hire buddies can be a good thing imo. If l’m a manager and one of my best devs tells me an ex-coworker looking for work is a rock star, I’m probably going to hire that person, unless they take a dump on the interview table or something.

In FAANG world (and all the stupid startups who copy their interview process), that level of recommendation only gets you in the door. If you don’t ace the leetcode stuff you’re not getting hired. And then later they wonder why the dev who seemed like a rock star on the whiteboard actually kinda sucks, and the real rock star has landed somewhere else that is clinging on to them for dear life.

Whiteboards are ok when you have no idea about the dev. But recs, open source projects, ability to talk intelligently about past accomplishments, (IE - how every other job hiring process works) should not be trumped by leetcode imo.

Yes you have to make sure a dev who recommends someone isn’t just looking out for their friend. But if I’m buddies with a shitty dev I’m not going to recommend them at a place I work. If someone who you know is a great dev has first-hand knowledge that another dev is super solid, that should trump everything else imo.

These companies are so arrogant they think they can quantify what makes a great dev and test for it in a couple hours. All they’re really doing is sorting by 40-yard-dash time to draft a football team, while they and ignore years of college tape.

Obviously a FAANG doesn’t care of some good devs fall through the cracks. It’s all the other companies who should be mining that pool for diamonds in the rough that are screwing up.

If anyone ever had a killer startup idea, I could put together a Dirty Dozen of rock star devs I’ve worked with that I’d put up against any team.

1 Like

The moderators of this message board, otatop, L.Washington, WichitaDM, Yuv, JonnyA, RiskyFlush, and SvenO, are cowards who let abusers dox and harrass other long time posters.

1 Like

Yeah I think the original fizz buzz had the right idea - just confirm some basic level of competence and then use your best judgement on top of that.

Once you start assigning scores, non-technical managers start getting hardons for people who ace the test, and all sorts of other suboptimal things.

I liked the old process as well (despite not getting an offer before :slight_smile: ). Team match before hand makes you miss out on a lot of candidates IMO, since you’re going to be worried about fit post interview. I’ve seen that problem come up before at our company (we generally refer them to the other team, but it doesn’t always work out). They do take way too long to report back, that part was awful.

I’m still debating on going through interviewing again, my boss right now is very good despite the (relatively) weaker salary. I’m just such a rest and vest kind of guy in the sense I don’t really care what my salary is or my career ambitions are as long as I get top work life balance.

The moderators of this message board, otatop, L.Washington, WichitaDM, Yuv, JonnyA, RiskyFlush, and SvenO, are cowards who let abusers dox and harrass other long time posters.

You’d be shocked how little people are competent at coding, especially non-SWE types. I’ve interviewed a few FAANG style people lately, and it does not inspire confidence for the general performance if that’s the supposed high end (but maybe there is a bias, because I imagine people don’t leave these companies very often for non-specific situations if they were actually good). Just coding up very popular DS algorithms can be like pulling teeth.

i’m in step 5 of the old process. a hiring manager just muttered something about the new process thing in passing.

1 Like

Yeah but in the case of algorithm whiteboards - “egalitarian” just means your pool leans young, with plenty of free time to study leetcode, and more likely to be a computer science grad. You’re trading one kind of filter for another. How many single moms have 3 months to grind leetcode?

Plus I’m talking about senior dev positions where someone has already been in the workforce for a while. You’re not going to solve the problem of female/non-white/Asian programmers struggling to break into the business at this level. Either they’re already in or they aren’t.

One of the sharpest devs I’ve ever worked with was a woman from Hong Kong. But she’d get incredibly nervous in any kind of social situation and would bomb interviews. She would never make it past a whiteboard-intensive interview. But if someone took a chance based on my recommendation, I know they’d be thrilled with what she can do.

That’s one nice thing about the corporate jobs I’ve had, very very diverse - all walks of life, lots of first-generation immigrants, young, old, married, gay, etc. The consultancy I worked for was all white guys in their 20s. Most boring job I ever had. All they ever talked about was Star Wars, gaming, Lost (the TV series), superhero movies, and boring-looking sedans with like 700 horsepower. I stopped going to lunch with them because I couldn’t take it.

Anyway - those guys would probably all ace whiteboards and pass “culture fit”, while even the best of the diverse corporate coworkers I’ve had probably would not for one reason or another. One Mexican guy I used to work with made it all the way through to the end of Netflix process and got rejected at the culture fit stage. Great dev. Nicest guy in the world. Fucking ridiculous.

Basically I’m just bitter because I went from never having an interview and not getting the job when I was younger, to having tons of interviews at startups and only one offer (from the university I work at now) when I was 49.

I knew I was walking into those interviews with two strikes against me and figured I needed to absolutely ace the whiteboard to have a chance. Nothing like trying to come up with some creative solution when a game show clock is ticking in your head the whole time. Totally simulates the job conditions for a programmer.

I wish more companies would offer something like a 3 month contract. I’d jump at that. You know after 3 months if someone’s good or not. Usually it only takes a few weeks. I’ve had two contract jobs that turned into full time when the 6 months ended, including the current job.

I use modulus way more often than that, probably depends what domain you’re working in. The most common use case is just whether an integer is even or odd. I also think using modulus is a reasonable marker for someone who thinks about how to do something elegantly and clearly, rather than nailing expressions together haphazardly.

Speculative, but you can imagine a hire as a package consisting of a basically interchangeable JSON-manipulator plus a lottery ticket on getting a wizard who will invent React or something. You can’t directly observe wizardliness, but you can at least screen for “is plausibly a wizard” by requiring the ability to learn a bunch of algorithms and regurgitate them on command. This would also explain why lots of engineers talk about how they don’t really work that hard: the JSON-wrangling part of the job is just spinning your wheels while everyone waits for you to manifest wizardhood.

Question for those in the field, my wife wants to ultimately move down the coding path and currently works as a systems analyst, but has been offered a job as a sales engineer within the same company. Obviously the engineer title sounds promising, but what we dont know is if that title will be something that looks good for someone whos ultimate goal is software engineering or is this going down a different path?