“Human Resources”

Managers often talk about “allocating resources” when discussing project teams. I don’t understand why we are dehumanizing people. Why can’t we just say people/staff/developers? If we are talking about money or hardware, then it’s fine to use the term “resources”. However, the term seems to be embedded in the business culture since the department that deals with people is often known as “Human Resources (HR)”.

I was watching all the Bourne films recently, and in the scenes where you see staff in the agency office who are monitoring security monitors – they say lines like “Asset is on the move”. It probably makes sense here to dehumanise people; because your end goal is to kill them, so calling them “assets” and using terms like “dispose”/”eliminate” probably removes you from the fact that this is a person who has feelings and a family, and you’re about to end them. Maybe managers talk about people in this way so it’s easier when it comes to redundancies. “Cut 10% of the resources, and move on”.

I think it isn’t even that effective to talk about people using their job roles. When managers only look at the Job Titles and not the individual skills, then they end up creating imbalanced teams. This could be that you need to spread a certain skill across teams such as SQL Databases, so a manager who only looks at Job Titles could end up putting the people with SQL skills together.

Additionally, some Seniors aren’t that great, and therefore lower-ranking Developers are better than them. I’ve definitely seen it happen where managers create a team consisting of 3 underperforming seniors, then wonder why it isn’t working. This was a source of my frustration a few years back and was some major motivation to start this blog. 

Creating a team based on 3 underperforming developers is a rarity, but a recent trend for us is to have only 1 Senior leading a few Developers and a Junior. If the Senior isn’t very good, then the team has no guidance at all.

In conclusion, I think managers should show respect to staff and refer to them as people (not “resources”). They should also try to understand where individual people’s skills are, rather than simply making assumptions based on a Job Title. This should lead to better balanced teams. Balanced teams should lead to high performance and morale.

Nerd Christmas

Joke

Several years ago, I invented a nerd joke and always recall it each Christmas.

Q: Who brings presents to Database Administrators?
A:Santa Where-Claus

Nerd Code

No idea where this picture came from, but I found it whilst looking through my pictures folder.

Nerd Christmas Tree

I found this in my chat history. It was a conversation between two software developers in the office which I overheard, then shared with other colleagues:

James: “Did you get your Christmas tree?”

Dave: “yes”

James: “Can you program it?”

I didn’t expect Dave to actually respond “Yes” then start talking about looping over the lights. It seems that programmable Christmas trees are a thing. I suppose it’s obviously a possibility to hook up some lights to an Arduino/Raspberry Pi etc.
It looks underwhelming to what I thought it would be.

Privacy Cookies

When you visit a website and have to consent to cookies, the user experience is often confusing. The wording, or the appearance of controls look like they are designed to mislead.

Sometimes when you see options and they look disabled by default, I wonder if I am misunderstanding what the dialog represents. So even when you close the dialog, have you really consented?

Additionally, how do I really know that my options have been saved and used correctly? Unless I see an advert for something I looked at on a particular website, I am oblivious to what a website stored about me, or sent on to their many partners.

Someone has made a short “game” which illustrates how bad these consent dialogs are.

https://cookieconsentspeed.run/

String comparisons

We recently had a controversial bug where our software was showing female-related information for males. Another team was responsible for the code that generates the warnings, but first I had to check we were passing in the correct information.

For males, we were passing in “Male”, “Female” for female, and “Unknown” if the information wasn’t stored. This looked correct, although using text in this way easily leads to bugs as I will soon discuss.

Another point of contention here is that if this is representing Gender, we aren’t providing enough options for today’s culture. More controversially – throughout the codebase, we are sometimes labelling this Sex and other places it is Gender. The user interface labells it Gender, but then the database column says Sex. 😬

This is obviously going to lead to problems if the developer uses this data in a way that wasn’t intended.

I was surprised users hadn’t flagged this as an issue because surely someone would be offended by the limited options and the way we display it. Also, some features of our software could easy display misleading information (just like the bug I will discuss).

So back to the main point of this blog. We were passing in what looked like the correct data, but then I looked at the other team’s code. It was actually worse than I anticipated.

if (sex == "M")
	criteria.Add("Sex = Male");
else
	criteria.Add("Sex = Female");

