How I spent summer…

I've never really wanted to join big companies, I've always liked small cozy game studios, where it's easy to get a “fatherly” scolding from a lead, and you can “speak kindly” to your colleagues about where they were wrong. But of course, crazy thoughts, but what if in Ya…, and try some other Facebook, Google. It's a pity they don't make games, but this thought lurked in the back of my subconscious, periodically reminding me of itself when I was looking at ads, and after letters from recruiters on LinkedIn. About a year ago, two of my friends, who have long lived on another continent, but with whom they still remember the collapse of the St. Petersburg EA, suddenly showed up on a LinkedIn page, left reviews and showered them with skills. At first, I didn't attach much importance to this, you never know what people think there, maybe they're just updating their network of friends, they have such a pastime there overseas. And it so happened that the hr-bots of the big G… reacted to these reviews, which later led to a very interesting experience of interacting with people, getting to know the kitchen of selection, interview stages and the funnel “of death” entrance. You have to be careful with your desires.

Somewhere on Habr there were already articles about G… and Ya…, such that reading descriptions of tasks at interviews, by a strong-willed decision the next morning I started solving leetcode. The will usually lasted for about a week, and then the routine of combat missions and meetings dragged me back to the cozy den of a not very large game developer. Why did I decide to write about this only a year after all the events? Yes, I simply signed an NDA on the methods of conducting interviews at the third interview, and when I realized WHAT I signed, it was already too late.

You have a parcel from G...

You have a letter from G…


It's easy for me to think and write on pluses, probably for the last twenty years I haven't changed this habit and haven't thought about stopping or changing the language. But the big G… was persistent and almost sold me a middle position in support of the golang standard library in San Jose. During my time in the industry I had the chance to use many languages, most of you probably even know them: MISRA C++ (specifically the dialect for BMW automotive), lua, javascript, squirrel/quirrel, jsc, mujs, dascript, haxe, scriptV, angelscript, clojurescript, paryrus and a couple of my own.

-1. Invitation from the big G…

The weather was not pleasing. In appearance, and in fact, it was a real tropical winter, with showers that wash you away on the way to the store. For more than four years, I still have not gotten used to the fact that the rain comes from everywhere, from above, from below, from the side, and when you come home you pour water out of the pockets of your raincoat. It seemed like the drops would break through the umbrella if the wind did not blow it away. Colleagues said that there was no point in buying an umbrella, but I did not believe them. You could stay dry on the street by running from the store to the hotel lobby between the charges of rain, but without local teleportation skills you come to the office wet everywhere. And the wind, the wind is a whole separate topic. The narrow streets of Maltese cities work like real wind tunnels, in a raincoat the sail area increases significantly, it does not blow away yet, but you have to make your way by tacks, minimizing the area of ​​​​your body accessible to the wind. In two weeks after my arrival, four umbrellas broke until I decided to buy them. Locals don't buy umbrellas, considering it a waste of money. Tourists don't know these tricks and it turns out: open an umbrella – throw away an umbrella – buy an umbrella – open an umbrella – throw away an umbrella. And with all this, in December-January it's still quite warm +16 – +18 outside, +18 at sea. It's amazing how being in this wind every day and getting to and from the office wet didn't make me particularly sick.

