angle-up arrow-clockwise arrow-counterclockwise arrow-down-up arrow-left at calendar card-list chat check envelope folder house info-circle pencil people person person-plus phone plus question-circle search tag trash x
26 June 2020 Updated 30 June 2020 by Peter
post main image
I decided to temporarily shift focus from developing the software for my CMS / Blog to a smaller project. Main reason is that I hoped to learn new things about Python that are useful. I always wanted to have my own IMAP client software. Maybe my choice was also heavily influenced by some annoyance about the IMAP client Dekko2 for Ubuntu Touch, the OS of my mobile phone. I know that I should be happy ...
Read more
17 June 2020 Updated 17 June 2020 by Peter
post main image
When searching for something on the internet you sometimes bump into an article that perfectly describes what you are already telling friends, colleagues for many years. Whether you are a publisher, a software developer, an advertising company, this Trevor Jim's article is a must-read. Here are the first lines: Internet advertising is a company town February 28, 2017 If you’ve watched a lot ...
Read more
17 June 2020 Updated 17 June 2020 by Peter
post main image
Using exceptions in Python looks easy but it is not. Probably you should study exceptions and exception handling before writing any Python code but TL;DR. There are examples on the internet, unfortunately most are very trivial. Anyway, I researched this and came up with some code I thought I share with you. Leave a comment if you have suggestions. What is an error and what is an exception, what is ...
Read more
29 May 2020 Updated 29 May 2020 by Peter
post main image
There are many types of vector icons. In this post I only look at SVG-icons, and limit myself to navigation icons, sometimes also called interface icons. These icons not only look nice on websites, they also color and scale like fonts. And they are very functional. Imagine a button with the text ' Edit' in it. Replace this text with a pencil-icon and you get more space on the page while it still is ...
Read more
12 May 2020 Updated 12 May 2020 by Peter
post main image
This site is running Flask. It uses DispatcherMiddleWare to run the frontend app and the admin app. The Flask documents state that the Flask applications in this case are entirely isolated from each other. That is true but often there is a lot of code we want to share between these apps. Things we want to share Both apps use the same database meaning we want to share the models.py file. Then we ...
Read more
26 April 2020 Updated 30 June 2020 by Peter
post main image
This website uses Flask, (plain) SQLAlchemy with Alembic for migrations and MariaDb. If you do not use these, this post probably is not what you are looking for. In a previous post I wrote why many websites should use UUID Primary Keys instead of Integer Primary Keys. Even if you have a high performance website then probably only few tables are responsible for this performance. High performance websites ...
Read more
16 April 2020 Updated 16 April 2020 by Peter
post main image
You have a website and it works fine. But you notice that certain visitors are trying to mess with your forms. They come from specific IP addresses. Then there are also bots that are scanning your site. Some are necessary but others should stay away. Don't you hate this? I do. In the past I once wrote a module that returned a not so nice response very slowly, byte-by-byte, slowing down their systems. ...
Read more
9 April 2020 Updated 9 April 2020 by Peter
post main image
We all know the Integer Autoincrement Primary Key. Works great, much software is doing it this way. It is fast. But it also has limitations. An alternative for the Integer Autoincrement Primary Key is the UUID (Universally Unique IDentifier) Primary Key. A UUID is a 128-bit number. It can be represented by a string, for example: 05390f2b-48e8-45c7-8ae4-08272dc69122 or a hex string (the same as above ...
Read more
24 March 2020 Updated 25 March 2020 by Peter
post main image
Flask is hot. Everyone loves Flask. I believe the main reason is that it is so easy to start with Flask. You create a virtual environment, copy-paste a few lines of code from some example, point your browser at 127.0.0.1:5000 and there is your page. Then you hack a little with a Jinja template and you get a beautiful page. You can even run Flask on a Raspberry Pi, isn't that wonderful? My main reason ...
Read more
10 March 2020 Updated 11 March 2020 by Peter
post main image
The problem: a customer wants an application with a certain functionality and want this yesterday. What you do is look for a plug-and-play solution, libraries and/or extensions. You tell your customer that you can do it, customer is happy, you do it. For example, you take Wordpress, select and configure some plugins. Problem solved, or is it? Yes, the problem is solved but for how long? After some ...
Read more