192 Followers
·
Follow

This past week the Supreme Court decided upon a consolidation of three cases on the rights of LGBTQ individuals in the workplace. …


Image for post
Image for post

If you’re a Python developer you have probably used many command line tools and maybe even had to write a few yourself. Writing CLI tools can be anywhere from really fun to really frustrating. Here are a few of my favorite tools that can help you write a command line applications in Python. Every project has different goals and requirements, so there isn’t one clear winner. However, hopefully this guide will help you choose one that fits your needs.

argparse

argparse is part of the standard library and gives you a way to parse command-line options, arguments, and sub-commands. For me argparse is a little more on the frustrating end of the spectrum of development. However, argparse is much improved over older standard library options, and since it is part of the standard library it’s always there with no extra installation needed. If you are looking to not include many dependencies in your code, or you have few very options to parse, then argparse is a good choice. Also since it is part of the Python standard library you will probably run into this module sometime in your career. …


Image for post
Image for post

I’ve been surprised over the years how many software developers don’t get how putting fail-safes in their code is good thing. Many perceive it as purposely allowing bugs or supporting an architecture that is sub-par. But I find it to be necessary to build a system that is resilient when things fail. Without them you falsely try to build the perfect system which will never happen in real life.

What is a fail-safe: incorporating some feature for automatically counteracting the effect of an anticipated possible source of failure

For me fail-safes are an admission that my code will suck at some point even if I try my hardest, so I need to put some safety nets in place to catch me when I’m stupid. …

About

Paul Bailey

Systems Architect @ Cognitive Space

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store