Code Amnesia

On Monday, Colin was struggling to recreate a bug even though he had recreated it on Friday. I knew he had been struggling for a few hours, so I decided to go over and talk to him. I always love a challenge of recreating obscure bugs.

He gave me a quick demo of what he was doing, and gave me a quick glimpse of the code.

I went back to my desk, and within minutes, I had successfully recreated it. Then I asked him what the difference was between my version, the version he recreated on, and the version he was struggling to recreate on. I knew my version was a version or so behind. The test environment he had previously recreated it on could have been updated Monday morning. So it seemed the simplest explanation is that someone had already checked in a fix sometime on Friday.

Then I remembered part of the code he had showed me, and thought that one of the methods sounds like it takes this scenario into account. So I ask Colin to show me the code again. I read the code.

Timeinints: “That code should stop this issue from happening. “Who wrote it?”.

So Colin annotates it. The annotation states “Local”

Timeinints: “Colin, you wrote that code”

Colin: “Did I? I don’t remember.” He stares at it for a few seconds. “Oh actually, I did write that as a speculative fix, but then I couldn’t test it out at the time”.

So he had spent most of Monday trying to recreate an issue he had already fixed on the Friday. He just didn’t remember fixing it.

Innovation Day

Every so often, people raise the idea of tech companies having an Innovation Day. So maybe every Friday, people can put down their usual work, and do a personal project instead; maybe using a language they aren’t familiar with. Sometimes we have explored this idea, but usually just for one or two days.

I’m always skeptical, because I often find fixing a bug, or making a simple feature will take a day or two, often even longer. To expect some kind of prototype in such a limited time always seems an impossible ask to me.

Recently, a group of people have been allowed to have a full Innovation Day each week. I was speaking to one of the guys and he was saying that they plan to stop it since one day a week isn’t enough time. A month quickly goes by and that’s only 4 days work.

When the innovation is supposed to be meaningful and integrated into new projects, these new projects will have come a long way and then it’s awkward to utilise it. Recently there have been projects that have been scrapped or required a major overhaul because of ideas that have either come out of the Innovation Day, or by some idea someone suddenly had. The earlier people know about requirements, the easier it is to integrate into the project. Trying to implement it later is hard, or even impossible; so the project gets scrapped and they all start again.

Another problem with just having a single day is that you could book that day off as annual leave, or maybe you are ill. If it is a team thing, what happens if someone has the day off and you end up being on your own?

Anyway, I was low on work, so thought I’d pay a visit to a particular pair of developers that were working on a feature relevant to my project. Turns out one of them was ill, and one of them had some important meetings in the morning so would be a few hours late.

Anyway, I end up meeting him and we had problems getting the previous week’s changes to build. There were quite a few people missing from the overall group too, and some developers seemed to take an overly long lunch break – like 1.5 hours. Then when they did return, they ended up switching conversation between work and banter, so much so; that I reckon they only were productive half the afternoon.

So how much benefit can a day a week really be? It’s seems unreasonable to expect zero complications and 100% efficiency, so it seems a waste of time.

I was speaking to another colleague about the Innovation Day and he was surprised that it was limited to a select group of people. He said entire teams should be innovating so they buy in to the ideas, rather than someone else saying “I did this in the Innovation Day, so your team should do it too”. It also links back to the comments on time; that you don’t want a team to have got so far into the project, then be told to rewrite it with a different style architecture.

The Brogrammer # 2

Not much to update on the Brogrammer situation but I did laugh when I saw him in a meeting, playing with a Rubix cube.

A few days later I walked past his desk and he was watching some Let’s Play of a strategy game like Command & Conquer. Usually, if people are chilling, they will put it in a small window even though it’s not even that inconspicuous. The Brogrammer had it full-screen; maximum chill. To be fair, I do hear him ask a lot of questions about code, so he is putting in effort. I just love his brogramming style though.

He was saying how he loves challenging himself to do things he is intimidated by, so he volunteered to present the team’s work to the department. He said he came up with the idea of using Text To Speech instead of actually speaking. His team members thought he was joking but he seemed very pleased with his idea. One guy asked him to speak to the Product Owner about it, because ultimately they would be responsible for the presentation. His reply was;

“mate, you haven’t heard it; it is proper sick!”

The Brogrammer

Poor UX – Sonemic Inc.

To convey information in a small image can be a difficult task, but ideally should be recognisable at a glance. I thought it would be hard to screw up a 5 star rating system, but checkout this proposal:

https://rateyourmusic.com/board_message?message_id=7419371

