Do engineers dream of endless complexity and problems in their sleep?
Yes, it is a “funny” word play on the legendary sci-fi novel Do Androids Dream of Electric Sheep? The title of this article is something I have had in the back of my mind since very early on in my career and it has stuck with me.
Note! If you are offended by swearing, bad language and grammar you will have a blast reading this article as it contains a lot of it π
πGreen field projects
The bare mention of the word makes people have a certain glow in their eyes and can almost see their pulses rise. It’s that mythical thing that you have heard about while making your way through an endless maze of legacy code written by what has to be some programming illiterate that came before you.
It is you chance to Make Things The Right Way. You have dreamt of this moment for so long and now finally you are to be part of such a project.
The architecture diagram is a blank canvas. You have heard the phrase “we will use the best tool for the job on this one” uttered by managers. Deep inside you know this will be great.
Let’s gooooo! π
There is a project kick-off and everyone is super excited. Everyone has been reading up on what is The Latest thing to be using. The room (virtual or physical, it doesn’t matter) is buzzing and spirits run high.
Designers, product manager and programmers alike have all arrived at the promised land together and it just feels amazing. This time, we know We Will Get It Right.
Fast forward, the project might be in an ok or it is in deep π©.Β The outcome is not what I will be talking about here, it is rather the completely irrational way in which we go about setting up Something New.
Three steps for f**ng things up when starting something new
- Pick technology based on what looks good on your resume and your personal preferences
- Make sure you are ready for scale from the first moment
- Focus on ensuring the programmers are enjoying themselves
CV Driven Development vs “WE ARE SO F**KED” Driven Development
CV Drive Development (CVDD) is a thing, heck I’ve practiced it for years early on in my career. Why wouldn’t you? If you work on dead-end technology, that means you career is heading in the same direction. Naturally we have a tendency to gravitate towards what makes us look good.
In a green field project, you absolutely have to have a grinch onboard. Someone to ensure that the team are not going completely ape-shit in the candy store just because they can.
A green field project should be treated as a startup, meaning you have zero money. It should’ve been done yesterday and investors are on your case to shut you down. That makes for a _great_ climate to make technology decisions. Why you say? Because it means you have to be honest and focused. No more CDD or reading blog posts about The Latest Thing. It’s about shipping value so you’re not shut down tomorrow. Most people would then choose Boring Technology. You choose something that you know, something that will give you velocity from day one and that is simple to work with.
Google Scale Baby π
A project manager or some stakeholder early on in the projects would usually layout the possible future. How this project will be a game change and that it will be critical for the business ability to grow in the future. It is intended to inspire and rally the troops.
Again, this is where you need a Project Grinch on hand. We all pretend we know about premature optimization, but let’s be honest we mostly use that as an excuse to skip things like testing, performance and security considerations π€·πΌββοΈ In reality, since this is a Green Field Project, we secretly are already at Google Scale.
We choose tools, frameworks and technology platforms which are often times months if not years in the future. Let’s face it you don’t need to setup a Kubernetes Cluster and create your own Development Platform from day one. In fact what you could do is to host the damn app on an iPhone 8. Because: YOU HAVE NO USERS!
Our Inner Engineer just can’t be silenced. We so desperatley want to do “what the big boys are doing” that we just can’t wait to get there. Which is why, especially on green field projects, we just go all out over doing everything. Be it the git repo structure & the pull request regime or the runtime platform you choose.
Green Field projects very quickly become the new legacy because we are not thinking about the context we are in. We are not considering what are the things required for the things right in front of us.
Developer Experience
The phrase has been abused by so many people with such a variety of agendas that I feel the meaning of the word is gone years ago. It is also a term hailed by Propper Engineers as the ultimate goal of any software development organization. If this is not your #1 priority, you are doomed. DOOOMED! As the art of typing instructions for the computer to run is The Most Important Thing. In reality it is never the most important thing, as it is always the business which is important. If that is not on track an amazing developer experience don’t get you anywhere but a new job for the engineers.
The Project Grinch would say: “Oh really?”. In order to ship value there has to be an effective way to get things in front of customers / users. I am not debating this fact. What I am sure of is that this should not be the ultimate goal to have ready from month one. I would say it doesn’t need to be there for years 1 or 2 either.Β Again, in a Green Field project, we have a tendency to just loose it on this point. Because FINALLY we can set it up just right. We can have the quick builds, with the automated tests. End-to-end tests and integration tests. Feature environments for all branches. Database migrations with rollback. EVERY DAMN THING!
The task of writing the code is so precious and whatever small obstacle preventing us from doing this has to be eliminated. Preferably with something shiny and nice. Whatever the actual cost and whatever the increase in complexity, it needs to be done. Let’s do a mono-repo and then when that starts to hurt we will just add more technology on top of it. Something like NX (in the JS eco system) which sounds brilliant. We throw all the shiny tools in to remove ANY hints of friction to the sacred art of writing code (completely ignoring the added complexity that goes with removing said friction both short and long term).
Don’t get me wrong, having all this in place already _could_ be useful. However all these things also come at a cost which you might not want in an early stage project. Let’s say you have a feature environment setup ready, so why not Just Use It? Well, it might be that this setup requires you to do feature branches. Which effectively makes everything related to continuously delivering value to users harder (yes, I know you _can_ do CI/CD with feature branches too. What I am saying is that you probably should not).
A different approach would be to say: “scrap that, let’s do trunk based development”. You reduce the complexity in getting things shipped and you a healthy mindset of getting things out.
How to not fuck up
- Ensure you always have someone who has no stake in having shiny technology on their resume
- Ensure you have someone who knows that any projects success hinges on the business side of things first and foremost
- Ensure you have someone on the project to tell the Engineers to “stop f**ing about”
You are welcome π