Hello everyone!
Today I'm going to tell about how is test task to job interview became the library Image Comparison. It's an open-source library, which is hosting on GitHub.
Before I start, let me introduce myself. My name is Roman. I'm a husband and father. I'm a software engineer in Epam Systems with 4 years of experience in IT.
The main idea of this topic is to tell, that creating an open-source product it's not wasting time, no! It's an amazing experience, which is going from all the open-source community. It's a time when you're a developer, project manager, product manager in one head.
While this library is growing I have been working with people from more than 10(!!) countries, such as the USA, Germany, Chine, India, Russia, Ukraine, etc.
Let's move on from the start of this story…
At the beginning of August 2017, I had an interview in one IT company, where is the first step was to do the test task.
The task was to create the program in Java that compares any 2 images with the same sizes and shows the difference visually by drawing rectangles. A detailed requirement can be found here.
I decided that I want to do my best. For this purpose, I decided to host my test task on GitHub. I wanted to kill two birds with one stone: provide the solution, which as open-source and research how GitHub works.
After some time, I found Marketplace on GitHub, which has a lot of services to use with the GitHub repositories. For open-source projects all free. It's the first time, where I've got that the open-source is the best community.
I've added the next services:
The results of these services can be added to README as a barge. In my opinion, it's making more interesting to read README.
When the test task was done, I've sent it and waited for feedback. I've got several issues, which were important and were added to the ISSUE section to the repository.
One of them — overlapping rectangles…
Rectangles can overlap and be included one-into-one. This behavior leads to some garbage on the resulting image. Desired effect: merge rectangles which included one-into-one to one rectangle.
After some time, I explored that many people visit my library on GitHub. Really, I didn't think that someone interested in my test project.
Next, I found that someone proposed a logo. It was a graphic designer dee-y. I wasn't in the open-source community before and this proposal was really strange for me. Why someone wants to do it for free. But he told me that he loved contributing to open-source projects. Kind of a life goals thing. It's really amazing.
Logo for the project — it's a cool idea and I accepted it. There were many options.
From
To
Final
It was the first time when I communicated in the open-source community. The new experience, a new acquaintance.
After some time I found an open GitHub issue with the bug. It was a developer from China.
The bug was about the problem with big images. He used large images and have got StackOverflowError. I was surprised, that someone used my code and found the bug, moreover, the developer created an issue.
It was my first challenge. Challenge to understand how to resolve this bug.
After some time, the QA automation engineer from Russia proposed a solution to this bug, but I declined it because the Pull-Request wasn't prepared as it must. It was my fault, I needed to see and try to understand the solution. It could help me to resolve it much faster.
By that time I'd had two major issues, which were critical.
The next stage in the development was working with Renato Athaydes, he's a software developer from Stockholm, Sweden.
He proposed changes by allowing using image-comparison as a traditional CLI. It was so exciting to hear, that someone wants to extend the usage of the image-comparison and open a new niche in development.
Renato resolved all the comments, which I created and I've added new release — v2.0. I started to create releases in the GitHub repository. This is really useful, because of the reason, that I can quickly get all the changes, which was in a specific release, all the description of the release, who is contributing it, etc.
Next, Renato asked me to add image-comparison to Maven Central. I haven't had any experience with publishing libraries to Maven Central and Renato pleased to add all the needed changes to the project for publishing. Publishing to Maven Central allows adding the library as a dependency without any problems. One big problem was to publish it.
But before publishing, I had to fix two major bugs in the system. I spent much time to fix them and in April 2019 I have added new release — v.2.0.2.
To properly publish the library, you need to deal with versioning. After researching this issue, I began to adhere to the following scheme: MAJOR.MINOR.PATCH
where:
MAJOR — version when makes incompatible API changes
MINOR — version when adds functionality in a backward-compatible manner
PATCH — version when makes backward-compatible bug fixes.
The next step is to understand how to properly configure artifactId and groupId.
I updated all my packages:
from ua.comparison.image
to com.github.romankh3.image.comparison
It makes more understandable for search where the codebase is.
And the result was release — v2.1.0.
I've received an email, where an independent consultant and the contractor asked me to see a new contribution from Mika. It's a developer from Sweden.
He said that people with bad eyesight have problems to see the diff rectangles if they are too thin. I liked this idea and added it to the project.
With these changes, I've been added a contribution made by a friend of mine, which wanted to practice using GitHub flow.
As a result, I've released a new version v2.2.0.
I've got an issue from TobseF from Karlsruhe, Germany. He wanted to use image-comparison as a library for tests. But he wanted more functionality.
At that time, the library had the main method compareImages() which returned new images as a result.
TobseF proposed to update the return value of compareImages() method to return ComparisonResult object with images under comparison, ComparisonState(match, missmatch, sizemissmatch). It will help to use in tests.
Also, he proposed to add a few configuration options, which would help him.
I liked these propositions, but changes weren't backward-compatible and removed part of the codebase, which I wanted to stay as it was. That's why I rejected changes.
Nevertheless, I decided to implement it by myself. It was a great idea for improving image-comparison.
Also, Mika proposed new changes — add areas, which can be ignored in the comparison. It's helpful for testing, too. That's why these changes were added, too.
As a result, v3.0.0 has released.
Version 3.0.0 became a real library, which can be useful for developers. I was so great, that image-comparison grows.
At the beginning of June, I've received an email from an automation QA engineer, which had several questions about image-comparison. He said, that he wanted to use it in automation QA tests for production.
Production tests! I was so excited to hear it. It wasn't a pet-project on GitHub, It was a real production. Great! I described all I could.
He said, that image-comparison was the only library which he found, which could compare two images with excluded areas. But excluded areas functionality didn't work as he wanted.
We have been working together for two months to make image-comparison better.
As a result, it was v3.1.1 release.
I understood that image-comparison can be useful for an automation QA engineer to use it in tests.
That's why I found aqa-forum, where I published an article about image-comparison. I've got useful feedback and released v3.2.0 and v3.3.0.
Please, if you know another forum, where can be shown image-comparison — write it on comments. It will help image-comparison to be better than it is.
Next, I found GitHub repositories, which contain useful links to the libraries and added image-comparison to them.
Image-comparison has 60 starts, 33 forks, 10 usages on Github as a dependency.
I think that this is a great result of the open-source community which helps me to bring a new library.
It's a long way and I believe this is only the beginning.
I'd like to say thank you all the contributors, which are building image-comparison with me.
Thanks for reading.
Best regards,
Roman.
Today I'm going to tell about how is test task to job interview became the library Image Comparison. It's an open-source library, which is hosting on GitHub.
Before I start, let me introduce myself. My name is Roman. I'm a husband and father. I'm a software engineer in Epam Systems with 4 years of experience in IT.
The main idea of this topic is to tell, that creating an open-source product it's not wasting time, no! It's an amazing experience, which is going from all the open-source community. It's a time when you're a developer, project manager, product manager in one head.
While this library is growing I have been working with people from more than 10(!!) countries, such as the USA, Germany, Chine, India, Russia, Ukraine, etc.
Let's move on from the start of this story…
Test task to the job interview. August 2017.
At the beginning of August 2017, I had an interview in one IT company, where is the first step was to do the test task.
The task was to create the program in Java that compares any 2 images with the same sizes and shows the difference visually by drawing rectangles. A detailed requirement can be found here.
I decided that I want to do my best. For this purpose, I decided to host my test task on GitHub. I wanted to kill two birds with one stone: provide the solution, which as open-source and research how GitHub works.
After some time, I found Marketplace on GitHub, which has a lot of services to use with the GitHub repositories. For open-source projects all free. It's the first time, where I've got that the open-source is the best community.
I've added the next services:
- Codacy — is a code quality service.
- Travis CI — Continuous Integration tool.
- Coveralls — test coverage history & statistics
- BetterCodeHub — code quality service.
The results of these services can be added to README as a barge. In my opinion, it's making more interesting to read README.
When the test task was done, I've sent it and waited for feedback. I've got several issues, which were important and were added to the ISSUE section to the repository.
One of them — overlapping rectangles…
Rectangles can overlap and be included one-into-one. This behavior leads to some garbage on the resulting image. Desired effect: merge rectangles which included one-into-one to one rectangle.
Test task as a Library. July 2018
After some time, I explored that many people visit my library on GitHub. Really, I didn't think that someone interested in my test project.
Logo
Next, I found that someone proposed a logo. It was a graphic designer dee-y. I wasn't in the open-source community before and this proposal was really strange for me. Why someone wants to do it for free. But he told me that he loved contributing to open-source projects. Kind of a life goals thing. It's really amazing.
Logo for the project — it's a cool idea and I accepted it. There were many options.
From
To
Final
It was the first time when I communicated in the open-source community. The new experience, a new acquaintance.
The first bug from the community
After some time I found an open GitHub issue with the bug. It was a developer from China.
The bug was about the problem with big images. He used large images and have got StackOverflowError. I was surprised, that someone used my code and found the bug, moreover, the developer created an issue.
It was my first challenge. Challenge to understand how to resolve this bug.
After some time, the QA automation engineer from Russia proposed a solution to this bug, but I declined it because the Pull-Request wasn't prepared as it must. It was my fault, I needed to see and try to understand the solution. It could help me to resolve it much faster.
By that time I'd had two major issues, which were critical.
Command Line usage. Fall of 2018
The next stage in the development was working with Renato Athaydes, he's a software developer from Stockholm, Sweden.
He proposed changes by allowing using image-comparison as a traditional CLI. It was so exciting to hear, that someone wants to extend the usage of the image-comparison and open a new niche in development.
Renato resolved all the comments, which I created and I've added new release — v2.0. I started to create releases in the GitHub repository. This is really useful, because of the reason, that I can quickly get all the changes, which was in a specific release, all the description of the release, who is contributing it, etc.
Next, Renato asked me to add image-comparison to Maven Central. I haven't had any experience with publishing libraries to Maven Central and Renato pleased to add all the needed changes to the project for publishing. Publishing to Maven Central allows adding the library as a dependency without any problems. One big problem was to publish it.
But before publishing, I had to fix two major bugs in the system. I spent much time to fix them and in April 2019 I have added new release — v.2.0.2.
Publishing in Maven Central. April 2019
To properly publish the library, you need to deal with versioning. After researching this issue, I began to adhere to the following scheme: MAJOR.MINOR.PATCH
where:
MAJOR — version when makes incompatible API changes
MINOR — version when adds functionality in a backward-compatible manner
PATCH — version when makes backward-compatible bug fixes.
The next step is to understand how to properly configure artifactId and groupId.
I updated all my packages:
from ua.comparison.image
to com.github.romankh3.image.comparison
It makes more understandable for search where the codebase is.
And the result was release — v2.1.0.
New contributor from Sweden. May 2019
I've received an email, where an independent consultant and the contractor asked me to see a new contribution from Mika. It's a developer from Sweden.
He said that people with bad eyesight have problems to see the diff rectangles if they are too thin. I liked this idea and added it to the project.
With these changes, I've been added a contribution made by a friend of mine, which wanted to practice using GitHub flow.
As a result, I've released a new version v2.2.0.
The new step of the library. May 2019
I've got an issue from TobseF from Karlsruhe, Germany. He wanted to use image-comparison as a library for tests. But he wanted more functionality.
At that time, the library had the main method compareImages() which returned new images as a result.
TobseF proposed to update the return value of compareImages() method to return ComparisonResult object with images under comparison, ComparisonState(match, missmatch, sizemissmatch). It will help to use in tests.
Also, he proposed to add a few configuration options, which would help him.
I liked these propositions, but changes weren't backward-compatible and removed part of the codebase, which I wanted to stay as it was. That's why I rejected changes.
Nevertheless, I decided to implement it by myself. It was a great idea for improving image-comparison.
Also, Mika proposed new changes — add areas, which can be ignored in the comparison. It's helpful for testing, too. That's why these changes were added, too.
As a result, v3.0.0 has released.
Version 3.0.0 became a real library, which can be useful for developers. I was so great, that image-comparison grows.
Using in production. June 2019
At the beginning of June, I've received an email from an automation QA engineer, which had several questions about image-comparison. He said, that he wanted to use it in automation QA tests for production.
Production tests! I was so excited to hear it. It wasn't a pet-project on GitHub, It was a real production. Great! I described all I could.
He said, that image-comparison was the only library which he found, which could compare two images with excluded areas. But excluded areas functionality didn't work as he wanted.
We have been working together for two months to make image-comparison better.
As a result, it was v3.1.1 release.
Niche search. July 2019
I understood that image-comparison can be useful for an automation QA engineer to use it in tests.
That's why I found aqa-forum, where I published an article about image-comparison. I've got useful feedback and released v3.2.0 and v3.3.0.
Please, if you know another forum, where can be shown image-comparison — write it on comments. It will help image-comparison to be better than it is.
Next, I found GitHub repositories, which contain useful links to the libraries and added image-comparison to them.
Now. November 2019
Image-comparison has 60 starts, 33 forks, 10 usages on Github as a dependency.
I think that this is a great result of the open-source community which helps me to bring a new library.
It's a long way and I believe this is only the beginning.
I'd like to say thank you all the contributors, which are building image-comparison with me.
Thanks for reading.
Best regards,
Roman.