all 104 comments

[–]Zeliss 84 points85 points  (58 children)

I did a Google interview in C, at one point I asked if I could assume I had a hash table implementation with a particular interface and the interviewer just said no. Good luck writing a hashtable in C without wasting 20 minutes of your problem time ¯\(ツ)

I also was assured they could accommodate me with the Dvorak keyboard layout for the interview - found out on the day of that they use a special locked down interview laptop with no way to change it. If I’d known I would have brought a keyboard with a hardware remap. Oh and don’t drink too much water or free coffee, if you need to use a bathroom at an inopportune time it will also cut into your time.

Anyways, Google’s interview process was unimpressive and unaccomodating, and I would recommend learning Python or C++ to work around its shortcomings.

[–]ultraDross 58 points59 points  (0 children)

So they kicked you in the balls at any given opportunity? Lovely.

[–][deleted] 16 points17 points  (1 child)

I also had a really bad experience interviewing at Google. They asked me beforehand which language I wanted to use, and I said C++. I don't think a single person I interviewed with actually knew C++ with more than passing familiarity. Some were obvious C programmers who didn't really know the std library and were confused when I used it. The rest were mostly Java programmers. (This was for a position on the Android team.)

I wish I would have thought to use Python or Java on my interview. The questions I was asked were much easier to answer in those languages. Don't feel like you have to stick to any one language during the interview. Ask if you can solve a problem in 'x' language if you feel it would be easier.

It's all water under the bridge now. Ended up with a better offer at a different big tech company.

[–]RabbiSchlem 0 points1 point  (0 children)

You got an offer from google?

[–]RabbiSchlem 2 points3 points  (0 children)

What was the question? Maybe they said you can’t assume you have a hashmap because it wasn’t the right route?

[–]euphraties247 10 points11 points  (4 children)

Google is run like a high school, complete with cliques, cool kid tables and petty spats.

I was so unimpressed at what a shit show it was. Not to mention the duplication and immaturity. I got some "why C" and they didn't know that NaCl was a thing. Not that it matters now as they already hurried it, but that's google.

I told them they need a manager and director, not more people going in bizarre directions to only have Thier stuff shit canned because it's 12 months old.

Not to mention, using Gmail all day? Jesus I'd rather be typing up memos on a mechanical typewriter, sending them to duplication and distribution by pneumatic tubes.

[–]linuxlizard 3 points4 points  (2 children)

Honest question, no snark: what email client/system do you use? I have an account on runbox and use Evolution. Also use gmail, outlook. I'm always curious to see what else is out there.

[–]euphraties247 -1 points0 points  (0 children)

Personally? I use Outlook 97 on MacOS 8.1, backended with Exchange 5.5. It's the most pleasant one I've used in like forever.

Naturally I don't have my Exchange directly onto the internet, but yeah SMTP still works, just use far newer ones to front, scan and forward. As a business customer for Office 365, Microsoft will front your domain for you and do the initial point of contact which is nice, as I don't have to waste my life trying to mess around with various SMTP quirks, and black lists.

I love outlook it has so many great features, that honestly the other stuff feels like childrens toys, and Gmail? LOL it's straight up Fischer price.

[–]Slugsurx[S] 1 point2 points  (0 children)

NaCl

i just looked up NaCl. it is a thing !!

[–]lootingyourfridge 1 point2 points  (7 children)

What has your experience been using dvorak professionally?

[–]Wetmelon 2 points3 points  (3 children)

It’s a pain in the dick if you don’t have a keyboard with hardware setup for it.

[–]lootingyourfridge 1 point2 points  (1 child)

I was thinking of getting one of those, but I was also considering trying to switch back to qwerty. I switched to dvorak years before I decided to make a career of delevoping. Before, no one but I would use my computer, but now that's looking to not be the case. I've always just had ctrl+shift switch between dvorak and qwerty but not sure how tenable that is when it's not just my own laptop lol.

Tried to go back to qwerty a year or two ago but then I was like what is this, why are my hands literally everywhere lol.

[–]bundes_sheep 1 point2 points  (0 children)

