On using Immutable.js
I’ve been using Immutable.js for quite some time in my non-trivial React/Redux projects and it has been paying off. Beside Redux’s requirement of never mutating its state, the library provides other relevant features that were a deciding factor for me to start using it. This article explains very well, what immutability is, why it is…
Autocomplete in RxJS (code walk)
Autocomplete functionality is probably the first use case you hear for using RxJS. Here is one possible implementation for it (code can be also found in JSBin): let input = document.querySelector(‘input’) let inputStream = Rx.Observable.fromEvent(input, ‘input’) let ul = document.querySelector(‘ul’) let responseStream = inputStream .debounceTime(500) .map(e => e.target.value) .filter(value => !value | value.length > 2)…
InfluxDB: a time-series database to go
InfluxDB is exciting new technology I’m learning at the moment. It’s a specialized database for storing time series. In short time-series is defined by its name and metric name(s). It consists of sequence of {timestamp, metric values} ((Baron Schwartz’s Blog: Time-Series Requirements)) where each record is uniquely defined by timestamp. The most obvious use case…
Testing concurrent code in Golang
I wrote a package which tracks certain hashtags on twitter and part of the package is adding and removing hashtag from list of hashtags. Plan is that this can be done from different goroutines hence tracking/untracking is done by putting hashtag in channels. It looks like this: var ( trackChan = make(chan string) untrackChan =…