The Unorganised Handover

There was a reorganisation of teams, so one team had to hand-over their code; do a presentation on the features, set-up etc. The live presentation starts:

“Dean, can you share your screen and do your thing?”

Manager / Meeting Organiser

“I wasn’t doing this one, or wasn’t planning on doing so. I joined the call just to watch.”

Developer

What a great start to a presentation. In the end, another developer just improvised and it was a bit mediocre.

Apprentice Insanity

An apprentice sends a code review with the following code comment in it:

“Need to check this logic…but right now; I may be going insane. Wait, WTF is this?”

Instantly, I doubt how good the rest of the code is. I wasn’t assigned to officially review it, but I knew the Lead Developer would tear it apart. Not just for that comment, but the Apprentice had written this as a disclaimer:

“There are no new unit tests because this will be submitted later. This work needs to be quickly checked in and tested.”

Even though he had already technically missed the deadline. Maybe he got special permission from the Product managers, but if not,  he had at least 2 weeks to work on it for the next release. 

Cutting unit tests probably cost him time in the long run. I wouldn’t imagine he wrote all the code and just tested it once. It would be a case of implementing the solution in stages, making tweaks and repeating the same manual tests with each change. If he had written the Unit Tests early, he could have run the tests as he is refactoring and adding features. Then in the end he would have fully tested code which works. Instead, he has untested code which we aren’t confident if it works properly, and wants to check it at the last minute with less time for the Testers to run manual tests against it.

3 weeks later, he still hadn’t checked it in. Probably a good job this change got rejected by a Lead Developer for not having Unit Tests.

I’ve seen this kind of scenario before where people cut tests or a feature that was “nice to have” in order to meet a deadline. They say they will finish it after it is checked in, but usually something with higher priority comes along and they do that instead. If it wasn’t important enough for the original deadline, then I guess it is deemed as extremely low priority by any manager. Then it never gets done.

It’s funny how many code comments you see along the lines of “//Check what this does”, “//Finish this”, “//check the performance”, and then you wonder:

  1. How did this get checked in? (well, probably fast-approaching deadlines like I’ve explained)
  2. What feature is missing? Is there a bug with this code?

If you write unit tests early, then you achieve a higher quality solution earlier on, and you gain confidence in the code. 

The worst scenario is: complicated code with no tests, written by an apprentice, who makes a statement which expresses his uncertainty if the code actually works.

Duplicate Wikis

Our repository has a ReadMe with some instructions in it. We also have 2 sub folders each with a similar ReadMe. We also had a team documentation website where similar instructions were pasted in.

I raised this with my team that if you want to change an instruction, you have to paste it in multiple places and it’s a bit silly. I did try and simplify it somewhat by reducing the amount of information: Just by using hyperlinks to direct you to where the more detailed information was.

I took some annual leave, and when I came back to the office, I found that we now have a GitHub Wiki and the ReadMes are closer to what they were before (my hyperlinks removed), but now with even more information on them.

Additionally, there was a Pull Request from a team member to update the main ReadMe with some incorrect information. I point it out to them, and they say “I pasted it in from the other ReadMe”.

Well, this is exactly why we don’t duplicate information, and why I raised this as an issue to the team.

If this was code, and not text, I know they wouldn’t do it. If you write some lines of code inside a method and need it elsewhere, they wouldn’t copy and paste it like a Junior may do. You would just reuse the method by calling it directly. If you copy and paste, then change one file; then there is a difference in behaviour and a Bug is introduced.

Since we are talking about text, you shouldn’t copy and paste it, you should use a hyperlink. Then you can just change the main source. Then there are no conflicting instructions. 

Always have one source of truth.

This is what I did. Why was it undone?

The Password Reset

Our IT department was configuring a new Laptop for me, and they contacted me stating they need to reset my password so they can do the final stage of the set-up.

Seems like a terrible process to me. Why do they need to impersonate me to configure a Laptop? Surely their privileges should be suitable to do their work?

I try to carry on with my work, but after my machine locked, I tried my new password but it wouldn’t let me in. I tried my old password and Windows accepted it, or at least initially. I then got the pop-up balloon that stated Windows needed my new credentials. So I locked my machine, tried to log back in, and Windows said I was locked out.

