Practice, handling errors, and some python 🐍
via reddit
Comments
Practice
I’ve been on a diet and I’m pretty sure this cat has better sit-up form than I have. Just like anything we do it takes practice and if we don’t do it for a while we fall out of form. As much as I exercised in high school I have to relearn a lot after not doing much for the past 20 years.
Even if I’ve written a lot of code it will take me some practice to pick it up again after a break. Software has changed a lot in the past 20 years and thankfully for me sit-ups haven’t.
Error is endlessly diversified
I heard part of this quote in a book I read recently and it made me think about errors in systems and trying to prevent them is a game you cannot win. Instead making systems resilient is a better use of our time. Instead of trying to define and catch every error it’s better to exit as gracefully as we can and let the process be replaced.
Perhaps the history of the errors of mankind, all things considered, is more valuable and interesting than that of their discoveries. Truth is uniform and narrow; it constantly exists, and does not seem to require so much an active energy, as a passive aptitude of the soul in order to encounter it. But error is endlessly diversified; it has no reality, but is the pure and simple creation of the mind that invents it. In this field the soul has room enough to expand herself, to display all her boundless faculties, and all her beautiful and interesting extravagancies and absurdities.
– Benjamin Franklin from his report to the King of France on Animal Magnetism, 1784
Links
I finally spent some time this past week learning how to use pipenv
to managed dependencies.
It wasn’t nearly as bad as I thought switching would be and my use cases comes down to pipenv install
and pipenv shell
.
Here’s a more thorough look at the benefits over pip
.
Pipenv: A Guide to the New Python Packaging Tool – Real Python
Pipenv is a packaging tool for Python that solves some common problems associated with the typical workflow using pip, virtualenv, and the good old requirements.txt. This guide goes over what problems Pipenv solves and how to manage your Python dependencies with it.
In a similar tangent to learning pipenv
I also re-discovered fastapi python library.
I haven’t used it yet but it looks like a great way to implement an API with modern features in python, including async request processing.
GitHub - tiangolo/fastapi: FastAPI framework, high performance, easy to learn, fast to code, ready for production
FastAPI framework, high performance, easy to learn, fast to code, ready for production - GitHub - tiangolo/fastapi: FastAPI framework, high performance, easy to learn, fast to code, ready for produ…
I found the story behind mailoji interesting partially because it’s something I could see myself doing. Or at least buying 10 domains and never finishing.
https://tinyprojects.dev/projects/mailoji