Day 35: Chopped Candidate

Have you ever watched the TV show Chopped? If you haven’t, it’s a competition among 4 chefs. There are 3 rounds, and after each round, one of them is chopped (eliminated), until one remains. The winner gets a cash prize. This would seem like a good way to determine who is the best of the group, right?

The problem is how the competition is run: each round the chefs are given a basket of “mystery” ingredients that they can’t see until the round begins. And more often than not, the basket contains, shall we say, “odd” combinations. One such basket contained blood orange syrup, the African spice blend ras el hanout, hot cross buns, and lamb testicles. The chefs can add other staple ingredients, but those four flavors have to be featured prominently in the result.

And if that isn’t difficult enough, there is a time limit that is always ridiculously short. The chefs had 20 minutes to create an appetizer from the basket I described above: 20 minutes to create a recipe, determine what other ingredients to add, prepare and cook the food, and then plate it for a beautiful presentation.

I must confess that I find the show very entertaining, and have watched countless episodes. And I’m not alone: the show has been running for 44 seasons over the past 11 years. But let me ask you: if you were opening a restaurant, would this be the way you would select your head chef? I would hope not! Any restaurant that would spring surprises on their chefs and expect them to deliver first-rate food in impossibly short time limits wouldn’t last very long.

Which brings me to the point of all this: if you are interviewing for a programmer, do your interviews actually determine how well they would be able to work in your team? How positive their contribution will be?

Making a candidate live code a solution to a problem they’ve never seen before in a short period of time with people watching their every keystroke is the software development equivalent to being on Chopped. I certainly hope that your work environment isn’t anything like that. So why would you think that a live coding session in an interview tells you anything about their potential?

What artificial scenarios like Chopped or live coding interviews do is test a candidate’s ability to handle stress. Personally, I’ve never had a problem with live coding, but then again I’ve never had test anxiety in school, either. I’ve seen many talented developers choke under those circumstances, but that doesn’t mean that I wouldn’t want to have them on my team.

What does it say about your company as a place to work if the bar they have to clear is how well they can handle high levels of stress?

When I first started interviewing candidates when I was at Rackspace, the standard was to have one interviewer do a live coding challenge, and another ask one of those bizarre, abstract brainteasers (“Walk us through your thoughts…”). Once again, these practices just show how nervous someone is in what is already an inherently stressful situation. That link includes a juicy quote:

These types of questions are likely to frustrate some interviewees so watch out for those who aren’t willing to play the game. It’s an interview after all and you make the rules.

Mark Wilkinson, head of recruitment, Coburg Banks

It’s all a game to him, and if asking questions with no right answers eliminates potentially good candidates, tough. It sounds like he is more interested in seeing who can tolerate being bullied than finding the best people for his company.

After sitting through some of these types of interviews at Rackspace, I campaigned internally to change these practices, because I saw some intelligent and capable candidates get flustered and end up looking dumb. I found that there are better ways to determine if someone is a good addition to your team. Perhaps I’ll elaborate more about these in a future post…

Day 33: Discipline

Recently an online discussion about film vs. digital photography got me thinking. I absolutely love digital photography, and would never consider going back to film. Sure, it’s really tough to match the richness of color of Kodachrome 64, or the detail and subtle gradation of 4×5 black and white film, but to me, those are not the most important things when creating art. Those considerations are more like a measure of craftmanship than critical elements for conveying an idea.

However, I am so grateful that I grew up in the age of film photography because of the discipline it instilled in me. Every time you pressed the shutter button, you were spending money. Period. Contrast that to today, where images cost nothing: take a bunch of bad shots, who cares? Click the little trash can icon, and they’re gone. Doesn’t cost a cent.

If you were a poor, struggling student, as I was at the time, buying film was a good chunk of what was left of your money after paying for rent, food, and other essentials. So if I saw something interesting to photograph, I didn’t fire away, taking several exposures from a few different angles in the hope that one would be what I needed. Instead, I composed the image in the viewfinder, looking at it from various angles, and through this process learned to recognize what was important for the final image. Most of the time I walked away without taking the shot, because on further reflection, it didn’t seem worth it.

What if I had had lots of money to spend? I believe that I would not have developed the visual discipline that I have today, as there would never have been a need to limit what I shot. Without that discipline, I don’t believe that I would have become as good a photographer. Even today, with all my digital equipment, I still shoot as though every exposure means something.

In general, scarcity forces one to become disciplined. For example, when you grow up in an environment where food is in short supply, you learn not to waste anything, and to only eat enough to keep going. Back in the early days of computing, when both disk storage and RAM were expensive, you coded in a way to ensure that your program would fit into memory, and would require as little space as possible when written to disk. That parsimonious approach resulted in the “640K Ought to be Enough for Anyone” quote that Bill Gates never said, but keeps getting repeated anyway.

