Say that you are eating some sweets while watching a movie. You had a look at your pack or sweets, counted five and continued watching the movie. Took the first one and deducted this in your mind (without looking at the sweets pack). In the mean time, and without you knowing, your daughter takes one. While you think that there are four sweets left, in reality there are only three. You will discover this at the end when you are looking for the last one. This is a Race Condition and in this article we will see how this occurs in programming and how we can avoid it.

Albert Attard
Author: 5 days ago

Defensive copying is a technique which mitigates the negative effects caused by unintentional (or intentional) modifications of shared objects. As the title indicates, instead of sharing the original object, we share a copy of it and thus any modification made to the copy will not affect the original object.

Albert Attard
Author: 1 week ago

This tutorial demonstrates how to develop a simple Java Swing (or user interface) application and test the UI related logic using automated tests, such as JUnit (Homepage), using a series of videos compiled as a playlist (Youtube). The application is kept very simple while making use of various technologies, such as EasyMock (Homepage). This tutorial is targeted to college or university students who studied Java but lack experience and would like to do something productive. The main idea of this tutorial is not to learn Java, but to help the viewers to build testable Swing applications. The playlist presented by this tutorial shows how to build a Java Swing application that can be easily tested using automated tests in a step-by-step fashion.

Albert Attard
Author: 4 months ago

This tutorial provides a step-by-step guide how to setup the development environment on a Windows 7 (Homepage) operating system. Please note that while you can follow this tutorial even if you are using a different operating system, some of the steps shown here may not be the same for all operating systems. For example, a Linux operating system (Homepage) does not install programs under the “Programs Files” folder like a Windows operating system does. On the other hand, the configuration of the SpringSource Tool Suite is the same irrespective of the operating system. Furthermore, irrespective of the operating system, the order of how things are done is the same for all operating systems.

Albert Attard
Author: 5 months ago

Programs work well when dealing with a considerable size of data, but their performance tend to degradate when dealing with large volumes of data. Resources are cheaper than ever, but this does not mean that we can have inefficient programs. Dealing with large amounts of data brings several challenges, even if the task is simple parsing some Java objects into JSON strings, as we will see in this article. Inefficient use of memory can make a program wasting more than 5 times the memory when compared with a more efficient one. This means that one program makes use of 1G of memory, while the inefficient one requires 5G of memory to perform the same task.

Albert Attard
Author: 7 months ago

This tutorial demonstrates how to develop a Java application that connects with a database and provides a user interface and is targeted to students who studied Java, but lack experience. This tutorial assumes basic knowledge of Java and it describes everything in great detail. The main idea of this tutorial is not learn Java, but to help the viewers to gain experience in developing Java applications. During the tutorial we explore various technologies, such as Maven (Homepage). These technologies are quite popular amongst developers communities and are considered as good traits when applying for jobs.

Albert Attard
Author: 7 months ago