Over a glass of local sparkling wine (don't scold me right away, the picture of the drink will be at the end), I close another task on AI monsters, and then a notification appears on LinkedIn, then in my email, and in addition an SMS arrives on the local number – “Leopold, come out. Come to Meet.”

I got a call from G...

Dalerank, come out.

I'm kidding, of course, the SMS simply duplicated the message in LinkedIn. After the first one, invitations began to arrive regularly once a week, and from different HRs. For about a month I ignored these “letters of happiness”, but then that little thought in the back of my mind finally got the better of me and the meeting was scheduled. Judging by the fact that the letters came from different HRs, they do not have a single database, which is quite strange for a mega-company, especially after rumors that a failed interview closes the “yellow brick road” for at least six months. Moreover, even when the interview was booked, the two remaining HRs continued to call me with some frequency from their country O(z).

0. Solve a dozen problems on leetcode

Yes, that's how easy and casually the question was asked at the first interview. At first it wasn't even clear that it was an interview. A girl in a sari read out the text (she just sat and read on the screen) in a wild English-Hindi surzhik, with very soft t's and s's, so it wasn't always clear what words she was saying. Having gotten through all this accent, I understood the essence of the interview – out of 10 presented tasks it was necessary to choose any one and write a solution online without using hints. I must say that at stage -1, they also told me that there would be some analysis of the task by choice, but, to be honest, I was just too lazy to prepare. Finding time in the middle of a milestone is problematic enough, and on top of that it was Christmas, so it was decided not to cheat with preparation. Among the list of tasks was implement atoi() function, probably every first one chooses it, because it is banal and simple. So I chose it, because I remembered its implementation for ebmed systems.

atoi_impl
//Implement the atoi(string s) function, convert a string to a 32-bit signed integer.
class Solution {
public:
int myAtoi(string str) {
  char* i = &str[0];
  char* e = i + str.size();
  
  //trim space
  for (; i != e; i++) if (*i != ' ') break;
  int sign = 1;
  
  if (*i == '-') { sign = -1; i++; }
  else if (*i == '+') { i++; }
  
  for (; i != e; i++) if (*i != '0') break;
  
  long long num = 0;
  
  for (int k=0; i != e, k < 11; i++, k++)
  {
    if (*i >= 0x30 && *i <= 0x39)
      num = num * 10 + (*i - 0x30);
    else
      break;
  }
  if (num*sign &gt; INT_MAX) return INT_MAX;
  if (num*sign &lt; INT_MIN) return INT_MIN;
   
  return num * sign; 
}

};

And… the girl in the sari started to figure out my code.

There is an intolerant joke about Indians here, sympathizers please do not open it

Wait, what? Indian programmers? Female programmers? Where is this world heading, Mikhalych… After wriggling the red dot between the eyebrows a bit about the ugly code and the non-compliance with the code style, the task was accepted. And that was the end of the interview.

At first I was asked to use the operator [] to access string elements, to which it was reasonably answered that it was used at the very beginning, and then it was simply not needed. And in general they complained that I do not use the interface for string from std. The reason for such a complaint was not named, except for “it's better this way”, “Ситс беття”, which probably translated from New English meant “That is better”. 45 minutes were booked, about 20 were spent, 10 of which I tried to understand New English speech with a very soft t, when What turns into, turns into What… What turns into an elegant “воть”, sometimes even into “во-оте”. And Let into “пи-ть, ли-ить” with a drawl.

What turns into elegant "here you go"

What turns into an elegant “vot”

They didn't let me take the solution, I just found this problem on leetcode from memory and checked if I solved everything correctly. Feedback on the second (second?) came in 10 days, probably because of the heavy workload. In addition, it was suggested to solve the remaining nine problems on leetcode, and achieve at least 50% Beats for each.

And two weeks later there was an invitation for a second (or third) interview, now on algorithms with a few more tasks. And excuse me, what was that first-second interview with tasks? Oh well, it's not every day we interview in the big G…

After browsing through various available forums to find out what the interviewers wanted to achieve at the first interview, and reading the stories of other poor guys, I came to the conclusion that:

  • the code should be written in a clear way, in Google code style, then there is a greater chance that it will be read and understood, and incomprehensible code is rejected without any consideration of who the smart one was who wrote it

  • complex code should be written in a limited way, the testers don't care, they have their own solution that they are guided by, and if you don't fit into these restrictions, then it's your problem

  • do not choose an easy level task, because in most cases a refusal arrives at the next stage, even if it was solved correctly and quickly. And there were some, for example, to calculate the median of an array of ints

1. Big O(n) with you

This time something got stuck in the well-oiled conveyor of processing man-hours into hard drive space (all meetings are recorded with your consent, if not, the meeting is automatically rescheduled for another day) and for another two weeks I was kicked around from one engineer to another. Honestly, at first it was a shame, having sat through the first two meetings for ten minutes, staring at the black screen with a glass of local sparkling wine, I often caught myself thinking – “Why do I need all this?”. Finally, the long-awaited meeting took place, and again a man of Indian appearance with a sheet of paper. Meet, Indian, glass of local sparkling wine, let's go…

The conversation didn't go well right away, because Sarih (the name is somewhere close, but it's not certain) clearly wanted to kill me as quickly as possible, I don't know why he didn't like me so much. The complexities of !all! containers of the standard library were asked, simply in the order written on the sheet. And a couple more from boost, to which I honestly answered that I didn't know, because I myself was in boost Antoshka both legs will break on the implementation of these containers. The man did not understand the joke about Antoshka.