https://e.snmc.io/i/fullres/s/ffb90e652d19dbefdb670fe23356bf0b/7743220
Original Proposal

In the first proposal, I try and count the coloured areas to work out what star rating it is, and it stresses me out. The more I look at it, the worse it gets.

https://e.snmc.io/i/fullres/s/f16becbabfbaef0654002183ff5e45e6/7743223
Revised Proposal

The revised, second proposal is easier to (roughly) tell what it is at a glance, yet the 2.5-3.5 ratings are still difficult. It’s still hard to count because each piece isn’t even, yet it represents equal value. Each piece represents a 0.5 rating, so two coloured pieces equals 1 star, but the second piece to be coloured is smaller. Furthermore, the fully coloured image is a single star, yet represents 5. Terrible.

Their current design which they want to replace looks like this:

Current design

It is very easy to understand this at a glance. It looks clean and conveys the information. Maybe they could get rid of the solid circle and put the number there instead.

There is always the tried and tested classic, retro design.

Classic design

Response to Carlos Orelhas

Over the years, I have asked many colleagues how/if they manage to set time aside in order to learn more programming skills. It something that I have struggled with, but often find myself going through phases of coding a few hours each weekend for a month or so… before going back to my normal routine.

Recently, Google recommended me a blog by Carlos Orelhas https://dev.to/aorelhas/how-i-deal-with-my-9-5-when-i-still-learning-programming-3ifb where he seems to suggest it is very easy to study every day.

I can pick many flaws in his statements, so here goes.

He says his typical day was this

9:00-1:00 work

1:00-2:30 lunch break

2:30-6:30 work

6:30-8:00 exercise

8:00-? shower, eat, watch Netflix

So when he looks at his schedule, he can plan his studying. He decides to get up earlier to study, replace part of his lunch break with study, then cuts his Netflix time to study.

7:00-8:00 learning

8:00 – ? shower, eat, prepare for work

9:00 – 1:00 work

1:00-1:30 lunch break

1:30-2:15 learning (not sure why he stops at 2:15 rather than 2:30)

2:30-6:30 work

6:30-8:00 exercise

8:00-? shower, eat, watch Netflix,

8:00-11:00 learning

11:15 reading before sleep

So he reckons he spends 1 hour reading a book and 4 hours (presumably) programming. 5 hours is a lot of free time, so he thinks it is really easy to learn new things. So let’s compare that to me. My schedule probably looks more like this:

7:30-8:15 shower, eat, prepare for work

8:15-9:00 travel to work

9:00-12 work

12:00-12:30 lunch break

12:30-5:00 work

5:00-6:00 travel home

6:00-7:00 catch up on the latest news, maybe watch a few YouTube videos

7-00-7:30 food time, watch more YouTube whilst eating.

7:30-12:00 free time.

So there’s some differences here.

  1. Carlos doesn’t mention actually travelling to work, presumably he works from home. This is a big difference because travel can be quite tiring and mood changing depending on what happens. Maybe you get stuck in traffic, maybe the bus was late, maybe the bus was filled with loud people.
  2. Carlos has 1.5 hours of lunch which is bizarre. 1 hour can be standard at some places but I find most people have a social group during lunch break. Walking off into a corner and reading isn’t really great for fitting in and getting on with your colleagues.
  3. I have no idea what happened to Carlos’ “shower, eat, watch Netflix” slot. It started at 8, but then he starts studying at 8. I often oven cook, so you can multitask and watch something whilst its cooking. Other meals require more attention to keep stirring. What is Carlos doing? Ordering takeaway 5 days a week?

When it comes down to it, we both have a similar amount of “free time”. So what’s my response?

  1. If I have been staring at code all day, I don’t feel that inclined to stare at more code.
  2. If you are stuck on something in your work, often it is best taking your mind off it. Do you want to keep reading about the problem, or just come at it with a fresh mind the next day?
  3. Carlos acts as if his specified schedule is a proper routine that can be maintained throughout the 5 week days. When does he do his food shopping? Who does the housework? Does he do any outside work activity? I’d say every odd day I end up picking up some extra food on the way back home, and I’ll end up doing a bit of housework. One day a week, I play a sport which ends up taking the afternoon (travel there, the activity itself, travel back, shower).
  4. Does he live with anyone? Some people live with their parents, some have a partner. You might get away with ignoring them for a few days a week, but you will need to dedicate sometime to your relationships. Other people have kids and will have to dedicate a few hours with them until their bedtime. Then the rest of time won’t be free time, it will be time with their partners.
  5. After I have come home, I need to relax and eat food. After that, I might be in the correct frame of mind to start studying. There’s an optimal point though, and after that I’ll probably feel too tired for something complex. So maybe 7:30-9:00 is quite optimal. After that, I’d find it hard to read a non-fiction book, but could be fine with fiction, or play games, watch TV/film etc. Carlos’ 3 hours of 8-11 seems inhuman to me, especially when it is all non-fiction based and requires more brain power.
  6. People may say “why can’t you study in your travel time?”. If I am at the bus stop, it’s not exactly comfortable reading stood up. Also, I can’t look down for more than several seconds without wanting to keep an eye out for the bus. When on the bus, there is 20 mins or so where I could do something, but as I reach the destination, then I will be paranoid I will miss my stop if I’m not looking. I think my comfort of reading on a bus depends on how full the bus is. If people are peeking at what you are doing, then again; it’s uncomfortable.

