Coding Tales #1

I haven’t written many blogs talking about code for a while, but my notes are stacking up; so time to post some blogs discussing code! I’ll try to explain them the best I can for the non-programmers, or those that find C# hard to understand.

There was one bug fix where the developer took several attempts to fix it. Taking several attempts to fix a bug illustrates that you either – don’t have a good understanding of:

  • the requirements,
  • or the codebase that you are changing.

If you make a change and it introduces a bug, then you make another change and it introduces another – instead of playing “whack-a-mole”, it’s worth considering if you are actually writing the correct fix. From my experience, you can often just take a step back, ask for help, and come up with a much simpler, and less risky fix.

In one of their changes, I saw evidence that it was possible that they didn’t understand what they were changing, or taking care in their work.

case ParentRecordRelationship.Grouped:
//when a record is grouped, the associated text is NOT altered - so this method should not be called
   throw new ArgumentException(string.Concat("Invalid parent record relationship supplied: ", parentRecordRelationship));

So we have a comment, explaining that the existing requirement is that the “associated text” is not modified, so it is completely invalid to call this particular method which would change the associated text (other code not shown). Therefore, we throw an exception which would cause the system to show an error to the user.

The developer changed the code to this:

case ParentRecordRelationship.Grouped:
    newAssociatedTextValue = CreateAssociatedTextValue(string.Format(_groupedWithFormatText, parentrecordOriginalTerm));
     break;
//when a record is grouped, the associated text is NOT altered - so this method should not be called
//throw new ArgumentException(string.Concat("Invalid parent record relationship supplied: ", parentRecordRelationship));  

So now he has allowed the text to be updated in this situation. Unless that really is a change in requirements, then this is the wrong thing to do. Also, instead of deleting the code that throws an exception, he has just “commented” it out (which is why it now shows in green), and also left in the actual comment saying that this scenario is invalid; which now adds to the confusion when the next developer reads it.

To me, that shows that the developer is uncertain it is the right thing to do, otherwise you would remove the comment and the code. Just “commenting” the old implementation out basically acts as a reminder that you might want to restore it. (You could easily just look at the history of the file to see the old code anyway, it isn’t like it is lost if you actually delete it in the first place.)

He also added to the confusion with this change

//take the 1st 12 characters of the format text
itemValueStartsWith = _combinedWithFormatText.Substring(0, 12);

it is now

//take the 1st 12 characters of the format text                      
itemValueStartsWith = _combinedWithFormatText.Substring(0, 9);

This is a good example of why writing comments for simple code is bad. The comment explains a requirement that it should take 12 characters, but you can see that it takes 9.

To me, this shows a lack of care, and lack of attention to detail – which are basic traits that I think are important for good software developers.

Training

Cost

One of the software testers was saying that they have been asked if they are interested in participating in a C# Programming course, with the aim of gaining skills to possibly allow them to write automated tests.

My opinion is that a 3 day course probably isn’t going to teach them anything that a video course wouldn’t (such as LinkedIn Learning or Pluralsight which we have access to). Also, there’s plenty of free resources like Microsoft’s own websites.

I was shocked at how much the training courses cost:

  • Programming Foundations (3 days) – £2975.00
  • The C# Programming Language (4 days) £4425.00

Maybe these courses include some kind of mentoring (which give an advantage over online videos), but given we employ loads of developers, surely a couple of people would be willing to volunteer to run some sessions internally. It would be much cheaper as long as they can spare the time.

Earlier in the year, to transition to a different form of Agile development (SAFe), we were sending some Product Owners on a training course. But not all of them. The ones that were sent were expected to then train the others. Nice money saving tip there.

Agile Training

Even when you go on training courses, how much information do you even retain? We did hire a SAFe trainer to present to the entire department, giving a general overview, but it was about 3 hours long and I couldn’t focus because the content was boring.

A week later, I was discussing how we currently worked and wasn’t sure where some responsibilities lie.

Colleague: Why are the roles/responsibilities so blurred? Where are the clear definitions of who does what?
Me: If you turned up to the training and listened, then you would know...but I turned up and didn't listen

Another colleague said that the training apparently costs £900 for 1 person – and it was for everyone in the department. Crazy.

Compliance Training

Every year, we have to complete some basic training courses. It just involves reading pages of information, then completing a multiple choice test. We have so many of them that we basically do 1 or 2 per month. There’s often a few questionable questions that we end up having a laugh about.

