Replace nested-if's with proper exception-handling
-
" Why handle exceptions separately:
■ Handling exceptions separately enables you to define the main logic of
your
code together.
■ Without the use of sepa...
Replacing null checks
-
This article introduces some patterns for replacing the "old" null-check
pattern.
I.e. instead of:
if (value != null) { doSomething(value); }
do:
Optio...
CoR compared to Pipe and Filter
-
Java World implies the pipes-and-filters architectural style described by
Parnas
Software systems often employ the equivalent of pipes (e.g., email filter...
Getting ADB Working for SPH-M840
-
Had a SPH-M840 Galaxy Ring Virgin Mobile 3G Android version 4.1.2,
attempting to install apps from Android Studio failed to detect device.
Installed SAMSUN...
Flyweight vs Singleton
-
Implementations seems to be virtually identical, differing only in style,
where the flyweight object is created and held by associated objects
(containers:...
init-param vs context-param
-
see
http://javahash.com/difference-between-servlet-init-and-context-parameter/
for background. Gist:
context-param variables are global and accessible thro...
rbenv vs RVM
-
RVM is responsible not only for changing Ruby versions, but for installing
rubies and managing gemsets, as well.
...Along with rbenv [to manage ruby versi...