Blackmail Hiring

A manager was talking about a former software tester, Aaron, who was regarded by many as a waste of time. He struggled to learn simple things, and you often had to explain concepts to him multiple times.

Many times I sat with him, and essentially did his work for him. I heard similar complaints from other colleagues.

The confession the manager made was: that Aaron actually failed the interview process. It was just that his friend Richard had recommended him, and when Richard realised that Aaron wasn’t going to be offered the job, Richard threatened to resign. So to appease him, Aaron was hired.

The thing is, Richard ended up leaving the company less than half a year later, whereas Aaron remained for years. Eventually, his manager lost patience with him, and Aaron initially moved teams and line manager.

His new manager wasn’t so patient, and issued him with a Performance Improvement Plan. Aaron’s position was finally untenable, so he finally resigned. No idea why we didn’t act earlier, but he should never have been employed in the first place.

The Name

I was peeking at Code Reviews and I saw this code.

retrievalUser.Surname = Formatters.ToTitleCase(usersName.Item as string);
retrievalUser.GivenName = Formatters.ToTitleCase(usersName.Item as string);

Notice how the code for both Surname and GivenName is exactly the same.

How can that possibly work? If “usersName.Item” is the full name like Alan Taylor, then surely if the UI shows GivenName and Surname, then it will be displayed as “Alan Taylor Alan Taylor” which is obviously not their name.

If this is some temporary code, then why haven’t they added a code comment next to the code to highlight that this needs replacing? Something like “Currently, the API only returns the full name so we cannot determine the users Surname and GivenName until version 2.1”.

Also, is it even correct to Title Case someone’s name? If you have a name like McDonald, wouldn’t this become Mcdonald? There’s probably loads of other examples too. I think the Dutch “van” is lowercase like “Robin van Persie”.

So there’s not much right with these 2 lines of code.

Crap C# Set property

I haven’t wrote a nerdy blog with code for a while. So let’s discuss C# Properties. A basic example could look like this:

private int _amount = 0;

public int Amount
{
   get { return _amount; }
   set { _amount = value; }
}

Here we have a property called Amount and the value is a number (int = Integer). You can get the value to see what it is, and you can set a new value. You could test it out with code like this:

Amount = 50;
MessageBox.Show($"Amount: {Amount}");

We set the Amount to 50. Then display the value in a message box. So this will display “Amount: 50”.

I saw a poor implementation of this basic C# feature. When I have come across crap code, I’ve sent it to my Apprentice to see if he understands why it is bad. This one caught him out.

This example looks similar, but notice the set method. It has a hardcoded value of 0 rather than the C# keyword “value”.

private int _amount = 0;
public int Amount
{
   get { return _amount; }
   set { _amount = 0; }
}

So what happens when you do this?

Amount = 50;
MessageBox.Show($"Amount: {Amount}");

Instead of showing “Amount: 50”, it actually shows “Amount: 0“. This can easily lead to bugs, or simply confuse a developer for a few minutes. The only way the value can actually be set in that implementation is via the “backing field”, the variable called _amount. This code will show “Amount: 50”

_amount = 50;
MessageBox.Show($"Amount: {Amount}");

Bonus SQL

I saw some bad SQL which I also sent to my Apprentice. I sent him this, hoping he’d maybe test it out, or maybe read up on bit fields, but he couldn’t tell me what was wrong with it.

declare @VerificationStatus bit
set @VerificationStatus = 2

A “bit” stores a value 0 or 1. So how can it be set to 2?

When you set it to 2, it doesn’t give you an error, it just sets it to 1. Any non-zero number is set to 1. This wasn’t the intention of the developer, he should have used an int. If he had tested his code, he would have seen it insert the wrong value into the table.

Could Not Find The File

I’ve no idea what the use case was, but someone wanted to use a really old test system, but when they tried to install it, they got an error message “Could not find the file Client_5.14.Zip”

After asking for help, he was told to copy the client patch from a back-up server, and place it on the Patch Server. Then when he tries installing the software, the version will now be found on the Patch Server.

