Archive

Archive for the ‘Interesting’ Category

Sane GitHub Labels

January 15, 2019 Leave a comment

TLDR; the default GitHub labels kinda suck; use a sane labelling scheme instead; and use git-labelmaker to simplify GitHub label editing.

https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63

Advertisements
Categories: Interesting

GNU Makefile setting env variables

January 12, 2019 Leave a comment

Problem:
Exporting env variables in Makefiles. The issue was that the environment variables were not visible across different targets. I needed the same env vars to be seen in both target1 and target2 below.

Solution:
Export the variables outside the target, eg at the top of the file.

VALUE1="myvalue1"
VALUE2="myvalue2"

export VALUE1
export VALUE2

target1:
    echo $VALUE1

target2:
    echo $VALUE2

Source:
https://stackoverflow.com/questions/2826029/passing-additional-variables-from-command-line-to-make
https://www.linuxquestions.org/questions/programming-9/exporting-makefile-variables-to-%24-shell-environment-807422/

Categories: bash, Interesting Tags: ,

DevTernity 2017: Ian Cooper – TDD, Where Did It All Go Wrong

January 9, 2019 Leave a comment

Since Kent Beck wrote the book on TDD in 2002 a lot of words have been dedicated to the subject. But many of them propagated misunderstandings of Kent’s original rules so that TDD practice bears little resemblance to Kent’s original ideas. Key misunderstandings around what do I test, what is a unit test, and what is the ‘public interface’ have led to test suites that are brittle, hard to read, and do not support easy refactoring. In this talk, we re-discover Kent’s original proposition, discover where key misunderstandings occurred and look at a better approach to TDD that supports software development instead of impeding it. Be prepared from some sacred cows to be slaughtered and fewer but better tests to be written.

Categories: Interesting Tags: ,

Keep a Changelog

January 4, 2019 Leave a comment

What is a changelog?

A changelog is a file which contains a curated, chronologically ordered list of notable changes for each version of a project.
Why keep a changelog?

To make it easier for users and contributors to see precisely what notable changes have been made between each release (or version) of the project.
Who needs a changelog?

People do. Whether consumers or developers, the end users of software are human beings who care about what’s in the software. When the software changes, people want to know why and how.


https://keepachangelog.com/en/1.0.0/

Categories: Interesting

5 Lessons Learned From Writing Over 300,000 Lines of Infrastructure Code

December 10, 2018 Leave a comment
Categories: Interesting

How can I change the author name / email of a commit?

December 3, 2018 Leave a comment

Problem:
I needed to change the email address for multiple commits.

Solution:
Followed the steps under this section in the source.

Using Interactive Rebase

Interactive Rebase is the Swiss Army Knife of tools in Git: it allows you to do and change almost anything. However, being as powerful as it is, this also means you can very easily shoot yourself in the foot. Use it with care (and possibly read up on it)!

Source:
https://www.git-tower.com/learn/git/faq/change-author-name-email

Categories: git, Interesting Tags:

Kubernetes for Python Developers: Part 1

November 29, 2018 Leave a comment

Kubernetes is an open-source container-orchestration system for automating deployment, scaling and management of containerised apps.

Kubernetes helps you to run, track and monitor containers at scale. It has become the de facto tool for container management.

Kubernetes is the largest and fastest growing open-source container orchestration software.

This blog post is the first part of a series: Kubernetes for Python developers.

Our goal is to migrate a Celery app app we developed in a previous blog post from Docker Compose to Kubernetes.

You do not need any Kubernetes knowlegde to follow this blog post. You should have some experience with Docker.

In this first part of the series, you will learn how to set up RabbitMQ as your Celery message broker on Kubernetes.

You will learn about kubectl, the Kubernetes command line interface. And by the end of this article you will know how to deploy a self-healing RabbitMQ application with a stable IP address and DNS name into the cluster.

https://www.distributedpython.com/2018/11/28/kubernetes-python-developers-part-1/

Categories: Interesting, kubernetes Tags: ,