There are many critical systems that have no room for failures, such as banking software or a hospital’s patient management system. It is difficult to experiment with new features or try a new approach when a piece of software is heavily relied upon. In order to experiment with new things, you need to have a test environment where you can try out features. If these features turn out to be harmful or cause problems down the line, they will not affect the current user version of the software. Creating a playground environment allows you to not worry about breaking changes or failures cousin headaches for program users and other developers. Software that is a breakable toy means it is that something can be played with, broken, and replaced without impacting anyone else. It is a way to learn, test new workflows, and ideas.
It is hard to clone and play around with code when there is a complex system that requires a database, client, server, and other resources for its operation. Because of the work and resources to create a clone of an existing system, I would not have created a second replica of the system in the past. However, this pattern makes a strong enough argument for me to put in the effort to make a breakable system for testing. I thought it was interesting a breakable toy can also be a personal project where you are the only one who uses it. I thought of this almost like a programmer’s diary where you program your ideas in private and you are the only one who sees them.
I currently program with a pattern similar to breakable toys but on a smaller scale. When I want to add a new feature into a codebase, I make a testing branch where I can execute that idea. In my ‘toy’ branches, I do not have any intention of merging the code into the main branch, I only use it to play around with an idea to see how it might be executed. I do not disagree with any aspect of this pattern, although it is good to also be comfortable working in an environment where you have to be careful about the programming you do could have a major effect.
From the blog CS@Worcester – Jared's Development Blog by Jared Moore and used with permission of the author. All other rights reserved by the author.