He then claimed he had just done that but was getting the same error.

Now, logic says that he has done that wrong. How can you place a file in the correct place but the error still says it cannot find it. So either:

  1. He has placed the file on the wrong server
  2. He has placed the wrong file on the right server
  3. He has the correct file on the right server, but it’s the wrong filename or folder location.
  4. Some other combinations, but you get the idea.

So I remote onto the server and look at the folder. Order by date. There’s a folder created today called “5.14”. 

  1. So it’s a folder not a zip file.
  2. It has the wrong name. It should be “Client_5.14” not “5.14”
  3. It has the wrong file contents in the folder.

No idea where he got the files from, or why he thought that would work.

Product Names

Let’s say that the company I work for is “ACME” (classic fake company name). Our existing product is called “ACME Pro”, and our upcoming product is ACME-One. 

In the past, we have had inconsistent branding, with the company name written as ACME, Acme, and acme. We have tried to be more consistent and have discussed the importance that the new product is only ever gonna be “ACME-One” and the hyphen is very important.

Colin has been doing some work in ACME Pro, but it has some kind of integration with ACME-One. He had a database change and was populating the new table with values “Acme Pro” and “ACME One”.

I point out that the casing is wrong with the first product, and he has missed the important hyphen in the second product.

It would take him a few seconds to change it, whereas leaving it like that means it will probably be wrong for a long time and annoy pedantic/perfectionist people like me.

He replies “this isn’t user facing text, so it is not an issue”.

He really doesn’t care about quality. Also, one of the database columns is literally called DisplayName. Who is the text displayed to? If it isn’t an actual end user, it’s going to be an employee using some kind of configuration tool; and that is still a type of user. 

It’s also annoying for writing SQL queries, because you may type “where DisplayName = “ACME-One” but it won’t find it because the stored data is missing the hyphen. So you have to be aware of the misspelling in order for data to be returned.

Disable all the services

I was talking to one of our Test Environments Engineers and he was absolutely raging. He said he had spent the entire day looking into a ticket someone logged that stated they could no longer connect to their server.

The Engineer said he was panicking because he thought they had been hit by a malicious virus. All the services on the server had been disabled which is why you couldn’t connect to it by standard means.

After a bit of investigation and quizzing the person that logged the issue, they admitted to some key information. The server had been slow, so they had disabled every single service on the server in an attempt to speed it up…then rebooted it. But since many of the services are vital for the server to function, or at least connect to the server; then the server was pretty dead.

The Engineer was raging that the person that logged it failed to mention this on the ticket, which would have been vital to work out what was wrong and how to fix it. Surely he realised it was his fault that the server was dead, it’s just that he wanted to try and cover up his mistake.

Mid Year Review 2020

Intro

I’m not sure if the “end of year” coincides with the tax year, or if this “mid year” should have been a few months back, but the organisation of our performance reviews has been poor this year.

I think we were supposed to agree on some objectives back in January or something, which got delayed, I think this was mainly due to managers having to decide which crazy criteria we are judged against this time. I have ranted about different ways of evaluating performance, but they usually seem unfair and favour those who love to exaggerate or are a bit dishonest; which isn’t who you want to give pay rises and promotions to.

Anyway, the mid year review was booked in and I pointed out to my line manager that I have no objectives and haven’t prepared anything. Then he said “don’t worry, I’m just gonna free-style it”.

So much for being fair! In previous years we were told the strict process and consistency across the departments was for fairness. Now we have regressed for a pure free-for-all.

However, I’m not complaining because I hate the majority of reviews. I think you do have to be purely subjective when it comes to analysing developers, and I think you have no choice but to judge how well they fit in the team, which the manager should have awareness of. So I have more chance of finally being promoted under this unorganised style.

The Review

So my manager Chris, begins the meeting by explaining that he has got some notes on his own opinions:

“you’re the strongest developer in the team, or you are up there with the best”

Chris

and he has also asked for feedback from my colleagues.

“the biggest problem with working with him, is that he is too good”

