Welcome to my encyclopedia of shitty code!
-
Configuring Quartz Scheduler to Run in Clustered Environment
The goal of running a Quartz job in the clustered environment is NOT to have duplicate running jobs. The triggered job should run just one time regardless of the number of nodes in the clustered environment. Download Quartz and extract the file. Navigate to quartz-x.x.x -> docs -> dbTables and run the database SQL script… Read More…
-
Managing the Order of AJAX Calls on Input Field’s Keyup Event
SCENARIO Consider the following code:- When user types an employee’s name, “Mike”, in the search field, a web service call is fired per character typed. In this example, the following web service calls are made:- Let’s assume this web service searches the input string against databases (or flat files, Facebook API, etc) and returns a… Read More…
-
Pretty Print JSON in JavaScript
PROBLEM You want to display a JSON object in JavaScript. TAKE 1 While this works, I find this approach inconvenient when viewing the output in Firebug because I have to click on each generated link to view the details. TAKE 2 … will generate this:- This approach will display the entire JSON object as one… Read More…
-
Reading Directory/File’s ACL Directly from Java
Prior to Java 7, there’s no way to read a directory/file’s ACL directly from Java. With Java 7, you can write something like this:- When you execute the code above, you will get something like this:- Read More…
-
Managing Log4j Configuration for Both Development and Production Environments
PROBLEM Most of the time, we set the Log4j’s log levels to something lower (debug or info) during our local development. Once it is ready for production, we normally set the Log4j’s log levels to something higher (warn or even error) to prevent meaningless information from flooding the server log. One way to do this… Read More…
-
Configuring Cobertura Exclusion to Work with Maven Site
PROBLEM The Cobertura Maven Plugin doesn’t respect the exclusion configuration. For example, if you have the following pom.xml, the exclusion configuration does absolutely nothing when you execute mvn site. SOLUTION To fix this, you will need to define the Cobertura Maven Plugin under both <build> and <reporting>. Read More…
-
Hello World!
… and I’ll begin to write shitty code from this day forward… 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.