“Craft over Art” was a great apprenticeship pattern to read about and I found myself relating to the ideas with my own work. A craft is an art that has functionality – a painting you can look at and hang on the wall, but a table or couch provides you with functionality. Good software should be written so it looks good and performs is purpose.
When constructing a piece of software it’s important to look at the tools we are going to use. A programming language, a laptop or PC, a good IDE, Unit Tests, and an outline of what the system should look like. No one starts a craft such as furniture building by grabbing a piece of wood and one by one assembling the project. They first create a blueprint with measurements, a model, and gather all necessary materials before they begin following their blueprint. I enjoy this analogy because I’ve made this mistake in the past when writing code. I would usually go line by line and fix mistakes one by one as I find them. This way of writing code is quite slow and it can be easy to drop a project because it seems too large or difficult. Now I follow a plan when I write my code and even if a method I’m working on has issues, I’ll move on to the next method. I’ll also create my methods before hand and leave them empty until I begin working on one to ensure I’m still following the system I designed for the project.
Art is also an important factor of crafting. If my code is messy, unorganized, and does not have good flow it will be incredibly difficult to refactor the code later on. When we enter the workforce it’s unlikely we will be writing a piece of software completely on our own. Your code will be combined with dozens and hundreds of other programmers work and it’s important that the system works well together.
From the blog CS@Worcester – Site Title by lenagviaz and used with permission of the author. All other rights reserved by the author.