JSON Hyper-Schema

Last week we looked at JSON Schema and how it can be used it in describing the data of your API. In this post we’ll be looking at the JSON Hyper-schema. It is a schema built on top of the JSON Schema and describes the URLs that can be built with a given resource. Let’s look at how we can use this spec to help supplement our APIs.

Fixed League of Legends Lag

I am a closet fan of the game “League of Legends”; mostly just as a spectator of famous streamers such as Trick2G. However, my wife loves to play the game and plays in the evenings. Things went wayward for her about a month or so ago when she started having huge lag spikes and high ping that seemed to start and then never clear up. Having done network support in the past I set out to try and solve this problem…

JSON Schema for Your API

It’s pretty easy to stand up an API. Unfortunately sometimes though, this easiness is a false friend you can be paying for down the road. Once you get any amount of consumers; even if they are internal, expressing the data models your API delivers and how it is validated can be a messy chore. You may write up some fancy documents describing your API (which is good); however, this can lack a bit in the area of tooling. This is where JSON Schema can really shine.

I Have Returned

I have been absent awhile; mostly enjoying a lengthy break over Christmas followed by an incredibly busy January. I’ve collected quite a bit over the last month or so which is being drafted up into posts for the next couple of weeks. I feel ready to get back into the swing of another year and am excited to see what awaits!

No Refunds on Life Spent

After visiting my sick grandfather in the hospital I realised the time spent in life offers no refunds. Take the opportunities you have today for the things you really want to do. I have really been wanting to go back to school and this hit home hard for me. There is so much more I want to learn and do with my life and the window I have to do it in is closing every day.

Sometimes we get complacent “dancing for the man”; staying comfortably distracted by the workday. Don’t let it happen! Always challenge and audit yourself to ensure you’re spending the time you have on the investments which are important to you.

Elixir Agent - a Lightweight GenServer

If you come from Erlang and are familiar with the GenServer behaviour you may be interested in the Agent set of methods that ship with Elixir. They provide a lightweight mechanic to save and retrieve state. Here are two functionally equivalent modules, one written as a GenServer and the other with Agent.

Project Barrier of Entry

"How much you know?"

How hard is it for a new person to pick up your project and start working on it? Think about the supporting database, message queues, mailer software, and any other systems your project ties into. Is there any kind of development credentials they’ll need? What is the process to get a change into production? When you go beyond the run-of-the-mill framework inside the vacuum of your local machine the barrier to getting started on a project can start to sky rocket. What are some ways we can help mitigate this?

Formatting JSON With Jq

If you haven’t tried it out yet, I highly recommend checking out the application jq. It allows you to quickly format json with bash or any other light weight scripting languages. I’ve been playing around with this for about a week and I would like to share some of the features it has.

Playing With JSONb and Postgres

This week I had the opportunity to play around with JSONb, a feature added to Postgres 9.4. It is similar to the native JSON column introduced in 9.3 but with some extra benefits. The two largest values that I have found so far is that JSONb can be indexed and the cost of selecting keys is quite a bit less. I also made a Ruby/Docker playground you can use to run some tests yourself. Check out jsonb_tests if you would like to try some of these features out yourself!

Putting Out Fires

"It burns when I program"

This week at work we were faced with one of those pre-launch fires. Stakes were high and emotions where even higher. Nothing feels worse in the work place then the pressure of tackling something like lost data or an uncontrollable outage. Needless to say, after long hours and several dead ends we were able to triage the problem and prevent a launch disaster. Looking back at it now, several days later, it reminded me of the time our barn caught fire growing up.