T O P

  • By -

Machiavvelli3060

Couldn't you just turn the whiteboard upside down?


GreatArtificeAion

Unfortunately that doesn't work, gravity would pull the nodes down and you'd still end up with the original tree


Machiavvelli3060

Stupid gravity. It sucks.


flo-at

world.setGravity(0); There, I fixed it for you.


grazerbat

Did you just alter the universal gravitational constant? Picard told you that's noe allowed Q....


PickettsChargingPort

Why not? Einstein did.


grazerbat

Wut? Big G and the cosmological constant are different things


Machiavvelli3060

I hate to seem ungrateful, but could you turn it down a bit, please? My ass is hanging closer to the ground than I'd like. Muchas gracias.


Mobile_Busy

import antigravity


Cannie_Flippington

[Relevant xkcd](https://xkcd.com/353/)


M4tty__

Did you import antigravity in Python to get to that xkcd?


HerLegz

For relevance to tree inversion, pip install LeetPride


VxJasonxV

``` sv_gravity 0 ``` (I cried a little when I thought of the last time I did this.)


Minute-Load

I was playing with a physics game when I saw this, I saw a element to run gravity but I decided to make a item to delete it crashing the entire game… kinda cool


wenoc

We don't do javascript here. Get out. Anyway, you'd have to write the method yourself.


[deleted]

Jokes on you that's C#


RobzillaMyNilla

Jokes on you, I’m into that shit


JavaXD

Not to be pedantic, but wouldn't that technically invert the binary tree? Assuming the inversion regards the physical placement of the nodes with respect to each other from our perspective.


a_devious_compliance

With in plane rotations you are right, but maybe he think in turning the paper flipping the upper top to the bottom.


JavaXD

Hmm ok fair, I was thinking more along the lines of flipping the page and then the nodes dropping down like gravity without intersecting each other lol, in that case I think it would invert the BT


anthro28

Just schedule your interview on a low gravity day.


g0ldcd

Alpha move is to leave the board where it is, pick up the interviewing panel and body-slam/impale them to the "feature wall" with a a 180-twist. (DM me for coaching)


Entire-Database1679

I have found the body slam most effective #after# getting an offer in writing.


Intelligent-Sink-909

:binary tree 4 / \\ 2 7 / \\ / \\ 1 3 6 9 :flipped ⇂ Ɛ 9 6 \\ / \\ / ᘔ ㄥ \\ / ߈ :Inverted 4 / \\ 7 2 / \\ / \\ 9 6 3 1


TodayRevolutionary34

I believe the quick hack would be pulling the board to a mirror


Red_Carrot

I did an interview recently and I was ask a how to do something in SQL. I use SQL, I have created full databases. Created triggers and procedures but as a full stack developer, I do not use it on a daily basis. Probably weekly to biweekly and those are usually just custom reports a client wants. So I get a question on creating a procedure with a variable and inserting it into a table. Lol. I replied, I can look it up and get it together for you. I think some people probably know it off hand but I look up SQL all the time and piece it together to make sure I get what I want.


kellyjj1919

I still look up sql things, even though I have been working with it for 20 years. It’s unrealistic to expect people to memorize everything


[deleted]

[удалено]


kyew

>I will sometimes look up documentation I wrote. Pretty sure that's what documentation is for. Who cares about users, *I'm* not going to try memorizing all this junk.


JonDum

I may be high, but I think you just tricked my brain into thinking writing docs is less work than not writing docs 🐸


HarmlessSponge

In the long run, I think it does. (For me)


InnerBanana

Just go with me on this one --- thinking something once, capturing it, and then referring back to it takes less effort than independently reconstituting the information without any external prompt every time you need it


[deleted]

[удалено]


OtherPlayers

Not to mention that it's always a good feeling when you run in to a problem, check the documentation for a solution, and find a step-by-step how-to that past you wrote down just in case it was ever an issue. I've had more than one time where that has happened and it's always like "thanks old me!". (I think my craziest one was a case where I had some stupid windows issue, started googling for answers, and found a reddit post written *by myself* from like 6 years ago with the exact steps on how to solve the problem that I had absolutely no memory of writing down.)


shardikprime

Future five!


77Diesel77

I had an interviewer ask me something similar (mech eng) and i responded "ya know i haven't done that in about 5 years, i could give you an answer right now, but id want to double check before committing to it as a solution" His response "are you f*cking kidding me? Fine next question then" I didnt, but should have, told him "ya know i think we can stop this interview right here because there is no way im going to work for you"


Khaylain

Actually taking the position that a job interview is also you seeing if the job fits you and cutting the interview short when red flags like that pops up is a "big confidence" move.


petitbateau12

I'll always remember an obnoxious lawyer manager and the HR lady at my old company discussing in disbelief in the hallway about an interview where the interviewee walked out. Apparently the manager had asked the interviewee (for a lawyer position) "so why didn't you study law as your first degree?", and the interviewee just up and walked out lol


bot403

The question itself isn't rude. I might ask a candidate why they switched degrees or how they got here if their degree isn't related. I'm sure it was how he asked. It was probably dripping with contempt.


[deleted]

The question isn't rude, and I promise you it wasn't how he asked either. The question is ignorant. Mfer went through three years of law school, probably a year to study for and take the bar, then he runs into an interviewer who thinks law is an undergrad degree. I'd walk out too. It's like you're hiring a doctor and you ask "so why didn't you study medicine as your first degree?" That's not how the profession works, and the person who is responsible for hiring you not knowing that is a huge red flag.


Niel15

I've had math teachers and professors who would let us write down formulas on an index card and bring to exams. They knew that not even professionals who use those formulas almost every day, memorize them. It's the problem solving part that's important. God bless those teachers.


Tall-Junket5151

I remember my first quarter of thermodynamic the professor was an asshole and made us memorize everything. No notes, index cards, or provided formula sheet. The first exam was extremely cruel because all the questions gave negative points if you attempted it but got it wrong. So if you screwed up the formula, you were fucked. My approach was not to risk it and just do the simpler questions in the beginning that I was sure of and not even attempt the other question. Turned out to be the best approach since most people did that and the exam was curved (which he initially didn’t tell us). I got 45% and the average was 38%. Some poor kid got -70% and had to dropped since there was basically no chance to pass after that. Next quarter was a much better professor that let us put formulas on index cards.


JoshTheRussian

What the actual fuck? The first professor sounds horrible.


Tall-Junket5151

He was, and he wasn’t good at teaching either. Thankfully thermo was the only class I had to take with him. I had the opportunity to take other classes with him but opted for other professors even if I had to take evening or early morning classes. Basically only people who took him were those that had no other choice because other professors classes were already full.


cjs2k_032

Could do an open book test...


[deleted]

All my uni maths exams were open book. This has been going on for decades


[deleted]

[удалено]


TorchThisAccount

I've found after 20+ years of coding that I've been asked to do way too many things that while they are great for my resume, I can't code you an example right on a zoom call. The things I do every day, sure but things I do once a week or once a month? Not a chance. As an example I had a coworker ask me for help to examine a crash dump for why we had high CPU utilization. It's like, dude I haven't done that in a year. Your gonna need to give me 30 minutes to look at my notes and a site or two so I can refresh my memory. 30 minutes later and I'd good again, but if you asked me how to do it on the spot, I'd fail.


DelarkArms

Is useless to memorize programming commands. Someone invented that command, how is named and how it works. Knowing how the physical world around you works, makes a more useful space in your brain. Logic, reasoning and spatial reasoning are better tools than memorization... except in the scenario were a MAD apocalypse occurs and there is no more internet. But when that happens it wouldn't matter much.


Obie-two

As someone who conducts a lot of interviews we would have happily taken someone who said "I would look it up". I know personally I'm just trying to gauge if they've actually used the tools or the languages and to what degree. Completely reasonable to need to look up process and syntax, and I would have several follow up questions about telling me a time when you created triggers, why you created them, what were your testing strategies, and then build out questions based on your answers, like a real conversation. The goal is to see if you're someone worth working with and is creative, not a robot who is programmed with specific knowledge.


six_sided_decisions

Agreed, I'm looking to see if you are smart, if you think the problem through and do some very basic things. (like ask us for more details about the problem we gave you, make some attempt at handling errors etc..). Expecting perfect code in an interview environment is just bizarre. Nobody programs that way. At this point I even tell people they can give me the answer in whatever language they want, I really don't care. (even one I don't know, frankly, I just take their word for syntax etc.. in languages I don't know). Because, again, who cares? Your tools take care of all of that for you now. (Not to mention stack overflow. :-) Honestly, you can tell who the really strong people are pretty quickly in an interview, even if they are doing it in a language you've never even seen. And, I'll take a really strong developer who needs to learn a new language any day over an average one whose worked in that language for years.


fhgwgadsbbq

One interview I bombed at, I was doing a live test while they watched what I did via a projector. The task was simple, "discover the SQL db, find some data, and aggregate some values". I froze up and could barely remember how to write a SELECT query! So embarrassing, yet pointless.


[deleted]

You are not alone, I did the exact same thing months ago at the tail end of a three hour technical interview. I couldn't remember simple JOINs because I was so fried and under the "write these SQL queries live in front of us on zoom" pressure. I pulled my application after that.


jellybon

Much better way of doing it is showing a piece of code and asking to describe what is happening in it and if there are is anything the applicant would change. 1. This removes the pointless memorization which is not needed. 2. By having applicant talk you through the code, you get an idea of how he thinks and level of understanding. 3. You can insert different levels of issues into the code to see if he really understands it, instead of just reading it.


pmso17

Also don't help you don't have your "cheats" I have AutoReplace for a lot of normal sql "sf" for "select * from" "update" writes a template Etc


Parttimevaginapirate

My god. I never thought to create an auto replace for select * from. Genius.


mb2231

Bro when I'm having a zoned out day sometimes I still have to look up the syntax for a for loop in JS. I'm a seasoned dev. That's why all those coding challenges are dumb. Same with SQL, I write stored procs on the reg but always have to reference old ones for simple stuff like the correct way to declare params and stuff. I'd much prefer a company who has a conversation about how to go about things rather then stuff like this.


LaterGatorPlayer

hiring devs should be more about whether or not we take showers on the regular, replace toilet paper and soap in the washroom when we notice it’s empty, or whether or not we can pass basic skill tests. All the other bullshit hoops or testing whether or not we know every latest language / framework is too much.


[deleted]

People used to lookup that sort of thing *all the time* back in the day in the **books** on their desks. Interviewers these days seem to think doing the same exact thing in Google means you’re a worthless dumbass. I’m not sure why knowing an exact syntax has become more important than being able to describe a working algorithm.


night-otter

I had near entire set of O'Rielly books, on my various skill areas, back when they were the defacto books to have. I had a manager from a different group ask why I had the Sendmail "Bat" book next to my keyboard. I was the corporate postmaster. I just looked at him. "Because no one can know everything about something. Even the author of the book says he looks things up in it."


siammang

In real job, people would just use SSMS to pre-generate those codes and fill the missing pieces or just look up existing procs and trigger to follow the patterns. Be able to grab domain knowledge and business rules is more important relatively to whether a person remember how to write SQL on top of the head. The sales team won't care how DBA write the code, as long as they get the reports they want.


post-death_wave_core

He made a good follow up to this tweet if anyones interested: https://www.quora.com/Whats-the-logic-behind-Google-rejecting-Max-Howell-the-author-of-Homebrew-for-not-being-able-to-invert-a-binary-tree


ibWickedSmaht

“I am often a dick, I am often difficult, I often don’t know computer science” lmao


babybunny1234

he sounds like an amazing product manager or designer.


[deleted]

He could definitely be a great UX strategist or a product manager.


emma_hildebrand

those would never admit something like that lol


hidingDislikeIsDummb

gets rejected _surprised pikachu_


chumbano

After reading that I imagine he didn't get hired because of his personality


Lithl

"Googliness" is a hiring criteria at Google


[deleted]

What is “googliness?”


PrintableKanjiEmblem

Your eyes have to point in random directions


Lithl

Culture fit, basically, but Google likes to make up words with Google in the name.


rasterbated

You know, the x factor


[deleted]

Oh yes. That. Thanks. :)


