Candy for the Dev Craftsman

Chocolatey: Sweet package management for Windows
Chocolatey: Sweet package management for Windows

Software development is very much a craftsman activity. You need to know the specific tech, e.g. programming languages, design patterns and best practices. Then spend time and focus on transferring that information to real knowledge – skill – by practicing and building experience. This process is dependent on tools.

Being a Dev is not really different from any other craftsmanship in regards to tools. Sharp tools, properly used, is the extension of any craftsman and the ability of using them will potentially play a significant part in honing the craft.

Le Machine – The Main Tool

On a simplified general level we as Devs only have one tool, i.e. the computer. That might change with the movement towards cloud services providing IDE/coding abilities. But at least for a while longer, Devs will continue to have a special relationship to their main tool.

To sharpen this tool – the computer – we install our favourite software tools helping us to become more productive and efficient in our Dev roles. Some of these tools are more efficient than others…granted you learn them!

Chocolatey – Sweet package management for Windows

One such very sweet Windows tool is not Dev-related per se but it will definitely help you in regards to managing installations and give you a “well-oiled” machine. Chocolatey is a package manager which has been around for a few years now and it is true craftsman candy! If you have previous experience of Linux distros the concept of package management should not be new to you. For instance, Debian-based distros like Ubuntu uses apt-get and Arch Linux has pacman. The convenience of package management has in recent years also made the JavaScript ecosystem flourish.

Why Chocolatey?

If you have limited experience of package managers you might be scratching your head and wonder what the big deal is?

What Chocolatey will give you is real simple and fast installation/removal of software. No more need for the tedious process of searching the Internet for installation packages, downloading and installing them. Instead your software is reachable from a repository accessed by Chocolatey. With one simple command the work is initiated and you just sit back and wait for it to fully execute! Sounds convenient, eh? It really is!

Start with installing Chocolatey. Then go ahead and explore the wonderful world of package management in Windows. Instructions following!

Installation/Uninstallation

To install a package simply do one of the following (the second line uses the shorter/more convenient alias version):

choco install -y PACKAGE_NAME
cinst -y PACKAGE_NAME

For uninstalling do one of the following:

choco uninstall -y PACKAGE_NAME
cuninst -y PACKAGE_NAME

Upgrading

Where Chocolatey really shines is in basic software maintenance like upgrading your software. No need to keep track of upgrades and hunting down upgrade instructions and/or doing the installation procedure again! One single source of truth but in regards to upgrading of everything currently installed via Chocolatey:

cup -y all

Chocolatey: Upgrading all packages

Batch installations

Regardless of how nice it is to a get a new machine every now and then, the process of getting it up and running tends to be a tedious one. Luckily, that tends to be a recurring but infrequent problem. Regardless, it is still a boring process when required. But not anymore!

Make use of the delicious sweet power of Chocolatey and maintain a batch-script containing install commands of all of your favourite tools and software. When time comes to install a new machine from scratch, you will just execute the script. My basic script looks like this:

Final Words

Give Chocolatey a try and you might be surprised about how convenient package management can be even on Windows.

In future posts I will write more about tools for the craftsman.

Be the first to comment

Leave a Reply

Your email address will not be published.


*