Life Codecs @ NamingCrisis.net

Ruminations. Reflections. Refractions. Code.

May 3, 2017 - Software dev Kotlin

Kotlin Quick Ref: Multiple Constraints/Bounds on Type Parameters

I’ve been using Kotlin the past few weeks, mainly to write JustLogIt!. I very nearly thought Kotlin was missing a feature that Java has: multiple bounds or constraints on a type parameter. In Java, one can do: interface A {} interface B {} // constrain the type parameter T to be a subtype of both A and B class Foo<T extends A & B> {} A feature I occasionally find very useful.

Mar 18, 2017 - Software dev

Bye, bye Dreamhost

After nearly 10 years of hosting with Dreamhost (including this site) with mostly okay service — it had its bad days! — I decided to migrate everything over to Webfaction (affiliate link) which I have been using since around 2014 for a few things. In the words of Dreamhost’s billing: You are not within our 97 day money back guarantee (it has been 3585 days since 2007-05-25)! Woot!

Mar 14, 2017 - Software dev

Docker Container as a Shell

Most of my work is done either on a Macbook Pro, or my Linux desktop. As much as macOS is a Unix, with supporting tools like MacPorts, Linux is still richer as far as commandline utilities go. Prior to native Docker support on macOS/OSX, you would resort to running Linux in a virtual machine, and having a share directory. With Docker, we basically emulate the same, but obviously, native Docker on the Mac, or Windows 10 for that matter, is far more lightweight than a VM.

Jan 27, 2016 - general philosophy

Who Do You Work For?

Corporations often talk about values. Expected behaviour and human traits that the corporation deems necessary to achieve its goals as a whole. It is expected that all levels of the organisation will display these traits. Of course, anything involving people is bound to have its own challenges. It is very difficult to instill values in people; more so adults. The idea behind value statements is legitimate, and having this framework of character is certainly a step in the right direction.

Sep 28, 2015 - Uncategorized

The Second Law of Thermodynamics

Often simplified and paraphrased (mostly by software folks, like yours truly, and pop sci crowds) to “everything tends towards entropy”, the law is surprisingly applicable to wide range of scenarios. Which, I suppose, should not be surprising given the universe and humans forming the ecosystem are simply bags of vibrating, heat-producing molecules. The last statement was not meant to be cynical, nor do I subscribe to the view that consciousness is a purely emergent physical phenomenon, but I am abstracting for the sake of this post.

Jul 19, 2014 - software dev

Set If Not Null ‘Pattern’ in Java 8

When working with business entities, many of them will involve a mix of complicated logic, and plain CRUD data. Often we will have some update or create method where an incoming DTO or Request object will have a subset of fields to source details to update the target entity. Even when trying to restrict the scope of the DTO to what an operation needs (an idea I am a big fan of), it may still be course-grained enough for that scope, and still have nullable/optional fields.