The interview continued, the interviewer's desire to fail me did not disappear, in the end he did find a weak spot in my knowledge, to the question about the implementation of std::map/unordered_map I honestly answered that I had worked little with them, for the reason that all our gamedev containers are a linear array, well, and some of its derivatives. I shouldn't have said this, because all the next ten minutes until the end of the section on the complexity of algorithms were about the map and various options for its implementation.

This is the inspector who found my point of failure.

The auditor found my point of failure

Guess what task they gave you? Of course, it was about implementing unordered_map. The task itself looks harmless, but the main conditions were not to use standard containers like map/unordered_map. That is, in addition to the algorithm itself, which is actually not very difficult, if you have ever encountered such a task, you also need to write an acceptable implementation of std::map. You are given 45 minutes for all this, plus the time left from the section on complexity, i.e. plus 0 minutes.

Given two strings of varying lengths, solve the problem of finding
the minimum window substring in one of them, such that every character
in the other string (including duplicates) is included in the window.

Later I dug into the litcode and found the same problem in the hard section, only without having to write unordered_map from scratch. There is actually a non-obvious hack here that can be missed or some interviewers (as was again revealed by further research on the forums) forget to mention. Cool map you can not implement it, and use one from the standard library, but in this case you will not be able to get a high rating from the review. Hardworking And deaf we will have to implement the algorithm itself and remember how unordered_map is made there, because the usual version was rejected by the tester as not fast enough.

Of course, I didn't finish it in the allotted time. It's rare to get something done on time, I always had to think about the solution, drink a cup of coffee, chat with colleagues, and in general, the peak of productivity is between 18 and 23. And so when you are tormented by DSA problems at 8 in the morning, the code is not always optimal. I had to finish writing under the disgruntled grumbling of the reviewer and having exceeded the limit of minutes by about fifteen. No, no one took away access to the live editor, they just sighed loudly, looked loudly at their watches and annoyingly tapped the keys. As a result, there was almost no time left to analyze the solution itself, the comrade frankly did not care about the algorithm itself, and all the remaining time, about 10 minutes, was spent analyzing the work of unordered_map. Honestly, I expected something a little different.

The solution itself is below, already tested on litcode, but without all this fuss with your own map.

min_window_impl
class Solution {
public:
string minWindow(string s, string t) {
    unordered_map<char, int> m;
    m.reserve(1000);
    int i = 0, j = 0, count = 0;
    string res = "";
    
    for(auto x: t) {
        m[x]++, count++;
    }

    int nsize = s.size();
    int min_len = INT_MAX;
    while(j &lt; nsize){
        if(m[s[j++]]-- &gt; 0) {
          count--;
        }
        
        if(count == 0){
            while(m[s[i]] &lt; 0) {
              m[s[i++]]++;
            }
          
            int len = j - i;
            if(len &lt; min_len){
                min_len = len;
                res = s.substr(i, len);
            }
            m[s[i++]]++;
            count++;
        }
    }
    return res;
}

};

I got up from the computer wet, as if I had been running for two hours without thinking. The fuss and going beyond the time limit did not go unpunished, but everything worked out. Feedback came a week later with a tail. They threw in some more tasks as a bonus https://codesignal.com/as I understand it, there is an opportunity to create something like automatic tests, and all the correct answers are sent to mentors for analysis.

When I wrote my unordered_map

When I wrote my first unordered_map

2. Very strange things

