Provisioning a Development Environment for Clojure Web Services via Ansible and Vagrant

Welcome back! DevOps has always been an area of interest for me, however I’ve not really had much of a reason to get into it. At CARFAX and LinkedIn, there were teams dedicated to the DevOps side of things. However, I’m picking up steam with a couple of projects that have me at the helm, and I’m seeing a more and more prevalent need for DevOps in these projects. What problems does DevOps solve? Lots of them! Copious amounts of problems, in fact. Here are a few examples: Ensuring Developers can just sit down and write code Automating building applications...

Clojure Protocols & Records

Deep diving back into Clojure! Damn, it feels good to be back! If you’re reading this, you probably don’t know much about Protocols or Records and the goal is simple – by the end of this post, you’ll feel comfortable understanding them, using them, and refactoring to them if you’re coming from a Java codebase. Protocols If you haven’t read the post on multimethods yet, go ahead. I’ll wait. Protocols are conceptually similar to multimethods, although protocols dispatch on the type of parameter, while multimethods dispatch on the value. Although, technically, you can dispatch on a multimethod on type but...

Android – Pending Intents

So you’ve been working with Android for weeks now, and you’ve all but mastered the ability to start a new activity with an intent. Here’s the kicker – There’s far more to Intents than starting a new activity when a user clicks a button, and today I’ll share my knowledge of pending intents. Note: This is an abstract piece on pending intents. Code is minimal to show the essential pieces of pending intents and provide clarity on what they do. This code is not copy/paste friendly nor will we be building an entire application. So what is a pending intent?...

Building a Simple API in PHP using Lumen

Alright, at it again with another PHP post. Hopefully this doesn’t dislodge my blog from the planet.clojure.in newsletter from writing too much non-clojure. The other day I wrote a post about using Slim with Eloquent to build a simple API. It was a fun project and I decided to share it with the PHP subreddit. Thankfully, the PHP community is far better than I remembered it — we created a lot of great feedback and had a few discussions about Lumen. What is Lumen, you ask? Well, it’s a microframework (like Slim) but comes bundled with Eloquent (the ORM we...

Building a Simple API in PHP using Slim & Eloquent

I’ve been exposed to a lot of PHP recently! I’ve been reviewing a course on functional PHP for a publishing company (link will be added once it’s released) and my friend has recruited me into working on an API that’s written in PHP using the Slim framework. I figured now would be a good time to write about my recent findings! Slim is a microframework, similar to Flask or Sinatra but for PHP. I’ve been pretty reserved about PHP in the past (It was the first language that I was paid to write) and I naturally associate PHP with poor...

Threading Pipelines in Clojure

Today we’re going to talk about the thread macro (->) and how to manipulate functions to fit them into your “thread pipeline”. First, let’s figure out what exactly the thread macro is. The Thread Macro If you’ve used -> before, you’ve done some threading. Other languages refer to this as “piping”, although this can be often confused with piping from the command-line. Check out this code (that doesn’t use the threading macro). (first (get-accounts (get-user 8675309))) Now this isn’t complicated, per se, but it could be a bit easier to figure out what exactly is going on. If you’re unaware...

Using NLP to Categorize Customer Feedback in Clojure

First – an apology. It’s been a long while since I’ve written and I kind-of dropped my last series on it’s head and left it to rest. If you were particularly interested in the Zero-To-Hero for Android Development, let me know. I’ll pick it back up. The reason I stopped writing it was because the community sentiment was straight-forward — they wanted more Clojure! Then, I became a bit confused with my next steps as a developer and got mixed up in Rust. Turns out, that’s not for me and I’m in a good spot where I’m at so expect...