Whoopsies. This is wrong on so many levels.

First of all, the method call asked for a C# String which is: text of one or more characters. There is a special type called “char” to represent a single character. So if they only wanted 1 character, then they should use the “char” type. However, using char still has similar flaws like I explain in the next paragraphs.

Performing String comparisons is bad because I could pass in “Male”, “male”, “MALE”, “m”, “m” etc, with similar permutations for “Female” and “Unknown”, and I could have also passed in some complete nonsense. What happens if I pass in “Thing”? surely it should throw an error because that is invalid? Instead they treat “Thing” as a “Female”.

This has caused the behaviour we were seeing. We pass in “Male” which seems like the correct thing to pass in, but because “Male” doesn’t equal “M”, the method treats “Male” as “Female”. It also treats “Unknown” as “Female”. Even if they had used char types, we would still see problems when comparing “M” to “m”, and “U” would still be treated as “Female”.

A more robust solution would be to define an Enum type of all the states, then check for certain types explicitly, but throw an exception for anything that doesn’t match the conditions you have defined. If someone adds more cases to the Enum in the future but doesn’t modify your code, your code will cause a crash. At least that highlights a problem rather than causing unexpected behaviour, or causing offence to users or their customers.

It can look something like this. (You can use a “switch” statement if you prefer).

if (sex == Sex.Male)
{
   criteria.Add("Sex = Male");
}
else if (sex == Sex.Female)
{
   criteria.Add("Sex = Female");
}
else if (sex == Sex.Unknown)
{
   criteria.Add("Sex = Unknown");
}
else
{
   throw new ArgumentInvalidException(sex);
}

I was going to suggest that if they had written unit tests, then some of these problems would have been spotted earlier. However, if they were barely thinking about the code they were writing, then no doubt they would come up with unit tests to check that “M” returns “Male” and “F” returns “Female”, and wouldn’t have bothered with other scenarios. You would have thought someone that code reviewed it would have spotted it, but they must have lazily done that too.

Dealing With Software Support #2

I recently had to deal with another company’s software support team, and this was the second bug I had logged. The first bug didn’t go well at all. For this second issue, I had provided them detailed recreation steps, and videos of the issue occurring.

After I logged the issue, they said they would investigate and get back to me shortly. After nearly 2 weeks, I received an email requesting to arrange a phone call. I thought he was going to give me some news but he wanted me to demo it. So I asked him what that would give him over the videos. He said the videos I sent him wouldn’t play. Brilliant.

I didn’t understand why the videos won’t play. I recorded them using the Microsoft Game Bar feature and they ran fine on my machine. Instead, he wanted me to record the video with Powerpoint. This is bonkers. At least I learned that Powerpoint can record screens. It’s quite useful because you can zone out a tiny part of your window to record…but then there is no option to simply record the full screen!

The problem we had was that our software was intermittently crashing when it was interacting with theirs. However if you changed some Security settings in their software to “never warn me about suspicious activity”, then the crash didn’t occur. You would have thought it should pop up a message box rather than crash. So I asked their Support specifically if he had any idea why this would happen. If it was something I could change at our end, then maybe I could quickly resolve the issue.

“Our software may be thinking this 3rd party app is suspicious. And disabling that security setting helps!”

Support

Well, that sure was helpful. I bet he referred to Captain Obvious for that one.

Why is it intermittent? Why would it think our application is suspicious? why would it crash instead of popping up a message if it was suspicious? My line of questioning is to prompt him into getting to the bottom of the issue but it seemed he couldn’t be bothered investigating or even logging it with their Development team with this information.

I was also annoyed how he kept on chasing my responses when I’d barely had any time to respond. In his email signature, it said he was working 9-5:30 Monday to Friday, and he sometimes sent emails at 8pm on a Friday. Then I’d also get an email 9am Monday reminding me that I haven’t replied to his last email. If he doesn’t work weekends, why does he assume I do? He has literally given me 0 working hours to respond. 

There were even occasions where he wouldn’t even chase me by email, but would chase me up by an actual phone call that I didn’t agree to. We had put our IT’s department’s phone number on the Support ticket. I told him many times to contact me by email, but we can arrange a Microsoft Teams call if we need to talk. He would then email saying he couldn’t get through by phone. So I would remind him