Before the next tech interview, I was asked to sign a mini NDA and take a rather strange psychological test. I had to imagine my surroundings in as much detail as possible, as if you were living in a desert, your daily routine, activities, animals and people around you. It was a very strange half-hour monologue on my part, because the testing party was just staring at their phone the whole time, judging by the reflection in their glasses, hanging out on TikTok and Instagram, scrolling through their feed, it's a pity I didn't think to take a screenshot. As a result, my personal desert was very reminiscent of the long-seen movie “Sahara”, with the unforgettable couple McConaughey and Cruz, so there was an old bulletproof Mercedes, a horse, a dog and an ancient armadillo with a treasure, lost in the sands, and the Tuaregs, those who are nomads, not Volkswagens, cheerfully attacked some lost factory, not far from the pyramid of Cheops. Half an hour of unbridled fantasy, co-authored by Clive Cussler, apparently went to feed another ML, I do not find other applications for such tests. The interviewer? The psychologist apparently did not understand the catch, or understood, but in no way gave out this knowledge. Half an hour of life in vain, no feedback, only a freshly signed one-year NDA. Well, at least you practiced your English, right now I'm writing an essay on the topic of a lonely programmer living in the desert, accompanied by the wild cries of Volkswagens, i.e. the cries of wild Tuaregs.

3. Glitch in the Matrix

Judging by the materials and tasks sent, the results of the previous technical interview, on CodeSignal, I should have been interviewed by at least an architect, well, or at worst a lead. All the tasks were entirely from the hard section on litcode, and, to be honest, it was a bit scary. But not much, solving the most difficult, as it seemed to me, tasks in the evenings, calmly celebrated my birthday and forgot about the remaining ones, doing them when possible. Besides, another milestone in the studio, Google is somewhere over the ocean, and the tasks are hanging in the fat, and the lead periodically asks about them.

It was time for the interview, I was preparing to be chewed out by the masters, but the matrix failed: the interview began with the person checking the camera for about ten minutes, and at first we discussed how to flip the picture in meet through configs, then we recreated the session several times, the camera was in the background for a few seconds, then turned upside down and turned off, it looked very much like some kind of filter, because with sharp movements individual parts of the body appeared. Finally everything worked and I saw the real one Indie programmer, you know how they showed him in movies in the 2000s? Only in a checkered shirt, and with a lush moustache hanging down over the corners of his mouth. The only thing missing for the complete entourage was a hat and Indiana's whip to urge on the lazy juniors. The interlocutor's name was Andrzej and he was from the company's Warsaw office.

Some fighting spirit has evaporated, how can you be afraid of Indy with a moustache, to whom you set up a camera a thousand kilometers away? It's like pair programming, after that you look at each other differently.

And then there was a repeat of the second technical interview, we went over all the containers again, their complexity, the algorithms used, the implementation features. My naive attempts to say a couple of times that all this had already happened were shattered by the reproachful look of the examiner, we discussed for several minutes how my answer differed from the previous one, what else I could add and… the analysis of the list of containers continued further.

Only the inspector's gaze was not so kind.

Now tell me about the unidirectional list.

I had to accept it, but the feeling of déjà vu did not leave me until the very end, we managed to go through and discuss two thirds of the list, queue, priority_queue and the flat_map_xxx subsection remained. But the allocated 45 minutes are running out, the interlocutor says goodbye and turns off the camera. Eh… buddy, I spent ten minutes setting it up for you, and you just… Those 10 minutes that I did good and eternal things were not enough, so believe in people after that.

Feedback came as usual a week later.

In general, I failed the second algorithmic section. It turns out that this was a minor part, i.e. I didn’t even get to the main section, can I say that I was upset? Upset, very upset, I had to persuade a bottle of local sparkling wine, sadly looking at the beautiful Luzzu.

That very local sparkling wine

That very local sparkling wine

4. Design Review

This was probably the only normal interview, in my understanding. Firstly, it had an open date, which meant that it was possible to schedule it whenever was convenient for both parties, the only request was not to delay the interview. All the previous ones simply presented a slot, if it was not suitable, the next one was in a week. Secondly, it really touched on issues that were directly related to my current and possibly future position.

The interlocutor was again from the Warsaw office, asked me about my current work experience, the algorithms used and what systems, patterns and technologies are used at my current place of work. And then he asked me to design one of our working systems from scratch, actually I did one of these systems from scratch, and after about ten minutes of telling, drawing circles, squares and the general algorithm of work, the conversation smoothly moved on to a detailed discussion of the specific implementation, the possibility of scaling and various hacks that were used. There was no writing of code as such, but he showed up and talked to his heart's content.

