Motivation, Creativity and Innovation

I am a strong believer in that every individual on this earth can be creative and that hard focused work beats natural talent in every way. Personally I get really inspired by observing skillful people come up with amazing and creative ideas. Others may feel rivalry and/or envy. I am not sure why certain people react one way or another ...

Read More »

Useful Ant build tags

Questions: How to do following tasks in ant file? Make zip file. Run command. Copy files to remote machine. Run commands on Remote Linux machine. Open an input box and respond to input value. Make an ant call. Answers: 1. Make zip file: Following is the xml for making zip file in ant: <zip destfile='${destination.folder}/zipName.zip'> <fileset dir= '${Source.folder}' /> </zip> ...

Read More »

Checked and unchecked exceptions in Java

Java has two types of exceptions – checked and unchecked. In short – checked are meant for cases when the developer can reasonably recover from the exception, while unchecked exceptions are programming errors that can’t be dealt with. This article explains when to use which. But it is not that simple – checked exceptions are making the code “uglier”. They ...

Read More »

Fault-tolerance primitives in Scala: links and traps

Over the last decade Actor Model is actively marketed as a simple, effective and save concept for building concurrency. Being popularized by Erlang in early nineties, and used as a primary concurrency construct in Scala, Actors offer share-nothing event-driven model, where creating and maintaining a single actor is cheap (so that you can keep running millions of them), and remote ...

Read More »

Android: Copy-paste with Intent and support for HTML

Android provides support for copy and paste feature using ClipBoardManager. The developer.android.com provides a brief description along with an image which helps to understand the Copy-paste framework. “To copy data, an application puts a ClipData object on the ClipboardManager global clipboard. The ClipData contains one or more ClipData.Item objects and one ClipDescription object. To paste data, an application gets the ...

Read More »

The crystal ball illusion

java-interview-questions-answers

I have noticed that people sometimes avoid doing thorough testing. This may sound as bogus to some, but hear me out… I do understand why this happen. Tests can create a feeling of being trapped, a burden that gets heavier to carry with every new test introduced. Building a stable, non-intrusive and quality ensuring suite of tests is a difficult ...

Read More »

Guava Files: Java File Management

Both Groovy and Java SE 7 provide improvements for file management in Java as I discussed in posts here, here, here, and here. However, when a particular Java application is not able to yet use Java SE 7 or Groovy for its file management, an improved file management experience can still be obtained by using Guava‘s Files class. File handling ...

Read More »

NUMA architecture and Java

java-interview-questions-answers

Time to deploy your application, looking forward to procure hardware that suits best to the load requirements. Boxes with 40 cores or 80 cores are pretty common these days. General conception is more cores, more processing power, more throughput. But I have seen a little contrary results, showing a small cpu-intensive test run performs slower on 80 core box than ...

Read More »

JavaFX Game (Connect Four)

This is my first JavaFX game tutorial and my first blog post about JavaFX panel. I made this connect four game with just 200+ lines of code just enough for a simple game. I used the GridPane panel here to lay out the disks, GridPane is one of the JavaFX layout pane but it is different from the other pane ...

Read More »