luminousmen
I P

Asynchronous programming. Cooperative multitasking

This is the second post of a series about asynchronous programming. The whole series tries to answer the simple question: "What is asynchrony?". At first, when I just started digging into the question - I thought that I know what it is. It turned out that I didn't know a clue about what asynchrony is all about. So, let's find out! Whole series: - [Asynchronous programming. Blocking I/O and...

Asynchronous programming. Blocking I/O and non-blocking I/O

This is the first post of a series about asynchronous programming. The whole series tries to answer the simple question: "What is asynchrony?". At first, when I just started digging into the question - I thought that I know what it is. It turned out that I didn't know a clue about what asynchrony is all about. So, let's find out! Whole series: - [Asynchronous programming. Blocking I/O and...

Concurrency and parallelism are two different things

It may seem that there is no difference between concurrency and parallelism, but this is because you did not understand the essence of the matter. Let's try to understand how they differ. ![Concurrency](/media/concurrency.jpg) **Concurrency** is the execution of more than one task is being processed at the same time inside the application. An important detail is that tasks are **not...

__context__ vs __cause__ attributes in exception handling

Since Python 3.0, raising an exception in an `except` block will automatically add the caught exception in the `__context__` attribute of the new one. That will cause both exceptions to be printed. Essentially this is a way for the current exception to carry information about the previous exception. For example: ```python try: raise ValueError('ValueError') except ValueError: raise...

What is the definition of a good software engineer?

"What is the definition of a good software engineer" - I like to ask this question everybody who somehow connects to software development. And I always got different answer. It depends on the people and their positions: managers see good software engineers to have a good understanding of the tasks, respect deadlines and soft skills. Middle/Senior software engineers always start with the words...

Ode to Unit Tests

> The Law of Testing: The degree to which you know how your software behaves is the degree to which you have accurately tested it. > -- "Code Simplicity" In order to verify the correctness of an application we use different kinds of tests: some check the logic of a small function or class, others check all the system layers from UI to databases and external services. Some kinds of tests could...