Documentation is the Gateway to Delegation

The first step to offloading a task is writing down how to complete it. Once the process is typed into a lean text file or wiki page, it can be learned by another human. This helps your team, but what’s in it for you? The most selfish programmers probably want to free up their time […]

Fix Spelling and Grammar with language_tool_python and textblob

Below are two practical Python libraries for text processing. This function uses textblob’s spelling correction along with language_tool_python, which applies grammatical corrections via the Language Tool API. I added these text processing transformations into my concept text generation app. These are free, public APIs up to around 20 requests per second. You can send both […]

How to Upgrade Requests in the Bash Console

This command can be used to upgrade your Python requests library with pip, Python’s package manager. It is tailored for a PythonAnywhere environment. I suppose this command works on any Bash console, but if you’re running your app with pythonanywhere, you can find the bash console here: https://www.pythonanywhere.com/user/your_username/consoles/ Install requests with this command: Substitute in […]

Experiencing Flow While Coding

Yesterday, I experienced a flow state where I became manically obsessed with perfecting a script I was working on. I think it’s beautiful code, about 100 lines long without docstrings. It solves a real need and it felt great to write it. Some scripts feel terrible to write and you know they’re bad. However, this […]

ftfy, The Wonky Text Fixing Python Library

Every Python programmer has undoubtedly come across some crazy characters. The ftfy library “Fixes Text For You” and acts like a swiss army knife when you’ve got questionable characters breaking your script. In my case, an HTTP request was failing because of weird cryptic letters hiding in the data when it was only supposed to […]

How to Track Python Script Completion

Did your script run to completion? Sure, you might log some tracebacks along the way or terminate the program early with sys.exit(). But did your script actually run completely to the end? I have yet to use the Trace module but it seems worth checking out also. Visualization tools like heartrate are worth mentioning too […]