This post is, belatedly, inspired by the Ministry of Testing blog idea: The Struggle with Learning to Code. I have a Computer Science degree, and have been programming for a while. (I started doing it as a hobby, and then studied it, and then got paid to do it.) I struggle with learning to code, … Continue reading The Struggle with Learning to Code
Category: Coding
Covariance and contravariance, part 3: Covariance in interfaces
This article is the third in a series on covariance and contravariance: Covariance in arraysContravariance in interfacesCovariance in interfaces In the previous article I showed how an interface could be contravariant, meaning it is expecting a smaller type for something you pass it. In this article I will show how an interface can be covariant, … Continue reading Covariance and contravariance, part 3: Covariance in interfaces
Covariance and contravariance, part 2: Contravariance in interfaces
This is part two in a series about variance – contravariance and covariance. Arrays and listsContravariance in interfacesCovariance in interfaces In the previous article I introduced the concepts of variance and type size. I also gave arrays as an example of covariance. In this article I’ll give an example of contravariance, and go into more … Continue reading Covariance and contravariance, part 2: Contravariance in interfaces
Describing films and code using pictures
This article is the combination of a few different things. For a long time, I’ve wanted to visualise in some way the details of the plot to the film Ocean’s 11. Also, occasionally I get grumpy about decrees about how people should document their code. Finally, I recently attended a talk given by my friend … Continue reading Describing films and code using pictures
Covariance and contravariance – part 1: Arrays and lists
This post is the first in a series - for once I will split a large topic into a few small posts. The series is about covariance and contravariance, together known as variance. Arrays and listsContravariance in interfacesCovariance in interfaces Covariance and contravariance are terms I came across occasionally, and never understood properly. Having put … Continue reading Covariance and contravariance – part 1: Arrays and lists
Usability for programmers
I recently started learning Xamarin. I should say I’ve started learning it again, because the first time I just couldn’t get into it. This time it’s going better, although I’ve still been struck by something that’s surprisingly labour-intensive and so surprisingly annoying. This made me think about the relatively cushy world I normally experience when … Continue reading Usability for programmers
Computer science while washing the dishes 2: The Stack
As well as stacks as mentioned in the title, this also touches on sorting and fragmentation. Yes, I’m one of those people who think that their way of loading the dishwasher is the best way. This is part 2 of a probably 2-part series of articles on how washing up shines a light on computer … Continue reading Computer science while washing the dishes 2: The Stack
Computer science while washing the dishes 1: The Queue
Calvin and Hobbes said that there’s treasure everywhere. For a sad geek like me, there’s also computer science everywhere. Doing the washing up the old school way involves a metaphor for the computer science concept of queue, if you think of people collaborating around the draining board. Quite a lot of this is a statement … Continue reading Computer science while washing the dishes 1: The Queue
Software tools
I’ve been thinking about tools recently. It started when I compared myself to my father who, like me, had an office job for pretty much all his career. Every day he took a briefcase to work, which contained (paper) documents, pens and a calculator. I have never used a briefcase, and instead take a small … Continue reading Software tools
Complexity: Performance trends in code
Introduction If you hang around programmers for long enough, you might hear people use terms like complexity or Big O notation, or say that performance is of the order … such as of the order N squared. I hope that this article makes those terms a bit less confusing. The basic idea is seeing how … Continue reading Complexity: Performance trends in code