Profile cover photo
Profile photo
Andrii Polunin
41 followers
41 followers
About
Posts

Post has attachment
The Difference Between URI, URL and URN
This small post briefly explains the difference between URI, URL and URN. Sometimes the first two terms are used interchangeably, and the last one is encountered less frequently in software development. Anyway, it is a good idea to understand the difference...
Add a comment...

Post has attachment
How to Checkout a Specific Tag in Git
Here is a quick tip which shows how to checkout a specific tag in Git. $ git clone <repository-link>
$ git checkout tags/<tag-name> -b <branch-name> The first command clones the whole repository. The second one takes a specific tag and creates a branch ...
Add a comment...

Post has attachment
Clone a Git Repository Into a Specific Folder
Let's take a look at a sample git repository URL: https://github.com/apolunin/java8-impatient It can be cloned via the following command: git clone https://github.com/apolunin/java8-impatient The contents of the repository will be put in the 'java8-impatien...
Add a comment...

Post has attachment
Change File Type in Vim
Recently I had to write a few lines of code in assembly language. Vim and GAS were chosen as suitable tools to use. I downloaded vim-gas plugin, installed it using vim-plug (Vim plugin manager that I prefer) and started coding. Unfortunately Vim detected fi...
Add a comment...

Post has attachment
Convert InputStream to String in Java
Sometimes in Java world it is necessary to convert an InputStream to a String for further processing. There are several ways to do it, but here is a fantastic trick I recently discovered in this article : final String text = new Scanner(inputStream).useDeli...
Add a comment...

Post has attachment
Create a GUID in Java
Some software development tasks need a way to generate unique identifiers. I saw several homegrown solutions, but Java 5 makes the process a breeze. It contains class UUID which can generate type 4 (pseudo randomly generated) unique identifiers. Here is a s...
Add a comment...

Post has attachment
Change Editor for Git Commit Messages
Git is a very powerful tool especially when used from a console. Obviously committing changes is a pretty common task which includes editing commit messages. If a message is short it is easy to specify it via -m option: $ git commit -m "my commit message" B...
Add a comment...

Post has attachment
Rename a Remote Branch in Git
In the previous post I described how to rename a local branch in Git. Now let's take a look how to rename a remote branch. The process is a bit more complicated than with a local one and consists of the following steps: Create a new local auxiliary branch w...
Add a comment...

Post has attachment
Rename a Local Branch in Git
From time to time I have typos crept in the names of Git branches I create. Certainly it is possible to delete a branch and create a new one with corrected name. However Git allows for combining two steps into a single one. Here is a simple way to rename a ...
Add a comment...

Post has attachment
How to Avoid Null Checks in Java
I suppose every Java developer wrote checks similar to the following many times: if (obj != null) {
// ...
obj.doSomething();
// ...
} Sometimes such code seems reasonable and its usage can be justified. However more often than not there are bet...
Add a comment...
Wait while more posts are being loaded