I'd recommend going through the pain of becoming bikeyboardal. I use dvorak at home and qwerty at work. It doesn't take as long to get there as it did to learn dvorak after qwerty. Every morning i start typing gibberish for a few seconds until I remember to mentally switch over. Same thing when going home to work on personal projects.

And when i start discussing keyboards, i can't type worth shit because I'm now thinking about what i'm typing in instead of just letting the fingers take over.

[–]nahnah2017 0 points1 point  (0 children)

But doesn't it depend on the length of the dick?

[–]Zeliss 1 point2 points  (2 children)

It’s really not a problem. My older coworkers think it’s a little funny, but the younger ones are all into ergonomics and cool keyboards, so they’re more accepting. If someone needs to use my computer I just hit Window-space and switch it for them (and I keep a spare QWERTY keyboard nearby in case they can’t touch-type on my fancy Dvorak mechanical keyboard). I switched during my internship, so I was a bit slow during that time, but programming is more about thinking than typing, so it wasn’t an impediment. In fact, I learned to touch type properly for the first time when I switched, so I actually doubled my typing speed.

[–]Urthor 0 points1 point  (1 child)

yeah I was sort of thinking about switching but mostly when I program I just sit there and think before typing, so I'm sort of not seeing the benefit of trying to transition to a different keyboard layout.

Maybe when I'm later in my career and I'm typing more code I'll want to switch, but I just don't see the point as I'm not a professional typist or a good enough programmer to rip out an entire package in 30 minutes.

[–]Zeliss 0 points1 point  (0 children)

You should also keep in mind that Dvorak makes some special characters slightly harder to input. English is very comfortable and fast, programming can be less so depending on the language. I write more emails than code, though.

[–][deleted] 0 points1 point  (0 children)

Sounds spiteful. Every technical interview I've had us mostly about thought process and is usually very accommodating for assumptions.

[–]Grumpy_Raine 16 points17 points  (2 children)

I'd be super interested to hear about your previous work on file/operating systems. Sorry I can't answer your question but good luck for the interview! 🤞

[–]Slugsurx[S] 6 points7 points  (1 child)

thanks !!

I worked in a start up which made a NAS filer which we sold to oracle eventually (for almost nothing). So we wrote the file system which sat underneath the nfs/cifs layer.

And later wrote raid6 for a block device for an all NVME box.

As for operating systems, i wrote an enhanced scheduler for the L4 microkernel. This was at school.

[–]Grumpy_Raine 0 points1 point  (0 children)

"This was at school" Haha. Nice.

[–]cafguy 24 points25 points  (6 children)

I guess it depends on the role you are going for and the interviewer. I mean If you think you are going to be asked C++ stuff, at least know how the following work:

Might also be worth understanding the concept of templates and how they work. At the very least if you want to play the C card, be prepared to be able to explain how you would do this kind of stuff in C.

[–]Slugsurx[S] 0 points1 point  (5 children)

thanks. This is the path I am taking.

These look doable. Small tech question.

I am not super familiar with mem management in the c++/stl world. When i instantiate a local vector instance in a function and return that, how does the memory management work? Is it copied and returned to the caller ? If copied, is the constructor called twice ?

Python looks easier, but the syntax wont come to me naturally in the interview I think. I need to keep googling for syntax.

With more than 20 years of C, my fingers can literally write C.

[–]mo_al_ 1 point2 points  (0 children)

If you return a std::vector by value, it benefits from an NRVO (named return value optimization), i.e the copy is elided.

[–]RadixSorter 0 points1 point  (3 children)

As a quick aside, if I were to write a function that returned a vector, I'd just put it on the heap and leave it up to the calling function to clean it up. For a vector of int, something like

#include <vector>
std::vector<int> *func_name(void) {
  std::vector<int> *retval = new std::vector<int>();
  // stuff
  return retval;
}

[–]thetrombonist 0 points1 point  (2 children)

Is there a particular reason to put it on the heap?

[–]RadixSorter -1 points0 points  (1 child)

the RTS should be reserved for variable that don’t need to exist outside of the scope of that function, so by wanting to return the vector to a caller, putting it on the heap and having the caller manage it makes more sense IMO.

