Moving My Personal Website from Heroku to Github Pages

When I first built my personal website I deployed it to Heroku. At that time Heroku was the best option for me because it offered a free tier and it was relatively easy to use. But one thing I did not like about it was that the application dyno—the container that handles all the HTTP traffic to the site— would go to sleep if my website receives no traffic in a 30-minute period.... Read More

Is your Python loop followed by an else clause? If yes, read on

Today I decided to start my day by reading about common anti-patterns in Python and how to fix them. An anti-pattern in the context of programming is a piece of code that solves a problem but that has the potential of having unintended bad consequences. One of those anti-patterns is the use of an else clause right after a loop without a break statement. As the article explains, the else clause following a loop is only executed when the loop sequence becomes empty.... Read More

Continuous Integration and Continuous Delivery make life easier

I have been hearing the terms “continuous integration” and “continuous delivery” for quite some time. However, it wasn’t until last week that I decided to not only learn more about them but also use them in my own projects. What is continuous integration? Continuous integration (CI) is a development practice where developers push code to a central repository several times a day. Every time code is pushed to the repository an automated build is run to verify that the new code did not cause any errors/bugs in the system.... Read More

How to run Python 2 and Python 3 together on Windows 7

I have always wanted to have both Python 2 and Python 3 installed and running on my Windows 7 computer, but I feared that installation was going to be a nightmare. However, today I put my fear aside and dove right into the task. At least two scenarios are possible. While my experience was with the first scenario, the second one is also possible. So here is how to approach each one: ###Scenario 1: Python 2, virtualenv and virtualenvwrapper are already installed... Read More

5 Tips for writing more concise and elegant code in Python

Last week, I was reviewing some of the first lines of code I wrote when I was learning python three years ago. While they worked, I now realise that there are many things I could have done in a more elegant and concise way. Of course, when learning a new programming language one is always encouraged to build things from scratch, to write one’s own functions, classes or methods to do things even when such code might already exists.... Read More

    Page 1 of 1