Refactoring function for the least amount of lines

I had the opportunity to review a small piece of code. From the first look, I knew this is a beautiful example ready for refactoring.
Continue reading

Posted in Refactoring | Tagged , , , , , | Leave a comment

Angular calendar datepicker creates incorrect date one day behind the selection

I was working at the bug fix task, which was from first sight very strange. In an Angular-Spring application, at frontend Angular calendar datepicker I choose a specific date. However, the database suddenly saved one day before the initially picked date.
Continue reading

Posted in Bug hunt | Tagged , , | Leave a comment

vim – How to quickly edit with vim in a terminal?

This article is a small tutorial with a few simple steps on how to quickly edit with vim editor. Knowledge can be used for a quick edit of any document in the Linux terminal.

Continue reading

Posted in Tutorials | Tagged , , | Leave a comment

SQL – How to use NOT LIKE in SQL?

I had a problem with one column where corrupted data occurred. Column stored images in the base64 form. However, because of the programming error, it sometimes was also storing image description on image removal.

This article will demonstrate at this example usage of SQL’s NOT LIKE command.

Continue reading

Posted in Tutorials | Tagged , , , , | Leave a comment

Git – How to remove folder recursively from Git

From time to time, I accidentally start versioning some folders or files which should be not part of the repository. However, the commit is made, and the content is pushed to Git repository.

This article contains several clever commands for removal of unwanted files in your git repository.

Continue reading

Posted in Tips & tricks | Tagged , , | Leave a comment

Windows – How to kill port at Windows?

How to set port free which is assigned to a certain process/application? This tutorial shows how to kill the port at Windows operation system.

Continue reading

Posted in Solutions, Uncategorized | Tagged , | Leave a comment

Simple Scala methods for sum and maximum

I am learning Scala. I have been confronted with a simple task to create functions for finding sum and maximum in the list of numbers. A precondition is that both functions should be solved recursively.
Continue reading

Posted in Scala | Tagged , , , , , , | Leave a comment

Convert varchar to text in PostgreSQL

If you work with PostgreSQL you will definitely get into the situation when you want to change the data type for the text fields in your tables. This is a simple hint how to convert varchar data type to text data type.

Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

3 basic mistakes for NullPointerException when Mock

You might get NullPointerException exception when you try to mock object in your tests. This article is a short list of 3 most common reasons why this might be happening.

Continue reading

Posted in Testing | Tagged , , | Leave a comment

How to create file in different directory in PHP

Let’s imagine I want to create a file in a different folder than where I am in the current moment. How to create this file in the different folder? This article will help with a small piece of code achieve creation of a file in the different folder.

Continue reading

Posted in Uncategorized | Leave a comment