Never miss a beat

Join my newsletter.

The Archives

Introduction to Asynchronous Programming in Clojure

Published: 7/15/2016

I’ve been writing about my favorite language, Clojure, for a while now. I’ve also been gauging your interest in Clojure and, if you’re reading this, I think you’re ready to take this relationship to the next level. Let’s talk about asynchronous code in Clojure. Getting Started If you want to follow along with the code examples, start a new project. I’m going to be using Leinengen and we’re going to name this app “warehouse”. Let’s open warehouse/src/warehouse/core.clj and modify it so it looks…

Using JSON Web Tokens with Clojure

Published: 6/23/2016

Authentication is easy. Good authentication is difficult. We’re at a point in the world where our users expect to be able to sign up for your service or app, and receive a more personalized experience. If you can’t validate who the user is, you can’t achieve this. In the past, people have leveraged sessions, cookies, sending the user’s email and password on each request ( please don’t ever do this ), and many other techniques to validate that a user is who they say they are. A lot of these…

Understanding Clojure Macros

Published: 6/14/2016

Learning Clojure has been one of the most thought-provoking experiences of my life. Coming from a predominantly OOP background, it’s safe to say that it’s always been a bit of a challenge. Macro’s specifically, were a challenge that was hard for me to grasp, and I know cause a lot of pain points to new Clojuristas. To first understand a Macro, we must understand what a function does. What is a function? For the sake of this example – A function is a named procedure that tells a computer to do…

Building RESTful APIs with Ginger, H2, and Java 8

Published: 10/1/2015

Recently, I started writing a few RESTful services in Java Spark. I found a few recurring themes and decided to extract them out into a layer ontop of Spark to make it even easier to build a RESTful service from the ground up. This project is called Ginger and I’ll show you how to create a RESTful service using the Ginger framework. If you get stuck, the completed source code can be found here . Things to know Ginger is built heavily ontop of Spark. As of recently, Spark only runs on Java 1.…

Intro to Reflection in Java

Published: 9/16/2015

Recently, I began exploring an interesting idea I had – creating a RESTful framework built on top of Spark. Now, Spark is naturally restful, but I basically want the user to be able to define an object, flag it as a resource, and compile their code. They should then have GET , POST , PUT , and DELETE verbs available on that object. Sounds relatively trivial right? There are actually several ways to do this, but the simplest way (once I was able to wrap my head around it) involves…

A Brief Comparison of FlowRouter and Iron:Router for Meteor.js

Published: 9/11/2015

Recently, I was updating an open source package that I maintain – a project structure scaffolding tool . While updating the template I use for my Meteor apps, I realized my tool was still catering towards Iron:Router. For those unaware, Iron:Router has a history of being the Router for Meteor apps. When I first used it, however, it felt like it was lacking in some ways. After using it on about several Meteor apps now, I’ve adjusted my design to conform to Iron:Router and it works extremely…