Welcome to my encyclopedia of shitty code!
Terragrunt: “plan-all” while Passing Outputs between Modules
PROBLEM Terragrunt has a feature that allows one module to pass outputs to another module. For example, if “project-prod” module wants to consume “subfolders” output from “folder” module, it can be done like this in “project-prod” module’s terragrunt.hcl:- The challenge is when running commands such as plan-all, it will fail with the following error:- SOLUTION […] Read More…
GCP + Terraform: “google: could not find default credentials” Error
PROBLEM When running any Terraform commands (init, plan, etc) from a different server, the following error is thrown:- SOLUTION One recommended way is to set up a service account by following the instruction from the above link. Another way, for developement purpose, is to install Google Cloud SDK and run the following gcloud command, which […] Read More…
Terraform: “Error acquiring the state lock” Error
PROBLEM When running terraform plan, the following error is thrown:- SOLUTION One way is to disable locking by passing -lock=false flag. However, if you are sure the lock isn’t properly released, to perform a force unlock, run this command: In this case… Read More…
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…
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.