Crazy Spaghetti or: How I Learned to Love Simplicity
Perhaps I am somewhat biased (after all, I am writing this on svbtle, which is an extremely simple platform), but I love simplicity. Things don’t have to be complicated to work well, and often you’ll find that things with good design ARE surprisingly simple.
NOW KISS #
Or.. Um.. Keep it Simple, Stupid. #
I think the Navy got it right - unnecessary complexity should be avoided like the plague. This is a very important thing to remember in automation. There are a ton of tools out there that all claim to do slightly different things to provision environments, orchestrate deployments, manage configurations.. so on and so forth. Those tools are great, but just remember that you don’t have to use all of them.
If your environment and deployment setups are too complicated, not even you will remember where all the moving parts are when you need to make some changes or fix things. Keep the logic that drives your automation in as few places as possible. Good automation should be self-documenting in a lot of ways, so its important to keep it as organized as possible. You really have to treat your automation like code (and it really is code!). Organization is important for maintainability, and you probably wrote the automation in the first place to avoid having to do a lot of manual stuff. If your automation is over-engineered, you will likely spend all the time you freed up trying to patch and fix a bunch of weird little problems with the automation instead of doing the manual work. That isn’t much of an improvement.
DRY #
Don’t Repeat Yourself. #
Or Anyone Else. #
Let’s face it. There are tons of people out there smarter than you or I, and they have likely already done a lot of hard work for us. Don’t think you need to engineer a solution from scratch when there is plenty of stuff you can grab and mold to fit your needs! Please don’t build a CI tool from duct tape and sweat when tools like Jenkins, Bamboo, Gitlab CI, etc all already exist. A bunch of very smart, very kind people made those tools already, and they want other people to use them! You can save yourself a TON of R&D on things like this, which will allow you to work on automating the things that really matter. And, because a lot of those pre-existing tools have been around for a bit (and because they have more users, and more eyes on them), support, bug fixes, new features, etc are all handled for you! Again, that frees you up for the important stuff.
TL;DR #
Basically, this all wraps up into a couple points.
- Don’t over-engineer your solutions. Complexity breeds a bit of chaos.
- Keep organized. Good code is self-documenting, and if you can’t quickly explain how an application gets from code to production, it’s probably more complicated than it has to be.
- Wherever you can, use existing tools, and make sure you are using the best tools for the job. Don’t use a sandwich where you need a hammer.