life and code. in small doses.

Writings and code from a programmer.

For more information on my background and experience, please see the about section.

Foggy City

Published February 3, 2023 #san francisco #fog

foggy city

Reading time: about 1 minutes

Read more...

Have TwitterServer Will Test

Published February 1, 2016 #TwitterServer #finatra #scala #Twitter

Did you know you can use Finatra’s Feature Tests utilities for testing any TwitterServer? That is, you can start a locally running server and write tests which issue requests to it as long the server extends from c.t.server.TwitterServer. It doesn’t specifically have to be a Finatra server. Recent changes to Finatra testing utilities allow for any arbitrary TwitterServer to be able to create Feature Tests and a very useful type of Feature Test is a simple Startup Test where you can verify your server starts and is configured how you would expect.

Reading time: about 2 minutes

Read more...

A Simple Finatra Example Project

Published July 12, 2015 #Finatra #Scala #Twitter

Over the past year-and-a-half I’ve helped to develop a Scala framework for writing services on-top of parts of the Twitter stack, namely TwitterServer and Finagle. This framework is called Finatra and we’ve recently published a second milestone release of the completely-rebuilt-from-the-ground-up version 2.x. Checkout out the blog post announcing the new version with more details on framework features. In this post we’ll write small Finatra example service; a simple URL-shortener using Redis.

Reading time: about 3 minutes

Read more...

Devils Dictionary of Programming

Published November 3, 2013

Devil’s Dictionary of Programming courtesy of https://programmingisterrible.com simple — It solves my use case. opinionated — I don’t believe that your use case exists. elegant — The only use case is making me feel smart. lightweight — I don’t understand the use-cases the alternatives solve. configurable — It’s your job to make it usable. minimal — You’re going to have to write more code than I did to make it useful.

Reading time: about 1 minutes

Read more...

Install Latest Maxmind Database Into Maven Repository Using Thor

Published May 4, 2013 #maven #thor #maxmind

In a previous life, my company used the MaxMind GeoIP database for geo-location information based on client IP addresses. We packaged the .dat as a JAR included on the classpath for use in instantiating a com.maxmind.geoip.LookupService object which we wrapped with a custom service. Generally, we updated the database once a quarter so I wrote a Thor script to download the .dat file, put it into a JAR, and upload the JAR as a Maven artifact to a Maven-compatible repository (we used Nexus).

Reading time: about 1 minutes

Read more...