There’s something to be said for learning how to get through tough times. It’s a delicate balance, though – too much scarcity can damage you physically and/or psychologically. My mom grew up as one of six kids in a family during the Great Depression, and it definitely left its mark on her. She wasn’t a full-blown hoarder, but she definitely had a hard time throwing things away – “you never know when you might need it!” was her refrain. And we were not allowed to be fussy about the food we were served at mealtimes: you had to eat every bit on your plate before you could leave the table. That experience has had an effect on me, as I really hate to throw food out. Maybe it’s my mom’s voice still echoing in my mind.

Day 31: Using etcd As a Mediator

etcd is a database originally developed by CoreOS, and is most famously used as the database at the heart of Kubernetes. It is a distributed key-value store, which in itself is not all that remarkable. The thing about etcd that makes it so attractive is the ability to watch a key for changes.

Other key/value stores, such as Redis, have implemented a similar feature, and may work just as well for you. I’ve been using etcd for years, and it’s worked well for me, so I’ve never had a reason to try these other tools.

For most data stores, the only way to find if a particular value has changed is to poll. You issue a query for that value on a regular basis, and compare it to the last value returned to see if it has changed. This is terribly inefficient, especially with values that don’t change often. It’s also inexact with respect time, because your system’s reaction to a changed value depends on the interval between polls. Longer intervals, while less chatty, mean that more time will elapse between when the value changes, and when your application responds to that change.

Enter etcd. Instead of polling an etcd server for changes, you can watch for changes. This is essentially a pubsub system that requires almost no configuration to work. When a key is written to etcd, if there are any watchers for that key, a message is sent to them with the new value.

This is kind of dry in theory, so let’s look at a real-world application using this system: my photoviewer and photoserver applications. These applications allow me to display photographs on monitors that can be anywhere with an internet connection, and control each of those displays from a central server. They represent the ultimate convergence of my work as an artist and my love of programming.

Each display consists of a monitor (actually a TV, but all I want is an HDMI input) and a Raspberry Pi that runs the photoviewer application. Each display has a unique ID to identify it, and when a display starts up, it registers itself with the server. The server contains the settings for that display, such as the list of photos to display, and how often to change the displayed photo.

Photoviewer running in my kitchen

I have one such display in the kitchen of my home, and like to change the photos displayed on it from time to time. To do that, I go into my photoserver app and change the album for that display. Almost instantly the image on the display changes. How did that happen? The server is a virtual machine running in the Digital Ocean cloud, not local to the kitchen display.

The reason this works is that I’m also running an etcd server on another cloud instance. When I change any setting for a display, the photoserver app writes a new value for that display’s key. The key consists of the unique ID of the display plus the type of value being changed. For example, if I change the photos I want displayed for a display with the ID of 65febdde-3e8a-4c76-ab8f-d8a653e466c7, the server would write a value of a list of the names of those images to the key /551a441f-8aba-44b5-b70b-349af0be5b67:images.

That application uses the etcd3 library to watch my etcd server for changes to any key beginning with /<unique ID>. The watch() method is called with a callback method, and when a new key is written beginning with that display’s prefix, the value is sent to the callback.

The callback method sees that the full key ends with :images, so it passes the value (the list of image names) to the photo display method, which then retrieves the image and displays it. This happens in real time, without any polling of the server needed.

The original version of these apps used the traditional polling method, which seemed wasteful, considering that it was typically weeks between any changes being made. Switching to an etcd watch makes much more sense from a design perspective, and it greatly simplified the code.

Look for cases in your applications where a response is needed to a change in data. Using etcd as a mediator might be a good approach.

Day 29: Death to Superman

Have you ever worked with a large team on a complex project? Usually there is a mix of experience levels, and those with more experience create the application design as well as the workflow that everyone will use. They also serve as the disseminators of information, especially when a new member joins the team. They are the resources that help everyone become more productive

At least that’s how it’s supposed to work. In a company with a good development culture, knowledge is freely shared, and the goal of the senior developers is to help create new senior developers.

In other situations, there is a different dynamic: the overall knowledge of the project is in the brains of a select few developers, and they consider the intricacies of the application their domain. Often it isn’t a group, but rather a single individual in that role. They begin to act like Superman: swooping in to save the day in a manner that only they can do.

This is common in companies without a healthy developer culture. Typically there is a sole developer assigned to create an application, so of course they are the only one who knows how it works. Or the project could have started with a small team, and eventually everyone leaves the project except for one. Other teams that need that functionality need to go through this person, who is now the bottleneck, the gatekeeper. As new people are added to the team, this one developer keeps them dependent on him (yeah, it’s usually a man) by only sharing bits of knowledge only as needed, and not educating the new members. He tends to treat the other developers as inferior, and as a result, no one else feels competent to handle the work that Superman can do.