This relaxed and friendly atmosphere, as well as the attention to detail from the interviewer, made the meeting more like a conversation between two engineers discussing the technical details of a real working system. Overall, it was a much more valuable experience than the student-like DSA exams.

5. System review

The interviewer evaluates knowledge of the operating system principles.

What do people think about my knowledge of systems design?

The system interview was optional, in principle it was possible not to pass it. According to HR, there will be no additional points, as well as penalties for not passing the latter. But we understand that free cheese is only for a clever mouse, so if you walk around like that for all the money. The interview took a little more than two hours, and was built in the question-answer format, if the answers were clear and quick, I was stopped and asked the next question. If the examiner did not like something, then leading questions were asked. For each answer, according to indirect calculations, no more than 5 minutes were given, this was noticeable, because with each new question the interlocutor looked at his watch and wrote down the time (probably the time, since I could not see the sheet itself) on the form. In terms of time, the interview was divided into two parts

  • Operating principles of the OS

  • IPC, Memory Models and Synchronization

We didn't get to virtualization and file system operation principles because the time allocated for this stage ran out. If you suddenly decide to go through this section, I advise you to reread Tanenbaum, perhaps no one has described the OS operation in books better than him.

What questions did I manage to answer:
  • Key elements of the OS
    1. Abstractions (processes, threads, files, sockets, memory)
    2. Kernel objects (creation, management, opening, writing, distribution)
    3. Object policies (LRU, EDF algorithms).

  • Key elements of the executable process
    1. Stack, Heap, Registers, Data
    2. PCB and process execution model

  • Threads and Parallelism
    1. Threads, Fibers, what are the differences and how are they implemented in different OS
    2. Thread implementation levels: user and kernel
    3. Understanding context and switching patterns

  • Schedulers and scheduling algorithms
    1. Task queue
    2. Waiting queue
    3. Device queues
    4. Queue management methods (FIFO, Round Robin, Priorities)

  • Memory management
    1. Symbolic addresses
    2. Relative addresses
    3. Physical addresses
    4. Existing models of memory managers

  • IPC
    1. Shared Memory Model
    2. Messaging Model
    3. Synchronization primitives
    3.1 mutex (recursive)
    3.2 spinlock
    3.3 rwmutex
    3.4 semaphore
    3.5 active waiting
    3.5 hw lock
    3.6 memory barrier

6. Test

At this point, I could have ended the interview saga and returned to my native and cozy gamedev to finish the game with the letter M…, but the habit I had developed over the years of bringing what I started to the status of “approved in dev” did not allow me to give up halfway through.

First day of writing the test assignment

First day of writing the test assignment

The test task was not impressive at all, it was necessary to simply write an implementation of a double queue of events with priorities, if possible without blocking. I was already set on something like, write a control system for a nuclear reactor, or at worst a satellite. And here, a very down-to-earth task, not too difficult. Not difficult because of the widespread use of the pattern of such queues with prioritization in game engines, where most components are built on them, from the frame task system to asset loading queues. I think you can guess where the inspiration came from.

Test Assignment/L4R (San Jose, golang support labs):

Objective

You goal to implement a priority double-ended queue (PriorityDeque) in C++. If you're up for a challenge, try to make it lock-free.

Tasks

  1. Main Part (60 points):

    • Build a PriorityDeque class to handle insertion, removal, and retrieval from both ends of the queue.

    • Each element must have a priority. The queue should prioritize elements with higher values ​​first.

    • Your implementation should include these methods:

      • add an element with priority at the front.

      • add an element with priority at the back.

      • remove and return the front element.

      • remove and return the back element.

      • Check if the queue is empty.

      • get the current size of the queue.

  2. Optional Part (Lock-Free, 40 points):

    • Implement a lock-free version using atomic operations and synchronization primitives.

    • Detail your approach and use the right data structures and algorithms to ensure performance and correctness.