Fire

“If you hear the fire alarm, wait a moment to see if it is just a test.”

That’s not the normal advice is it? I’m sure the previous training has always said that you should be told the exact time when a fire alarm test is going to be. Any other time you hear the alarm, then you leave the building promptly via the nearest fire escape. If you are supposed to wait, you may as well use that time to grab your belongings. How long is a “moment” anyway. It never stated how you verify it is a test.

Security

Natalia’s Instagram has been hacked. Should she change her password first, or tell her customers

Why haven’t the hackers changed her password already? If they haven’t, surely you need to do it before they do. It only takes a minute to change your password. Surely, that comes first, then you can tell your customers. The training said you should inform your customers first.

you don’t have to follow the same level of security for all of your accounts.

Is that even good advice? I mean, most people probably do it like that, but everything should be secure. If someone can gain access to one of your accounts, they may be able to use that to get extra information about you to help them hack into your other accounts.

It is okay to write passwords down, but not on post-it notes.

I’ll write them down in a book labelled “Passwords Do Not Read”. Seriously, what does that advice even mean? A good password is one you remember. But writing it down is probably better than not being able to get into your own account. Maybe that is the point but the course didn’t explain it well.

Me 14:57:
someone follows you into your workplace and asks you to hold the door as they have forgotten their access card. Should you stop and challenge them?
-to a fight
-Rock paper scissors
-to a quiz
-Pokemon duel
Paul 14:57:
LOL
Are they actual answers??
Me 14:57:
no, it was true or false

Work Environment/Health & Safety Training

Good posture requires you to keep your feet flat on the floor or on a footrest.

Don’t footrests make your feet at an angle?

I love doing training about good posture whilst leaning forward at an angle. I do find it hard to sit like the training implies. It seems unnatural to have everything perfectly straight. I tend to slouch and constantly change position throughout the day.

The air in your environment should not be uncomfortably dry – you shouldn’t find your eyes or nose drying out.

is that even a thing?

Welcome to this course on Display Screen Equipment (DSE).

“Take appropriate action to prevent ill health when using DSE”

Do we really need an abbreviation for that? Can’t it just be “monitors”. It makes it sound like we work with asbestos or some hazardous material. 

“Your wrist and forearm must be supported when using a pointing device”

I’m trying to picture someone using a laser-pen with their wrist and forearm strapped to a plank of wood.

There was a section on different decibels of various environments. Libraries are apparently fairly noisy…

Me 16:20:
which is louder, a library or living room?
Andy 16:20:
libraries are notoriously quiet
Me 16:21:
have you done this Health and Safety training?
the library is louder. Even a wooded area is quieter
Andy 16:21:
this sounds rubbish
Me 16:21:
what happens if you have the TV on
or is that with the tv on
because it's a lot louder than a bedroom
Andy 16:22:
there aren't any of those areas at work
maybe a 'wooded area' at a push
Me 16:23:
did you know a conversation is louder than an office?
Andy 16:24:
haha shut up now
Me 16:25:
well, that's one way of reducing noise!

How can a conversation be louder than an office when offices contain several conversations? Is it comparing a face-to-face conversation vs a silent office?

Later on, there was a question about why water is bad for electricals. Since it is multiple choice, some of the answers are a bit silly.

Me 16:32:
Water can increase the power of the electricity and cause the equipment to work too fast.
Andy 16:32:
haha
Me 16:32:
I once overclocked a PC by spilling a drink on it
we should log a ticket - "build server is performing slow and needs to be watered"
Andy 16:34:
do you mind watering our build server while we're away on holiday and feeding the Load Balancer?

Bribery and Corruption

There were various scenarios and you have to state if it is a bribe or not…

“An offshore agent was dishing out bribes”

I think you have just given away the answer.

“We uncovered inappropriate payments…”

Sometimes I think these training courses have no effort put into them. It’s innappropriate, so I would say it is a bribe.

There was a question where it says something along the lines of: “Sean happens to have a relative who works for your company, and Sean is bidding for a contract. The company wants to accept Sean’s offer because he has put forward the best proposal. Is there anything wrong with this?” Options are:

  • Yes, Sean should not have sent the offer because it’s unprofessional
  • We will look conflicted if we do any future work.
  • Not at all, provided Sean has the skills that we’re looking for