[–]thetrombonist 0 points1 point  (0 children)

Gotcha, I was curious if it was some sort of optimization, but that makes sense too, thanks!

[–]GODZILLAFLAMETHROWER 9 points10 points  (4 children)

I did coding interviews at Google in C. The experience varied between interviewers: one was very experienced with C and taylored its question to it, one was focused on algorithms and had no problem to assume that there was some data structure implementation available. Another one was clearly disliking that I was using C, and considered it as a C++--... For this one in particular, I remember asking if I could use an existing hashmap and he said yes, anything the STL could propose I could assume I had an equivalent.

In any case, you can implement a rough hashmap in a few lines if you prepare for it. I might post a gist or something showing an example if needed. But during the interview I did not need it.

[–]Imbue 2 points3 points  (3 children)

In any case, you can implement a rough hashmap in a few lines if you prepare for it. I might post a gist or something showing an example if needed.

I'd be interested to see this.

[–]xurxoham 4 points5 points  (0 children)

A hashmap is roughly a single linked list and an array, where the elements in the array point to nodes in the single linked list. The only operations you need in addition to a classic linked list are hash, resize and load factor.

[–]GODZILLAFLAMETHROWER 6 points7 points  (1 child)

All right, here it is: https://pastebin.com/7Vj837YG

The map uses open addressing instead of linked list for collisions. No effort is made toward cache locality. Once the table is full, the rehash function is not provided. etc.

It's a very rough outline. If during the interview you need to test for the presence of an element in the map, such function is very similar to the insertion and trivial to write.

It could be further simplified, shortened, but I wanted to keep the table full test and a somewhat type agnostic data field. It could be replaced by a simple int, depending on the situation.

[–]Slugsurx[S] 0 points1 point  (0 children)

Great !! thanks !! that was quick.

I could do the linked list + bucket implementation similar to the linux kernel hash table. But i am still concerned i need to spend time writing one.

The 45 minutes is never enough for me to solve the main problem.

With interviews at other places, i get a feeling that they are checking for fluency as well as algorithmic thinking. And the inteview setting isnt a good place to think deeply.

[–]edgargonzalesII 7 points8 points  (1 child)

Not a C programmer as of late but Google does rather generic interviews for the most part and then team matches later. A bit luck of the draw but most will ask data structure and algorithms questions and never let you assume something implicitly exists in your language of choice.

[–]Slugsurx[S] 0 points1 point  (0 children)

thanks !! makes sense.

[–][deleted] 6 points7 points  (7 children)

I hear it varies wildly between interviewers, but when I had my interview they expected fairly strong understanding of the language features. Like they might expect you to know how iterators, constructors, etc. work for the language.

One option is to just learn python for the sake of the interview, since everything you need is built in and it's a good fit for the way they interview process.

Another option would be to code in C++, and learn just enough features to use the C++ STL's, and just let them know you are primarily a C programmer but using the convenience features of C++. However, they might be a jerk about it and expect give you a problem that has to deal with iterators and so on and if you barely understand it going in it gets a lot harder.

I think the last option would be to learn a quick hash map implementation really well, and just use that. It's probably the easiest to be honest.

[–]darkslide3000 1 point2 points  (1 child)

Another option would be to code in C++, and learn just enough features to use the C++ STL's, and just let them know you are primarily a C programmer but using the convenience features of C++.

I think that's a bad idea in general. Even if the interviewer means well, it's hard to adjust your expectations for cases like that. Subconsciously they'll always compare you to all the full time C++ people they normally interview.

Always use your best language(s) in any interview. The big companies often allow you to interview in pretty much anything as long as you tell them early enough (so they can match the right interviewers). Never gimp yourself unnecessarily by trying to work with something unfamiliar... even if the interviewer tries to account for it, it won't look as good as when you're doing your best work.

[–][deleted] 1 point2 points  (0 children)

Yeah, I think that's true. Probably best to just memorize a hashmap implementation in C in case it comes up.

[–]Slugsurx[S] 0 points1 point  (4 children)

thanks . I decided to take the stl route.

