Category: Coding

  • 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…

  • Self-closing tag: Atom plugin for deleting redundant closing tag

    Couple days ago I’ve published my first plugin for Atom code editor which I really enjoy using. This plugin is named “self-closing tag” and is useful for situations when you expanded a HTML tag and than you make it self-closed ((By typing “/” before “>” in opening tag.)). Now instead of manually deleting redundant closing…

  • 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 =…