I selected the last option, but I was wrong, it is the second option. An explanation was provided “recruiting people who are related to employees, clients or suppliers is not prohibited, but the appointments must always be made on merit and in line with company policy.”

Wait…I was correct then. It is fine to accept Sean’s offer.

Environment Training

This last answer made me laugh:

Why is it important for our Company to care about the environment?
A) To increase our productivity and cut costs
B) Because the environment is an invaluable source of resources that are necessary for our continued business
C) To take part in the latest management fad despite it having no real benefits

MANAGEMENT FAD.

AI picture generators: Part 2

I’ve been playing with one of those AI picture generators; stabilityai. I was trying to think of ideas that are a play on words, or scenarios that you wouldn’t imagine a character to do – similar ideas to what Jim’ll Paint It would do.

Check out part 1 here

It seems like it knows who Jabba is, but has decided to use it’s own interpretation. It’s like a dough ball monstrosity
Another Star Wars one. Looks like some rubbish Cosplayer
Again, it seems to know who Postman Pat is, but has gone for an abomination
If you blink a lot, maybe you should go see an optician
Sum 41 probably like doing sums
Don’t lick metal, kids
Greta Thunberg at the World Pool Championship. A random mashup.
An actual Jim’ll Paint It suggestion: https://www.facebook.com/JimllPaintIt/posts/pfbid02a2aLNTagnhotRKfyECsjzPgTnds1cmL4AtVjAiSe7GaxgP73XTjdc76K9yPgXrk2l
A random one my friend came up with. Ex-footballer Ian Wright

Windows 11 Upgrade

At the end of May, our IT department began upgrading everyone to Windows 11. Around a month and a half later, in mid-July, they announced that the upgrade had been a success, and managers were congratulating them on a good job.

40% of clients have had a Windows 11 attempt.

IT Manager

40% seems very low. The thing is, if you actually think about their phrasing, they say “attempt” so it wasn’t necessarily successful. I’d like to know why 60% of computers didn’t even attempt to upgrade.

For me, it failed twice. After the first failure, I asked how much space was required because I was sure I had at least 10GB, and I was notified of the failure when Windows popped up an alert saying I was completely out of disk space.

“About 10GB should do it (this has been confirmed in the testing phase).”

IT Manager

So it is confirmed but they aren’t sure on the exact amount of space we need.

I cleared out 20GB for it, and it still wasn’t enough. Unless it failed for some other reason. I started browsing through my hard drive and found a secret folder. There was an ISO file for the upgrade which was 5.2GB but then there was also an extracted version of another 5.2GB. So the temporary files they are using is 10.4GB but yet they claim you only need “around 10GB”. No, you need 10.4GB for the installer, and another X amount to actually install it, but maybe 20GB wasn’t even enough. 🤷‍♂️

There was also a file with an interesting name “RunOnce_Do_NOT_Run.bat”. I wonder what that means. Was the file created with the contradictory name? Or did someone run it once, then rename it? 🤔

Over 2 months later, they instructed people to trigger the upgrade again. This time I had 40GB free and it upgraded fine. If it did fail again, only then would IT investigate what the problem was. Surely loads of failures are just down to low disc space, but their script never checked before attempting, nor did they publicly confirm how much space we even needed.

Absolute shambles.

FENSA Inspection

Recently, I replaced all the windows and doors to my house using a local company. Most windows were installed well, but some windows had minor scratches/scuff marks which they replaced, but they replaced them with scratched ones. They replaced them again…with scratched ones. More importantly, I had one window where there was a draught coming through each of the 4 sides of the window, and when they put a new window-ledge in, they managed to crack the wall all the way down to the skirting board.

“FENSA is a government-authorised scheme that monitors building regulation compliance for replacement windows and doors.”

https://www.fensa.org.uk

I kept on giving them a chance to fix the issues but they often delayed. I thought I could complain to FENSA, but in hindsight, they seem useless. You can opt in for an inspection, but they may not inspect your property if they have done enough inspections for that particular company within the year.

When I received a FENSA certificate, I assumed that I would not be getting an inspection. The FENSA certificate should be their approval to say it has passed their standards, but receiving it without an inspection seems like it’s not worth the paper it is written on.

