RxPY3: Creating a rolling buffer using buffer_with_count

👉 I created a github-repository with this and other rxpy (version 3) examples. You can find it at rxpy3-examples on github. When I first looked at the different buffer-operators, I was very surprised to find that none of seemed to provide a simple rolling (aka sliding) buffer. This seemed like something that is so basic that it should be part of the core library. It turns out, I was just not reading the documentation close enough: buffer_with_count(count=buffer_size, skip=1) will give you a rolling buffer of size buffer_size. [Read More]

Debugging postgres: Showing recent queries

Postgres’ built-in pg_stat_activity-view shows the list of all open connections, including the current query from that connection in the query-column. What if that is not enough? How can you see not only the current query, but a list of recent queries? That is what the pg_stat_statements extension is for. Enabling the pg_stat_statements-extension Unlike pg_stat_activity, which is active by default, pg_stat_statements needs to be enabled on the postgres server. There are two steps: [Read More]

Debugging postgres: List all connections

Sometimes want a list of all connections to your postgres database. Postgres maintains this list in an internal datastructure that you simply query like this: SELECT * FROM pg_stat_activity; This will give you something like this (I have removed many columns to make it more readable here): state application_name client_addr wait_event NULL NULL AutoVacuumMain NULL NULL LogicalLauncherMain idle test.trader.PersistentQueue(data) ClientRead active PyCharm 2021.2.3 NULL NULL NULL BgWriterHibernate NULL NULL CheckpointerMain NULL NULL WalWriterMain In this example, there are two client connections: one from PyCharm, one from my test-application showing up as “test. [Read More]

The Open Web Application Security Project's Top 10 of 2021

The OWASP 2021 report is a good reminder to educate myself about web security. For example, I know about current password hashing algorithms (i.e. Argon2), but I need to educate myself about authenticated encryption vs only encryption. This year’s top 10 are:

No-code and low-code tools cannot solve software engineering problems

No-code and low-code tools a category of software tools which let people create software solutions without writing code (or very little code). I have had extensive experience using such tools over the years, and I have always felt that they were missing some crucial elements. What no-code and low-code tools are still missing At a certain point the solutions people create using no-code tools are reaching the same complexity as software written in a general purpose programming language. [Read More]

Google's knowledge sharing process

Today I learned how Google facilitates (developer) knowledge sharing across their teams. Internally, Google calls this the readability process, a form of standardized mentorship through code review. “Code-review?”, you may ask, “What’s so special about that? Don’t all successful technology companies practice code-reviews?” You are right, and Google also has these regular code-reviews. But the readability process, is different in some key ways. Here is how I understand it: readability reviews are mandatory for all code commits (not on the commit-level, of source, but for a set of commits) readability reviews are performed by qualified individuals, who are well versed in the companies’ software development guidelines and best practices anyone can become a qualified readability reviewer, ensuring that knowledge is shared across teams, essentially across the whole company Anyone can become a qualified readability reviewer To qualify, you simply need repeatedly submit your pull requests to a central group of qualified reviewers for your specific programming language. [Read More]

RxPY3: Using multiple observers with the buffer-operator

I created a github-repository with the two rxpy (version 3) examples from this and another previous blog-post. You can find it at rxpy3-examples on github. My previous example of the rxpy3 buffer-operator demonstrated the basic usage of the buffer-operator by using two interval-observables. In today’s example I will create a custom observable. While this particular observable is very simple, it demonstrates how to create an observable from a non-reactive data-source. [Read More]

RxPY: How to use the buffer-operator

I created a github-repository with the two rxpy (version 3) examples from this and another previous blog-post. You can find it at rxpy3-examples on github. When I was trying to understand and use the buffer operator of RxPy3, I noticed that there are not a lot of code samples out there. The few examples are usually for version 2 of RxPy, and that does not help if you are a complete RxPy3 n00b, like me. [Read More]