“The phone number is for our IT department. I don’t have a direct number.”

Then he would sometimes respond with something similar to:

“We tried to connect you by phone, but unfortunately unable to connect”

Support

Absolute wind-ups.

I find that they always want to arrange calls, even though they end up asking something that can have been addressed by email. They must get reviewed by how many calls they make or something. I don’t understand the advantages. Being put on the spot to give information over the phone isn’t as effective as asking in an email and waiting for the person to have time to acquire the information when they are free. But maybe that’s just my preference? Still, they should respect the customer’s preferences.

At one point, he suggested that the reason why some users didn’t encounter the issue was due to a different “Microsoft .Net Framework” version installed on their machine. I asked him the best way of finding this information out. He replies with the following: 

I found the framework version in the error listed in Event Viewer for the affected machine. You can check if they are different by comparing a working machine and non-working machine.

Support

Do you see a flaw in their plan?

A working machine doesn’t log an error in the Event Viewer:smile:

Database Patching – Everything Is Fine

When it comes to changes to the Database, we have a tool (which I will call DBPatcher) which runs your changes, runs the Unit Tests and runs Code Analysis (finds bad formatting, violations of coding standards, common mistakes etc). So it is vital that this passes successfully before you send your code to review.

I was doing a Code Review aka Pull Request (PR) and I saw evidence that they hadn’t run it through this DBPatcher tool.

Ronald was eager to get his code checked in, so wanted me to approve. However, I wanted them to run the tool and fix any issues first. The conversation went like this:

[Thursday 8:21 AM] Ronald
     Can we complete the PR? do you have any doubts on it 
​[Thursday 8:23 AM] Me
    I'm convinced DBPatcher will flag those select statements because there is a mix of tabs and spaces
<yes it is trivial to flag, but DBPatcher will flag this, so this is evidence they haven’t run it. There could be other errors too, but I will let DBPatcher find them>
​[Thursday 8:23 AM] Ronald
    OK, thank you. I will complete the PR 
​[Thursday 8:25 AM] Me
    what? I am saying the DB patcher will give you errors
​[Thursday 8:26 AM] Ronald
    sorry for misunderstanding 
    I ran it in the morning. We didn't get any error for our DB changes and unit testing also didn't throw any error for our code
<he attempts to send me a screenshot of the final result but it didn’t seem to transfer>
​[Thursday 8:44 AM] Me
   The image isn't showing for me. But since I started running DBPatcher when you messaged me, and mine has just finished, I can only assume you disabled the "Run Code Analysis" to speed it up
​[Thursday 8:45 AM] Me
    In fact, there's some failing unit tests too
<this is contrary to what Ronald claimed. He said there were no Code Analysis errors and no Unit Test failures, and I see both.
[Thursday 8:45 AM] Ronald
   I have enabled those and haven't unchecked it before running the patch 
​[Thursday 8:45 AM] Me
    What is in the output window?
​[Thursday 8:46 AM] Ronald
    yes there are some errors, but not related to our code and our schema 
​[Thursday 8:48 AM] Me    
DataWarehouse
Error on line: 12
ColumnListFormatting: Select column list incorrectly formatted
<clearly his code>
​[Thursday 8:50 AM] Ronald
    oh ok 
​[Thursday 1:19 PM] Ronald
    we resolved formatting in our SQL commands 
    we couldn't find which unit testing is failing and we are not sure if this unit test is part of our project. Can you help us with this one ?
​[Thursday 1:21 PM] Me
    
|20|[DataWarehouseTest].[Test1] |Error |
|21|[DataWarehouseTest].[Test2] |Error |
|22|[DataWarehouseTest].[Test3] |Error |
|23|[DataWarehouseTest].[Test4] |Error |
|24|[DataWarehouseTest].[Test5] |Error |
​[Thursday 1:26 PM] Ronald
    
I ran the DB patcher 20mins ago with the code analysis checked and we checked the output results also, we couldn't find anything related to DataWarehouseTest 
Attached the DB patcher output result we got 
[DBPatcher OutputResult.txt] 
<I look at the file. It has hundreds of errors, so it is hard to make sense of. His database is clearly screwed. No wonder it was running quick and he couldn’t see any Unit Test errors; they simply weren’t running>
​[Thursday 1:31 PM] Me
    your database looks absolutely messed up. You shouldn't have those errors. The unit tests are failing to run