A few days later, I received another letter from FENSA. It was a duplicate certificate. How do you manage to send 2 certificates out? A bit of a shambles.

A few weeks go by, then I receive a call from some other inspection company saying they would like to come round for the inspection. I was quite excited for it, because surely they would fail the inspection and I could get them to reinstall windows that actually work, and fix the damage to the wall.

The guy that turned up was in a FENSA uniform which was confusing since that wasn’t the company that called. I thought FENSA was outsourcing the inspection, but he seemed like he was actually from FENSA. He “inspects” the downstairs windows, and by that, I mean he glanced at them and used some sort of electronic device against each pane of glass (he just pressed it against it and it beeped, no idea what it was actually doing). He then said “I think that’s all done then”, and I was like “erm, don’t you need to go upstairs?”.

So he goes upstairs and does the same with the bathroom and hallway, then he was about to go back down until I reminded him that he hasn’t looked in any of the 3 bedrooms. In one of the bedrooms, he used the device against 1 glass pane and was about to walk out, but I pointed out there was another 2 panes above the main window.

We get into the problematic bedroom, and I explain the problems with the draught, and the crack in the wall. For the draughts, he said he could see sealant around the windows so it was fine. I told him originally there was no sealant, but I got the window company back in to seal it. However, there were still a few sections where a draught was coming in, and if a draught is coming in, there must be an entry point outside the house too. He said he wasn’t gonna check outside. He basically said that he just checks there are windows, and there’s a decent amount of sealant around them. Any draughts or other damage are outside the scope of what they check. For the crack in the wall, he said it looked like the crack had been there a while, so he thought I was falsely blaming the window installers.

I expected FENSA to act as an Ombudsman that would step in to resolve disputes. I thought they would have a high standard of quality and actually carry out a thorough inspection. You know; get ladders out and check the minor details with fancy equipment. Then give you a certificate only if it passes their rigorous standards.

What happened was: they sent me a certificate to say it has passed (twice in fact), then sent someone round as a token gesture who couldn’t wait to leave as soon as he came through the door. Probably wasn’t even 10 minutes to check 9 rooms and 2 doors.

I thought it was like when software developers create a “Pull Request” for their peers to review against the “coding standards” and “best practices”, but all their colleague does is casually glance at it and click “approve”. There’s no real “quality gate”, people are just box-ticking without any thought to bypass the process.

Employee of Choice Update – Claimed Changes

Intro

Recently, my employer announced an “Employee of Choice” scheme. It wasn’t clear if this was an official award or a self-awarded title. Essentially, they want to improve a few key aspects so that current employees would recommend working here.

There were a few key pillars: Culture, Leadership, Employee Rewards and Terms, Work Environment, Processes, and Branding.

Many people were sceptical that there would be any meaningful improvements.

A post was recently published, detailing the current and upcoming improvements. I feel many aspects are just “clutching at straws”; it just feels like they are blagging aspects. Although some points are nice sentiments, they don’t offer real value or a long-term change. 

Claimed Improvements

CULTURE

1. For the Employee Of The Month/Quarter awards, we shared video testimonies from nominators. 

2. Webinars, and suggested further reading.

Coming Soon:

  1. Comprehensive induction for new starters, and a “New Starter Pack” of company branded items (drinks bottle, pen and paper etc).
  2. Improve support/recognition for long term employees (7+ years).
  3. Provide examples of ‘collaboration’ (which was one of the lowest scoring attributes on the survey)

Verdict: I’ll probably write a blog on Employee of The Month, but I think they often get unfairly awarded. Making someone (who nominated the winner) record a video could just discourage people actually providing nominations. The webinars could be appreciated by some people but it’s basically a motivational talk which not everyone will care about.

GREAT LEADERSHIP

1. Webinars.

Coming Soon:

  1. Comprehensive induction for new managers.
  2. Consolidate materials from across departments to increase consistency.
  3. Calendar of events. 
  4. Improve training resources​​​​​​

Verdict: Basically everything is just “coming soon”, so no changes here.

WORK ENVIRONMENT

1. Delivered DSE (Display Screen) Assessment presentations to all departments.

2. We’ve analysed employees’ postcodes to see if they are in reasonable travelling distance to an office. 

Coming Soon:

  1. Promotional videos for our offices
  2. Presentations for hints/tips on the O365 software suite.
  3. Review of office usage
  4. Exploring different approaches to support more social interactions
  5. Exploring options to support colleagues wellbeing

