May 6, 2018

Bootstrapping

Let's get technical

Let’s talk about starting projects.

Is there anything harder, more oppressive in the creative process than searching for that initial inspiration? The trope has existed for as long as stories have been told, through images of writers sat in front of blank pieces of paper, artists with empty canvasses, coders with empty directories… Okay, maybe I made the last one up. We coders get it a little easier with regards to getting started, with a well trodden path to follow.

git init

Programmers never have to deal with the tabula rasa of an empty project directory. Modern best practice means that everyone uses source control, by which of course I mean git. And therefore, even from the apparent abyss of an empty directory shines a beacon of hope…

Ahh, master...

That’s not all that git offers as far as the trail of breadcrumbs to an established project goes. Before you’ve even considered code you can choose a license, prepare for popularity and, most importantly, outline the key ideas and name your project in the readme.

README (please…)

This is the front page of your project. The headline. The attention grabber. Or at least, it will be when it’s famous. For now it’s your dumping ground for ideas, conceptual lists of TODO and some very terse notes written for yourself about what your project is and how it should be run.

No repository should exist without a readme even if it’s just a couple of lines - it provides a summary of the project’s past, present and future through release notes; user guides and introductions; and a priority list for the future.

With all of this done, maybe you can finally get onto some technical stuff!

Start your engines

Here we go, fingers on the keyboard, it’s time to make the code happen! Maybe your project started from wanting to try a new language or library, maybe you had a great web service that just has to exist but for some crazy reason it doesn’t yet, or maybe you’ve discovered the killer application of Blockchain (Protip: you’re wrong). Now’s the time to pull the trigger on any unresolved decisions and give some stuff a try.

Chances are you’re going for something relatively generic for a lot of your application - maybe you need a quick’n’easy front end and are running create-react-app, and perhaps you need a standard backend, but in Scala? akka-http or http4s seeds got yo’ back. Whatever you decide on, there’s always some minimal setup and boilerplate required to get yourself into a position where you feel ready to start writing the ‘real code’, and before you know it you’ll have a repo full of directories and files that only you really understand - time to document it in the readme and push to your fully operational battlestation codebase!

By this stage, you’ve created a repository, you’ve authored a whole load of files and you’ve even selected and installed the languages and frameworks you’re planning to use. You’ve basically finished the project! Just need to write that little bit of business logic… Bon voyage!