+++*

Symbolic Forest

A homage to loading screens.

Blog : Posts from July 2021

Motivational speaking

Or, principles and platitudes

It’s nearly a month now since I started the new job. It’s not been plain sailing all the way, of course, but it feels like it’s going reasonably well.

One aspect of coming in and taking over a team is that naturally I want to put my own flavour on things. I’m not saying I automatically think my ideas are always better than what the team already does, of course, but I do think firstly that new ideas can often trigger new thinking and give new energy to a team, and secondly, that some of the things are familiar to me are inevitably going to be new to my new colleagues, and things they might not have considered before. So, if I can bring in processes and practices that have worked well for me before, they may well work well in the new job too. If anything, as long as I can get the team behind them, they might be worth a try.

“As long as I can get the team behind them” is the key point there, of course; and it’s important to make sure we all feel we are a team and that we can all contribute to making change happen. I started writing down some Basic Good Principles along those lines. “We know we’re not perfect but we’re always improving,” for example. “We all review each other’s code, because everyone gets it wrong sometimes.” — I’m always surprised how many people don’t quite follow that one. “This document is not set in stone and is always changing, just as our processes are always changing and improving.” is another one, because when a particular practice or process turns into dogma is when it starts to impede you rather than work for you.

After a while brainstorming this stuff, writing down these sort of things, though, I started to get a bit of self-doubt. Is writing down these sort of principles really helpful, or were my notes just turning into meaningless platitudes in themselves? Was I at risk of accidentally coming up with the “Live, Laugh, Love” of software development?

Which of course, set me thinking. What is the “Live, Laugh, Love” of software development? Maybe if I deliberately came up with something quite so awful, quite so twee and nauseating, it would reduce the risk of ending up in that zone by accident?

I scribbled a few things down, crossed some out, shuffled some ideas around, and eventually came up with the following. I think it’s pretty good. By which I mean, I feel slightly disgusted with myself.

Code

Create

Care

One of our regular correspondents writes: Yeah, I think you might need a shower after that.

Most definitely. I felt dirty. If you ever find me giving that as advice to my team, please, tell me I need to take a holiday. All the same, if I was to pick a font and put it on a framed print, I wonder how many I could sell?

Flashback

Or, someone from the past

Regular readers might have noticed that there haven’t been many posts on here lately: the pressure of various other things that come before this place. The new job, for example, is one. Going to visit The Mother and help her with various bits of paperwork, another. I was up visiting The Mother the other day, as it happens. Not only did I also fit in a few nice long walks on her local beach, which will be the subject of another post another day, but I went down the pub and met up with this chap for lunch.

Wee Dave, allegedly

In the post about the new job, I mentioned how I used at one time to write lots of posts about my colleagues, giving them all false names and talking about some of the less controversial things some of them got up to. The chap in the picture is the guy referred to on this site as Wee Dave—not his real name of course. I called him Wee Dave because he succeeded Big Dave, although of course that wasn’t Big Dave’s real name either.

I hadn’t seen him for, ooh, it must be thirteen years nearly. We caught up, on and off, about various things that had happened through the intervening time: him on how strange it was, after I left that job, to stay on for a few more years in a business that was slowly shrinking as its owner wound down towards retirement, selling off a department here and shutting down one there, until in the end only Wee Dave and a couple of other people were left rattling around inside an empty warehouse. For my side, I told him all about some of the things I’ve worked on since, some of them interesting and some of them less so.

Naturally, we also reminisced about the people we worked with and that I wrote about here. “Say hi from me!” messages were passed over, and we talked about how few of the people there we actually kept in touch with, and quite what a strange place it was to work. Wee Dave ended up working with someone else from that place at his next job; unlike me, of course, disappearing to the far end of the country. Like me, though, he’s moved from general IT work into software development, partly because it’s far more interesting and challenging than setting up servers, rotating backup tapes and generally being a systems dogsbody. We shared the usual gripes that all software developers have, such as nobody really agreeing on what Agile is supposed to mean even though everyone claims they do it. That, indeed, is something I might have a long ramble about on here some time.

Thirteen years is a long time, from one meeting to the next. Of course, as I have to go up there and visit The Mother fairly regularly nowadays, I’m going to be in the area much more often in the future. Hopefully the gap until we next have a drink together won’t be quite so long.