Back in the ’90s when I was a junior developer I was placed on a team that had exactly that dynamic. Someone would have a great idea, but nobody would act on it until that one lead dev signed off on it. People were even a little afraid to say that they thought it was a good idea, because if this Superman figure didn’t like it, he wouldn’t simply explain why. Instead he’d make you feel dumb for not understanding every implication your change would have.

Of course, when he wanted to change something, he just did it without involving anyone else. It wasn’t unusual to come in one day to find the part of the code you’d been working on had been changed, or sometimes even deleted. Needless to say, there was a general unhappiness on the team.

After a few months, Superman started throwing his weight around with our boss, taking the attitude “you can’t afford to lose me”. It worked for a while, but after one particularly obnoxious outburst, our boss called his bluff, and Superman quit on the spot and stormed out. Everyone on the team was both relieved that the source of tension was gone, and also afraid of how much more work this would mean for us. We were all afraid that the project would founder, and we would have to re-hire Superman, who would then be even more insufferable.

To our surprise, it wasn’t all that bad at all. Everyone started exploring the code base a bit more, now that we didn’t have Superman to supply that knowledge and make those changes. We started talking among ourselves about things we thought needed to be changed, and team members who were always quiet began to speak up more. The entire dynamic of the team changed for the better. And instead of the project falling apart without Superman to lead the way, it got better. Maybe no single person knew the entire code base like he did, but we all learned a lot more, and with people working together, got more done. We divvied up the code so that each person was responsible for learning that part well enough to be a resource to the others. Knowledge was once again being shared.

So while it’s good to have some knowledgeable people on a team to serve as guides for the newer members, it can become toxic with the wrong people and the wrong environment. If you’re on a team with such a toxic member (or members), don’t worry about what would happen if they left the project. Inevitably, the team will be better off without them. Speak with your manager if they aren’t already aware of the situation, and try to come up with a plan to spread the knowledge around better. And if you are told that they think things are fine the way they are, that’s a very strong signal that it’s time to update your resume. It’s not worth the mental toll to remain in a toxic environment.

Day 10: Missed Opportunity

It’s been a little over 2 months since I became one of the 40 million people in the US who lost their job as a result of the COVID-19 pandemic. In that time I’ve been reaching out to people in my network, tracking LinkedIn regularly, and keeping an eye out for a new opportunity.

I’ve applied to over a dozen companies, and out of all of those, only one even bothered to write back that they didn’t think I was a good fit for them. For the rest, it was as if my application had been sucked into a black hole.

Until yesterday. I got an email from a well-know tech company saying that they were impressed by my experience, and so we arranged for a video interview with the hiring manager. Finally, it seemed, the world of employment wasn’t looking so bleak!

For the record, it is not my intention to embarrass this company, so I shall not name them. They seemed genuinely interested, and the people I dealt with were both professional and pleasant.

The interview yesterday went well. I was impressed with the hiring manager, who seemed very sharp. I got the impression he was likewise impressed with me, since he told me he would refer me forward to the next phase of the interview process.

A couple of hours later, though, I got a call from someone in HR at this company. The hiring manager had mentioned to him that I was looking for remote work, which I always state clearly up front. It turns out that even though their entire company is working remotely now due to the pandemic, once that’s over they expect everyone to work from one of their offices. In other words, though working remotely has kept the company running, they will not hire anyone who isn’t located where their offices are. As I am not in a position to relocate now (and besides, I love San Antonio!), I politely declined to continue the hiring process. The HR person mentioned that there is talk of opening up the company to hiring remote workers, so I told them that if that ever happens and I’m still available, I would be glad to help them transition to a remote-friendly culture, as I do have a bit of experience with it.

Before the pandemic, it had been very difficult for me to understand why so many tech companies resisted remote work. I suppose its the old “if I can’t see you, how do I know that you’re working?” attitude. But now that they have been forced to do it by circumstances, you’d think that they’d realize that there is no reason not to embrace it, and many reasons to do so:

  • You now have access to a much wider pool of talent
  • Relocation expenses are eliminated for most hires
  • The amount of office space you need to run your business is kept low
  • Processes are documented better
  • Workers are generally happier

One of the supposed advantages of working in an office is the spontaneous conversations that happen – the proverbial “water cooler” discussions. Sure, these can be helpful, but all too often the fruit of those discussions is never recorded. When you work with a distributed team, it forces you to document these things, usually in email or a Google doc. Such documentation is helpful for preventing misunderstandings down the road.

Unfortunately, it seems that many companies are cutting edge of tech, but very slow learners when it comes to hiring remote workers. So I’m back to looking for openings and filling out applications. And that company is back to looking for the talent they need to grow.