Brizzled

... wherein I bloviate discursively

Brian Clapper, bmc@clapper.org

College is Forever

| Comments

Recently, I’ve gotten involved with my college alma mater, as a mentor and a member of the alumni board of my college within the university. One thing struck me, not too long ago, as I walked across campus. My alma mater has changed quite a bit since I left there, after obtaining my bachelor’s degree, 30 years ago. Yet, when I step foot on campus, part of me still feels like I’m going home again.

This feeling is rather odd, when I stop to think about it. I spent a mere four years of my life thereā€”a drop in the bucket, considering that I’ve spent 12 times that many years not being there, both before and after. Yet, walking on campus, three solid decades after I left, still evokes strong feelings and strong memories.

Perhaps it’s because I still count several people from those days among my very closest and dearest friends. However, while I think that’s a big part of the feeling, there’s more to it than that. I believe those coming-home feelings are a testament to the impact the college experience can have on the lives of people who are just beginning to reach for adulthood.

To all those high school seniors who are ready to fling their mortarboards high in the air and spend a carefree summer, before moving on to college: Make the most of your college days. Soak up new friends, new experiences, and new knowledge. Enjoy the new feelings of freedom, and embrace the new responsibility you have for ensuring your own success and happiness. Enjoy what you can, even while working your butts off, because the experiences coming up are likely to have a lasting impact on your entire life.

Play Framework: LESS vs. Sass Recompilation Performance

| Comments

Overview

Lately, I’ve been building some web applications using version 2.0.4 of the Play Framework. Overall, I find I like the framework. In my opinion, it compares favorably with technologies like Django and Ruby on Rails, especially for those of us who find that compile-time type safety provides useful benefits.

However, one area where Play lags far behind the competition is in CSS asset compilation.

So, I decided to run some tests…

Generating a QR Code in Scala

| Comments

I recently discovered that I needed to generate QR codes in Scala, and it turns out to be quite simple, with the help of the QRGen Java library, by Ken Gullaxen.

In this brief article, I demonstrate how to create a simple SBT project to pull in the appropriate dependencies, as well as how to call the QRGen library from Scala.

Seamless Rails menu entries across ActiveAdmin and Resque Web

| Comments

Introduction

For one of my clients, I built a customer web portal in Rails, and I used the ActiveAdmin gem to provide a slick administrative interface. The site also uses Resque to process background jobs, and the Resque web interface is mounted within the Rails application.

With these components in place, I wanted to provide cross-linking navigation menu (“navbar”) items within the application itself, within ActiveAdmin, and within the Resque web engine.

The application navbar is easy, of course, since it’s entirely under my control. Adding links to Resque web and ActiveAdmin navbars is more challenging.

Here’s how I did it.

Hacking Buildr’s POM Generation

| Comments

Awhile ago, I finally decided to bring the build process for one of my open source Java projects into the 21st century. Since I find Maven irritating, I converted the project to use Buildr, a Rake-based build tool that contains, among other things, Maven-style dependency management.

Life was good. I had a nice, simple build, with all the power of Ruby at my disposal, and without any need to edit XML, which sucks.

Then, someone reported a bug: The Buildr-generated POM did not contain dependencies. As the author of the bug report wrote:

Maybe they should be added to the POM, so my build system (I use Gradle) will be able to download all the required jars?

That, of course, is a perfectly reasonable request. As it happens, it was easier requested than accomplished.

Using Twitter Bootstrap with Jekyll

| Comments

Introduction

I use Jekyll to generate more than a few web sites. I like the separation between the HTML presentation and the Markdown content, and I like that its easy to migrate Jekyll web sites to and from GitHub Pages.

Recently, I decided to update one of those web sites, partly to take it out of the dark ages, and partly to learn more about Twitter Bootstrap. Twitter Bootstrap is a terrific package, consisting of Javascript, CSS and HTML that is relatively easy to use, flexible, and customizable.

A Case for CoffeeScript in the Browser

| Comments

Like many others who do some development for the web, I’ve grown to like CoffeeScript. The CoffeeScript package comes with a Javascript implementation, allowing CoffeeScript to be translated into Javascript directly in the browser. Jeremy Ashkenas, author of CoffeeScript, recommends against using that approach for anything serious, and with good reason. However, there’s one scenario where I find CoffeeScript in the browser to be especially useful.

Simple Address Standardization

| Comments

Introduction

Suppose you’re writing an application that stores and compares street addresses. Depending on how you obtain those addresses, you may need to standardize them.

  • Standardizing the addresses makes them easier to compare.
  • Standardizing the address can have the side effect of validating the address.
  • Standardizing an address also makes it more likely that you can send a physical piece of mail to the address and have it actually arrive.

This article explores one way to solve that problem. I’ll be showing examples of Ruby and Python, but the same general approach works for other languages.

A Sublime Text 2 Plugin to Set the Syntax from the File Name

| Comments

A few months ago, I switched from GNU Emacs, which I’ve used for more than 20 years, to Sublime Text 2. After years of using Emacs, there are a few things I miss in Sublime Text 2. Fortunately, Sublime Text 2 has a rich Python API, and it supports plugins; so, it’s relatively easy to add features I miss.

Like all decent modern programming editors, Sublime Text 2 supports syntax highlighting. But, for various reasons, it can’t always guess which syntax applies to a file. For example, lately, I find myself editing a lot of Sass files. Sublime Text 2 always brings Sass files (i.e., files ending in .scss) up as plain text files, with no syntax highlighting. I wanted a way to tell Sublime that all files ending in .scss should be assigned the “Ruby Sass” syntax, by default.

In other words, I wanted the equivalent of this Emacs Lisp capability:

elisp
1
(add-to-list 'auto-mode-alist '("\\.scss\\'" . sass-mode))