Ehsan Arasteh

Programmer, software architect and technical writer

Read this first

Push on Github with any username you want!!

Today I’ve found a confusing feature on Github! I can push on my private repository as a valid Github user who does not have access to the project. Let me describe how is it possible:

1- First make a change in project on your local machine.

2- Change your git identity on your local machine: git config user.name “newemail@domain.com”

3-git push

4- Done.

Now when you check your project on Github, the new commit is pushed via a user who has never worked on project.

Continue reading →


Memoization in javascript

In computing, memoization is an optimization technique used primarily to speed up computer programs by keeping the results of expensive function calls and returning the cached result when the same inputs occur again. Memoization has also been used in other contexts (and for purposes other than speed gains), such as in simple mutually recursive descent parsing in a general top-down parsing algorithm that accommodates ambiguity and left recursion in polynomial time and space. Although related to caching, memoization refers to a specific case of this optimization, distinguishing it from forms of caching such as buffering or page replacement. In the context of some logic programming languages, memoization is also known as tabling; see also lookup table.

Today I want to explain how memoization can optimize implementing algorithms in javascript.
Let’s suppose we want t write a recursive

Continue reading →