May 14, 2014

The nitty-gritty of a Clojure web app

This post is a follow-up/supplement to my article Anatomy of a Web App: How I Built RedditLater in Clojure, published on sitepoint. To make the article appealing for a mass-market audience, I had to take out most of the nitty-gritty details that wouldn’t interest people who weren’t interested in Clojure to begin with (plebians!). The details still have some good stuff in them, though, so I’ve made this post out of it.

So I hope you’re here to read about my fiddly minutae, because off we go!

Read more »

March 20, 2014

Elasticsearch Rosetta Stone

I’ve recently done some work with Elasticsearch. It’s a great platform, but I still found it pretty hard to get started. It wasn’t obvious what was what. Perhaps I didn’t read the docs closely enough. Anyhow, I wrote up some examples demonstrating how to get started with Elasticsearch.

Read more »

February 20, 2014

Set up Flask with webassets

Flask isn’t new, but it’s really great, and it’s definitely my first choice when starting a new Python app. Today I want to give you a quick tour of the tools I use to set up a new Flask app.

Read more »

January 19, 2014

Just what does "code as data" mean anyway?

Recently, I’ve seen popular articles on macros and metaprogramming in Nimrod and Elixir. Both of these are wonderful metaprogramming systems, to be sure, but I couldn’t help but imagine some in the audience smirking inwardly – and occasionally less inwardly. What odd syntax! How out-of-place they are! If only there existed a homiconic language, they think sarcastically, that could eliminate the need for awkward and forced syntax. Of course, these smug bastards are users of any of the LISP family of languages.

Read more »

December 6, 2013

The many flavors of concurrency in Clojure

Clojure, being the extensible, malleable, rewritable language that it is, is spoiled for choice when it comes to making your cores work for you. You can pick your poison when it comes to making your program concurrent.

Read more »

November 16, 2013

Angular in the small

For those of you that aren’t familiar, Angular.js is one of a new breed of emerging frameworks dedicated to building rich, responsive in-browser interfaces. I’ve had the privilege of working with both Ember.js and Angular.js, and enjoyed them both, so this won’t be a showdown (if that’s what you came for, here’s a nice one).

Read more »

September 10, 2013

On secure SSL: The least every developer should know

The NSA, besides playing the role of Big Brother in the unfolding dystopian saga revealed by Snowden’s leaks, is at the forefront of cryptography research. Being in the business of secrecy, the NSA also has recommendations for keeping things secret. The first of these, Suite A is naturally a secret, and apparently recommends a mysterious list of algorithms known only to the NSA. However, their Suite B recommendation for general national security use is published as an RFC, and suggests technologies available today in browsers and web servers.

Read more »

August 21, 2013

Fixing "Could not generate DH keypair" on RedditLater.com

RedditLater.com is a little app I made last April. It worked fine until sometime in July, when Reddit released an improvement to its SSL configuration on its api. Thereafter, attempts to get an access token using clj-http-lite began to fail with a javax.net.ssl.SSLException: Could not generate DH keypair exception. Some investigation led me to a stackoverflow post (where else) which led me to this eventual workaround: hack up clj-http-lite to wrap the default SSLSocketFactory in a new class that would remove all the unsupported algorithms from the list of supported ones.

Read more »

August 6, 2013

3 new programming languages to watch

On the eve of learnxinyminutes.com getting TechCrunch’d, I thought I’d write about a few of my favorite languages on the site. Learn X in Y minutes has a lot of conventional blockbusters like C and Java now, as well as old cult favorites like Haskell and Erlang, but it was the independent films — that is, languages — that received some of the earliest attention, occasionally by their creators themselves. Being the language-dabbler/compulsive HN reader that I am, I had already heard of them, but in case you haven’t, here are three cool new languages that you can stuff in your brain hole:

Read more »

July 11, 2013

3 Wrong Ways to Store a Password

Sooner or later, in the field of Web Development, you’re going to need to store someone’s password. This is easy to get wrong, but easy to get right, too. Today, let’s take a tour of the wrong ways, and then find out how to do it the (current) right way. Plaintext Alice just learned PHP, and are making an app with user authentication. Her database stores an email and password in a table called users.

Read more »

July 10, 2013

Live development is the way of the future

Live development is nothing new; it’s been well-explored in Lisps and in other languages like Smalltalk and Erlang since more or less the dawn of man. Emacs was for a long time – and by many still is – considered the only way to develop for Lisp, thanks to SLIME. But I with projects such as Light Table, and a growing popularity of functional and dynamic languages in general, I think we’ll see live coding become seriously popular as capable mainstream tools collide with capable mainstream languages.

Read more »

July 7, 2013

Reducers explained (through Python)

Last year, Clojure introduced a new library called core.reducers, which represented a new, efficient way to deal with operations across collections in functional languages. It’s since been picked up by Elixir, and libraries have been written for some other languages.

Today, I want to explain a bit about what reducers are, why they exist, and how they can be more efficient than other functional methods of handling collections, and help you write your code more prettier.

Read more »

June 28, 2013

Learn C in Y minutes

Learn the language of strong, independent women and hairy-chested manly men alike: I’ve written a quick C overview for LearnXinYMinutes.com. Y probably is not 15 in this case, but if you feel like brushing up, head on over to http://learnxinyminutes.com/docs/c/ and learn you some real programmin’. I’m not sure how applicable the format is to a language with as many tricks up its sleeve as C has, but feel free to tell me what you think!

Read more »