So I called IT and they unlocked my account but I still couldn’t get in. The IT guy said he would reset my password again. For security, he said I needed to state my line managers name. I said Alan. He said it was wrong, it is Louise. I said I had switched a few weeks ago. He reset my password.

There’s a couple of things wrong with this approach. I know quite a lot of people’s line managers, and this is information you can look up inside the company. So if someone is off on annual leave, I could ring up IT pretending to be my target, ask to reset the password, state their line manager’s name, and there you go; I have access to their emails and can do whatever I want under their name.

If I was an external attacker, I might not know their manager, or maybe I would have old information and could tell them their old manager. The IT guy should have just said I was wrong, and not tell me what the answer is. Anyone could say “oh yeah I’ve switched managers and your system is wrong”. Even if he did refuse to reset the password, I could just call again with the new information.

Why would you do something as major as resetting a user’s account when the supposed user got a security question wrong about themselves?

Inner Source

You have the concept of Open Source where anyone can see the Source Code and can edit it. With private repositories, only a certain group can see and contribute. One team in our company says their private repository is Inner Source, which means developers from other teams can contribute.

My team uses this team’s library and one of the members of my team was annoyed by one of their bugs, so decided she would fix it. She correctly assigns the Bug to herself, implements the fix, and sends a Pull Request to the other team.

After 4 days, there’s a Slack message posted in our channel asking her what the status is with the Bug. Their manager says that the Bug was planned to be fixed this month, and because it had been taken:

“This can cause duplication of effort and put our planned deliverable at risk”

How can it cause duplication? She assigned it to herself, and if other developers were dumb enough to work on it, then that’s their fault. They didn’t actually do any work on it though. What actually happened was they discussed the Bug in their “refinement session” and realised it had already been taken.

How can it put their deliverables at risk? If they planned 10 items and we took 1, that’s only 9 for them to deliver. They are now closer to completion.

I don’t understand why they keep boasting about being Inner Source, then they keep making things awkward for people when they contribute. 

  1. They seem to have an overly pedantic system of rules which keep being more complex as time goes on.
  2. They aren’t prompt with feedback, and aren’t that friendly when they do respond.
  3. They love experimenting with all kinds of tools, and they only make sure they are compatible with Linux, yet most other developers use Windows so sometimes struggle to contribute to their repository.

Also, the Pull Request has been open for 4 days. We want it checked in; you are putting our deliverables at risk.

New Tester

I didn’t think we really needed a tester, but months ago we put in a request for one. Now we finally have a new Automated Tester!

He is off to an amazing start…an amazingly bad start.

He did a bit of manual testing to understand what we have so far. He logged two bugs which are probably the same issue. On the stand-up, he says they are “minor”, so I assumed minor cosmetic issues.

When I encountered the issues, I would categorise them as major cosmetic. One of them was that the menu panel appears at the opposite side of the screen! How does that even happen? The second issue was that it sometimes didn’t appear at all! 

The control is completely broken then. I’d say it’s pretty urgent given how little features we have.

He then starts writing automated tests, and the first one he submitted seemed to be backwards. I told him the test didn’t make sense, he kept on saying “it’s just a sample”. I didn’t understand what he meant, it should be a valid test. It was on the lines of :

GIVEN I navigate to the LogIn Screen
AND I enter valid credentials
WHEN I click Log In
THEN I am taken to the Home Page

although what he wrote was

GIVEN I navigate to the Home Page
AND I enter valid credentials
WHEN I click Log In
THEN I am taken to the LogIn Screen

I told him the page names were the wrong way around. He was demanding I let him check it in because the test passes; it is fine. I told him if that test passes, I don’t trust the framework.

He then explains that the test finds the title of the webpage is “Home Page”, then you are redirected to the LogIn Screen. After you type your credentials and click Log In, you are taken to the Home Page. However, the check doesn’t wait for the page to load, so at the time it checks, it finds “Log In Screen”.

So the test is crap basically, but instead of fixing it, he specifies the wrong page titles to get the test to pass. The functionality is correct, but the test is Invalid but Passes.

I eventually (reluctantly) agree to let him check it in anyway on the promise that when he adds more tests, he also fixes that. A week or so later, he sends an update. You will definitely think I’m making these stories up.