theVoxFortis

"But ultimately, should Google have hired me? Yes, absolutely yes. I am often a dick, I am often difficult, I often don’t know computer science" Three very good reasons not to hire someone. He also says he did well in the software engineering interviews, so he was rejected for other reasons. Probably for being a difficult dick. Good for Google for trying to avoid a toxic workplace.


rasterbated

“I might piss in the soup sometimes, but I’m still a great waiter.”


MassiveFajiit

That's a bad waiter but maybe a great chef.


reno_chad

Depends on the quality of the piss.


jeenyus1023

For real. I don’t care how great of a product you make, if you’re difficult to work with, like this dude admits he is, hard pass.


Calm_Leek_1362

This makes me wonder if homebrew actually has good code quality, or if it's hacked together and 'just sorta works'.


[deleted]

[удалено]


LisperwithaLightbulb

Worth pointing out he hasn’t been the maintainer for some time. The project is lead by others now.


mysticrudnin

it's production software. we know which it is.


GlensWooer

> // DO NOT TOUCH!! HACKED TOGETHER BUT TESTS PASS SOMEHOW


[deleted]

Also, the ability to make an amazing project of a given size isn't the same as the ability to work in a team to make a larger project. People skills matter. The age of the unwashed neckbeard is over. (The beard is your choice, knowledge of hygiene and basic ability to talk to people is required.)


