Reading Java Network Programming by Elliotte Rusty Harold, O'Reilly (2013)

This practical guide provides a complete introduction to developing network programs with Java. You’ll learn how to use Java’s network class library to quickly and easily accomplish common networking tasks such as writing multithreaded servers, encrypting communications, broadcasting to the local network, and posting data to server-side programs. Author Elliotte Rusty Harold provides complete working programs to illustrate the methods and classes he describes. This thoroughly revised fourth edition covers REST, SPDY, asynchronous I/O, ...

Reading Effective JavaScript by David Herman, Addison-Wesley Professional (2012)

This book is organized around 68 proven approaches for writing better JavaScript, backed by concrete examples. You’ll learn how to choose the right programming style for each project, manage unanticipated problems, and work more successfully with every facet of JavaScript programming from data structures to concurrency.
Key features include:
1) Better ways to use prototype-based object-oriented programming. ...

Fixing Vuze 5300 console user interface encoding bug

Vuze 5300 has encoding issues in its console user interface. After digging into the source, I found that the encoding issues are caused by org.gudy.azureus2.core3.logging.impl.LoggerImpl$RedirectorStream.

Controlling screen brightness on HP ProBook 4540s in Fedora 20

Everything on my HP ProBook 4540s works out of the box in Fedora 20 except the screen brightness control. The brightness is always 100% which just burns my eyes badly. When I press the shortcuts on the keyboard to adjust the brightness, I can see a KDE bar pops up in the center of the screen and the percentage changes, but no actual brightness is changed. If I leave the laptop for long enough, Fedora is able to turn the screen off. But once I start using the laptop, the brightness is back to 100% again. So there is no gray area between the black and the white.

Vuze 5300 command line options

All the command line options available for Vuze 5300, i.e., the output of "set" or "show options".

Handling arithmetic overflow: an exercise of parsing strings to integers

Let us say we want to parse a string to an integer, where we must throw an exception if the parsed value is too positive or too negative. This boils down to how arithmetic overflow can be detected.

Java reference objects: strong, soft, weak, and phantom

Java reference objects generally provide two ways of interaction with the garbage collector: to control when an object can be garbage collected and to receive a notification when an object is garbage collected. After so long, I find myself not able to clearly describe them again. I would like to take some notes here as my memory was just refreshed, in case I forget later. This is going to be a short note, just enough for distinguishing them by their most prominent characteristics. Please consult the javadoc for more details.

Fixing screen flashing for PJD7820HD projector and HTP-072 receiver

The ViewSonic PJD7820HD projector and the Pioneer HTP-072 5.1 channel home theater package both are cost effective products for entry-level home theater setup. However, when I first connected my laptop to the input of the HTP-072 receiver through HDMI, the screen of my laptop kept flashing. The screen first turned black for one second, then returned normal for another second, and then turned black again. Every time the screen returned to normal, the mouse cursor was reset to the center of the screen, causing my laptop not operable. The output of the receiver was connected to the projector through HDMI, and there was no signal on the projector.

Windows 7 virtualization by KVM on Fedora 20

Today I managed to set up a guest Windows 7 virtual machine on a Fedora 20 host using KVM. The easy setup and the superior performance led me to the conclusion that KVM should be the preferred virtualization solution over either VMware or VirtualBox under Linux.

Five tips for defining classes of constants

Classes of constants are usually used in the name of removing duplication. But chances are that such classes are eventually cluttered with unrelated constants, causing unnecessary coupling among components. In fact, a lot of constants are private to specific components, and should not be exposed as public static final fields.