Anonymous

“why isn’t he a senior yet?”

Colin

I know that one because Colin had personally called me last week and told me he had questioned it with Chris. No idea why Colin is lobbying for my promotion. 

I’m good friends with one of the Software Architects, and he has also been trying to influence Chris on my behalf. So I have 2 people protesting about it which is funny.

‘The promotion is finally here’, I thought. Then Chris starts saying that there’s been a bit of negative feedback too, and it’s my communication.

He said that I’m too cynical and sometimes put a downer on the outlook of the project. I wasn’t sure what he meant at first, but then I later realised that as a joke, when the slightest thing has gone wrong, I do say things like “the project is gonna be cancelled!”. Are people actually taking that seriously? It’s just over-dramatic comedy. Instead of Chris asking “how are your projects doing?”, he always asks “are there any projects on fire?” How is that any different?

I do wonder who doesn’t like my humour, since when I am on calls and say things like that, people in the team do laugh. Given that I write it on a lot of Slack posts, surely people understand it’s just a recurring joke; like a comedy sketch show. There’s plenty of witty humour too, not just recurring phrases. I bet it is Becky or someone with a similar personality because she just seems a bit out of touch with technology, and is a bit too serious. She also asks stupid things so I can be quite snappy in my responses on Slack, so out of everyone in the team, I bet her opinion of me is the lowest. At least I answer her questions, most people don’t even attempt to help.

Chris did say to maybe not joke around so much, apart from when I’m with him because he loves my humour.

Chris also started saying he needs even more evidence of my Senior qualities to take to Senior Management to persuade them of my promotion. Therefore I need to accept more responsibility and take the lead on projects.

I think I argued my case really well. Firstly, I said “how can I lead when we have loads of Seniors in the team?” They should be leading because it is their job to do so. The fact that not many show much leadership anyway means they are underperforming, and also I am held to different criteria. It’s also Chris’ job to decide who works on a particular project. So if I’m never the most senior in the team, then I can’t lead. That’s not my fault.

I also stated that I have been given these challenges like mentoring and I do show senior ability by doing all the Code Reviews, then nothing comes from it, not even a wage rise.  He kept on saying he needs evidence to convince the senior management, but I said that he has enough; he had said he regards me as one of the best developers in the team, and realises I was essential in dealing with all the recent urgent fixes that everyone shied away from. He can see that I’m one of the few developers that engages with the conversations on Slack/Teams. What is everyone else doing? Either doing their own work and they don’t care about the rest of the team, or they are simply chilling out.

He did ask why I thought I hadn’t been promoted in the past but others have been. I said others are probably a bit more firm in their demands and threaten to quit if they don’t get what they want, whereas I just get on with things. Also, the way we attempt to measure developer’s performance is just nonsense.

He did say to improve my communication, I need to show more authority and be more firm in my views. So I asked him for a payrise, otherwise I may have to quit!

Result?

It was funny how he said my humour was perceived to be a negative aspect, but I was running the Performance Review like a comedy show. I can’t help myself chipping in the humour. Although there is truth in my demand. If someone joined the company in my role, you can guarantee they would be on equal pay or higher, because I’m somehow still bottom of the salary band. He did promise to look into that.

He did conclude he would sort out my promotion, but when I pressed him on timescales, he refused to comment. No doubt I’ll have to wait another year or something daft.

Mentoring #3

I am mentoring an Apprentice who has never done C# before and this is his first programming job. So this is a diary of some-sort of his progression and my ability to mentor.

I found an example on the Code Review section of Stack Exchange by someone who was writing their very first C# program. I thought it was a good example to give to my Apprentice to test him out.

So I showed him the code, and asked him to explain to me what it was trying to do, if he could suggest improvements or spot any bugs. Basically doing a Code Review.

I thought he explained the code fairly well and struggled in places where the code wasn’t well-written. He did point out one bug and did hint at a few areas of improvement but didn’t seem sure on how exactly to improve it.

