Let’s see how to edit descriptions of Jira issues in Vim or Neovim. We will do this by installing a browser extension that can open text fields in an external editor. We will also cover how to make Jira issues syntax-highlighted in Vim, how to enable spell checking, and how to use snippets to speed up the writing of Jira issues. The approach described in the blog post can be used to edit text fields on other sites as well, such as GitHub or Stack Overflow.| Petr Zemek
In this post, I take a trip down memory lane by looking back at my professional career so far.| Petr Zemek
C++11 introduced an alternative syntax for writing function declarations. Instead of putting the return type before the name of the function (e.g. int func()), the new syntax allows us to write it after the parameters (e.g. auto func() -> int). This leads to a couple of questions: Why was such an alternative syntax added? Is it meant to be a replacement for the original syntax? To help you with these questions, the present blog post tries to summarize the advantages and disadvantages of this ...| Petr Zemek
In this article, I provide tips on choosing a software-engineering career path that is right for you. We will take a look at whether you should stay as a Senior Software Engineer, switch into management (Engineering Manager), or move into technical leadership (Staff Software Engineer).| Petr Zemek
Recently, I have stumbled upon an apparently strange situation in which a non-empty Python package was empty after it got imported. Let’s take a close look at that issue because it may happen to anyone.| Petr Zemek
An example of a subtle bug that you can run into in C and C++: accidentally overwriting another local variable. Such an issue can manifest only on certain systems, and can be hard to debug if you have not seen it before. An oldie but goodie.| Petr Zemek
My personal musings on the common thought that a senior developer is only a stepping stone to a manager.| Petr Zemek
Let’s have a look at a simple piece of Python code that I have both accidentally written and seen in code reviews which does an entirely different thing than expected.| Petr Zemek
The requests library is arguably the mostly widely used HTTP library for Python. However, what I believe most of its users are not aware of is that its current stable version happily accepts responses whose length is less than what is given in the Content-Length header. If you are not careful enough to check this by yourself, you may end up using corrupted data without even noticing. I have witnessed this first-hand, which is the reason for the present blog post. Let’s see why the current r...| Petr Zemek
In this post, we will implement multiprocessing.pool.ThreadPool from Python in Rust. It represents a thread-oriented version of multiprocessing.Pool, which offers a convenient means of parallelizing the execution of a function across multiple input values by distributing the input data across processes. We will use an existing thread-pool implementation and focus on adjusting its interface to match that of multiprocessing.pool.ThreadPool.| Petr Zemek
One of the first things that C++ programmers learn about auto is that bare auto never deduces a reference. In the present post, I show you two examples when it seemingly does. The first one involves proxy objects. The second one concerns structured bindings from C++17.| Petr Zemek
It is often useful to have a way of ensuring that a program is running at most once (e.g. a system daemon or Cron job). Unfortunately, most commonly used solutions are not without problems. In this post, I show a simple, reliable, Linux-only solution that utilizes Unix domain sockets and the abstract socket namespace. The post includes a sample implementation in the Rust programming language.| Petr Zemek
Celery is an asynchronous task queue based on distributed message passing. It is written in Python, but the protocol can be implemented in any language. However, there is currently no C++ client that is able to publish (send) and consume (receive) tasks. This is needed when your project is written in a combination of Python and C++, and you would like to process tasks in both of these languages. In the present post, I describe a way of interoperating between Python and C++ workers via the AMQ...| Petr Zemek
We will implement the DBSCAN clustering algorithm in Rust. As its input, the algorithm will take a distance matrix rather than a set of points or feature vectors. This will make the implemented algorithm useful in situations when the dataset is not formed by points or when features cannot be easily extracted. The complete source code, including comments and tests, is available on GitHub.| Petr Zemek
This post introduces my Rust wrapper for ssdeep by Jesse Kornblum, which is a C library and program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length. In contrast to standard hashing algorithms, CTPH can be used to identify files that are highly similar but not identical.| Petr Zemek
When talking about T&& in C++, you may have heard about universal references and forwarding references. This may get you wonder. Why there are two names for an apparently same concept? Is there any difference between them? Which one should I use? Let’s find out.| Petr Zemek
Have you ever wondered which of the following variants you should use in range-based for loops and when? auto, const auto, auto&, const auto&, auto&&, const auto&&, or decltype(auto)? This post tries to present rules of thumb that you can use in day-to-day coding. As you will see, only four of these variants are generally useful.| Petr Zemek
Upon sending a revised version of a submitted paper to a journal, one is generally required to enclose a statement on the revision based on the referees’ report. In this statement, you basically respond to comments from the referees. A friend of mine asked me whether I could publish the LaTeX template I have been using for writing such statements. Well, here you go :).| Petr Zemek
If you have been using Git long enough, you have probably heard about git add -p/--patch, which allows you to selectively stage parts of files. However, did you know that many other Git commands support this argument as well? Among them are commit, reset, checkout, stash, and log, and they represent the main topic of the present post.| Petr Zemek
I have been using Vim as my primary (and only) text editor since 2009. Over the years, I have discovered many useful things about Vim that I wish I knew earlier because they dramatically improved my text-editing efficiency. In this post, I would like to share the most important ones with you.| Petr Zemek