August 23, 2016

Basic site monitoring with Riemann

Riemann is a general-purpose event processing system, but its most typical application is as a place to send and generate metrics about applications. I recently set up a Riemann server for my personal projects, and I feel like my devops game is stepped up by 1000%.

Or, at very least, I feel like I know know about it as soon as one of my sites goes down.

Read more »

May 21, 2016

Getting Started with Dokku on DigitalOcean

Dokku is a heroku-like tool that allows you to deploy complex apps by simply pushing with git. It supports heroku buildpacks directly, so you can

Read more »

April 15, 2016

What’s in a namespace?

Every well-behaved clojure source file starts with a namespace declaration. The ns macro, as we all know, is responsible for declaring the namespace to which the definitions in the rest of the file belong, and generally also includes some requirements and imports and whatnot. But today (at Clojure/West, shoutout!) Stuart Sierra made a passing reference to the internals of ns during his talk that got me interested.

But what is a namespace really?

Read more »

March 29, 2016

Write and deploy your own self-hosted Readability clone is a handy tool, but it also suffers from being useful, popular and free – the service is (understandably) often down, or slow.

If you’re a heavy Readability user, it might interest you to know that there exist many software libraries...

Read more »

March 27, 2016

Composible Architecture: A real-world example.

I am the primary maintainer of a significant REST API written using Flask-Restful. Flask-Restful is a pretty full-featured library for creating REST frameworks with Flask. It features everything you need to manage routing to class-based resources, a library for marshalling objects to JSON format, and reqparse, an argparse-inspired library for writing input parsers.

Read more »

March 26, 2016

React.js in the small

I’m a big fan of accessible technologies. I get suspicious whenever I encounter a framework or library that is “not worth it for a small project,” because that is a coded statement that means either “It has a broad scope of features that a small project won’t take advantage of,” or “it trades off simplicity or user experience for performance or other reasons.” Accessibility also helps open-source projects move from obscure to ubiquitous; if jQuery had required a command-line tool to compile it when it came out, I can practically guarantee you wouldn’t have ever heard about it.

Read more »

March 19, 2016

The Web is (finally) a mature platform

I started my career as a “web developer” circa 2007. I’d dabbled before with Javascript while making sites in HTML/CSS as early as middle school, but that was my first real job as a real software developer. Back in those days, LAMP (Linux/Apache/MySQL/PHP) was about the only sensible way to build a web application. You could use Java servlets, of course, or build applications using CGI, but once PHP was stable and available and straightforward, and it quickly became the obvious choice for a huge range of applications.

Read more »

February 28, 2016

Clojure SQL Migration Libaries

It is generally recommended, if you’re developing an application that uses a database, that you manage changes to the schema of said database using some sort of migration system or another. Luckily, several intrepid developers in the clojure community have stepped up with their own solutions to this problem – all of which end up being very similar indeed. Read on for an overview of your options and to find out which one is right for you.

Read more »

February 20, 2016

Plotting Reddit post frequencies with d3

This week I added a better graph to Later (for Reddit)’s post timing analysis page. Previously, the most common time and the most common day were plotted on separate bar charts. However, I noticed that I got called out on this in this article on Medium, which offered a pretty sensible alternative that I wasted no time in ripping off wholesale. I still have the bar graphs in, but I also added a 7x24 color-coded grid plot, allowing for a more accurate view of exactly when the most popular posts were posted.

Read more »

January 30, 2016

Failjure: Exception-free error handling for Clojure

I’ve written before about handling errors in Clojure without using exceptions, by making use of ad-hoc monads. In that post, I also referenced Andrew Brehaut’s error monad implementation.

Since then, I’ve written a number of projects that use similar handling, and I thought the time had come to wrap it up in a library, which I’m calling Failjure.

Read more »

January 11, 2016

Clojurescript Boot Live-Reload Weasel Vim-Fireplace Piggieback

My long-standing complaint about Clojurescript is that it’s a pain to get running. People who prefer Leiningen seem to have gotten a handle on this with figwheel; however, those of us who have jumped on the Boot train (it’s newer and therefore better!) still have to do some assembly to get the live-reloading auto-compiling repl setup that’s become the standard for Clojurescript development.

Like many problems in the Clojure universe, this is less a problem of technology and more a problem of approachable documentation. With just a little bit of configuration and some understanding, you too can assemble that perfect Clojurescript dev setup using Boot.

Read more »

January 4, 2016

Deploying a Clojure web app with Pallet

Pallet is a Clojure DevOps platform/library designed to automate blah blah blah. We all know what these things are supposed to do, the question is how they do it, and Pallet takes the agreeable tack of just being a Clojure library that you can run in a repl and do devops stuff.

Read more »

December 28, 2015

Clojure SQL library showdown

When it comes to database access, I’ve become less particular over the years as I’ve gotten more and more comfortable with SQL. These days I’m happier to write the SQL to get just the thing I want, than wrestle with an ORM to produce the same thing...

Read more »

December 17, 2015

Password Authentication/Authorization for Clojure

In my previous post, I gave a quick overview of how the Buddy auth library for Clojure. Today, I’ll give a more fleshed-out example of how to use it to add session-based password authentication to an app.

Read more »

December 15, 2015

Clojure auth with buddy

A while back, I wrote about using Friend to handle auth in Clojure. I neglected to mention (or look at, in particular) the other auth framework making waves in the Clojure community, aptly named Buddy.

Buddy is, well, another authentication/authorization framework. It also contains some lower-level crypto utilities, but the main use right now seems to be handling auth for web applications in Ring. I had heard good things about how Buddy works, so I decided to give it a try, and now you get to hear about that.

Read more »

December 4, 2015

Using Letsencrypt with Nginx has just entered its public beta period. This means that you can get ssl certificates really easily and for free. Letsencrypt’s certificates are up to modern specs and fully accepted by all browsers, so you no longer have any excuse not to have SSL on all your domains.

This post will hold your hand through the process of moving your Nginx site from http to https.

Read more »

October 19, 2015

Introducing Unpythonic

A short post to say that I’ve just launched a new project called Unpythonic. It’s a collection of articles introducing various concepts and techniques for functional programming in Python.

Read more »

October 1, 2015

Writing Friendlier Clojure

I love the Clojure language, but I don’t think there’s any use pretending that the combination of expressiveness, power, and repl-driven development can result in some staggeringly dense code. Everyone that writes Clojure is guilty of this at one time...

Read more »

July 12, 2015

React.js for incremental text games

I have a small weakness for silly text games like Candy Box and A Dark Room, and most recently Kittens Game (“a Dark Souls of incremental gaming”). The common feature of these games is that, for the most part, the UI is just numbers on a web page, and you perform certain actions to increase those numbers to purchase upgrades that further your ability to increase the numbers.

One of the great things about this style of game is that the barrier to entry is very low (which is probably why there are approximately a brazilian of these things around), and the games in the genre are differentiated almost solely by the quality of their mechanics (without silly things like “art” to get in the way). You, the reader, might even be interested in dipping your toe in the world of incremental games. If you want to add one to the pile, I recommend you use React to do it.

Read more »

June 15, 2015

Ripping off in Clojure is a clone of Buffer, or at least the Buffer of about 5 years ago. Back then, all buffer did was let you schedule posts to Twitter, to be sent at regular intervals throughout the day. It was on HN about 3 years back, and has been running...

Read more »