Use your commit history to tell a story

I always try and keep my commits focused on one thing. This was brought to my attention recently as I was doing a code review. A number of refactors mixed in with code changes.

Makes reviewing much harder to perform, and harder for both developer and reviewer to ensure things are correct.

Git has many features for helping with this. Find a refactor part way through a change, then pull out the refactor portion so it can go into its own commit, and continue with your code changes.

Doing a large refactor and want to make it smaller? Again, git supports that.

When coding, think about both your validation of the changes as well as a code reviewers view. As soon as there are more than 100 lines of code in a commit, and especially if there are a number of contexts, the review quality goes way down.

Why aren’t you contributing to Open Source?

An interesting take on why your employer should support you contributing to Open Source, and why contributing to Open Source doesn’t have to mean using personal time.

If you’re a programmer today, you’re almost certainly taking advantage of Open Source libraries. These libraries are saving you (and by extension, your employer/clients) much money, time and effort.

Therefore your employer/client should be ok with you contributing to the libraries during working hours. Obviously it will be easier if you focus on libraries that are in use for the project, and preferably addressing issues you’ve encountered, or adding features that are valuable to you.

The other benefit is exposure to other’s code, peer reviews, and all around improvement of your own design and coding abilities.

Something to think about, and talk with your employer/client’s about if they don’t currently allow it.

Why don’t you contribute to open source?

Starting from scratch isn’t always the best approach

Something to keep in mind. Green field isn’t always the best answer.

Here’s an example where they took a 10 year old existing application and applied UX. The end user was very satisfied with the outcome, and didn’t care about anything under the covers.

The author came to the realization that doing it this way made the most sense, as it would have taken much longer to start from scratch, and in the user’s eyes would only be marginally better.

Too often we want to re-write a system from scratch rather than update an existing one. Something to be very wary of.

[elink link=””]

Finding Tomcat files when running inside Intellij IDEA

Investigating a problem, and created a custom logger using logback. Defined the file location as ${catalina.base}/logs/filename.log, but wasn’t sure where to find it.

Did a full drive search and discovered where Intellij stores it (at least on OSX).

To save myself future searches, it stores it in ~/Library/Caches/IntellijIdea15/tomcat folder where IntellijIdea15 will reflect the current version you’re running.

Within this directory will be folders for the various Tomcat Run Configurations. Inside the Run configurations folder will be the logs, webapps and conf folders.