Category: Coding

  • 1 tip for writing more understandable code in JavaScript

    I find JavaScript code more understandable if it’s using functions heavily because when written properly ((They are small and do one thing only.)), they typically convey what they do. That does not mean you should start practicing functional programming at once. You can just start by using utility libraries like lodash or underscore more when…

  • Using Ramda’s evolve in Redux reducers to create new state

    Ramda is a JavaScript utility library similar to lodash or underscore ((I haven’t used underscore in ages though)) with an extra touch – it’s designed to be better suited to functional style of programming. For example it provides automatic currying ((Remodeling function in a way that instead of accepting multiple arguments at once it accepts…

  • Functional programming

    2016 was the year my understanding and appreciation for functional programming grew big time. Functional programming (FP for short) is a programming model old as programming but its popularity gained traction only a couple of years ago. According to Wikipedia, it’s “a style of building the structure and elements of computer programs—that treats computation as…

  • Creating CSV file with different datasets

    Lately I’ve been into Java (as part of programming in Android apps) and I had to code a logic that takes different datasets (for example data about game, data about player stats, different headers) and writes them in single CSV file. This is not a task when you simply write 2D array of string to…

  • Reactive React component using MobX (counter example)

    In the following (muted) video for beginners I show how simple it is to make a React component reactive using MobX. Component displays counter’s value and buttons for incrementing and decrementing it and when user clicks the buttons, value is updated on screen accordingly. The main takeaway from this example is this: when observable variables…