Embracing the Messiness in Search of Epic Solutions

Home

Welcome to my encyclopedia of shitty code!

  • Spring MVC: Failed to convert value of type ‘java.lang.String’ to required type ‘java.time.LocalDateTime’

    PROBLEM Given the following controller … When executing … … the web service call returns 400 Bad Request with the following error in the console log:- SOLUTION One solution is to change the data type from java.time.LocalDateTime to java.lang.String before parsing it to java.time.LocalDateTime. However, it is a little more verbose than I like. A… Read More…

  • MS SQL Server + Hibernate 5: Incorrect syntax near ‘@P0’

    PROBLEM When upgrading to Hibernate 5, the following exception is thrown:- SOLUTION Change the MS SQL Server dialect from this… … to this … Read More…

  • tar: Exiting with failure status due to previous errors

    PROBLEM When creating a compressed archive file:- … the following error is thrown:- SOLUTION This error usually occurs due to permission issues. However, the error messages are hidden beneath gobs of output activated by the verbose flag. To fix this, reduce the output by removing the -v flag:- … and now, the error message appears:-… Read More…

  • Docker: Handling Circular Dependency between Containers

    PROBLEM Let’s assume we are going to run 3 containers:- Nginx is used to serve cleaner URLs through reverse proxies so that users will access http://server/jenkins and http://server/nexus instead of remembering specific ports. So, the simplified docker-compose.yml looks like this:- While http://server/jenkins and http://server/nexus work flawlessly, the Jenkins container is unable to communicate with Nexus… Read More…

  • Docker: Defining Custom Location for Named Volume

    PROBLEM Let’s assume we have the following docker-compose.yml: By the default, all Docker-managed named volumes are stored under the installed Docker directory… typically, /var/lib/docker/volumes/[path]. However, it is possible /var mount is low on disk space. SOLUTION It appears we can create a custom location for the given named volume:- Keep in mind /data/jenkins must be… Read More…

  • ES6 + Mocha + Sinon: Mocking Imported Dependency

    PROBLEM Let’s assume we have the following 2 files:- apis.js service.js Let’s assume we want to test the logic in service.js without using nock to mock the HTTP call in apis.js. While proxyquireify allows us to mock out the apis.js dependency in service.js, sometimes it is a little more complicated than needed. SOLUTION A simpler… Read More…

  • Synology NAS: Running CrashPlan in Docker Container

    BACKGROUND The reason to run CrashPlan in Docker container is to prevent any future Synology’s DSM updates from breaking the CrashPlan app. Let’s assume the Synology NAS IP address is 1.2.3.4. STEPS Diskstation Manager Log into Diskstation Manager: http://1.2.3.4:5000 Install Docker. Mac SSH into Synology NAS. Install CrashPlan Docker container. Run CrashPlan Docker container. In… Read More…

  • Java: Exploring Preferences API

    BACKGROUND In any written scripts or rich client apps, there is almost a need to persist the user preferences or app configurations. Most of the time, we, the proud developers, handle that situation in very ad-hoc manner. When storing in a file, we use different formats: from old-boring XML, to cool-kid JSON, to even cooler-kid… Read More…

  • Spring + Ehcache: XML-less Spring Configuration for Ehcache 2.x vs Ehcache 3.x

    BACKGROUND The documentation on the web regarding Ehcache 3.x configuration using Spring is rather lacking. There is apparently a very distinct difference in Spring Java-based configuration between Ehcache 2.x vs Ehcache 3.x. Spring + Ehcache 2.x Dependency:- Spring configuration:- Spring + Ehcache 3.x Dependency:- Spring configuration:- 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.