Software Design Algorithms Cheat Sheet

If you have a career as a software engineer at some point you’ll be asked to diagram a software system. It might be a system you plan to build. It might be to help explain/document a system that has already been built. Or it might be part of an interview question. These days most people seem to have given up on UML and will create a wild mix of arrows, boxes, circles and words. But there’s a lot of other methods that are useful and the best results usually involve a mix. So here are the techniques I’ve found useful in a super quick way.

Continue reading “Software Design Algorithms Cheat Sheet”

Software Architecture with Tarot Cards

One of my favourite things to do with software engineers is to practice together. I like it because often we’re not trained to collaborate and it can be a difficult adjustment. If we throw people into collaborative techniques they can struggle as they try to navigate their way through the process while protecting their reputation. I’ve seen teams so nervous about suggesting a “wrong” idea that they will struggle to suggest anything when presented with a trivial problem. So I like to get teams to practice on something that feels a bit like a game.

I first got to experience an Architecture Kata at the Aglie 2018 conference in San Diego. I got to attend a workshop my Martin Salias on Architecture Kata with Tarot Cards. In his workshop we formed into groups of 3-4 and selected a kata exercise from Ted Neward’s Heroku App – we got some kind of medical advice service. We then got 10 minutes to work on our first release. The Katas ask for a lot so you immediately have to consider what to prioritise so you get that real feeling of a sprint plan being executed even though you’re just drawing out a design.

Continue reading “Software Architecture with Tarot Cards”

8 Patterns for TDD

I’ve been doing Test Driven Development for nearly 10 years and I’ve spent most of that time doing TDD with C++. There’s a bunch of things I learned early on that I still use heavily today. And some patterns I’ve come to value over time. I’m using C++ examples but I’ve applied the same thinking in Python, PHP, Javascript and Lua.

I will also include some warning smells along the way. Things that will give hint your design is not testable.

1. Dependency Injection

This is one of the first things you’ll learn in doing TDD. It doesn’t matter if you’re doing London Style or Chicago Style you will eventually hit cases where you need to swap out the real item. It may be because that real object would touch the file system, a database or a network. Or it may be because it forms a convenient seam between your code and something more complex.

Smell: Singletons and classes that new their dependencies.

Continue reading “8 Patterns for TDD”

Pair and Mob Programming for Interviews

In a recent assessment of people applying for graduate and intern positions at my work we wanted a way to quickly assess them as a group. Ideally we wanted to see their individual skill at work, how well they worked with others and all in under an hour for groups of up to five. So I suggested we get them to do some Mob Programming on a Kata exercise. It wasn’t something we tried before but the idea wasn’t completely out of the blue.

Continue reading “Pair and Mob Programming for Interviews”

Learning Refactoring Together

My team has a challenge that I haven’t run into before. We all want the code to be better quality that it is now. However we don’t agree on what “better” is.

Even simple things can lead to long discussions and debates so it was a struggle to get some serious progress. Reviews could get bogged down because a refactoring someone did triggered a debate on its merit. We needed a format to allow us to work through some of the fundamentals and find where there was consensus. So I booked us in to do some mob programming together except we were not going to write new code. We were going to focus on only refactoring.

Continue reading “Learning Refactoring Together”