Java
On Thursday during the metrics team meeting we decided to rename AtlasBot to metrics-bot to better fit the naming scheme of the team’s other projects.
It would appear that there has been interest in the bot and that it’s something that people want.
The JavaDoc has now moved to a new location, a git repository has been created and there is a new Trac component to organise the metrics-bot todo list.
Still in the process or tidying up the bot behind the @TorAtlas Twitter account, which means I’m still writing Java. I’ve now been exploring “list comprehension"-like techniques using another new Java 8 feature, Streams. Essentially this involves creating lists from lists in an elegant way.
In Python, I would do something like:
runningRelays = [relay for relay in relays if relay['is_running']] (I know something is happening because writing that example line I had an incredible urge to terminate the line with a semicolon.
I’m in the process or tidying up the bot behind TorAtlas and I’ve chosen to write it in Java. My undergraduate degree had a lot of Java in it, but that was while ago now, and there are some cool new features I’ve learnt about including Period and Duration.
Some of the tweets coming from the bot talk about how long a relay has been contributing to the Tor network. When fetching the details document I look at the first_seen field and get this as a ZonedDateTime to make sure I’m doing all my calculations in UTC.