paint-brush
The Clever Programmerby@themachine94
11,269 reads
11,269 reads

The Clever Programmer

by theMachine94October 26th, 2024
Read on Terminal Reader

Too Long; Didn't Read

A story of how a final year student with lofty credentials joined our small team.
featured image - The Clever Programmer
theMachine94 HackerNoon profile picture

I was living and working in a small city in northwestern Germany before the COVID pandemic hit. I was working at a small startup. I was one of 7 engineers at the company. Despite us being a very small team, my coworkers were some of the smartest people I've ever worked with. We built a native desktop application used by Mechanical Engineers to design parts. These parts were the kind that went into cars and planes and such. It was a 3d modeling (CAD) program so naturally, whenever we hired a new engineer or had an intern, we preferred people who were good at math, geometry, writing low level high performance code etc. When we interviewed candidates, I was given the responsibility of doing the technical interview. I had prepared some programming tasks that reflected the skills we want in a candidate. I'd ask the candidate to solve the problem and talk through their thought process. Even if they don't finish the solution in 45 minutes, it was a useful way of learning what they know and how they think. Other members of my team interviewed the candidates for other criteria such as personality etc. This had worked really well and we had hired some really talented and motivated engineers. We were all pretty good at what we did and we respected each other.


In early 2020, we had a final year student from the local university reach out to us asking for an internship. I took a much needed vacation and went to Berlin for a couple of weeks. So I was not around to do the technical interview. My manager and the rest of the team were super impressed with the student during the interview, and his resume was exceptional. We had never had an intern before. My manager thought a technical interview might be unnecessary for an intern. So he decided to have him start working with us without a technical interview. I came back from my vacation and was told about the new intern that was gonna start the week after. I had to supervise this intern's work. Basically, make sure he understood what had to be done, answer any questions, unblock him in anyway possible. We had already laid out the set of problems we wanted the intern to work on. From now, I will refer to the intern as Stefan. Around this time, there was a lot of talk of the Corona virus spreading in Germany. It was everywhere in the news. We were a small team and we were used to working in close quarters, asking each other questions, brainstorming on white boards etc. But alas, exactly one day before Stefan joined us, Germany went into full lock down. We all started working remotely from home. We struggled with remote work during the first few weeks. I being the supervisor of Stefan's project, I told him he can reach out to me with anything he needs to get going. In case I was away or busy, other team members were happy to jump in and help Stefan out.


Our code base was a mixture of C# and C++. All our users were on Windows, so we wrote the front end and anything else that was not performance critical in C#. All of our numerical algorithms, 3d rendering and anything that was performance critical was written in C++. Most of our team members were proficient in both languages, some specialized in one or the other. Stefan claimed to be very proficient in both C# and C++. On his first day, I was on call with Stefan for several hours explaining our code base to him, getting everything setup on his local machine so he can get started. Stefan was a little nervous, and said it had been a while since he wrote C++ or used Windows. Stefan daily drove a Linux machine. He seemed to struggle to write C++. I figured he is a bit thrown off having to work in a new environment, new code base and decided to help him out until he gets going. So we pair programmed for the next couple of hours. He needed me to help him write code one line at a time. He kept doing silly mistakes in his code, and needed me to correct them and show him the right way to do things. I thought this was a bit odd but decided to give him a chance anyway. I hoped that by the end of our call Stefan knew enough to continue working on his own.


To my delight, the next day I didn't hear from Stefan. I messaged him and he said he's making progress and didn't need anything from me. I was happy to hear that. I could focus on my own work. But the day after, Stefan reached out to me again asking for help. To contribute to our application, Stefan had to write both C# and C++. He had to write the numerical part of the algorithm in C++, and wire it up with the front end and do a few other things in C#. When Stefan reached out to me on day 3, he hadn't made any progress with his C++ code. It was mostly where we left off at the end of day 1. But he made a lot of progress with his C# code. He was attacking the task from both ends at the same time. Stefan proudly showed me the things he wrote in C# on day 2 without my help. I read through the code and was blown away by it. The code was of really high quality. It was concise, elegant and effective. Stefan was actually really talented, I thought. Maybe he was indeed a little rusty with C++ syntax and language details, but his C# code showed that he was generally a good programmer. I figured this was a good sign and that he will likely improve his C++ code very quickly. This encouraged me to help him with his C++. I once again spent several hours on day 3 pairing with Stefan, helping him with his C++ code. This cycle repeated one more time. Stefan went off on his own and write C# code on day 4, and came back to me asking for help with C++ on day 5. At this point I was starting to get suspicious. The level at which he needed help with his C++ code was not consistent with the high quality C# code he wrote. In C++ he seemed to struggle with basic concepts, how computers work, how memory works etc. Obviously C# is a garbage collected language and you don't need to know memory management, but something didn't feel right and I couldn't quite put my finger on it.


A whole week had passed. As a team that was used to working in the office, we all hated working remotely. At this time during the lock down, we were allowed to gather in groups of 7 or fewer people. A coworker, let's call him David, invited me and a couple other coworkers to his house for a barbecue during the weekend. He lived not too far away from me and we had done stuff like this before. The weather was nice, we were hanging out in David's backyard with his wife and 3 year old daughter. We grilled and ate meat and vegetables, had a few beers and the mood was very mellow. David's 3 year old daughter was serving us dirt in little plastic cups pretending it was ice cream. Needless to say, I didn't fall for it. David brought up the topic of Stefan and the conversation went something like this:


