Month summary - December 2020

Posted by Tobiasz Kedzierski on 31.12.2020

December 2020

I am aggregating here some more or less interesting stuff of various IT related materials which I came across this month. Some of them are strictly related to the things I did or am currently doing.

Some thoughts

This month was quite limited due to the long Christmas holidays during which I did not spend too much time in front of the computer.

Some time ago in one of the projects I came across the problem of too long response time on one of the websites. The form on this website is responsible for triggering operations dependent on external APIs. The request timeout on Heroku where it is deployed is limited to thirty seconds and apparently, from time to time handling this form exceeds that limit. Not only does it spell very poor user experience, it also causes server error when timeout is exceeded and the requested task is only partially completed.

Inspired by the blog post about using Celery with Flask, written by a great developer Miguel Grinberg, I made something similar in Django. The proposed solution is to trigger a long-running task on the website. The task will be performed asynchronously by the Celery worker and a dynamic progress bar will inform about its status. In the repository django_celery_progress_bar I created a simple Django app with two Celery workers. The first worker called celeryworker is responsible for executing scheduled periodic tasks, while the second one, called celeryworker_highprio is responsible for handling tasks triggered by the web form. The response from the app is returned immediately with initial task status. Then the progress bar updates are handled by a javascript function executed in a loop until it finishes.

Progress Bar

On another note, I have been tracking my expenditures for many years. At the beginning I used spreadsheets but updating it was cumbersome and inconvenient. To make it more friendly I wrote a web app for it in Flask some time ago: Home-Budgeting-App. I have used it for a year approximately. I decided to rewrite it to Django to be able to use its powerful admin panel. This is how (yet_another_home_budgeting_app) was created.

Articles

Always leave the code better than you found it

What are some ways to improve the code when you are in it?

Build the Perfect Productivity System with Paper Notebooks and Digital Tools

Combine the Bullet Journal and other note-taking methods with your favorite apps

Productivity: Meaning, Concept, Formulas, Techniques, Measurement and Advantages

Productivity refers to the physical relationship between the quantity produced (output) and the quantity of resources used in the course of production (input).

How I Hired a Freelance Editor for My Blog

“Hey, you had great ideas in that post, but I never read them because your repetitive sentence structure lost my attention, and I closed the tab.” An editor actually can give me that kind of feedback.

Laziness Does Not Exist

But unseen barriers do

The Complete Guide to Effective Reading

Learning is a heavily misunderstood concept.

How to Prioritize When There’s Always More To Do

Advice for managing life's chaos and focusing on what's important

How much I made as a really good Engineer at Facebook

When I moved to US to join Facebook a decade back, I had no idea whether the offer I was given was good or bad.

How to Make Your Code Reviewer Fall in Love with You

This article describes best practices for participating in a code review when you’re the author.

Warren Buffett’s “2 List” Strategy: How to Maximize Your Focus and Master Your Priorities

Let's talk about the simple 3-step productivity strategy that Warren Buffett uses to help his employees determine their priorities and actions.

If You Commit to Nothing, You’ll Be Distracted By Everything

The Kaihogyo is a 1,000 day challenge that takes place over seven years.

This Is Water: Overcoming Bias and How to Think Real Good

Once upon a time, there used to be a great and acrimonious debate in philosophy about whether people had “mental imagery” — whether or not people actually see a little picture of an elephant when they think about an elephant.

Google Cloud (over)Run: How a free trial experiment ended with a $72,000 bill overnight

Billing budget? Free plan? All useless when buggy code went into overdrive

Shifting to a remote mindset

On moving away from the in-office default and considering how to achieve what you value.

How to Think: The Skill You’ve Never Been Taught

“I’ve spent my life trying to undo habits—especially habits of thinking. They narrow your interaction with the world. They’re the phrases that come easily to your mind, like: ‘I know what I think,’ or ‘I know what I like,’ or ‘I know what’s going to happen today.’ If you just replace ‘know’ with ‘don’t know,’ then you start to move into the unknown. And that’s where the interesting stuff happens.” — Humans of New York

Python

Using Python's bisect module

The goal of the bisect module is to allow you to efficiently search and update sorted lists.

Build a Flask microservice with OpenFaaS

Which is better Flask or serverless-style Python functions? Why not have both?

Tools

ripgrep (rg)

ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern. By default, ripgrep will respect your .gitignore and automatically skip hidden files/directories and binary files.

todo.txt-cli

A simple and extensible shell script for managing your todo.txt file.

fastai/ghapi

A delightful and complete interface to GitHub's amazing API

Typer

Typer, build great CLIs. Easy to code. Based on Python type hints.

diagrams

Diagram as Code.

Videos

The Art of Code - Dylan Beattie

YAML Tips for Kubernetes

Peter Norvig: How Computers Learn

Czy leci z nami DevOps? Webinar

DjangoCon US 2017 - End-to-End Django on Kubernetes by Frank Wiles