I ended up writing all this response and then realised I never did a thorough investigation into Carlos. After doing a bit more digging, I see him in the comment section of another blog on the 6th August “I started learning web developer a few weeks ago.” Brilliant. So his routine is only a few months old and he thinks his methods are so good, that he needs to blog about it. I think it links to this tweet by @iamdevloper

I think Carlos has the youthful energy which will soon wane.

If Carlos sticks to this routine for a long period of time and proves he has learnt a lot in that time; then I will take him seriously. His GitHub page currently has 12 repos with very simple examples in which no one is going to be impressed by. One called MyPortfolio has nothing in it.

Slack inconsistencies

Recently, we started using Slack due to someone waxing lyrical about how all the cool tech companies are using it. Here are my top things I hate about how my colleagues use Slack:

1. Inconsistent use of threads

When we used Microsoft Teams, people were mocked when they posted a brand new message instead of replying to the previous one. However, even though it’s the same people using it, replying to a message seems to be uncool in Slack, and it seems encouraged to post a brand new message even though you are referring to a previous post. This causes people to act all irrationally, because then they get confused if they should either simply post, @ the person, reply and repost etc.

When you get two questions in a short space of time, people have no choice but to “create a thread”. This gets confusing because part of the conversation then appears as replies, but the start of the conversation were separate messages. Sometimes people still won’t start a thread, then just keep @’ing them instead.

When you want to find previous conversations, you end up having to scroll through all that crap which may have been a conversation between 2 people and no one else cared. If it was a thread, it would just be collapsed into one message.

There is also a Thread section which shows you threads you are involved in, but then they are incomplete because people’s inconsistent use of threads, so that feature is frustratingly useless.

2. Going off on a tangent of memes

People seem to see Slack as a casual way of communicating. Maybe because it has the name “Slack” which doesn’t sound as corporate as Teams or Skype. The level of professionalism dips to the point that people are just replying with a GIF, then someone else replies with another GIF. Maybe the GIF had some relevance, but the reply would probably just be a GIF that the person liked. Maybe they didn’t understand why the first GIF was chosen and thought it was a great opportunity to reply with a cute cat. Sometimes you have gone so far off on a tangent, you don’t even know what triggered a response

3. Replying to yourself multiple times like its some kind of instant messenger client and you think you need a second by second update about what you are doing

People seem to view Slack as an Instant Messaging client, whereas with Teams they viewed it as a Message Board. People tended to write longer messages on Teams, and if they needed to post some additional information, they tended to edit the original post.

Since Slack is perceived as Instant Messaging, people often post quick messages one after another, so it’s like:

Tim: “Can you give me access to this repository”

Mark: “Hang on”

Mark: “You should have access now”

Mark: <thumbs up emoji>

Tim: I have access now

Tim: thanks mate

4. replying to a thread but also posting it to the channel even though no one cares

This is very much like point 1, but I think it deserves a special mention. Sometimes a thread has formed and may have several replies in it. I am happy, several people are using the software as it is designed. Then boom! Someone comes in with a basic comment like “I agree with this” and then they tick the box to repost it to the channel. It’s like they think their opinion is so important, they have to make sure everyone sees it.

5. Too many channels.

We have so many channels, many teams have a private channel just for them, and a separaate channel for outsiders to ask questions. Some teams even have a third channel where only bots post the main content. They link it up with GitHub so that any Pull Request or Issues are just reposted to the channel. I guess they have disabled their email alerts and prefer to get the messages in Slack. Often, people go into the channel then say “@here ^” to cause an alert to everyone to check it. Surely the Slack channel was created to avoid the email alerts, then people are replacing them with a Slack alert.