David: How is it going with Stefan? He had reached out to me asking for help a few times in the last week.


Me: Oh, Yea I also helped him quite a bit. He's just getting started so I didn't mind helping him. What do you think of him?


David: Yea. I was quite impressed by his work. He is writing really high quality code and seems to know what he's doing in C++, but struggles to write good C# code. I've been helping him write C# code.


I asked David: "Wait, do you mean it the other way around? Because I think his C# is very good but he sucks at C++." As soon as I finished the sentence, we both understood what was going on. I had been spoon feeding Stefan C++ code, which he showed David as his own. And every other day, David was spoon feeding Stefan C# code which he showed me as his own. I was impressed by the quality of David's C# code, and David was impressed by my C++ code. On the one hand, David and I had this beautiful bro moment of how we admired each other's code. But that moment was over shadowed by the fact that we were both duped by Stefan. This was straight out of a story, but happening in real life. It was like the story of that guy that didn't know how to play chess, but manages to draw games with two grand masters by playing them against each other. Stefan was pulling this off in real life. Stefan didn't know shit. We hated ourselves for taking a week to realize it. To be fair, had we been in the office this trick wouldn't have worked. We fell for this because of how bad we were at communicating while working from our homes.


When we returned to work next Monday, I told Stefan not to bother David and to only ask me for help. It soon became really obvious that Stefan didn't know that much about programming, math or geometry. It was clear that his resume was full of lies. He just happens to be a very smooth talker, and has a talent of sounding like knows a lot. That skill got him the job, and fooled us for a whole week. The more I worked with Stefan, the more I reviewed his code, the more incompetent he turned out. I was finally seeing who Stefan really was, his true programming skills. I am not sure if incompetent is the right word. Stefan wrote bad code, but it was bad in a strange way. When I asked him about it, he gave strange answers. Here's an example that really happened. I once told Stefan something like: "… So you want to get this integer value, and if that value is between the lower bound and the upper bound, you should call this other function … Is that clear?". Stefan assured me he understood what had to be done. When I looked at his PR the next day I saw something like this:


int value; // Assigned from somewhere.
for (int i = lower_bound; i <= upper_bound; ++i) {
  if (value == i) {
    do_stuff(...);
  }
}


I was blown away. This wasn't just bad code, this was something else. I remember being young and being bad at coding, but my bad code was never like this. This was another dimension of weirdness. Even as a novice programmer, I would have never thought to write code like this. The choice of looping over all the integers between the bounds was strange enough, but what really blew my mind was the fact that even when he finds a match and calls the function, he never breaks out of the loop. He keeps checking the remaining values. How? I asked Stefan why hadn't he simply done:


if (value <= upper_bound && value >= lower_bound) {
  do_stuff(...);
}


Upon receiving my suggestion to use simple inequalities instead of comparing against every integer in a range that could be 10s or even 100s of thousands long, Stefan commended me for coming up with such a good idea, and pushed the new change to the PR. Every time Stefan struggled to do something, we'd give him something easier to do. Surprisingly he'd fail at that too. It was a short internship, so we didn't bother too much with Stefan. After some time he ended up doing non programming tasks, managing things in spread sheets and other ad hoc tasks that needed to be done. The original projects he set out to work on proved to be far beyond his skills. Somehow, Stefan had completed his 3 month part time paid internship. He wanted to continue working for us through the summer. He had pitched a new research project that would be useful for our company. When my manager asked me if I wanted to continue working with Stefan for another 3 months, I said NO. I reminded my manager how horrible his work over the last three months had been. But my manager was an optimist. He had faith in people. He asked me to think of myself when I Stefan's age, in college and learning things for the first time.


My manager asked me to think it over and asked me to consider giving Stefan another chance. In all honesty, when I was Stefan's age, I was writing 2D games in JavaScript using the new fangled (at the time) HTML5 canvas. Stefan was truly incompetent, even after adjusting for his age and experience. But far worse than his incompetence was his dishonesty. In any case, I didn't want to take this decision lightly. On the one hand, maybe Stefan is capable of learning, but on the other hand he is dishonest. I read through the proposal he wrote down for the new research project. The idea was very novel, and if it works, would be very useful for our company. It was truly impressive. But then I had a moment of clarity where my cynicism took over the optimism my manager tried to instill in me. I became fixated on one word from Stefan's research proposal: '2-manifolds'.


Having worked with him, I knew how incompetent Stefan really was, and there is no f**king way he knew what a 2-manifold meant. I copy pasted Stefan's research proposal into an online plagiarism checker. It was years ago and I forgot which one it was. I just searched on google and used one of the top results. The plagiarism checker found a 97% match with a research paper and provided a link the original. Stefan had copied the whole thing. The next morning I spoke to Stefan about his research proposal. As soon as he started speaking it was clear he didn't understand what he was talking about, and it was all just a word salad. He was being a charlatan again. I let my manager know and this finally broke his faith in Stefan. Stefan didn't work for us again.


The only thing Stefan was good at was selling himself, and to seem like he knew what he was talking about. I understand there are professions where these skills can get you quite far, e.g. Sales. But I thought it was peculiar for someone to try and bull shit their way through a technical career such as software development.