Oliver Roick

Oliver Roick Homepage

I'm a software engineer based in Melbourne, Australia. I enjoy building geospatial web applications for science and non-profit communities.

I currently work at Development Seed. In the past, I delivered projects for Google, The Nature Conservancy, NASA, The World Bank, Citizens Advice and many others.

Latest posts

A Shell Script to Create New Posts for Markdown Blogs

Create new posts for your Jekyll blog without the hassle.

For personal projects, I like to keep things very simple. The blogs I write are published using Jekyll instead of a more sophisticated database-driven application. That way, my stack will be low maintenance, and I can focus on writing.

In Jekyll, blog posts are managed via Markdown files in a specific directory. Each post has its own file. A front matter included in each file contains metadata about the post, such as the title, publishing date, category, and desired layout. Jekyll looks through those files and then generates the site resulting in a set of static HTML pages that can be pushed to a web server.

There’s no user interface (unless you use NetlifyCMS or similar), so creating new posts can be cumbersome. You have to manually create a file, ideally name the file using a slugified version of the post’s title, and then add the preamble with title and the published date in ISO format and anything else your specific setup needs to render the post.

Being the lazy software developer that I am, repetitive and manual work is highly annoying. So I created a simple shell script that asks for the post’s title, creates the file using the slugified version of the title for the file name, and then pre-fills the preamble.

#!/bin/sh

read -p 'Title: ' title
SLUG="$(echo $title | sed -r 's/[\.\, \?]+/-/g' | tr '[:upper:]' '[:lower:]')"
DATE=$(date +"%Y-%m-%d")
DATE_TIME=$(date +"%Y-%m-%dT%H:%M:%S%z")
tee -a src/_posts/${DATE}-${SLUG}.md <<EOF
---
layout: post
date: ${DATE_TIME}
title: ${title}
description:
category:
---
EOF
vim src/_posts/${DATE}-${SLUG}.md

This also automatically opens the new file in Vim so I can start adding content directly.

I invoke the script using make because I like the simplicity of typing make post.

The Pragmatic Programmer

Twenty years after its initial publication, Andrew Hunt’s and David Thomas’ The Pragmatic Programmer is still essential reading.

Every software engineer has opinions about how software should be built. The views are based on experience with a few programming languages, selected frameworks, and a small range of use cases. They make sense for a limited context, and we confuse them with wisdom and happily apply them everywhere. That’s how cargo cults are born.

The Pragmatic Programmer is a book full of opinions. But authors Andrew Hunt and David Thomas have been writing software for forty years, longer than most of today’s software engineers have been alive. The book’s opinions and advice are grounded in experience that forced them to review and change their views over the years, resulting in the updated second editing of The Pragmatic Programmer, published more than 20 years after its first edition from 1999.

The Pragmatic Programmer is a software-development primer focused on building habits that will make you a better engineer, like learning how to use the Shell and chosen IDE efficiently. It talks about building robust software using contracts and assertive programming and ensuring your software won’t become an unmaintainable mess by avoiding common pitfalls like complex class inheritance, coupling of modules and hand-coded configuration. You’ll learn when to refactor (always), and that writing tests aren’t a waste of time. And because software projects usually don’t fail when developers write code, but beforehand during planning, Hunt and Thomas also cover how to manage projects, gather requirements and estimate.

This book is language- and framework-agnostic. The programming languages used in the examples throughout the book vary from JavaScript, Ruby and Python to C++. Any patterns included are generic and can be applied to many scenarios, whether you build applications for the Web or mobile phones.

The Pragmatic Programmer is essential reading. You will find a ton of advice on how, generally speaking, you can be a better software engineer, advice that will hold up at any stage of your career. For new members joining your team, ditch the bag of useless welcome swag and buy them a copy of The Pragmatic Programmer. It’s better for the individual, your team, and the environment.

GitHub Provides Release Notifications Via Atom Feeds

Get updates on projects from the comfort of your RSS reader.

GitHub offers Atom feeds for releases of projects hosted on the site, complete with release notes if maintainers provide them — a painless way to stay up to date with new releases.

The feed for a project can be accessed at
https://github.com/{org-name}/{project-name}/releases.atom
so you can subscribe to releases of Leaflet.Deflate via https://github.com/oliverroick/Leaflet.Deflate/releases.atom.

From the Portfolio

Building Resilience Index

Hazard mapping and resilience assessment for building projects and property portfolios.

A2O Search

Find bird sightings across Australia using recorded audio. Like Shazam, but for birds.