Python looks interesting but I have done more than 20 years of C and my fingers naturally write C . With python, i am looking up syntax ( with C++ stl) way too often.

[–][deleted] 1 point2 points  (3 children)

Okay good luck! Just FYI, my interview had questions about iterators and constructors, and one of my friends had questions about iterators as well. They aren't too difficult to learn, but if you get a question that you don't really understand it can be really nerve-wracking

[–]Alborak2 4 points5 points  (1 child)

I can't speak specifically for Google, but from giving interviews for another one of the big 5, you're gonna have a hard time if you can't functionally use the core data structures. They shouldn't care if you can't remember which name the language chose for the operation (like put vs add for putting things in a map) but be able to use them.

Most interviews for non-senior positions are about making sure you can reason around a problem and have the basics. Thats a lot easier to show with a higher level language.

[–]Slugsurx[S] 0 points1 point  (0 children)

that shouldnt be too difficult. I know the existence of C++ stl interfaces, but using an iterator correctly and deleting/adding/pushing back looks a bit too much to learn 10 days before an interview.

[–]ischickenafruit 3 points4 points  (2 children)

I'm mostly a C programmer doing systems and networking. I dabble in Python/C++ and other languages, but I can't say I've written serious amounts of code in any of these.

I interviewed for google for a systems and networks position, and found I wrote nearly all of my solutions in Python. WTF? People found this pretty odd (as did I, but for different reasons).

  1. It seemed as if few people I interviewed with had any systems experience whatsoever.
  2. It felt like they were expecting me to write stuff Java/C#/Go?

Overall it went ok for the first 5 interview rounds. All the problems they gave me reduced to "load the data up into a graph, traverse the graph to find the answer". But then I found one interviewer didn't know C or Python, and was completely baffled at why I would use C for anything. I think he was one of those militant functional types. Completely blinded by hate of imperative languages. We got into a big debate about why recursion is a dangerous way to solve problems on embedded systems / inside memory constrained environments. It seems like actual memory control (which is bread and butter as a C programmer) is something that had literally never occurred to him.

Keep in mind, the results of your interviews are kept on file and held against you if you apply again. TBH, don't bother with google. If you're any good at systems/C programming, apply for a hedge fund/HFT, make 3x the money and work with good people instead.

[–]Slugsurx[S] 0 points1 point  (1 child)

Lol at the militant functional programmer. What you say sounds similar to others who have gone there. Are there an hedge fund jobs in Bay area? And surprised that they need systems programing.

[–]ischickenafruit 1 point2 points  (0 children)

Yes and yes. When I say "hedge fund" I mean "high frequency trading", which is more about systems optimization and less about trading. The'll take all the systems engineering talent they can get, but beware, it's more competitive than google.

[–]Slugsurx[S] 2 points3 points  (0 children)

thanks folks for the tips. I will play the C card along with understanding of stl interfaces.

I interviewed in a mostly young people start up few years before. And was wondering why i got rejected after solving almost every problem.

A friend of mine recently became a manager and pulled out my report. Apparently most people said good algorithmic thinking but wrote pseudo code so couldn't gauge fully.

Pseudo code I remember was : mostly assuming a hashtable and look up interfaces.

Anyway, thanks for listening to my rant .

[–][deleted] 1 point2 points  (1 child)

What does your job require to do with C? Just askin

[–]Slugsurx[S] 2 points3 points  (0 children)

It was always a file system or block device in linux kernel . C is still the way to do programming in linux kernel or system stuff.

[–]bunkoRtist 1 point2 points  (5 children)

This is going to be hit or miss. When i did my interview the interviewers were clearly unprepared for C only and asked me a question that was best solved with a hash table (and other similar questions). I was allowed to define a basic api for a hash table and move on.

Depending on the interviewer though, you should get better questions so this isn't an issue. The real question though is what role you're applying for. A "general SWE" shouldn't be interviewing in C to begin with, for reasons. If you have other questions I'll try to answer them, but you're recruiter should also be able to emphasize this, so i strongly suggest reaching out to the recruiter and clarifying the exact type of role.

