Embracing the Messiness in Search of Epic Solutions

Home

Welcome to my encyclopedia of shitty code!

  • Webpack: Managing Tree Shaking

    PROBLEM Sometimes, Webpack’s tree-shaking may accidentally eliminate imported code from import statements. For example, we may have a root JS file that imports a CSS file:- … and for some reason, the CSS file will never appear in the final bundle even if the Webpack config contains proper rules to handle CSS files. SOLUTION To… Read More…

  • Azure: Deploying WAR File to Tomcat

    PROBLEM Typically, when using ZipDeploy to push a WAR file (ex: my-app.war) to an Azure instance, we need to:- This zip file will automatically be unzipped under site/wwwroot:- Tomcat detects ROOT.war and will try to unpack the WAR file under ROOT/:- The problem is sometimes Tomcat is unable to fully unpack ROOT.war because some files… Read More…

  • Feign + Eureka: UnknownHostException when Attempting to Invoke a Service

    PROBLEM When attempting use Feign to invoke a service through Eureka, the following exception occurs:- SOLUTION Go to the donkey-kong-service app and add the following line to the application.properties:- Now, when Feign tries to invoke the service, the IP address will be used instead of the OS’ reported hostname. Read More…

  • Spring Boot: Restarting App using Dev Tools with IntelliJ IDEA

    Spring Boot provides spring-boot-devtools module that allows the app to “smartly” restart whenever the files on the classpath have changed. Because the rarely changed classes (ex: 3rd party JARs) are separated out into a different classloader from the app’s actively developed classes’ classloader, it allows Spring Boot to quickly restart the app compared to “cold… Read More…

  • Spring Boot: Connecting to IBM MQ over JMS using non-IBM JRE

    There are several ways to connect to IBM MQ:- This article shows you how to connect with Spring’s JmsTemplate. CONNECTIVITY INFO Typically, the MQ admin will provide the following connectivity info that allows you to connect to MQ:- DEPENDENCY Add the following dependency:- SPRING CONFIGURATION While the connectivity info can be hardcoded in Spring Boot’s… Read More…

  • React: Debugging Layout Thrashing

    PROBLEM When the React app grows larger over time, it is highly likely to run into situations where the component keeps re-rendering for no apparent reason. There are many reasons why this is happening… to name a few…. parent component re-renders, this.props or this.state has changed, etc. The key is to quickly find out what… Read More…

  • Groovy: Handling Byte Order Marks When Reading a File

    PROBLEM Given a file with the following content:- When reading the file:- … the following values are printed:- Even though the value is trimmed, there is still a leading space in front of text. A further inspection reveals the leading space is not a regular space:- SOLUTION Some editors prepend a special Unicode character called… Read More…

  • Spring Web: Encode ‘+’ Value Using UriComponentsBuilder

    PROBLEM Given the following code… When using Spring Web 4.3.18.RELEASE, the URL is properly encoded:- However, when using version between 5.0.0.RELEASE and 5.0.7.RELEASE, the URL containing “+” value does not get encoded:- SOLUTION There is a ticket opened regarding this breaking change. To properly encode “+” value, use 5.0.8.RELEASE or later. Then, ensure encode() is… Read More…

  • macOS + Eclipse: The ‘X’ Executable Launcher was Unable to Locate its Companion Shared Library

    PROBLEM When attempting to launch Eclipse-based app (ex: MyApp.app) on Mac, the following error is thrown:- SOLUTION This problem seems to occur on macOS Sierra and later. When unzipping the app, the lingering extended attributes prevent the app from launching. To fix this, run the following command to remove these extended attributes:- Then, double click… 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.