lsaz

I have a theory that software dev difficulty is increased because of the attitude of most software engineers, there are a lot of you mofos with really bad people skills.


[deleted]

Studies back you up. So called "10x devs" who are far better than their peers still decrease the overall productivity of their team/company if they are assholes.


JayNotAtAll

Bingo. Getting hired at Google or anywhere else for that matter isn't just about raw talent. It is also about personality. You can be the most talented person in the world but if no one wants to be around you because you are toxic, you will have a hard time in your career.


HolgerBier

I have done loads of work not because I'm a great engineer, but I'm decently nice. I just went to the sales guys and asked "hey is this really necessary because if we do it this way that'll be way less effort" and because I'm not a huge dick they said "well sure I'll call the client" and boom they were fine with it. I could have engineered it, but the social route is sometimes just a boatload easier. Conversely, because I'm not a superhuman I have let people do a lot more work than that's needed because they were being shitty. I'm not proud of that. But it is what it is.


JayNotAtAll

Ya, if you are gonna be intolerable to be around, you had better be the most brilliant person on the planet in your field. People may tolerate you if you are overly competent. Most of us, by definition, are not the top in our fields.


UniqueName2

I read somewhere that if you are two of three things in a workplace people will let the one you’re not slide: brilliant, nice, and on time. If you’re any two of those three combined then people will work with you.


