Disabling the Tracker Service in the GNOME Desktop

The GNOME desktop environment includes a background task that tracks all file changes and indexes them so file-searches from the GNOME file browser can be fast. However this service does consume quite a lot of IO and CPU resources, particularly for software developers due to the way we use tools that generate large numbers of files. I don’t use desktop-search, and disabling it has made my development system far more responsive. Here are the steps needed to disable tracker (thanks primarily to this tip from site Linux Uprising):

systemctl --user mask \
  tracker-store.service tracker-miner-fs.service \
  tracker-miner-rss.service tracker-extract.service \
  tracker-miner-apps.service tracker-writeback.service
tracker reset --hard

# and check
tracker status  # should report "is masked"
tracker daemon  # should report "unavailable/not running"

Supposedly, within the GNOME Settings tool, going to “Search” and turning it off completely (in the window headerbar) will also disable it, but some people have found this doesn’t work.

In Defence of Java Checked Exceptions

At my current place of work, there has been some debate about the use of checked vs unchecked exceptions in Java.

I see many positives in Java’s checked exception feature, and have written up my thoughts here.

What was originally intended as a short text grew somewhat, looking at exception-handling and error-handling in general in several languages.

A JDBC Query Monitor

I recently wrote a Java JDBC wrapper for monitoring calls to a database (JDBC DataSource). My employer has allowed this to be released as open source.

If you are creating or maintaining a Java application and would like to log requests to your database, look for unexpected operations, or gather statistics, then this code might be helpful.

Checking Git Merge Status

One of the software applications I work on uses Git as version-control and has a traditional (if somewhat old-fashioned) branching strategy: a branch per feature/bugfix, an integration branch, a release-testing branch, and release branches. Different users/tools are responsible for merging between these branches so it can sometimes be rather difficult to know whether a local Git branch has been merged to any specific target.

Sybase ASE Stored Procedure sp_jdbc_getprocedurecolumns and Performance

My employer has a large Java-based application which uses Sybase ASE as its data store, and a mysterious stored procedure sp_jdbc_getprocedurecolumns (which we never call directly) is causing performance problems. It took quite a lot of work to track down why; if you’re having similar problems then see the explanation here.

Learning Prometheus

I recently needed to track down some performance problems in a large (Java-based) application. My employer already uses Prometheus for monitoring, so it seemed time for me to get to grips with its concepts and instrument the application with appropriate metrics then create some matching Grafana dashboards.

Learning Prometheus/Grafana turned out to be a little harder than I thought so I have written up what I learned in case it is helpful to someone else.

And yes, it did help to track down the problem(s).

For fun: browser as scratchpad

A colleague recently pointed out that the following command can be pasted into either Firefox or Chrome to get an editable window for keeping notes. The text can even be saved afterwards..

data:text/html,<html contenteditable>

You can adjust the font-size, etc with inline styles, eg:

data:text/html,<html contenteditable style="line-height:1.5;font-size:20px;">

Another colleague pointed out a nice “retro console” variant:

data:text/html,<html contenteditable style="background:black;color:lime;font-family:monospace">

On a similar topic, a browser window can also make a nice JSON pretty-formatter (read-only):

data:application/json,{"yo":1}

Maven Multi-Module Builds with Centralized Version Management

Are you building Java software using a Maven multi-module structure, and using mvn versions:set to update the version-numbers on each release? If so, there is a much better way.