This is an abbreviated chapter from my book Java for the Real World. Want more content like this? Click here to get the book! For anything but the most trivial applications, compiling Java from the command line is an exercise…
Announcing Java for the Real World
When I started my first Java job, I was immediately overwhelmed by my knowledge gaps of the Java ecosystem. I knew how to write decent code and had a good understanding of the Java language, but I had never used…
Parallel File Reading: Python vs Java
Given a set of files, I wanted to see how Python and Java would perform in both single- and multi- threaded environments. As a simple task, I chose to just count up the number of bytes in a given file…
Implementing a Naive Hash Table in Java
Suppose you have a set of documents that you want to be able to retrieve easily on demand. A back-end searching algorithm could take in a string of text and then find the document whose text matches the input. But…
Method Chaining Gone Wrong
Method chaining is the feature available in many programming languages to stack method calls in one line, with each method accessing the object the previous method returned. Compare: The first block’s MyObject class uses traditional setters whereas the second block…