Today I learned about a more elegant helper method in Apache Commons' StringUtils library for Java.
The function was `trimToNull()`
Normally I would have just done
if (StringUtils.isBlank(foo)) {
responseDTO.setFoo(null);
}
Now I can just do responseDTO.setFoo(trimToNull(foo));I had written the original code, Claude suggested the improvement.
I enjoy shipping code and reviewing what Claude writes.
To add to that, what I find most helpful is the boring stuff, the JIRA cleanup, trawling Wikis and other sources to find out what the historical context of something was.
Normally that would take me all day to do, with a 30 minute code change.
Now I can do that in about 15 minutes and think about building or shipping some tool which I never had time to do.