Requirements

  • !!! Do not use any of the C++ Standard Library (STL) components

  • BUT! For the lock-free part, use atomic operations from <atomic>.

  • The solution must be thread-safe and handle concurrent access.

  • Optimize for time and memory efficiency.

Evaluation Criteria

  • Correctness of the solution (required).

  • Performance and efficiency (20 points).

  • Code quality and readability (10 points).

  • Lock-free implementation (optional, 10 points).

  • Comments and documentation (20 points).

  • Tests to verify all class methods (20 points).

Recommendations

  • Think about the data structure you'll use for storing elements and their priorities.

  • For the lock-free implementation, get familiar with algorithms and synchronization primitives like CAS (Compare-And-Swap).

  • Modularize your tests to cover all class functions.

Deadline

Let's aim to have this ready within one week of receiving the task.

Well, an addition to the collection of test tasks. Writing an arkanoid in an hour or tanks in a week, that was it. Writing a program to calculate the propagation of a sound beam in a heterogeneous environment, that was it, but at least they paid for it. Writing “life” in a couple of days, that was it. And even though I was writing obviously unnecessary code on the pluses, for the team that makes the standard library for golang, it was still an excellent test of knowledge.

Are you probably waiting for feedback? It was a month after passing the test. Nothing between them, not even a hello bye, just an automatic response – we received your decision. I had to remind them about myself a couple of times, but in response I received the same automatic message, word for word. The third time I received a normal response, well, almost normal

Dear Candidate,

We've noticed that you put a lot of effort into solving this task.

You've done a commendable job addressing the challenges and have developed
a robust and proficient code that passed most of our tests with flying colors. However, it's worth mentioning that you didn't embrace industry-standard solutions that would enable other developers to reuse your work. Additionally, we observed a lack of focus on system-level error handling.

Best regards,
Golang support team

7. Beauty contest final

As you can see from the tone of the letter, it was time to hang up my oars. But the next morning HR scheduled another meeting, and about two weeks later there was the final stage, when an independent commission of 4 people read the reports of the people who interviewed me on a call, including the report after the system interview and the psychologist's resolution (they said this won't go away). They checked how well my experience and skills are suitable for different teams, and in general for the position of L4 engineer. Based on the total score, I did not pass the very position of middle go (L4) developer in San Jose, I did not have 3 years of security clearance (if I understood correctly, this is how long you need to live and work in the States to apply for this position), and I myself was not ready to agree to L3 (de facto Junior and there were no such conditions there). But there were two teams in Europe, one in Warsaw, the other virtual, completely remote, who were ready to take me on L4. In August 2023, they sent an offer.

But as you understand, there would be no article if I were there, but for now there is a breeze, sun and local sparkling wine.

Remote on not remote?

Remote or not remote?

conclusions

All the above adventures, read interviews, in one of the world companies, in my opinion, do not check absolutely any of the real skills. Well, except for the fact that you chilled on leetcode or codesignal, know the syntax of the language and understand a little about algorithms, about this in the next paragraph. These interviews absolutely do not check real knowledge of algorithms and the possibility of their application in real projects, because if the examiner himself looks at the answers on the sheet, “what kind of tanker is he”?

You can believe that knowledge of algorithms will teach you to program in pluses, goshechka or python, it will not teach – tested on a dozen students and interns. In the best case, your colleagues and you personally will spend a lot of time on training such an Olympiad-winning programmer, in the worst case, the Olympiad-winner will remain with his opinion that any task can be done through binary search. And the team will be left with unfinished tasks, and an acute allergy to students and juniors.

And also, interviewers from large departments and companies are not motivated to conduct adequate interviews, and I think this is deliberate; taking on stronger guys as colleagues means preparing a replacement for yourself.

Draw the rest of your own conclusions.

On the way to the next position in gaming

On the way to the next position in gaming

P.S.

More than half a year passed from the response to the HR letter to receiving the offer. Interviews were held every month, each lasting an hour or two on average, except for the first one. There were three DSA meetings, one on design, and one system + test task, I missed the non-technical ones.

There was a clear benefit from the attention of HR from a large company – HR from smaller companies began to come in more often, and they began to respond more willingly, even taking into account the redness of the passport.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *