What are bitwise shift (bit-shift) operators and how do they work?

The bit shifting operators do exactly what their name implies. They shift bits. Here’s a brief (or not-so-brief) introduction to the different shift operators. The Operators >> is the arithmetic (or signed) right shift operator. >>> is the logical (or unsigned) right shift operator. << is the left shift operator, and meets the needs of … Read more

What is a callback function?

Developers are often confused by what a callback is because of the name of the damned thing. A callback function is a function which is: accessible by another function, and is invoked after the first function if that first function completes A nice way of imagining how a callback function works is that it is … Read more

What is dependency injection?

Dependency Injection is passing dependency to other objects or framework( dependency injector). Dependency injection makes testing easier. The injection can be done through constructor. SomeClass() has its constructor as following: Problem: If myObject involves complex tasks such as disk access or network access, it is hard to do unit test on SomeClass(). Programmers have to … Read more