Milestones

Or, how and how not to learn languages

I passed a very minor milestone yesterday. Duolingo, the language-learning app, informed me that I had a “streak” of 1,000 days. In other words, for the past not-quite-three-years, most days, I have fired up the Duolingo app or website and done some sort of language lesson. I say “most days”: in theory the “streak” is supposed to mean I did it every single day, but in practice you can skip days here and there if you know what you’re doing. I’ve mostly been learning Welsh, with a smattering of Dutch, and occasionally revising my tourist-level German.

My Welsh isn’t, I have to admit, at any sort of level where I can actually hold a conversation. I barely dare say “Ga i psygod a sglodion bach, plîs,” in the chip shop when visiting I’m Welsh-speaking Wales, because although I can say that I am wary I wouldn’t be any use at comprehending the response, if they need to ask, for example, exactly what type of fish I want. To be honest, I see this as a big drawback to the whole Duolingo-style learning experience, which seems essentially focused around rote learning of a small number of set phrases in the hope that a broader understanding of grammar and vocabulary will follow. I’ve been using Duolingo much longer than three years—I first used it to start revising my knowledge of German back in 2015. When I last visited Germany, though, I was slightly confused to find that after over a year of Duolingo, if anything, I felt less secure in my command of German, less confident in my ability to use it day-to-day. Exactly why I don’t now, but it helped me realise that I can’t just delegate that sort of learning to a question-and-answer app. If I want to progress with my Welsh, I know I’m going to have to find some sort of conversational class.

Passing the 1,000 days milestone made me start wondering if anyone has produced something along the same lines as Duolingo but for computer languages. In some ways it should be a less difficult problem than for natural language learning, because, after all, any nuances of meaning are less ambiguous. I lose track of the number of times Duolingo marks me down because I enter an English answer which means the same as the accepted answer but uses some other synonym or has a slightly different word order. With a coding language, if you have your requirements and the output meets them, your answer is definitely right. In theory it shouldn’t be too hard to create a Duolingo-alike thing but with this sort of question:

Given a List<Uri> called uris, return a list of the Uris whose hostnames end in .com in alphabetical order.

  1. uris.Select(u => u.Host).Where(h => h.EndsWith(".com")).OrderBy();
  2. uris.Where(u => u != null && u.Host.EndsWith(".com")).OrderBy(u => u.AbsoluteUri).ToList();
  3. uris.SelectMany(u => u.Where(Host.EndsWith(".com"))).ToList().Sort();

The answer, by the way, is 2. Please do write in if I’ve made any mistakes by being brave enough to write this off the top of my head; writing wrong-but-plausible-looking code is harder than you think. Moreover, I know the other two answers contain a host of errors and wouldn’t even compile, just as the wrong answers in Duolingo often contain major errors in grammar and vocabulary.

Clearly, you could do something like this, and you could memorise a whole set of “cheat sheets” of different coding fragments that fit various different circumstances. Would you, though, be able to write decent, efficient, and most importantly well-understood code this way? Would you understand exactly the difference between the OrderBy() call in the correct answer, and the Sort() call in answer three?* I suspect the answer to these questions is probably no.

Is that necessarily a bad thing, though? It’s possibly the level that junior developers often work at, and we accept that that’s just a necessary phrase of their career. Most developers start their careers knowing a small range of things, and they start out by plugging those things together and then sorting the bugs out. As they learn and grow they learn more, they fit things together better, they start writing more original code and slowly they become fluent in writing efficient, clean and idiomatic code from scratch. It’s a good parallel to the learner of a natural language, learning how to put phrases together, learning the grammar for doing so and the idioms of casual conversation, until finally they are fluent.

I realise Duolingo is only an early low-level step in my language-learning. It’s never going to be the whole thing; I doubt it would even get you to GCSE level on its own. As a foundational step, though, it might be a very helpful one. One day maybe I’ll be fluent in Welsh or German just as it’s taken me a few years to become fully fluent in C#. I know, though, it’s going to take much more than Duolingo to get me there.

* The call in answer 2 is a LINQ method which does not modify its source but instead returns a new enumeration containing the sorted data. The call in answer 3 modifies the list in-place.