Welcome to my encyclopedia of shitty code!
-
If you spend too much time thinking about a thing…
If you spend too much time thinking about a thing, you’ll never get it done. – Bruce Lee Read More…
-
Spock: Reading Test Data from CSV File
Following up on my recent post about creating a Spock specification to read the test data from a CSV file without loading all the data into the memory, I created a CSVReader that implements Iterable that allows me to pull this off. You may download the source code here. With this implementation, I can now… Read More…
-
Maven: Plugin Execution Not Covered by Lifecycle Configuration
PROBLEM When running a Maven project in Eclipse or Spring Tool Suite (STS), we get an exception that is similar to this:- SOLUTION This problem stems from m2eclipse (m2e) plugin, which provides Maven support in Eclipse-based IDEs. STEP 1: Suppress the Error Message The simplest solution is to instruct m2e to silently ignore the plugin… Read More…
-
IntelliJ: Handling SVN Global Ignore List
PROBLEM Every time we check out a project from SVN for the first time, we always have to remember to set the SVN ignore list in IntelliJ. SOLUTION NOTE: We only need to perform these steps just once per development machine. To do so, we configure the SVN global ignore list and have IntelliJ to… Read More…
-
Spring: Invoking Stored Procedure
PROBLEM There are many ways to skin a cat… so is invoking a stored procedure using Spring. Let’s assume we want to invoke the following stored procedure that accepts 3 arguments (person ID, start date, end date):- This stored procedure returns a result set where each row contains a person ID, a date and a… Read More…
-
Maven: Unable to Execute Spock Specs
PROBLEM When running mvn clean test, Maven Surefire Plugin doesn’t pick up *Spec.groovy test files. SOLUTION By default, Maven Surefire Plugin is configured to execute test files with the following patterns: **/Test*.java, **/*Test.java and **/*TestCase.java. To fix this, we need to modify the inclusion list for this plugin. Since both Java and Groovy files get… Read More…
-
Spring Security: Forcing URLs to use HTTPS
PROBLEM Your web application supports both HTTP and HTTPS. You want to force all URLs to use HTTPS. SOLUTION Spring Security has a simple configuration that allows us to redirect all HTTP-based URLs to HTTPS. All we have to do is to set requires-channel=”https” on <security:intercept-url/> tag. For example:- With this configuration, when the user… Read More…
-
Java + HTTPS: Unable to Find Valid Certification Path to Requested Target
PROBLEM When trying to invoke HTTPS-based web service (ex: https://server:1234/myapp/web-service), the following exceptions occurred:- SOLUTION I do not want to take any credits away from @mkyong, but this author wrote a great solution to this problem at http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/ . Kudos to him. The only thing I want to point out here is the link to… 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.