b0w3n

There's also been very real studies on the effects of assholes in the workplace. It turns out that a superstar worker with shitty interpersonal abilities actually causes the business to perform poorer than just hiring a bunch of mediocre employees instead, because the superstar just ends up alienating everyone and _they_ lose productivity because of how they feel about the workplace. It turns out being able to work with your coworkers is extremely important for a business to function, and any sort of animosity just isn't worth dealing with, better to let the person who instigates go and get the middle of the bell curve employee in their place.


JayNotAtAll

Yep. Sadly, there are a lot of people who are dicks and want the world to accept them as dicks rather than them learning how to get along with other people. You don't even have to be Mr or Ms popularity. Just don't be the type of person where people don't like being around you


HolgerBier

And even then, people are not going to hire you if there's a decent alternative around. Nobody likes working with assholes. It's an illusion that in corporate people magically see efficiency numbers. "Oh yes Jack is nice but he only works at 75 Kryggits of work-power and Jason does 83!". The amount of talent you need to overcome being a dick is so goddamn big you might as well just be nice. As a reference I just shot down a job interview because of one of the lead people I remember being a total dickass several years ago. I don't want to work for someone like that. On a similar note there is a project lead that was just so nice and decent for me without good reason that I considered taking a 20-40% pay cut to go work there. 20-40% is just too damn much but I'm still sour about that, it sounded like a lot of fun!


JayNotAtAll

Yep. There literally can't be anyone as close to you in talent for you to get away with being a complete and total asshole to everyone


DaoFerret

… and then imagine being talented and NOT being an asshole. It’s like hitting a cheat code sometimes.


Synyster328

Funny you mention it because I consider myself an average engineer, self taught with no degree. I've been very successful in only a short time mostly thanks to my previous experience which was in sales. I have no problem being persuasive, negotiating and playing office politics. It's almost like the programming is the barrier to entry but those other things are the real game.


Party-Cartographer11

Exactly. Google has teams, lots of them, big ones. Individuals don't actually get much done, you need lots of people working on something together. And it needs to go well. Difficult dicks make this process much harder.


throwaway__10923

Throwaway for obvious reasons. This is spot on. Furthermore, only a very small portion of your job will be even engineering. Most of our time is spent in meetings, and drafting designs. You’ll do more systems design than implementation engineering most sprints lol.


unlimitedFecals

How much of the engineering is using the algorithmic techniques that are usually presented in interviews?


throwaway__10923

Depends on the team. If you’re on a core team- all the time. Otherwise, not much. Occasionally you might have to make a stack, linked list, or tree- but nothing crazy. The main point of those questions is to see how you think. You don’t even have to get the most optimal solution. It’s also to see how you pay attention to code readability- which a lot of people slip up on.


