Skip to main content

Top 10 Most Common Mistakes That Java Developers Make: A Java Beginner’s Tutorial (Publication)

Top 10 Most Common Mistakes That Java Developers Make: A Java Beginner’s Tutorial (Publication)

Java, a sophisticated programming language, has been dominating a number of ecosystems for quite a while. Portability, automated garbage collection, and its gentle learning curve are some of the things that make it a great choice in software development. However, like any other programming language, it is still susceptible to developer mistakes. This article explores the top 10 common mistakes Java developers make and some ways of avoiding them.

Common Mistake #1: Neglecting Existing Libraries

It’s definitely a mistake for Java Developers to ignore the innumerable amount of libraries written in Java. Before reinventing the wheel, try to search for available libraries - many of them have been polished over the years of their existence and are free to use. These could be logging libraries, like logback and Log4j, or network related libraries, like Netty or Akka. Some of the libraries, such as Joda-Time, have become a de facto standard. The following is a personal experience from one of my previous projects. The part of the code responsible for HTML escaping was written from scratch. It was working well for years, but eventually it encountered a user input which caused it to spin into an infinite loop. The user, finding the service to be unresponsive, attempted to retry with the same input. Eventually, all the CPUs on the server allocated for this application were being occupied by this infinite loop. If the author of this naive HTML escape tool had decided to use one of the well known libraries available for HTML escaping, such as HtmlEscapers from Google Guava, this probably wouldn’t have happened. At the very least, true for most popular libraries with a community behind it, the error would have been found and fixed earlier by the community for this library.Click here for full article

Original article:

http://www.toptal.com/java/top-10-most-common-java-development-mistakes


Comments

Popular posts from this blog

Explain the tools used to monitor system security.

12.Explain the tools used to monitor system security. Ans. 1. People who, for purpose of larceny or to amuse themselves, like to break into computers, they are called ‘crackers’. 2. If there is a vulnerability in a system they will find it and use it against you. 3. Preventing use of your machine for nefarious purpose and guarding against intrusion are, in the end, your responsibility alone. 4. Red hat equips you with tools to detect and deal with unauthorised access of many kinds. 5. You need to configure those tools and understand how to sense the warning they provide. 6. Fortunately Linux is development community is quick to find potential exploits and to create ways of slamming the doors before crackers can enter in your system. 7. Red hat is careful enough to making available new, patched version in which potential exploits have been found. 8. You should make sure to download and install the repaired package. 9. This line of defence...

Explain memory and virtual file system in Linux.

22.Explain memory and virtual file system in Linux. Ans. 1. These file systems do not exist on disk in the same way that traditional file systems do, they either exists entirely in the system memory or they are virtual because they are an interface to system devices. 2. cramfs: cramfs is designed to cram a file System onto a small flash memory device, so it is small, simple and able to compress things well. The largest file size is 16MB and the largest file system size is 256MB since cramfs is so compressed, it isn’t instantly updateable. 3. tmpfs: tmpfs is structured around the idea that whatever is put in the /tmp file system is accessed again shortly, tmpfs solely in memory, so what you put in /tmp doesn’t persist between reboots. 4. ramfs: ramfs is basically cramfs without the compression. 5. romfs: This is a read only file system that is mostly used for initial ramdisks of installation disks. It was designed to take up very little space, so you could fit a ke...

Explain the boot process in Linux.

13.Explain the boot process in Linux. Ans. 1. When we turn on our PC, it runs a program called “Basic input/output System” (BIOS). 2. BIOS is the only way to communicate with the system components until the operating system is up and running and able to take over the system management functions. 3. BIOS is installed on Read only memory (ROM) chip physically attached to system board. 4. The ROM type of chip is usually referred as to as an EEPROM chip, meaning it’s not writeable by user. 5. After the BIOS loads, it performs some diagnostics on the hardware, checks the installed components to be sure they are functioning and checks the system RAM (Random access memory). 6. Next the BIOS tries to find system drives from which it can load the boot program to begin the process of starting the operating system/kernel. 7. We can specify the search order for drives by changing the setting in the system BIOS configuration. 8. Usually the first hard drive...