Train Tracker - Part 3: Scaffolding

This is part 3 of my Train Tracker project. Code from this post can be found in the scaffolding branch on Github. Previous post can be found here. Logging Log messages written to stdout and stderr are captured by systemd for services it manages. We can then access these logs using journalctl. In order to keep external dependencies low, I will be using built-in Java logging infrastructure. Default ConsoleHandler, logs everything to stderr with no option to separate the stream based on log level. I want log levels Warning and above to go to stderr and the rest to stdout. StdConsoleHandler will format using SimpleFormatter. ...

May 26, 2025 · 3 min · shiva

Train Tracker - Part 2: setup

This is part 2 of my journey to build a train tracker to aide my office commute. You can find part 1 here. In this post I am going to talk about setting up the project to customise the gradle project created by IntelliJ. Dependencies Only runtime dependency is going to be Gson, so lets add that to gradle config implementation("com.google.code.gson:gson.2.13.0") Dev dependency will be Junit and mockito. IntelliJ already adds junit, lets add mokito and update the Junit dependency. ...

May 5, 2025 · 2 min · shiva

Office commute Train Tracker

For my office commute, I rely on the train. While trains generally operate on schedule, occasional delays occur. When they’re running late, I’d like to be notified so I can adjust the timing of my walk to the station. Before I decided to roll out my own, I was using National Rail app’s alerting feature. At some point National Rail removed this option. I tried multiple other train apps, but they were “slow”. When I say slow, I mean the UX, performance on mobile connection. ...

April 10, 2025 · 3 min · shiva