Choosing a platform: advantages and disadvantages of chatbots

When answering the question of why I should do a millionth shopping list app I gathered the main requirements it must satisfy to cover my use case: multi-platform – I should be able to use it on any device, including mobile and desktop interactive – users can edit items and lists, change their status, hide done items, keep track of several contexts, etc. fast – the app should load fast to decrease cognitive resistance and load...

2021-11-22 · 4 min

Are python comprehensions faster than loops, why, and does it matter?

Python comprehensions are believed to be faster for generating collections than for loops. The question is why are they faster? What part of a comprehension is faster than in the loop? Below we answer this question and whether their faster performance is something worth considering. This will be more of an exploratory exercise, where the journey and methodology are more interesting than the destination. If you need only the conclusions, you can jump there....

2021-11-15 · 8 min

'Why' of a project: listOK

Recently I have outlined my framework for determining the ‘why’ of a project: what problem it solves and what are its main requirements and target, its return on investment, and, finally, if it is at all viable. Today we will look at how it works on a small pet project of mine listOK – a shopping/to-do list Telegram bot (project page).1. What problem does the project solve? Keeping track of items they need to buy/do in different contexts/places....

2021-11-08 · 6 min

Python comprehensions breakdown

Comprehensions are a quick and easy way to generate sequences (collections) of any kind in Python. In simple cases, they should be easy to write and, more importantly, read. However, when I was making my first steps in Python I tried to avoid comprehensions as much as possible: most of them looked convoluted and not easy at all. Better stick to good old for loop. In time my attitude changed, of course, I just needed to dive deeper to understand syntax and use cases for applying comprehensions....

2021-11-01 · 11 min

defaultdict: a hidden gem of Python standard library

Often you need to store data (counters, sums, lists, etc.) about some entities. A regular Python dictionary will suffice with one caveat: before adding information regarding a particular entity you need to check if the corresponding key exists in the dictionary, otherwise you will get a KeyError. Do not know about you, but I have written similar code many times: dct = {} if key not in dct: dct['key'] = 0 dct['key'] += 1 A better way While it is perfectly workable, it does not add to readability....

2021-10-25 · 2 min

Start any project with 'Why?' and 10 questions to do it

Before starting any project, even a small personal one, it’s important to start with its ‘why?’. There are several reasons for that. First, generally speaking, for every project you need to answer three questions: why, what, and how. It is always better to start with ‘why’ because while answering it you will better define its requirements, scope, features, etc. (‘what’ of a project) and without that, it will be difficult to work on ‘how’....

2021-10-18 · 7 min

Three reasons to pay attention to other peoples’ mistakes like your life depends on it

Everybody makes mistakes. However, we see 24/7 footage of only our life, which creates an information asymmetry: we know 100% of our mistakes and much less of other people, giving rise to feelings of “I am constantly making mistakes, I am not worthy” on the one hand, and infallibility of others on the other. Other people trying to hide, deny, or excuse away their mistakes exacerbates the problem. Feeling especially “prone to mistakes” is not a good place to be, regardless of whether it is true....

2021-05-02 · 2 min