Automated testing should be treated as production code
Automated testing acts as documentation for all features
Automated testing must be human readable including non-technical
Automated testing can also act as user guide and be included in production
Automated testing must consider the testing pyramid by Martin Fowler
Automated testing is about quickly helping us, not about complete testing
It is quite hard to make changes to code that is used by another feature that is forgotten.
himynameisthirdy
Personal Log of Vicente "Thirdy" S. de Rivera III. Thoughts and opinions about everyday life, Programming, Music etc.
Tuesday, May 5, 2026
[DRAFT] Forgotten production code and Example driven development
Tuesday, July 30, 2024
Maven version ranges inception

I was able to diagnose this problem by looking at the metadata files that maven keep in:
cat ~/.m2/repository/path-to-your-dependency/maven-metadata-<remote-hostname>.xml
Sunday, April 28, 2024
Reflection of thoughts #1 - Logs and Multithreaded applications

- In the logs, each http request is represented as its own thread, so you can identify which logs belongs to which http request since the thread name is included in the log. However, it would still be hard to hard to follow because multiple threads be adding new lines to the log in a mixed fashion because these threads are running simultaneously.
- Much more difficult is when each http request would also spawn new background threads where each has their own name which you cannot reliably associate with the parent http request. For example a spawn background thread called acme_Quartz_Worker-9 . With the logs being appended by many threads on-demand.. I think it is impossible to identify which worker thread belong to which http request thread.
- In Java, always make sure to always include the exception when you call logger.error(). Failing to include it may hide valuable clue since most exceptions have a root cause exception that would usually be the most important clue.
- If available, always add contextual information in the log message. Usually this would be the id of the object being processed (like the UUID of a particular entity). Human readable information is also welcome.
- Have a well designed exception system where you ensure which layers do log an error and which layer does the logging of errors. For instance, logging an error in a class called StringUtils is a very bad idea since different callers of this utility class may want to handle errors in different ways. Also, it is hard to determine which process had an error with the StringUtils. In addition, you usually do not (and you should not) pass contextual information to a StringUtils method - which is recommended to include in #2.
Wednesday, October 18, 2023
Beyond TDD
Today I was writing a class JUnit test code that of course runs very slow as it starts up by bringing the whole AWS infrastructure online (exaggeration) just to run several assertTrue statements..
As you might suspect, I am not fond of writing this test code. This is because I know in my heart that this test code will be more burden than useful:
- The test will contribute to a test suite that will take 5 hours to complete
- The test is very hard to read because it deals with CSV importing code.. and Java does not deal well with such string intensive inputs
- The test has a lot of test specific code which adds maintenance burden
- Dev only test code, modern test code strive towards making it readable for non-technical
PS: The title is inspired by Nico Rosberg's podcast called "Beyond Victory"
Thursday, September 21, 2023
TIL: The JVM can ommit stacktraces in the name of optimization
While investigating an issue, I saw a NullPointerException without a stacktrace..
ERROR logs that omits the throwable object (and it is available) is quite devastating. I call such situation 'swallowing the exception'.
However, this time, it is very different. Apparently the HotSpot JVM may opt to not log the stacktrace but only the exception:
source: https://stackoverflow.com/questions/2411487/nullpointerexception-in-java-with-no-stacktrace
Having a look at older instances of this ERROR log, I found that the occurrence the day before indeed had stacktrace. This is quite surprising and something I would not expect..
Monday, August 19, 2019
Software Methodologies and Religion
It's good to read and understand various ideas. From my experience and knowledge so far, I think the biggest problem with methodologies is that company X can be so different and it is very easy to blindly 'adopt' a methodology without putting in the effort in understanding it. The same with religion and superstition. (Idea I got from this article).
The most interesting idea I have learned so far on this topic however comes from Edgar Schein. Paraphrasing the idea: "Professional Relationship hurts Communication". I highly recommend listening to him on YouTube. I look forward to read his books.
Friday, August 12, 2016
TIL (Today I Learned) - various important things for Software Development
- When resetting a whole column on a relational database table, dropping/adding the column might be better than running an UPDATE. In my case, I had to update two columns to NULL from a table with 35 million rows.
- OAuth 1. I had to support a third party to use our REST service that uses OAuth 1.0a. In only a couple of days, I had to learn how this spec works and write up the details needed by the 3rd party to write a client. I'm glad that today there's plenty of resources for this complicated spec; I can imagine that this would be very troublesome to understand in the past. At least a former colleague had a lot of issues when he worked with Facebook OAuth in the past. This blog post really helped me out in quickly understanding OAuth.
- Monitor HTTP traffic of java programs via Fiddler. With networking setups, it is often easier said than done. By experience, I knew I would be in trouble with how to setup the SSL certs, force java to to use a proxy server, etc. Surprisingly, this is actually easy to do. I use this guide and was able to set it up in 5 mins!