One common type of problems reappearing over and over again on stackoverflow.com is “reusing” a single instance of any of the Subject classes and then being surprised that it doesn’t work as one might expect.

Let’s start by talking about Subjects and their internal state and why is it so important to be aware of complete and error notifications. Then we’ll move to more interesting examples with ReplaySubject and BehaviorSubject classes.

Reusing a single instance of Subject

All Subjects have an internal state that reflects the most basic principle of Rx. Every Observable emits zero or more next notifications and one complete or error notification but never both. …


In 2015 I worked on a web app in AngularJS that seemed to be very simple but over time it evolved into a quite large project and I was hit by Angular’s performance soon and really hard.

I realised how little information is available apart from the most basic recommendations and since I’ve spent some time optimising our AngularJS app to run well even with 100 000 rendered expressions at once I thought it would be worth sharing it with others.

Everything in this article is related to AngularJS 1.4 and the later part to Polymer 0.5 but I belive it’s still relevant because there’re so many existing AngularJS apps and Angular 2.0 is yet to come. …


Node.js is a brilliant product. It gives you so much freedom and I think it’s ideal for single purpose web servers.

Another great thing is WebSocket. Nowadays it’s widely supported and its usage is mostly in very specific applications such as games or Google Docs. So I wanted to try to make some very simple real world application.

WebSocket requires it’s own backend application to communicate with (server side). Therefore you have to write single purpose server and, in my opinion, in this situation Node.js is much better than writing your server in Java, C++, PHP or whatever.

Btw, if you’re looking for some more in-depth information on how WebSockets work I recommend this article Websockets 101. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store