6. people using @channel @here as it if it is important

That brings me onto the next point, people using @channel and @here tags. Normal messages give you an unread notification, @ tags give you a desktop alert like it’s important.

@everyone notifies every person in the #general channel

@here notifies only the active members of a channel

@channel notifies all members of a channel, active or not

If you look at Slack’s official documentation https://get.slack.help/hc/en-us/articles/202009646-Notify-a-channel-or-workspace, they say “We suggest using @here, @channel, and @everyone sparingly.”

An example when to use them:

@everyone – Alert everyone in the company about the emergency evacuation drill.

@hereYou’re locked out of the office and need help from someone already at work.

@channel – Update a project team’s channel about a last-minute change in deadlines.

But people use them daily. It’s like “@channel can you tell me where I can find the specification”, “@here can you tell me who knows most about automated testing?”. I end up “muting” most channels to prevent these alerts from showing. It is never that important.

7. You can only have 15 participants on a conference call.

Most teams only contain several members, so team calls are usually fine. Recently, teams have been doing demos, or individuals have been attempting to share their knowledge via a live tutorial; and we have hit the limit. Even when people know there’s gonna be more than 15 participants, they will still host the call on Slack. Why? Because Slack is what the cool kids use. What you gonna do? Post messages in Slack asking the presenter to record it? Slack doesn’t have that feature. Here’s a GIF of a child crying.

Appraisals

We have tried different ways of appraising developer’s performance, but I think it’s pretty impossible to measure. As my Lead Developer always says: “you get what you measure”. For example, you wouldn’t want to measure someone by Lines of Code because this will lead to verbose, inefficient solutions, and would encourage bugs because then the developer can write even more code to fix it. You won’t want to measure by Code Coverage of tests, because you can achieve 100% Code Coverage, but still have bugs in your code.

We have tried teams filling in a form to give feedback to their peers. This was deemed unfair because people didn’t like saying negative things about others, and it wasn’t beneficial praising colleagues because you were competing with them.

We have tried just leaving it up to Managers to put people forward when they perceive them to be doing well. This was deemed unfair because some managers would be more vocal or lenient than others.

We are trying another form filling task, but you write about your salient experiences, then come up with a score 1-4. When I looked at the scoring system, I felt you couldn’t put the highest score without justification that your actions were way above and beyond your role. I thought that no one will put the lowest score because it’s supposed to be a form that highlights your abilities, not weaknesses. So I ended up putting 3 next to the really good ones, and 2 next to the decent ones.

Anyway, I was discussing my form with my manager, and they said to me that we can’t submit scores of 2 because that means I am under-performing. My options were to either change them to a 3 and submit them, or just remove them from the form.

Then I thought “hang on, we score them 1-4, but are only allowed to score them a 3”. Okay, maybe a 4 at a push, but still, that’s only two options.

I’d imagine they wouldn’t want to read everyone’s forms; they just want an overall rating. So they would just add up the scores and come up with an average; then use this value to compare people. But everyone in the company will have a rating of 3. So how do you know who is performing well, or who is under-performing? Well, you would have to read all the texts! Which is what the scoring system aimed to avoid.

I reckon when they had a meeting to come up with this ridiculous proposal, it would have gone like this following scene from the absurdist comedy “Nathan Barley”. There’s a meeting to brainstorm new ideas for their magazine.

Note: Dan is the only level-headed one, and he thinks he is working with a team of idiots (which obviously they are).

Rufus: We should give Nathan Barley a column.
Ned: Yeah, we should give Nathan Barley a column.
Rufus: Yeah like call it…”Nathan Barley’s Column”?
Ned: Hey, let’s just call it “Barley”, yeah.
Rufus: Yeah, man, or like “Nathan”.
Ned: Yeah, cause like, that could be like two columns.
Dan: (in disbelief) Two columns?
Rufus: Yeah, and like maybe one would be better than the other one.
Ned: Yeah, yeah, and you’d only read the good one.
Dan: How would you tell which one was the good one?
Ned: Check ’em out. Direct comparison.
Rufus: Like, you’d read them both to find out which is the best one.
Ned: Yeah, and then you’d just read the good one.
Dan: Are we gonna’ do this?
Jonatton: OK.

Or in my case:

Rufus: We could give the employees forms to fill out and they score themselves 1-4 Ned: But you are only allowed to score yourself a 3
Dan: How would you tell which employees are the good ones?
Rufus: Like, you’d read all the forms to find out who are the best staff.
Ned: Yeah, and then you’d just promote the good ones.
Dan: Are we gonna’ do this?
Jonatton: OK.

