Writing and Publishing Python Modules
There is a time and a place for specific solutions, and generalizable solutions. This article is aimed at the latter, using python as an example. When building out large systems, it’s important to keep in mind the DRY principle — Do not Repeat Yourself! Repetition in a code base can turn a simple change into a tangled mess befuddled by human errors — hence, spaghetti code. One way to reduce repetition in a single code base is by modularizing functionality — by decomposing repetitious code into modular functions, an update to a single function can replace the arduous task of updating code in different corners of the codebase. But what if you’re building something bigger, and shared code exists beyond a single repo?
Enter, packages. Every major programming language has some mechanism through which code can be shared and used by different people — Ruby has Gems, Node has npm, and Python...
Continue reading →