GIVEN I navigate to the Home Page
AND I enter valid credentials
WHEN I click Log In
THEN I am taken to the Home Page
WHEN I click logout
THEN I am taken to the Home Page

Yeah, that’s right, we are always on the Home Page no matter what we do. How can that pass this time? I’m out of ideas.

Open Source Culture

Last year, a developer suggested we get involved in contributing to open source. It’s a good way of getting our company name out there and also it gives back to the community – given that we are using many open source libraries ourselves.

Recently, a developer had used an open source library, but needed to make a small change to it. He had created a “fork” which meant he had the code showing up in his GitHub profile. An audit report runs on our profiles and it was flagged up for investigation because the repository had “public” visibility. The intent of the report is just for someone to check we don’t have our proprietary code exposed publicly.

There was some discussion, with the end result being the developer was made to remove the code. He cited “they didn’t want my name being traced back to the business”.

I wish we would just commit to ideas. Are we Open Source-friendly, or not?

£24 a month Expenses

In the UK, it seems that if you are working at home, you can reclaim around £24 expenses from the government.

Due to Coronavirus, we are working at home, when we would otherwise be working in an office.

A couple of my colleagues were discussing how they are going to claim this money. I reckon, these people are on £35k+ salary, and I reckon they probably save money by being at home. They don’t have to pay for fuel, and save 30-60 mins travel time per day.

You may be thinking: if they are entitled to it and their costs really have gone up, then fair enough.

However, think of the current situation we live in. 

There’s all those people that have lost their jobs and are struggling to find new ones, self employed people that have had to close their business, all those people unable to work due to being ill, or isolating as a precaution. I was listening to the news on LBC Radio, and they reckoned “1 in 10 are expected to be unemployed”.

Then these guys are there in their privileged jobs, on high salary (compared to many), and can happily work at home, then demanding an extra £24 from the government which doesn’t mean much to them, but means quite a bit to someone else.

No doubt they are the same people that say “the NHS needs more money”, but are then claiming money they don’t need from the government. If your costs have gone up, and you want to claim, see the advice by Martin Lewis

People Not Actioning Pull Requests

I always think Code Reviews (or Pull Requests) are very important, but there seems a lot of people don’t seem motivated to actually do them.

I’ve complained to my team members for not engaging with Pull Requests. We say that we need 2 approvers before code can be checked in, but yet only 2 people (other than me) do them within a reasonable time, and there are 7 of us. So if someone is on annual leave, then the Pull Request is more than likely gonna stay there in limbo.

After complaining on two occasions, Sean finally completes one within minutes of one coming through. “Brilliant!” I thought, my words have finally got through.

I had a quick skim through the code and I was concerned about how many Unit Tests had been temporarily removed. Yet, Sean hadn’t actually flagged that up in his comments! He had overlooked such a blatant error.

The comment Sean left on the unit tests was: “no new line at the end of file”. That’s such a trivial thing, and GitHub actually flags that up for you anyway. There were some other comments on other files where Sean claimed that the “Code Analysis would flag these lines up”; however the developer hadn’t even changed these lines. The report wouldn’t have complained about them.

So he made a redundant comment, and some incorrect comments, and overlooked the massive problem that the developer had actually removed some tests. Presumably because his new changes broke existing functionality. It was definitely not ready for Code Review. It gets a good old “Needs Work” from me.

Maybe some developers just aren’t good at looking at code…

William Nonsense

While we are all working at home, teams have set up an optional call so we can socialise and try and keep the office banter. I was paired with William’s team. I have quite a few blogs where I comment on how poor William is at communicating; he constantly uses wrong terminology which causes all kinds of confusion.

A team member had suggested we have a main subject of conversation to start off with, so there’s always something to talk about. So we had subjects like “today’s news”, “sports”, “board games” etc. People were suggesting topics for Tuesday and the team agreed on “hobbies”. 

It sounds like on Thursday arrange the talk for Friday to be bobbies lol 

William

Okay, bobbies is a typo of hobbies. But, why would you phrase the sentence like that? Why not simply “tomorrow’s subject is hobbies”. Why does he need to mention today is Thursday? Why end the sentence with “lol”. It’s just complete nonsense.