Shirking Responsibility #2 – Email

We had an email from the Product Owner asking who could pick up a bug. It was sent to Adam, Bruce, Colin, Dave, (all of which are Seniors) and myself.

Colin responds quickly, stating that he thinks Adam or Bruce would be suitable. Adam then responds with more questions about it. After a few days, the Product Owner chases it up, to which Adam then states that he doesn’t think it was his responsibility and it would be better if Bruce or Dave looks at it. Bruce then replies stating that Timeinints would be the best person, but maybe Dave.

I couldn’t believe all the Senior developers had just basically played the blame game, deferring it to each other until the last person has no one to palm it off to.

Anyway, I went to the team lead to tell him to pick someone, knowing full-well he would just ask me since I was the one talking to him. I didn’t mind doing it, but wanted to basically say “look at these losers trying to avoid work; you need someone dedicated who will accept responsibility”.

Open Source

I was making a simple demo website to try a library that a “UI Controls” team had put together. I added a combo box, a text box and a button.

In such a simple app, there were two bugs, and I was distraught. The first bug was that the combo box always showed the first item no matter what you selected. The second was that the text box should clear when you clicked the button to submit the data, but the text remained.

I was beginning to think I wasn’t cut out to be a web developer, but then I had the idea of replacing them with the standard HTML controls in order to eliminate the idea that it could be a problem with the custom UI controls. Turns out that the code I wrote should work, it was just the custom UI controls that were buggy.

Then I wondered why a team had even bothered writing some custom controls. With any code, you always have to ask yourself “am I reinventing the wheel?” Many common programming tools are available Open Source, completely free to use. The advantage of using Open Source is that you can focus your attention elsewhere, and only write bespoke code that gives the company some value. UI controls is a prime candidate to use Open Source since it is generic to most applications, so should have a good user-base who will support the tools. As it goes, there are plenty of Open Source UI kits we could have used.

If you think you can add value, and definitely make a better product, then you may choose to develop something yourself. But you have to bear in mind, any new features or bugs will take developers away from the projects that matter. Here we are, several months later, and the basic controls have fundamental problems with them.

The strange thing is, the team that did this “UI Controls” project was led by a vocal advocate of Open Source software. He was even suggesting we should move one of our projects to Open Source and claimed it would bring massive reputation benefits to the company. It seems strange to then reinvent the wheel, then fail at it.

Innovation

Recently, we were told about a culture change to one of innovation. Our new philosophy is that people need to explore different technologies to work out which ones would benefit the company.

When investing time into this research and coming up with a prototype, obviously many experiments won’t bear fruit. As long as we document our thoughts; why the technology isn’t suitable, what scenarios it could be suitable etc., then it won’t be a waste of time, because we have learnt from it and educated others.

One team did a presentation on cloud computing, and the differences in performance when it comes to running severless functions. They reported that using languages such as Java and C# will be a poor choice due to “cold starts”. Better languages would be Go or Python that have a speed benefit. See Cold Start Comparisons for comparison tables and charts.

When the time came around to do more presentations, a different team talked about severless functions and how they encountered a problem called “Cold Start”. I was face-palming. What’s the point in these presentations if teams aren’t gonna listen to each other? Sharing knowledge and learning from each others mistakes or findings make teams progress quicker. It’s a waste of time repeating what other teams have already done.

Anyway, when the next presentations came about, we were all eager to hear about something different. But up stepped a team to talk about severless functions. The presenter explained that they knew about the “cold start” problem due to the other presentations over the previous months, but they wanted to witness it for themselves rather than just go by what they were told. I couldn’t believe it; why wouldn’t they invest their time in something new, and then come up with a presentation that people can learn from. Just churning out the same content was a waste of everyone’s time.

This week, I overheard a couple of developers talking about their experiences with severless functions.

“I’m finding Go really difficult to code in, so I might just use C# instead”

“What about the cold starts?”

“Well, it will be Microsoft’s priority to fix it, so by the time our code goes live, it probably won’t be a problem”

There are many programming languages around, and they are created for a purpose. As a developer, you need to use the correct tool for the job, and shouldn’t just use a language just because you are familiar with it. If you look at the findings in Cold Start Comparisons, maybe Microsoft could improve efficiency slightly to Java levels, but surely you can’t expect Python performance. It’s a completely different style of language. Also, it’s a bit of a gamble hoping that performance will improve by the time you rely on it.