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.

Mentoring #2

I think I’ll end up writing loads of blogs about mentoring my new Apprentice. It’s going to be an interesting journey for sure.

  1. He doesn’t know C# or SQL and that’s a prerequisite
  2. He has never used our software before
  3. It’s his first software job so knows nothing of the process

I explained to him that this team is really difficult, but historically, we have always thrown juniors into a team like this, much to the protest of many. This team deals with a wide range of bugs, and often requires good knowledge of requirements, and excellent debugging skills. We also get really tight deadlines, since we are given all the “Major Incidents” which can have 1-3 days deadlines. It’s unfair to put that much pressure on an inexperienced developer.

I told him it’s a “sink or swim” type approach, but strangely I can’t think of anyone that quit. When I was a Junior, we all complained about this, but yet everyone stuck around and became good developers.

I was telling him my long journey into development, and told him it takes years to get good, although maybe I was just slow because I was extremely casual. He reckons he can learn within a few months. I think he is ambitious, but I reckon he can learn like 10 times faster than I did. He can put more effort in, and I can guide him.

I was telling him how I haven’t been given guidance on how to be a mentor, but I can just freestyle it. I told him I’d like to be the mentor that he expected to have. I mean, he is an Apprentice and has been here a year without anyone actually being assigned to him. That is such a classic thing to do: hire people on the promise of training and good things, then they get here and they are never assigned any official training.

Mentoring Again

Background

A few years back, I was assigned an Apprentice to mentor. I said I would love to do it, but I questioned why the Senior Developers in the team didn’t have anyone to mentor when it is literally in their job descriptions.

At the time, my manager said that she thought I’d be the best mentor in the team, and if I do it successfully, then that is good evidence I can be promoted.

I think the mentoring went successfully, but I didn’t get a promotion.

Present Day

Fast-forward to the present day: My new manager said that an Apprentice is joining our team, and out of everyone, he reckons I would be the best mentor. If I do it successfully, then that is good evidence I can be promoted.

I said I’d love to do it. This time I didn’t complain about the Seniors not mentoring. I didn’t want to risk my manager reassigning the Apprentice. I have a good feeling my manager will actually promote me, but we will see.

The Future

I had a chat with my Apprentice. He has never done C# before; but it’s vital to our team. We already had a lack of developers – and a lack of skilled ones. Now we have someone who has never seen the program we are working on, and never used the language it is written in. He has come via a bootcamp that taught him basic Web Development, so that’s some wasted training.

This means that I’ll have to spend a lot of time training him, which means my productivity to bug fixes/enhancements will drop. Our team’s productivity was already low, and now we have another member which is actually going to decrease productivity. I hope managers realise this.

I think I’ll have to encourage him to learn as much as he can on his own. I’ve sent him a C# ebook which is pretty comprehensive. He has access to an online training platform to watch in his own time, plus all the rest of the free content on the internet.

This is another topic to write about on the blog. It can document me learning how to teach someone from scratch, and also document funny mistakes he makes.

Team Summary

The team is showing unwavering commitment, innovation, resilience, and drive to deliver continuously. I’ve never seen anything like it in the years I’ve been here.

Head of Development

I always say that managers often show a massive disconnect from reality. They seem to praise when the team has performed poorly, and I think this is another case of that. I went through our team’s changes in the last month. Merges are trivial and I don’t really count them as real work, but I’ve included them in the table anyway. 

Here is the analysis:

NameMergesFixesMy View
Me14I’ve been disappointed in my productivity. However, I haven’t done that bad when compared to everyone else. Additionally, I have got loads of changes in a branch, on hold; awaiting confirmation of actual requirements. 
Senior Dev111 (mainly small items)Decent work, but really only cherry picking “quick wins”
Colin4 (made a massive mess of one of these, made a bit of a mess with another. I think the other two were primarily to teach people how to merge [ironically].)5 (I believe 2 of these fixes were issues he created in the other 3)Colin wasted a lot of time by making a mess of a merge which introduced at least one bug, and he made a mess of one of his other changes. He claims he has been more productive whilst working at home.
Colin 203 (1 of which was removing an unused using statement)With only 2 real changes, one of which was small and it didn’t work properly; this is terrible performance.
Rob02Rob has been real quiet. I think he had a bit of time off work, but still, this is poor
Beavis01Beavis was primarily just making excuses why he can’t work. To be fair, there was one week where he was doing some other work for another team.
Total626
Our “drive to deliver

