An Ode to Code

Making time to code can be done every day. Carve out those little moments where you can automate tedious tasks or study up on that hot new Python library that takes your quality to another level. Take time to reorganize and refactor in your favorite text editor. Break your script, then break it again. Break […]

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 […]

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 […]