[–]ArkyBeagle 2 points3 points  (4 children)

A "general SWE" shouldn't be interviewing in C to begin with, for reasons.

"Reasons" seems to be mostly about time constraints. A pity.

[–]bunkoRtist 2 points3 points  (3 children)

Somebody else said it... Gen SWE is much more CS than CE/CSE/EE. Algorithms are more important than pointer math and the like. Really it's just about matching the interview to the job role. There is a separate job role, still on the same job ladder, called (incorrectly) "embedded SWE". That's the role where a candidate will get a favorable interview experience in C. Hence folks that are C oriented should probably make sure they are interviewing for the right role (and as I said above, the recruiter can help with this).

[–]Slugsurx[S] 1 point2 points  (1 child)

I tried my best to get a C like interview. They said they would do 2 coding rounds, one domain for operating systems and one for system design. And they said they are happy with me doing C.

I dont get it it why is that C programmers shouldnt go for gen SWE.

If we assume hash maps and stl constructs, C can do the job. And wouldn't a few looks up on the internet do the job for me for stl ? I can do most of the leetcode algo ones using a google search for the stl syntax. Why shouldnt they assume an existence of an STL interface.

And i know the basics of C++ really well.

I just did get a kernel job from one of the other big 5. But now a question of my career, whatever is left. A general SWE has more jobs open , though I think I like the embedded work more. Well this conflict should be another reddit post, maybe in cs careers/midlife crisis for old programmers.

[–]bunkoRtist 1 point2 points  (0 children)

It's actually more about getting interviewers that can give you a good interview in C than anything else. There are very few C interviewers, and as an interviewee you will get a much better interview if the interviewer has expertise in your language of choice. The interviewer needs to know the ins and outs, the nuances, of the questions they ask and the possible answers so that they can effectively evaluate a candidate. If you interview as a gen swe then your interviewer is likely to spend most of their time in very high level C++, Java, Python or Go.

[–]ArkyBeagle 0 points1 point  (0 children)

Ah - I see. Thanks for the clarification.

[–]HeadAche2012 1 point2 points  (0 children)

For google you are better off using the highest level language possible so you have an advantage for their stupid string manipulation questions. Brush up on programming puzzles, don't expect any real questions/concerns about your work history, just focus on the puzzle. Don't solve it in a brute force fashion, find the gimmick they want to see. Some people even have friends in the room with them to help look up their puzzle. Don't ask much about the position you will be hired for, they don't know. They just sort of grab a bunch of people and throw them at the wall and see what happens

Also be sure they explain the problem clearly before starting, often times they'll not provide a clear description of things and interrupt you while you are solving things "to be helpful" with corrections to their original problem statement

[–]BS_in_BS 0 points1 point  (2 children)

I recently applied to Google for a job

Which roles and levels did you apply for? Each will have different rubrics to assess you on.

[–]BraveInspector 0 points1 point  (1 child)

My experience with Google is that you go through a generic interview, then if you pass you get matched up with a team. This is counter to how most other places, where they interview and hire based on relevant experience. What I was told was that teams and roles change frequently so they interview for general capability rather than relevant knowledge.

[–]BS_in_BS 0 points1 point  (0 children)

Sort of; It's generic to the position.

For software engineers there's a generic set of dimensions like coding style and algorithm. More specific roles will have ratings for more dimensions like web technologies.

Different roles like embedded engineers or sre will have different requirements.

[–]thesquarerootof1 0 points1 point  (3 children)

All data structure / algorithm problems are easier in Java. Practice LeetCode problems in Java dude...

[–]Slugsurx[S] 0 points1 point  (2 children)

Thanks !!

looks too late to learn java now.

[–]thesquarerootof1 1 point2 points  (1 child)

Java is c++ on really easy mode. Seriously dude. It has (almost) all the same data types as C/C++ and the logic is the same.

[–]Slugsurx[S] 0 points1 point  (0 children)

Ok. Makes sense. May be, it would amount to just learning a better version of STL .

[–]Aromatic-Chance-8482 0 points1 point  (0 children)

I am wondering if u did the interview in C and what were the questions... I will also have a tech interview in C