Home » Author Archives: Mark Needham

Author Archives: Mark Needham

Neo4j: How do null values even work?

Every now and then I find myself wanting to import a CSV file into Neo4j and I always get confused with how to handle the various null values that can lurk within. Let’s start with an example that doesn’t have a CSV file in sight. Consider the following list and my attempt to only return null values: WITH [null, "null", ...

Read More »

Go: Multi-threaded writing to a CSV file

As part of a Go script I’ve been working on I wanted to write to a CSV file from multiple Go routines, but realised that the built in CSV Writer isn’t thread safe. My first attempt at writing to the CSV file looked like this: package main     import ( "encoding/csv" "os" "log" "strconv" )   func main() { ...

Read More »

Go vs Python: Parsing a JSON response from a HTTP API

As part of a recommendations with Neo4j talk that I’ve presented a few times over the last year I have a set of scripts that download some data from the meetup.com API. They’re all written in Python but I thought it’d be a fun exercise to see what they’d look like in Go. My eventual goal is to try and ...

Read More »

Neo4j: Graphing the ThoughtWorks Technology Radar

For a bit of Christmas holiday fun I thought it’d be cool to create a graph of the different blips on the ThoughtWorks Technology Radar and how the recommendations have changed over time. I wrote a script to extract each blip (e.g. .NET Core) and the recommendation made in each radar that it appeared in. I ended up with a ...

Read More »

Go: First attempt at channels

In a previous blog post I mentioned that I wanted to extract blips from The ThoughtWorks Radar into a CSV file and I thought this would be a good mini project for me to practice using Go. In particular I wanted to try using channels and this seemed like a good chance to do that. I watched a talk by ...

Read More »

Kubernetes: Simulating a network partition

A couple of weeks ago I wrote a post explaining how to create a Neo4j causal cluster using Kubernetes and … the I wanted to work out how to simulate a network partition which would put the leader on the minority side and force an election. We’ve done this on our internal tooling on AWS using the iptables command but ...

Read More »

Kubernetes: Spinning up a Neo4j 3.1 Causal Cluster

A couple of weeks ago I wrote a blog post explaining how I’d created a Neo4j causal cluster using docker containers directly and for my next pet project I wanted to use Kubernetes as an orchestration layer so that I could declaratively change the number of servers in my cluster. I’d never used Kubernetes before but I saw a presentation ...

Read More »

Kubernetes: Writing hostname to a file

Over the weekend I spent a bit of time playing around with Kubernetes and to get the hang of the technology I set myself the task of writing the hostname of the machine to a file. I’m using the excellent minikube tool to create a local Kubernetes cluster for my experiments so the first step is to spin that up: ...

Read More »

Neo4j: Find the intermediate point between two lat/longs

Yesterday I wrote a blog post showing how to find the midpoint between two lat/longs using Cypher which worked well as a first attempt at filling in missing locations, but I realised I could do better. As I mentioned in the last post, when I find a stop that’s missing lat/long coordinates I can usually find two nearby stops that ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns