javascript
4 01 2016
Maks Nemisj | javascript |
I still have to used to this new arrow functions and implicit return statement. If you’re unfamiliar with them, here is the doc – https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions Look at this two ‘almost’ identical parts of code and think what is the difference between them? code-one.js and this one code-two.js They look the same, except that one will […]
ecma2015, functions
6 10 2015
Maks Nemisj | javascript |
UPDATE (15 May 2020) : I see a lot of comments regarding TypeScript and that there is no issue with setters/getters while using static typing. Of course, you can safely use getters/setters in the environment, which guarantees static type check, but this article is about vanilla JavaScript. This article is my opinion why I think this […]
classes, getters, javascript, setters
10 09 2015
Maks Nemisj | javascript |
Currently I’m working on a project which uses GitHub. Here we work with feature branches, which means every feature gets its branch and every branch has to go through the pull request and then merged back to the main line. Whenever branch is merged back it get’s deleted in the GitHub with button “Delete branch”. […]
bash, git, github, python, scripts
24 07 2015
Maks Nemisj | javascript |
Have you ever needed to repeat a string or character multiple times? Some times I have this need ( don’t ask why ) and it was always annoying for me to do this. For such a simple operation, you have to write for loop and concatenate string. I know, there is now repeat available in […]
bit shifting, experiment, javascript
17 06 2015
Maks Nemisj | javascript |
Embellishment of a story Recently I had to setup a new mini webserver. The functionality of this server was not very complex: 1. Fetch JSON data from [Jenkins](http://jenkins-cli.com) server 2. Transform JSON into another format 3. Read files from the file system 4. Return the result to the user I took express.js and node-jenkins package […]
async, callbacks, es2015, generators, javascript, node.js
21 05 2015
Maks Nemisj | javascript |
In this article I will explain “Why should you test react.js components”, “How can you do testing” and “What are the problems you might come across”. Testing solution which I use, doesn’t rely on the Test-utils of React and on DOM implementation ( so that you can do the node.js testing ). Why/How to test […]
javascript, mocha, node.js, react.js, test
7 05 2015
Maks Nemisj | javascript |
Sometimes easy things appear to be more complicated, than initially thought. For example conditional IE comments in HTML, which I had to add today to a code I write. At my work we have to support Internet Explorer browser version 9 an higher . In order to use media-queries we decided to use https://github.com/weblinc/media-match polyfill […]
comments, html, IE, isomorphic, javascript, react.js
15 04 2015
Maks Nemisj | javascript |
UPDATE: Created npm module to fix this stuff – https://www.npmjs.com/package/clean-npm-tmp Today I came to work and it appeared that builds on our Jenkins ( CI environment ) are broken due to “No space left on device” error. Further investigation showed that the whole /tmp folder was filled with strange “npm-xxx” folders, which in their turn […]
bash, node.js, npm
27 03 2015
Maks Nemisj | javascript |
How often do you wanted to go to the root of the git repository? If not very often, then I do it quite often. Mercurial has this nice command hg root, but git not. In order to do it in git you have to use some long command ‘rev-parse –show-toplevel’ which I even can’t remember. […]
bash, git
24 03 2015
Maks Nemisj | javascript |
How often have you done this in you code? Instead of this? While it might be used to accomplish the same result, the code above has some hidden pitfall in it. Image situation that you always use the code above, also inside your for statements. If you wouldn’t be careful enough, you might trap in […]
best-practice, javascript