» Posts by Yuri Takhteyev

Write Your Angular 1.x Applications in an Angular 2 Style

Written by Yuri Takhteyev

As the Angular team is making progress towards a “beta” version of Angular 2, it’s time to think seriously about your transition plan. At Rangle.io we have been looking into this topic for a few months now and would like to start sharing what we’ve come up with. What’s Angular 2 Again? If you are new to Angular 2, I recommend...

Read More »

JavaScript Teaser: Fabulous Fibonacci

Written by Yuri Takhteyev

Fill in the missing line of the following code that implements a function returning the next Fibonacci number every time it's called. var nextFibonacciNumber = (function() { var s = [0, 1]; return function () { // Fill in the missing line here. return s.shift(); }; })(); You should only need to add a single statement, consisting of less than 25 characters. Please post the answer on JSFiddle or similar service, and...

Read More »

JavaScript Teaser: A Missing Character

Written by Yuri Takhteyev

The function getCount() defined below is supposed to return the next number every time it's called, starting with 1. (So, the first call would return 1, the next call would return 2, the next would return 3, and so on.) function getCount() { var magic = function() { getCount = function() { return magic.x += !magic(); }; }; return magic.x = 0 + magic(); } Unfortunately, due to a one missing character, it currently...

Read More »

JavaScript Teaser: Awful Functions

Written by Yuri Takhteyev

Here is our JavaScript Teaser for May 14, 2015. Can you solve it? What does this function return and why? function awful() { function terrible(x, y, z) { return x; } terrible[0] = 'this'; terrible[1] = 'is'; terrible[2] = 'pretty'; terrible[3] = 'terrible!'; terrible.length = 4; return [].map.call(terrible, terrible).join(' '); } Please post the answer on JSFiddle or similar service, and then post...

Read More »

The Rationale for Rangle.io's Development Guidelines

Written by Yuri Takhteyev

We recently released our JavaScript Development Guidelines. This post explains how and why we developed them. Why Have Guidelines? When Rangle.io was smaller, we found it easy to synchronize our approaches and identify best practices simply by gathering in front of a whiteboard when a disagreement arose. As the company grew, it became important to have a more robust approach to ensure that everyone...

Read More »