I then took him through some changes, and explained how the code could be improved. Most of the code was jammed inside one method so it was 300 lines long. I showed him how you can easily refactor the code into smaller methods using Visual Studio, and how to rename variables (with the advice of choosing descriptive names). The end result is code that is self-describing.

You can read the popular book Clean Code by Robert C Martin which discusses more ideas along these lines.

I told him it’s an important skill to read other developer’s code, since maybe you end up spending 90% of your coding time reading existing code (not sure of the exact statistic there, but it must be high). Also you will be doing it in the code review process.

He seemed to really enjoy it, and was grateful for my tips. I told him I will probably be testing him with more of these challenges, and I also expect to see him put my advice to use in his own code.

All Nighter

After my important bug fix was complete, it needed urgently testing, so a Tester worked overtime on Friday night and Saturday.

During testing, he found a bug, but it was completely unrelated to my fix. Still, he wasn’t to know that, and so when he raised it as an issue, my manager was panicking and trying to contact  some developers.

I didn’t see the message until Saturday 11am, but when I logged on and investigated it, I saw another message from my manager to liaise with Colin. Colin loves his overtime so had jumped at the chance to get involved.

When I managed to contact Colin at around 11:45am, he sounded like he was falling asleep. He then told me he was working 10pm to 4am to work out what was happening.

To be fair, he didn’t have the advantage of knowing what the original bug was or the impact of my fix, so I assume he spent a lot of time investigating that. The thing is, the only conclusion he had was that “it wasn’t caused by your change”. I worked that out within 30 mins; I didn’t need 6 hours.

The thing is, there’s no way you can work effectively that late at night; given that you have already done 9-5, and you have it in your mind that it’s now the weekend. To get back in “work-mode” and look at code through the early hours of the morning – it’s just madness.

The thing is, I worked on an important project with Colin a couple of years back. There were major problems with the code which were often caused by Colin. I fixed them during work hours. Colin was spending a few hours extra each night in overtime fixing other problems. He would then turn up late the next day, looking completely tired, and then wrote more crap code… then had to sort it out in overtime. Then it’s an endless cycle. If you want quality code, then overtime is not the answer.

Good Job

There have been a few instances of managers just regurgitating information, but when I think about it, I guess that’s just how the world is. Someone can report back to their manager and the manager has to trust what they say. Then that manager feeds back to their manager, and so on.  I guess you can’t expect them to verify all the information. That’s why you have a hierarchy and delegate, and get information fed back to you.

It’s quite funny when it reaches Director level, because I’m sure they literally have no idea what certain things mean because they won’t have more than a basic understanding of how software is developed. 

There was a really urgent bug fix, and I volunteered to do it. It wasn’t immediately obvious what the problem was, and I was getting a bit lost trying to debug it. Recreating it was easy, understanding why it wasn’t working was tricky.

Given the urgency, I requested help. I managed to get one of my close colleagues to help. He did point me in the right direction; he pointed out something I had overlooked. Then I came up with the theory of why the bug was occurring, and I was correct. At that point, fixing it was actually trivial.

He had to give feedback to my manager to confirm that he had helped, but he tried to make sure I got credit by saying that I did “a good job”. I know this because he screenshotted the Slack conversation and sent it to me.

I then received a message from my manager stating I had done “a fantastic job”. A day later, the Development Director messages me saying that she understands I have done “a cracking job”.

I love how the adjective basically increased in importance as it went up the chain: good->fantastic->cracking.

I did do a good job from a certain perspective. I did show good decision-making by requesting help to ensure the work was done on time. It definitely worked out for the better. 

Also, another developer should have actually picked this work up, but I detected his reluctance. It was one of those where it was quite late in the week, and we had to fix it with some urgency. He didn’t want the pressure/stress and responsibility. I did step up, and it was a bit more complicated than I initially thought, so I definitely mugged myself off there. 

I’d like to think I would volunteer for things like this anyway, but I am trying to be the centre of attention in order to force my manager to give me that promotion he hinted at. This has worked well, because the Development Director has been told about it.