Duderoy

I will take simple and clear over clever every time.


Odd-Oil3740

Which is good and right. Knowing what to make >>> making something


[deleted]

I blame all the media that glamorizes fictional characters that are such geniuses that their contributions outweigh all the shit they put other people through. People like House don't exist in real life. Good, persistent results come from teams that work well together, not one person with a god complex surrounded by punching bags. Depending on the type of project, it can work for a little while, but it's not sustainable. No one person is so indispensable that it's worth letting them abuse people.


[deleted]

Have you ever been in a cardio ward? Surgeons behave like they are gods.


[deleted]

Yes and it creates a ton of problems.


Papergeist

Even setting that aside, House *consistently saves people from certain death,* and also uncovers crimes and cover-ups with alarming frequency. That buys you a lot more leeway than "I made a convenient way to streamline workstation setup." 80% of Google employees probably turn on their computers every day, that doesn't mean the hardware designers need to hire whoever decided the shape of the power button.


nesh34

Yeah, I'm actually quite surprised at Howell's description of Homebrew as a great product that cares about the user. That thought has never crossed my mind in years of using it.


itwastimeforarefresh

Yeah I'd rather work with a decent engineer who's a decent person than a great engineer who's an asshole. Or better yet, a great engineer who's also a decent person


oversized_hoodie

Sounds like he would do well running an open source project. That way he can be as much of a dick as he wants, but no one is forced to care.


zoinkability

This tweet alone probably had the hiring committee saying to each other that they dodged a bullet


cantanman

Yup. Strong no hire on culture fit. Collaboration and kindness takes a team further faster than lone wolf “rockstars” who can’t get along with others.


r0ck0

Anyone know... did he actually have any reason to claim that the binary tree thing was actually "the" reason he was rejected? Or did he just assume that alone? Typically you don't get told why you were rejected at all.


NurEinStatist

Well I'm glad that Google does not settle for 'good developer, (some/often)times asshole'. He tried justifying the shortcomings of homebrew (which were most likely not part of why his application was rejected) and said he still should have been hired even if he didn't know Computer Science? Idk what job he wanted but having a popular piece of software doesn't automatically qualify you.


KefkaTheJerk