So in a month, we haven’t done much work. I’d be interested to calculate what the average amount of fixes developers do each month. It’s a bit meaningless because a fix could take an hour, and another fix could take a week. However, you would think it would average out over a period of time.

I’ve never seen anything like it. I might use that as a recurring phrase from now on.
My manager actually said to me that my efforts “haven’t gone unnoticed”. I didn’t bother to correct him. I think I need to play up the delusion to try and get a promotion. Honesty never got me anywhere before.

Press F5 to launch

I had a look at my old team’s work to see what progress they have made and to reassure myself I had made the correct decision to leave that project. 

Not much has changed in months. All the issues we had haven’t been fixed. There’s errors logged to the console window, there’s loads of buttons that don’t work. There’s a few small features but nothing works properly. 

What made me laugh was a button that said “Press F5 to launch”. It’s a website. Pressing F5 isn’t going to launch a dialog; it’s going to refresh the page in the browser.

Maybe there is a way of overriding the browser’s refresh behaviour but that would be very annoying to the user.

What I don’t get is: how someone came up with that requirement in the first place, someone else implemented it and somehow didn’t realise it wasn’t going to work. Although surely they did realise when they wrote some code to do it, then pressed F5 and the page refreshes…but then checked it in anyway.

Honestly, you just can’t get the staff.

HTML Encoding

A developer wrote some code that tries to extract text that looks like HTML tags. So if you have <h1>, <div> etc in your text, he was basically just deleting the HTML prior to saving it to the database. 

The thing is, the code just looked for a “<” then a “>” and removed everything between. So if you had a sentence like “the value is ❤ and >1”, then run that through his code, the returned value would be “the value is 1” which has a completely different meaning. You could have paragraphs of text between these characters, and his code would just delete it.

Not sure why he decided to hand-craft his own solution. There will be more official ways of encoding HTML.

Just Copying What Was Already There

My manager calls me and says there is a bug that might end up holding the release, and wondered if I can help. He said it was found when testing Colin’s work, but it might not actually be related to his changes. 

Colin had been given some other work and he was taking ages on it,so wasn’t available to complete this work himself.

So I call Colin and ask him what this bug is. He sent me the description from the tester (Becky) which was next to useless, he showed me his recent changes, and a specification from his project. Colin assured me that his changes should work, because he just “copied what was already there”.

It seemed like everything I needed, so I got digging into the code and testing it out.

It didn’t take me long before I realised what Colin had done. There were two scenarios that he needed to check. By copying and pasting what he saw in that file; he was just covering one of the scenarios. The other scenario was actually in another file, and he would have realised that if he actually tested it.

The thing is, my first thought was to add a unit test to cover the scenario. I checked for existing unit tests for that file, and there were some existing tests. Colin hadn’t bothered adding additional unit tests; which would have made him realise that his changes didn’t cover both scenarios.

Then days have gone by, the manual testers have finally got round to testing out his changes, and logged this issue just days before the release. 

Then I have to save the day once more.

It’s so annoying/stressful when you get given a bug to fix with strict deadlines, but luckily it was very easy to fix. If Colin had shown a bit of effort, then we wouldn’t have been in that situation.

Finishing the Apprentices work

In a previous blog, I was criticising some work done by an Apprentice: Apprentice Insanity

What actually happened with this is that it got deprioritised so was just shelved for a couple of months. Which is weird, because the original developer made out it was very urgent and wanted to check it in at the last minute.

When it was decided it was needed again, who got asked to finish it off? 

Yeah! me! What are the chances of that?

The Fix

The work was to show some messages to the user why a feature isn’t enabled for them. There can be several different reasons, but we never told the user why, until now.

So I load up our program with a valid user… I can’t use the feature anymore, and it tells me 5 reasons why I can’t use the feature. It’s completely broken then. A valid user should have allowed me to use the feature, and obviously show 0 reasons.

