Refactoring

Sponsored links
JavaScript/TypeScript

Reducing number of conditional clauses by command pattern

This is 3rd post in Become a better and decent programmer series.In the first post, I explained how to extract logic in ...
JavaScript/TypeScript

How to make code testable

In this post, we created a shopping application which is available on console and refactored it. It has only one class w...
JavaScript/TypeScript

How to become a better programmer

I hadn't been decent programmer for a long time because I hadn't written unit test. Decent programmer should at least be...
JavaScript/TypeScript

Dependency injection in Typescript. Constructor? Setter? Factory method?

Decoupling class relationships is important for unit testing. Less cohesion makes writing unit tests easier. This post shows 3 ways to do it. Constructor injection, setter injection, and using the factory method to inject the desired instance.
Sponsored links