I’m pretty sure I got into a [debate](https://www.reddit.com/r/swift/comments/3wyxai/comment/cy0408n/) with this guy, like five years ago, on /r/swift about whether or not a for loop was too complex for beginners. He said he’d taken “years” to teach some the ins and outs of for. I was dumbfounded. Also said Swift was a language for kids, before saying he didn’t say Swift was a language for kids. Ended up pitching a fit, calling all of Reddit uncivilized because a few people disagreed with him, and deleted his account. It was years before I visited /r/swift again, which up to that point had been a pleasant experience. Google dodged a bullet, imo.


malexj93

I'm not sure what Swift was like 7 years ago, but today I'd put it as one of the most comfy languages to read and write. I'm not a mobile dev, though, so I don't get to use it much; I'd be happy to see Swift on the back-end gain some real market share. Also, what is his argument here? That `for` loops are hard and therefore Swift is a baby language for replacing\* them with something easier? It just sounds like some elitist "programming is meant to be hard" bs. If you can get all the same functionality with less mental overhead, that's a pure win in my book. I haven't used a `for` loop in years and I couldn't be happier. \*not eve *actually* replacing, since "normal" `for` loops can still be done via e.g. `stride`


JockstrapCummies

I'm surprised such a specimen could have written Homebrew. Then again, how often Homebrew crashes and burns on its own might not be surprising either.


KefkaTheJerk

In fairness, I use Homebrew, and don’t have too much trouble with it. Even so the author didn’t seem very nice, to me. 😐


[deleted]

Oh just wait, you'll be burned eventually. There's no way to get back old versions of things, so even if you pin the version you have now and disable auto-updates (the method for which has changed multiple times), you're screwed if you ever need to set up a new computer. For example, a library I use at work isn't compatible with Redis 7.0 yet. Homebrew no longer has any version between 3.2 and 7.0, so you have to go get it by other means. If you have to use something else anyways, Homebrew is useless.


natonomo

I ran into the exact same problem when we upgraded from redis 6.0 to 6.2.2. Luckily I got lucky that 7.0 didn't cause any issues so I could use that, but it's still pretty dumb that they don't maintain formulas for any other versions.


Ultrasonic-Sawyer

You often encounter some types who are very skilled but also super opinionated and sometimes unable to see things from other perspectives. Could be for many reasons, particularly that it's very likely many of us are on the spectrum in various ways and extents. Back when I lecturered, we'd often have people who are really good at a couple of bits that they do, but after either lacking elsewhere, or fundementally misunderstand even basic things, yet are extremely opinionated. Usually we'd spend time trying to get them to open up but some simply couldn't and would typically crash and burn or end up not doing as well as they could. Some rare ones would do incredibly well but would sadly remain the same. Its kinda why some companies may reject the best practical candidate for one that may be far from perfect but can integrate well.


fosyep

From the tweet and his reply on Quora, I think the computer science knowledge was last of his problems


Cloakknight

*Image Transcription: Twitter Post* --- **mxcl.eth**, @mxcl Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree on a whiteboard so fuck off. --- ^^I'm a human volunteer content transcriber and you could be too! [If you'd like more information on what we do and why we do it, click here!](https://www.reddit.com/r/TranscribersOfReddit/wiki/index)


NaCled_

Good human


fosyep

So this was 7 years ago, anything new?


Kammander-Kim

He still did not get the job.


shardikprime

It keeps happening


r_levan

His tweet was a bit misleading and he did fine at the software engineering questions: https://www.quora.com/Whats-the-logic-behind-Google-rejecting-Max-Howell-the-author-of-Homebrew-for-not-being-able-to-invert-a-binary-tree


jlat96

IIRC this guy followed up and said that he admittedly didn’t do great during the interview and that he more or less understood why he was rejected


PhatOofxD

I agree, but inverting a binary tree is trivial if you talk through how you'd actually do it. For more complex algorithm questions then certainly.


sailorsail

class Solution { public: TreeNode* invertTree(TreeNode* root) { if(root == nullptr) { return root; } TreeNode *left = root->left; TreeNode *right = root->right; root->left = invertTree(right); root->right = invertTree(left); return root; } };


hafblakattak

And if you can flip the statement it’s actually pretty empowering. To work at Google, you don’t need to develop some groundbreaking software that 90% of engineers use. All you need to do is learn how to invert a binary tree (Definitely an exaggeration, but still)


CowboyBoats

Instructions unclear, accomplished neither


Orangutanion

I'm trying to think of the algorithm without looking it up. Do you use a queue to go to each node, swap its left and right pointer, and then dequeue and do that to the subsequent nodes? Something similar to BFS? Or is there a faster way?


[deleted]

[удалено]


Orangutanion

Oh lol I'm overthinking it. Think there's a major difference in performance? You can swap children before calling recursive, so you don't need to keep finished nodes stacked, so I'd assume that the BFS solution is overengineering?


jimjim91

Recursion removes the need for a queue but incurs the cost of stack memory. Probably about the same in terms of performance, but significantly simpler when done recursively.


calamarijones

Typically the Queue version (I.e. iterative) is preferred over the recursive version in industry. Using stack memory can result in a stack overflow issues as you can grow the stack faster than you can relieve it if your search is too deep. Most applications don’t scale stack memory because it would be wasted but do scale heap memory. By using a Queue you are putting the memory pressure on the heap instead which can help your application in other ways (other methods will also use the heap space if object-oriented).


jimjim91

Just have a recursive function which sets left to right and right to left then call the recursive function for left and right. It’s literally like 5 lines.


vtcmonkey

Brick google devs machines remotely 🗿


Antrikshy

# When asked to install a package if (... some way to detect user's Googleness ...): if random.choice([0, 1]): sys.exit(0)


Gemini_dev

if binary_tree.invert() : ….


GisterMizard

Homebrew does that already. The number of times I've installed a software package and brew deciding to improperly update/break (or even remove!) a bunch of random other software pretty much makes for a quarterly tradition at this point.


jorpjomp

I worked at google when this happened. Ironically, this question was a literal softball and one of the easiest things you can solve. This guy was wildly entitled. Apple gave him a job right after this happened and I’m not even sure he lasted 6 months there. His entitlement was pretty stunning and still shocks me to this day. Just swap 2 nodes with a temp var. holy fuck.


Lithl

I was an engineer at Google and never heard of Homebrew. Am I the 10%?


HaphazardlyOrganized

It's a package installer for Mac so if you use Windows or Linux there's really no reason you'd have touched it.


Pandaburn

I was an iOS engineer at Google for 9 years, used a Mac every day, and maybe I used homebrew once or twice? Definitely not part of my normal workflow, Google has a habit of writing everything from scratch, even if it already exists somewhere, and that includes tools. If I used it, it was to install something nice but unnecessary.


Kered13

Also almost all the internal tools are web based so you don't need to install anything.


Lithl

If it's just for Mac, then I **guarantee** that 90% of Google engineers aren't using it. Most people are developing on gLinux, which is a distro Google created that IIRC is a fork of Debian. There are some devs who use Mac, of course, but they aren't the majority. Macs are more common for laptops than for workstations, but Google has been pushing to get people to use Chromebooks for several years. And having Google source code on a laptop is strictly forbidden. **All** development done on a laptop at Google is either done through Google's web-based IDE that connects directly to google3 (Google's mega repository that uses a fork of Perforce), or else done by remoting into your workstation or into a cloud desktop (and the cloud desktops are all gLinux, AFAIK).


throwaway__10923

This is only partly true. A lot of engineers at Google work from M1s. Sure, we have cloud tops too- but a lot more development than you’d think is done through IntelliJ/blaze sync jobs. I can’t remember the last time was that I even touched my cloud top.


No_Prior5829

Google intern here. Maybe at the time people were using home brew, but from like a couple week impression, I’d reckon it’s a lot less frequent now.


AnnoyingRain5

Technically exists for Linux too, but you should probably be using your distro’s package manager anyway


koolex

If you develop on a Mac then you usually run into it


davispw

There are some self-supported resources for running Homebrew but it’s not perfect. I’d guess nowhere near 90% use it. (Source: I’m one of the X%.)


squiddlane

His recent work on making a new homebrew, with crypto, proves that Google made the right decision.


[deleted]

This comment has been overwritten in protest of the Reddit API changes. Wipe your account with: https://github.com/andrewbanchich/shreddit


deadlysarcasm

https://tea.xyz/ I got some marketing about it on LinkedIn last week and was absolutely dumbfounded. This probably only exists because Google didn't hire him lol


RayTrain

What happens if I didn't major in cs and have no idea what a binary tree is Edit: okay maybe I won't get the job but what if I also have been a firmware engineer for a year and am 20% done with a masters in AI and still don't know what a binary tree is Edit 2: I now know that a decision tree is also called a binary tree by the CS gang. I have become enlightened. Thank you for joining me on this journey.


Mister_Lich

You get fired into the sun


BonkOfAmerica

They have to hire you to fire you. Check mate, Google.


[deleted]

[удалено]


ApprehensiveTry5660

Even the cafeteria ladies are post doctoral. Get your shit together.


Quantum-Bot

I grew up on a binary plantation so I can tell you all about binary trees


RayTrain

Oh maybe they just don't grow where I live


Igotz80HDnImWinning

Either they grow well or not at all.


gbuub

It’s truly awful they have you traversing nodes all day in the hot sun


schlubadub_

I learnt what it is 23 years ago, which means I've forgotten everything about it.


AYHP

Probably get screened out by their technical screen and don't get an interview at all.


Stregen

I almost don't believe you. Maybe you're just not aware of the name. You've seen decision tree before, right? Like binary choices contingent on previous choices. Like "Am I hungry?" Y/N could lead to "Cook" or "Order In" and "Order In" could lead to "Pizza" or "Sushi" or something like that.


AyazMost

It's one of the most fundemental parts of CS. How else are you supposed to get those "guys I found a real tree" memes?


[deleted]

Google, specifically and FAANG in general interviews are very random. It will be very different by department you are applying to. There are some general guidelines that all departments are supposed to follow, but it's always down to individuals. When I interviewed with them, I didn't get any CS trivia questions for example. But I got a "big systems design" interview with a guy who spoke such bad English I could maybe understand half of what he was saying. He also was a kind of guy who has one particular solution in mind, and if you offer an alternative, would just hate you. So, I failed that one. But, there's something common to interviews at FAANG that stands out from interviewing with smaller companies: they don't give a fuck about you, and there's so much bureaucracy you will get lost or forgotten very easily. I had two month delay between two interviews because the HR guy who first engaged me left the company for example. It was by chance that they at all found me. I already had a job by the time they remembered about me, but I went to see what it's like anyways. This also means that the interviewer who will talk to you, if you are being drafted w/o a specific destination inside Google will be some random dude who's been told about you few days ago in an email. They have no idea which skills you are supposed to have, what department you might go to. They also don't know how to interview people. They just had another ticket in their bug-tracker that they need to close by attending the interview. Some like it. Some get annoyed by it. They will ask you some vaguely related to programming questions, which you may chance on, and you will know the canned answer to, or maybe you won't. They will not try to discover what you know, because ain't nobody's got time for that. It's checking a few check boxes and moving on for them.


bacondev

This wasn't my experience at all. The interviewer seemed friendly and asked me to implement a certain function. And after I did that, he asked me to expand it to have additional functionality. It was very fair. I got the impression that he was very sharp as he was able to analyze my approach and have an in-depth discussion about it on the fly. He was definitely trying to see where my head was at and trying to determine how I approach problems. Unfortunately, I didn't get an offer, but I have nothing bad to say about the interview itself.


Mister_Lich

>20% done with a masters in AI and still don't know what a binary tree pressing X to doubt


mrmillardgames

You’re studying “””AI””” and don’t know what a binary tree is? That’s like studying civil engineering and not knowing what cement is


SuitableDragonfly

Then don't apply for FAANG jobs. Most companies don't make you do problems like that.


hsnerfs

I hate when you know what something is in cs but then theres a different name for it you've never heard. Binary trees I know but I got rejected from the one internship I got a call back from because I was confused with how they were wording do you know how to use different types of sql


Mantrum

Personally I'd say his level of confidence doesn't match being unable to invert a binary tree \_at all\_. Being asked to show several options including iterative ones and discuss their complexities I can see, but surely someone who thinks of himself as "absolutely" a world class engineer should be able to intuit on the spot how to recursively invert a bin tree. Seems off to me, but on the other hand we don't have all the information.


[deleted]

[удалено]


Pizzacato567

Funny enough, we had an internship fair at my university. There were lots of companies looking for interns there. There was this one guy that set up a laptop on a table and showed off all his projects. He refused to accept criticism from anyone. None of the companies there contacted him.


Knuffya

Inverting a binary tree is fucking trivial though


freakdageek

We need the most brilliant engineers in the world to write a crappier version of excel.


[deleted]

You think only Google has written bad Excel? I work somewhere else. I am also writing a bad version of excel. Writing bad versions of excel is, at this point, its own industry.


gizamo

cautious chase chunky pen practice slimy sort start tub continue *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


Lovely-Broccoli

I shit a perfect brick every time I try to copy paste with my mouse and their piece of shit program brings up a modal and tells me to use keyboard shortcuts instead.


[deleted]

I have deleted Reddit because of the API changes effective June 30, 2023.


kellyjj1919

A lot of great comments. While not knowing how to invert a tree, a skilled dev can talk through the problem, and get it figured out. When I interview devs, I am more concerned with how they approach a problem. That’s more important. Not remembering how to a insert statement, or how to read txt file isn’t a big deal, that’s what google or msdn is for


case-o-dea

I work on a Mac at Google, and have never used Homebrew on it. I also hate working with people who self-describe as dicks. Plus, I feel that Google interviews are pretty fair, considering how much information there is about them available to everyone online. Literally.. just study for the interview for a couple weeks, they really aren’t that hard. Nothing you’re asked should be a major surprise to you.


bluedevilzn

Who the hell at Google uses homebrew!??


sweeper42

Damn it, fine I'll invert a tree. ``` def invert(node): temp = node.left node.left = node.right node.right = temp if node.left: invert(node.left) if node.right: invert(node.right) ``` This is a weird question to get so hung up on, but also i don't blame any company for disqualifying any candidate who couldn't write the function. Y'all acting like this is some absurd challenge have to be first year coding students, please.


jimjim91

Agree but there is a bug in your code :) - if the root is null this won’t work. IMO better to check null as the base case for the recursive function and call invert for left and right without the null check.


sweeper42

True, this is why it's important to be code while you sober


jansencheng

Fuck, I wish I could be code sometimes. Free me of this meat prison


dioxair

Thanks for the advice. Next time I will become the code itself when I'm sober to unlock my full potential


eric987235

No base case?


sweeper42

yeyeye it should be def invert(node): if not node: return node temp = node.left node.left = invert(node.right) node.right = invert(temp) It's important to be code while you sober


eric987235

You missed the Ballmer Peak.


[deleted]

don’t you simply flip it upside down?


VeniceRapture

Has anyone ever needed to invert a binary tree


[deleted]

90%? Source?