Posts

Showing posts from 2019

How correctly imitate dependencies?

Image
This is continuous of my previous post about why we should imitate our dependencies. I did it not long ago. I though about how do it properly and when I can say that it is correct. Start from test and real dependencies I am starting from the tests. I wrote the simple tests which, I though, are correct. That was my learned about dependencies. I had the good situation that I had some prepared tests before. During the writing test I got a knowledge. A lot of time, I verified what the system return. After it, I got the full automated tests for my dependency. Now, I am sure that dependency works like I think. Like my test use it. I think this is a very good advantage. Extract the interface for communicating The implementation to communicate is implemented and tested. Our test, if you implement it like functionality test, not code test, should show us, how we want to use our dependency. We know what parameters we use, what methods. We know what we want. That is a place where we must extr

Why you should imitate your dependency?

Image
I had a problem with applications from other people. A lot of time I must to integrate with it. Sometimes it is easy or it looks easy. Sometimes it is very, very hard. I have one solution, which let you implementing your system faster, automatically testing and don't be always depend on other applications. The rest of the advantages is on this post. About solution The solution is, such as topic suggest, implement some imitations of these dependencies. A lot of applications, we use like repository or like execute and forget. Sometimes other applications do some complicated calculating, but we don't need good result for our application. We need only be sure that our piece of application works well. We haven't been responsible by other applications. Yes, we like, but that responsible take our time, which we should invest in our application. In Java we can use Mockito to test our solution. We prepare automated tests, which testing our solution. Yes, this is correct, but how

My goals in 2019

Image
Hello, I want to declare my goal in 2019 like a post. The first reason is that I want to have a place with my goals. It is my promise to me. The second is that I think I can be an inspiration for your career goals, so let's go! I want to automate my work and live The first thing, which I wanted to do in previous years, is creating an automatic script for my job. I want to create a simple menu which allows me to automate my job like pulling the newest develop branch after login to notebook or run compile, test, run all modules and open the browser by one click. This is what I wanted and I declare to do it in 2019. I want to create a very flexible script, because I want to share it, so I think the result will be on this blog. I give to me a term for a simple, but flexible menu to end of February 2019. This should be to use to other kind of my life. Not only for work. Books, books everywhere I have the books to read: Clean Architecture: A Craftsman's Guide to Software Struct