Verdict: We used to get asked about our equipment on a regular basis, and you could request a new monitor, ergonomic keyboard/mouse, chair etc if you stated your current equipment wasn’t suitable. Weirdly, I don’t think our department was asked this year despite their claim (I hadn’t heard of it and asked several colleagues too); so that is a step backwards. After claiming the majority of colleagues were in traveling distance to an office, they announced the closure of a couple of offices. How can you say “we’ve analysed employees’ postcodes” is a delivered thing – it’s just analysis for a potential improvement, and they removed an office option for a group of employees.

EMPLOYEE REWARDS AND TERMS

1. Amazon vouchers for employee rewards

Coming Soon:

  1. Maternity Returners’ workshop 
  2. Improved “Benefits Portal”
  3. Flexibility in the Working Week
  4. Maternity and paternity leave are being reviewed

Verdict: Managers can award prizes that you can redeem for vouchers. There’s plenty of options already, and I suppose Amazon is gonna be a popular choice.

PROCESSES

1. Successful completion of Security training

Coming Soon:

  1. Process Improvement Framework
  2. Considering the blockers ​​​​​​​

Verdict: How do you determine if training was successful or a failure? Surely you need to test people on their knowledge, or ask for feedback. I actually thought one (of two) of the presentations was abysmal and I couldn’t believe these guys were security experts and charging for these presentations. He was supposed to show the basic steps that hackers would take to hack a website he had created himself (and therefore had basic security flaws), but many of the attacks he tried didn’t actually work.

I asked some colleagues if they turned up to the session:

“We didn’t even book a place on it. we never have to consider security stuff. Everything’s done in the safety of our framework. I’ll let someone else worry about it”

colleague

With that attitude, that shows that we do need training!

BRANDING

1. Updated main website

2. Booked into a few careers fairs

Coming Soon:

  1. Guides on how employees can promote the company on their own social media.
  2. Reviewing our recruitment practices and processes.
  3. Enhance the Careers section of the website.
  4. Blog posts/testimonials from employees to share across social media.​​​​​​​

Verdict: Basically just “coming soon”. Booking careers fair is an upcoming thing with an unknown benefit.

Conclusion:

When you look through what has been delivered of actual value; I would say very little change has happened so far.

Employee of Choice Update – A change that impacts me

Intro

Recently, the company announced an “Employee of Choice” scheme. It wasn’t clear if this was an official award or a self-awarded title. Essentially, they want to improve a few key aspects so that current employees would recommend working here.

There were a few key pillars: Culture, Leadership, Employee Rewards and Terms, Work Environment, Processes, and Branding.

Many people were sceptical that there would be any meaningful improvements.

Increasing Notice

Shortly after this was announced, I was notified that my contract had changed.

Your contract of employment is for an indefinite period but subject to notice (and to the terms of this agreement). The period of notice to be given in writing by the Company (or by you) to terminate your employment shall be three (3) months’ notice.

Contractual Change

A 3 month notice period is a lot. I think it’s only beneficial if they want to make me redundant, but if I want to leave, having to give 3 months could put other employers off hiring me. I’m not planning on leaving, but the increase from 1 month to 3 months seems to be contrary to their aims to improve “Employee Rewards and Terms”.

I contacted one of our Employee Representatives. They have meetings with Senior Management/HR to discuss improvements/complaints.

Becky

I thought it was based on length of service: The longer you’ve been here, the more notice you give

Me

I think it used to be. I think now they want Seniors to have 3 months and Experts and above to have 6 months. If you want to leave, what is the point in keeping you here. 3 months is excessive, 6 months is pure bonkers

Becky

ohhh that’s alot….I’ll put this to the forum

Me

put my quote in there as well. Needs to say “pure bonkers”

Response

“In line with current markets and business critical roles, some notice periods have been reviewed. Colleagues should refer to their line manager for further information”

HR

Basically they claim to look at what everyone else is doing and want to mirror them. Yet the whole point of the “Employee of Choice” scheme is to do better than the competition; and not copy them. Increasing from 1 to 3 months is a step backwards.

I went back to Becky, but she said she wasn’t actually there in the meeting so had no idea what was said. However, she did say she will try to re-raise it because she didn’t think their response was acceptable.