Hi, I'm Mohammad Kaab and i'm a software developer.

Learning new technologies is my hobby. Two subjects which I'm mainly focus on them are Refactoring and Testing.

One of the big problems that many developers deal with is the lack of a fixed deployment cycle, which is different due to problems with the system being developed. I try to follow the rule of TDD as well as refining the code in a timely manner to initially stabilize the system and then apply the new features.

One of the key roles that I had in each company, it was the bold subject of refactoring and writing tests. I patiently looking for the solution and i'm always being greedy to have the system as flexible as it could using SOLID principle.




I would like to start this article with an example which has been taken from a real project, I usually do like to talk about real examples instead of using FOO|BAR example.

Before we start to explain different types of test double, I would like to explain what is the purpose of using them in the testing environment. When we start writing tests we are facing some situations which we need to avoid calling or using the real THING and we should also replace that thing which it could be (Class, method, endpoint, package) with something else that we are calling it Test Double.


Read more ...



I remember when I wanted to write my first test, I was very nervous and I did not know what should I do and from where should I start. I was totally terrified because I was thinking of losing time and not accomplishing the whole feature. And I think it was very normal behavior of my self.

because now when I think about it, writing tests for the first time it's very horrifying and actually you don't know if you are in the right way because it's your first time. so I have accomplished my first test case and I started to work on the other ones. and after some time when I get back to my code I was shocked because I was using a very old way to write tests and it was a very hard time to just write one test, I understand my self at that moment. but after that, I get a little bit better.

 

Now here is my recommendation of how to start writing tests before writing any code. 


Read more ...



This is my first article which I started writing it in English, Actually, I had a website with the name of code-design but unfortunately, I have forced to change the domain. so now I'm here with a new domain. hope you'll enjoy the article, let's start without any further ado.

You started working on a project which you don't know really what's going on in the project completely, you still in the investigation state. but you know what is the concept and logic behind the scene because another developer who wants to leave the job was explaining for you what's going on in a very superficial way. 


Read more ...