-
Maybe
In functional programming, Maybe is a wrapper around a value which deals with null or undefined values for you. That means if you get that kind of value as a result of some computation, all other chained operations that follow, evaluate to that value. It turns if/else where you check for value’s nullness or undefined…
-
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…