What the heck is Android’s Proguard?

Hello there Android developer or curious onlooker. Welcome back to another blog post talking about your favorite, my favorite, and the world’s favorite mobile operating system. Today we’re going to talk about Proguard and what that means for Android Developers. Proguard is a free tool that has recently became pretty mainstream in the Android ecosystem. In fact, you’ve probably seen it’s name mentioned a few times in Android Studio (provided you’re using Android Studio), but what does it do? Proguard helps developers by shrinking, optimizing, obfuscating, and preverifying your Java class files. It’ll take care of some helpful tidbits like...

Using Generics in Scala

Scala has, in it’s core library, several classes that are intended to contain (at some point or another) some object. A few examples of this are seen in Option and Future. These container classes allow you to act upon values that may or may not exist or even to work with values that should appear in the future (hence the name “Future”). The idea of these container classes is fundamentally simple. Let’s define a container class to hold an instance of class called Egg. class Container { private var eggs: List[Egg] = Nil def push(egg: Egg) { eggs = egg ::...

Introducing the Fish Shell

The first thing I do when I my hands on a new Macbook is install Homebrew. Then, I install Fish. What is fish? Well, that’s an excellent question. Fish is a command line shell that (in my workflow) replaces Bash — the shell most developers are used to. There are plenty of alternatives to Bash, with Zsh being the most popular, but I’m hoping to give fish a shot by the end of this article. Here’s what I like about it: Tab based completion on just about everything Tab suggestions based on parsed man pages Searchable history The prettiness of...

Scheduling background tasks in Play with Scala

A common theme with web applications is to run tasks in the background. Commonly, they’re ran at set intervals. You’ll find data processing servers, online-game servers, and several other types of servers using regularly scheduled background tasks and today, you’ll learn how to implement these tasks in Play with Scala. This is my first post on Scala and Play but expect to see more in the future. I’ve been digging into it deeply and have decided that its worth investing the time and effort into both — the language and the framework. It’s worth mentioning that this tutorial assumes you’re...

Provisioning a remote server with Ansible

If you’ve ever manually provisioned a server before, you know the feeling of excitement that you receive once you’re finished and your application is running on a remote machine. If you’ve ever provisioned two servers identically, you know the feeling of dread from getting it exactly right the second time. Thankfully, tools like Ansible exist to help us provision multiple servers exactly the same way. Today, I’ll talk to you about provisioning a remote machine using Ansible. Install Ansible If you haven’t yet, you’ll want to install Ansible on the non-remote machine. Ansible is installed via Pip so if you...

Adding Trigram Searching to a Clojure Webapp with YeSQL, Migratus, and Postgres

Recently on Porios, I added the ability to do fuzzy text searches with Trigrams. Porios is powered by a Clojure API (a dated Luminus template, actually) which uses YeSQL, Postgres, Compojure and several other libraries. Let’s talk about implementing a trigram search for this application components. What is a Trigram? A Trigram is a three character subsection of a string of text. This allows you to match text if you’re close to the actual text you’re looking for. For example, the string foobar can be represented as the following trigrams: foo, oob, oba, bar. With trigram searching, “Grammy” could match...

Using Futures in Clojure

It’s late at night so I’ll keep this post short. I’m going to quickly cover how to use Futures in Clojure and why you would want to use them. Let’s start with the why. What is a Future? A future is simply a function that executes code on a background thread and can be dereferenced to get the result of that code. Here’s what they look like! (future (println "foo") (+ 1 1)) This code will start a new thread, print “foo” and then do the heavy-lifting of calculating 1+1. Keep in mind the result of a future has to...