So I fixed a few bugs, and now I can use the feature, but there are still 3 reasons displayed. So it says I can’t use the feature; but I can, and I know I should be able to. 

I spent a lot of time looking through the code, and I saw that there is an existing file that did the validation, but the apprentice had created another file with some other validation rules in. If it is the same rules, then we are checking them twice? If they are different rules, then you end up in a situation like this; where I can use a feature, but the other file’s validation tells me I can’t.

So I end up deleting this extra file, and make the existing file be the code that returns the failed rules.

The new dialog he added looked nice enough, although the dialog was a bit small, and a few aspects of it wouldn’t actually meet our UX standards. When I looked at it, I saw that he had positioned all the controls by hand for a particular size, and so I had to do a lot of rework to get the controls to work on a larger dialog.

He also had code with complicated logic to adjust the size further. Complete hacky. So I got rid of all that too.

There was some other hacky code where he even had a comment along the lines of “for some reason the control can be duplicated, so if this happens, then we need to remove it”. After some experimentation and debugging, I eventually worked it out. What was happening was that the initialisation code was calling his new method twice. You would think that means the control was always added twice, but it wasn’t.

It turns out that there was some existing code that checked if a control was in position 1 in the grid, and if it was; it was then removed. Then there was some logic to re-add it based on a condition. So the control in position one is optional.

Position 1Control that sometimes gets displayed. Put new control here?
Position 2Control that is always displayed
Position 3Another Control that is always displayed
Illustrating the grid layout. There are 3 rows which can have controls in.

The Apprentice was adding his control to position 1 in the grid, but if the other control was there, then he added it to position 2 instead. So what was happening is – if he added his control to position 1, then the existing code then removed it, then when his logic is executed the second time, then it gets added to position 1 once more. So it displays correctly, but works “by coincidence”. 

If the existing control is added to position 1, his method then adds the new control to position 2, so when it executes the second time, it adds a duplicate to position 2. So then his hacky code kicks in and removes the duplicate. The simple solution; just create a new row in the grid for his new control. Delete the duplicate call. Delete the hack.

So it seems like he got into a mess by trying to cut corners, put in a hack when it didn’t work, but then it only worked intermittently and he didn’t understand why… so then put in some more hacks to cover it up. What you end up with is nonsense.

In the end, I had completely rewritten it, made the UI nicer, and got rid of all the bugs. Result.

The Demo

We had a demo arranged with someone who was basically representing a user. I was going to demo my code, but, an hour before the meeting, I got an important meeting invite. As a joke, I asked the Apprentice if he could cover me. He said he would be happy to do so. I told him I was joking, but if he really wanted to do it, then it would be appreciated. Like a nutcase, he agreed. With only about 45 minutes to prepare for the demo, I told him I had completely rewritten his code, so he may be a bit lost. 

He chose to demo from his existing, broken code.

My meeting turned out to be really short, so I joined the demo as the Apprentice was trying to explain a feature, after it crashed and somehow wiped the contents of an existing dialog, much to the confusion of the Representative.

I saved the day at that point and demoed the proper, working code.

Afterwards, one of my colleagues said to me 

How the hell can you demo something THAT broken?

concerned colleague

I said he is “a complete legend”.

The Proxy

A new customer reported a particular feature was broken. This feature used a web browser (Chromium) to work.

A developer spent ages trying to work out what was going on and realised that the site had an invalid proxy script. The invalid script was causing a crash within Chromium, rendering this feature completely unusable.

Due to a typo in their proxy script, their proxy wasn’t blocking access as described by the script; it was basically “anything goes”.

The developer told them how to fix it, and we thought it would be case-closed. However, now that the proxy blocked access to websites as defined by their IT department, their employees started complaining.

Instead of the IT department:

  1. tweaking the rules, 
  2. Disabling the script completely
  3. or simply informing their staff that these sites were blocked according to their company policy

They decided to revert back to the original broken script. This obviously made our software break again. 

Really, it was a problem with Chromium, the software used in Google Chrome and now Microsoft Edge. Obviously, the workaround is to actually set a valid proxy script, but they decided to be awkward.