Leo Ufimtsev

Leo Ufimtsev's contributions

Java code coverage in Eclipse
Article

Java code coverage in Eclipse

Leo Ufimtsev

Besides testing, Java code coverage can be a very effective debugging tool as it helps you see which code is ran. EclEmma is a great Java code coverage tool that has an Eclipse plugin. It's very simple and intuitive and has all you would expect from a code coverage tool. With it, you can: See code coverage for a java application that you've run (and potentially merge multiple run instances) See code coverage for jUnit tests and maven tests See...

Article Thumbnail
Article

Eclipse for JNI development and debugging on Linux (Java and C)

Leo Ufimtsev

Cross language development in one project In this tutorial style article I'll discuss how to configure Eclipse for Java Native Interface (JNI) development based on a sample project that you can copy and modify. I.e, you can have a single project that can be both Java and C at the same time, and support a full code navigation and debugging of both languages. This article is focused on the configuration of Eclipse rather than explaining JNI itself, however there are...

Article Thumbnail
Article

The Eclipse Developer's guide to Clean Code (part 1)

Leo Ufimtsev

"Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees" -- Clean Code We spent 10 times more time reading code than writing it. Thus keeping code clean is essential for maintainability and company growth, but doing it by hand can be tedious. Let's take a look at some of the clean code practices and how we can use Eclipse to re-factor code faster. Change inline comments to sub method calls...

Article Thumbnail
Article

The Eclipse Developer's guide to Clean Code (part 2)

Leo Ufimtsev

Last time we discussed de-duplicating some code. Today let us look into the effectiveness of refactored code, Java 8 support and moving/renaming code. But hold on, aren't method calls expensive? I took a course on compilers in University and did some research on the matter. In 1996 Java in-lining might have made sense. But nowadays the overhead that methods generate is relatively negligible, also the JVM is quite smart in optimizing bytecode by in-lining methods that make sense to in-line...

Memory leaks flow chart
Article

How to find and fix memory leaks in your Java application

Leo Ufimtsev

Do you have a Java application that runs fine at first but slows down after a while, or it runs fine for a small number of files but performance degrades for large number of files? Maybe you have a memory leak. About When fixing memory leaks; If someone were to ask me: "If you knew back then what you know now, what would you tell yourself?". Well, I would say..... Target Audience While in general the approach described in this...

Article Thumbnail
Article

Eclipse EGit for git repo management

Leo Ufimtsev

Eclipse EGit plugin allows one to perform most every day git operations through the gui. (e.g commit with a sign-off/gerrit ID. View history, hard-reset, difference comparisons, Stashing, branching, etc.. ) The main advantage is that it makes some operations faster than through the command line, (e.g one doesn't have to type in file names or copy commit-id's). Egit is only a thin layer on top of git itself. So it does the same git commands underneath. Compatibility Linux/Windows/Mac. Already available...