Embracing the Messiness in Search of Epic Solutions

Home

Welcome to my encyclopedia of shitty code!

  • Karma: Getting Started

    Overview This tutorial walks through the steps need to configure Karma to work with a Maven web project. It will also be used as a base for my future Karma related posts. Install Node.js First, download Node.js from http://nodejs.org/download/ and install it. Once installed, we should be able to invoke npm command from the command… Read More…

  • There is No Such Thing as Maturity…

    There is no such thing as maturity. There is instead an ever-evolving process of maturing. Because when there is a maturity, there is a conclusion and a cessation. That’s the end. That’s when the coffin is closed. – Bruce Lee Read More…

  • Guava: Reducing Cyclomatic Complexity with Objects.firstNonNull(…)

    PROBLEM Ever written code like this? While it works, it has several minor problems:- SOLUTION Guava provides a much cleaner solution to address these problems:- Read More…

  • Guava: FluentIterable vs Collections2

    PROBLEM Guava’s Collections2 is great when dealing with collections, but it quickly becomes rather clumsy and messy when we try to combine multiple actions together. For example, say we have userIds, which is a collection of user IDs. For each user ID, we want to retrieve the Employee object and add it into an immutable… Read More…

  • Combining and Minifying JavaScript Files with Google Closure Compiler

    GOAL The goal is to combine and minify several JS files into one JS file in the right order. PROBLEM Let’s assume we have the following directory structure with three JS files. Directory Structure appdev.js appdev.blackcow.js appdev.whitesheep.js SOLUTION To pull this off, we will leverage Google Closure Compiler. There are multiple ways to use this… Read More…

  • MS SQL Server: Executing SQL Script from Command Line

    PROBLEM When opening a 150MB SQL script file in Microsoft SQL Server Management Studio, the following error appears:- SOLUTION Instead of opening the large SQL script file and execute it, we can execute it directly from command line. … where -E uses trusted connection, -d points to the database and -i points to the SQL… Read More…

  • IntelliJ: Overriding Log4J Configuration Globally for JUnit

    PROBLEM Most of the time, we may have several Log4J configurations depending on the environments, for example:- Since log4j.xml and log4j2.xml are the default configuration files for Log4J and Log4J2, these configurations will always be used unless we override the configuration file path. In another word, if we don’t override the configuration file path and… Read More…

  • Java + Groovy: Creating Immutable List

    Java: Mutable List Java: Immutable List Java: Immutable List using Guava Groovy: Immutable List Read More…

  • IntelliJ: Selectively Disable Line Wrap

    PROBLEM Sometimes, we have very lengthy statements that look like this:- When we reformat the code in IntelliJ, it becomes like this:- There are times we really don’t want the long statements to wrap around because they look very messy. SOLUTION While there is no option to selectively disable just the line wrap in IntelliJ,… Read More…

About Author

This author has 20+ years of experience in software engineering and cloud engineering. In an industry where knowledge becomes obsolete in the next three months, he learns anything that crosses his path indiscriminately. He floats from one technology to another like a moth and stings the problem sets like a mosquito. This author codes Java while drinking Espresso and writes Spock specifications while listening to Groovy beats. He masters Google Cloud Platform just like how he masters the art of predicting the movement of dark clouds over his backyard, where 60% of the time, he is right every time.

This author suffers from the Dunning-Kruger effect, where he overestimates his competence and underestimates his ignorance. Technology buzzwords never faze him, for he does not know enough to be afraid of in the first place. GCP, GCS, GCR, GKE, GWT… everything sounds the same to him. He never fears acronyms, synonyms, or antonyms, for he has ChatGPT in his back pocket. This author is a jack of all trades but a master of none. He writes like he knows all the answers, yet he googles for better solutions from elsewhere. He fakes it until he makes it; if he doesn’t, that’s okay because he has the attention span of a squirrel. The blog posts are his buried walnuts, in case he needs them one day.

In conclusion, this author is full of something. He apologizes in advance if you are trying to solve your company’s real problems with his shitty solutions. There, he has successfully written paragraphs of nonsense because every professional blogging website needs a section about the author, with a too-cool-to-smile portrait staring sideways into the abyss.