C:\DatabasePatcher\tSQLt\RunAllUnitTests.sql
Could not find stored procedure 'tSQLt.RunAll'.

    you need a new database.
[Thursday 5:50 PM] Ronald
    Thanks for notifying us of these issues.
    Now we have fixed these issues and ran the patch, and there were no issues with our project.
​[Thursday 5:51 PM] Ronald
    please review it from your side 

I then look through their changes which fixed the unit test. With Unit Tests, you usually create a variable called “Expected” then set that manually. Then you create an “Actual” variable and this is set based on the actual code. They had those statements as normal, but then they had added this:

update #ActualResult set SessionGuid = '38090f0d-3496-48c3-a991-a0220fe3b58f', SlotGuid = '0b817794-7ffb-4ae3-8013-a7847a1b2139';

So this means their code isn’t returning the correct result, but they are then manipulating the result (#ActualResult) to force it to match – so the test passes. They could have just changed the Expected result, but that would be sabotage anyway. Why would they knowingly break a feature like this?

Anyone who is serious about software development shouldn’t be doing this. They have “Senior” in their job title, and this change was approved by two of their team members. It was up to me to be the gatekeeper and reject this change.

[3:51 PM] Ronald
Sorry for the unit test update statement, I have removed those and all the unit tests are passing correctly.
Sorry, that was some typo.

A typo!? How can you possibly claim that was a typo? “Sorry, I accidentally bashed on the keyboard and somehow produced a sequence of characters that was valid: not only to be executed without error, but for the unit tests to pass too.”

I also don’t understand how you can have hundreds of errors and just continue working like everything is fine. Then when someone is telling you something is wrong, you still pretend everything is fine. When I tell him he hasn’t run DBPatcher, why didn’t he respond with “I did, but there were loads of errors. Can you help me fix this?” Proceeding like he did just wasted my time, created unnecessary friction and made himself look like a complete idiot.

Gender Pay Gap

We recently published our Gender Pay Gap figures, and HR and Directors love to hype it up. However, I read this definition we put out with our results, and wondered how useful it actually is:

The Gender Pay Gap GPG is the difference in the average pay and bonuses of all male and female employees across an organisation. This is different to equal pay which is the comparison of the amount a male and female gets paid for doing the same job.

Mean %Median %
Gender Pay Gap 20207.31.5
Gender Pay Gap 201911.25.1
Gender Bonus Gap 2020-28.514.1
Looks like we have reduced the Gender Pay Gap, although it looks like some women are getting massive bonuses to skew the mean
Pay QuartileMen %Women %
Upper7426
Upper Middle6634
Lower Middle7228
Lower6733
Seems around 2/3 of our staff are men, although women are getting those Upper Middle management jobs

So I’m not sure what these figures mean. I think these vague figures mean that we are grouping together Directors, Managers, Developers, Support Staff, Admin staff, maybe even cleaners. Then we split them by gender and publish the average.

Even if it was grouped by department, I’m not sure what you could take from the results, although I would quite like to see it. There’s not many women Developers in the UK offices, but there’s a fair amount of Software Testers, and plenty of Managers. I’ve no idea if the average manager gets paid more than the Developers but it could be possible women get paid more in our Department.

I think the second set of figures show how I imagine the Development Department is. There’s generally more men everywhere but the managerial roles that women seem to favour – are higher paid. So the highest proportion of women are in the “upper middle” (34%).

But you can’t conclude anything from these figures other than we probably need more women in general. What we need are the Equal Pay figures, but even then, I think there will be plenty of people that aren’t fairly paid regardless of gender. I wrote about how I was unfairly paid recently and I ended up with a promotion and ~£14k rise.

These somewhat cryptic statistics don’t really mean anything and just seems like a token gesture to appease those that would actually benefit from them if they were accurate. What I always find strange is that the HR department is mainly composed of women, and if these women are actually seeing a problem with Equal Pay, then surely they should sort it because they should have the power to do so.