Workplace safety
August 2, 2012 | 4 min Read“This is just about getting some numbers.” “Oh, and we need some basic UI, nothing fancy though.” “We should have some alternative storage or exporting options, you know, keep it simple, just export to Excel. Oh and some more numbers, please.” “This latest function broke some of the numbers from before, could you fix that please?”
Many projects that start out small legitimately grow bigger over time, by adding just one little more reasonable function at a time. All of the sudden the project is a big junk of ugly, unmaintained code, and nobody is responsible in particular. It’s a pain to work with and when a change is made nobody can predict the consequences.
Let me try an old metaphor: house construction. But rather than thinking about the actual building, I want you to think of infrastructure and protection.
Starting out small When you start building a wall*, and you are building only a small one, it is totally reasonable to wear a pair of gloves. Yes, hand protection. You could work with your bare hands, too, but you will be faster working with gloves. You can concentrate on the task at hand and not worry about how to touch each stone and tool. You won’t even look silly wearing gloves, because you are on a construction site, even if it is a small one. Plus, at the end of the day your hands have a much higher chance of remaining unharmed, giving you the possibility to pick up your work at top speed the next day.
Even for very little projects that just produce some numbers, it’s totally justified to set up a local git repository. The effort is small and the gain is immediate. You do not need to be a software engineer to learn working with it.
Getting bigger When the wall gets higher you might be tempted to stretch up and push the stones in place even when you don’t have an optimal working position. For the next stone row then, you might be tempted to get a ladder. This is getting dangerous, both for the wall and for you. The wall won’t be straight, and it might even fall apart if you lean the ladder against it before the mortar has dried. Maybe you should stop building the wall and hire a craftsman. The craftsmen won’t bother with what they regard as toys and set up a scaffold.
When you project gets bigger the time has come to set up some automated builds, or hire someone who can do that for you. This is starting to get professional work, and it should be done in a professional way.
Lasting Do you know how the top of a wall is built? It should have a concrete topping. This holds the stones together and prevents them falling down. If you put weight on it, it will be distributed over a large area. Even old and crumbled walls can be reinforced and hold up a solid roof with 20cm concrete on top of them. The concrete topping will make the wall last for a long time. It won’t fall apart anytime soon. It is not hard to make a concrete topping, if you use the right tools: a scaffold, some casing, reinforcement steel, a concrete mixer, sand, cement and gravel. Doing this is some physical effort, but not really hard. Craftsmen know how to do that, but more importantly they know when to do that. On top of every wall that is designed to last. If the wall does not have a top, it will fall apart too soon.
Automated regression tests help keeping your project together. And as a software engineer you know when you need them. In every project that deserves it’s name.
The bad example There appears to be an universal law on construction sites. At least one young male worker is working bare chested, standing in the midst of all these noisy power tools, not wearing ear protection, sometimes not even gloves. Every passer-by looks at him and shakes his head in disbelief: by the age of 40 this guy will be close to deaf, missing a finger or two, rendering him unable to work. Discussions spawn whether this is his fault, for he is foolish, or his employers fault, for he is young and probably uneducated. We know even though this guy might look cool and good in shape at this very moment he won’t last in his business.
Do not be that fool in your work environment. It is actually not cool to huddle code together omitting all safety protocols. And you know better. As a software engineer you might not get hurt physically, but getting to work without your infrastructure is unprofessional and in the long run you will not stay in this business.
- Let’s not worry about foundations for now; metaphors don’t need to be taken literally.