Sunday, April 21, 2013

(grok 'clojure)

Learn at least one new language every year.  Different languages solve the same problems in different ways.  By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut.
- The Pragmatic Programmer

Was that really written almost 15 years ago?  Time flies.

It's been a while since I learned a new language.  I started messing around with Clojure, and it's been a blast.  It is the most fun I've had programming since the first time I fired up Squeak and started poking around.

I can't seem to break out of the "every project looks like a blog engine" mold, so I started another web app called Logbook (source).  Inspired by this post by Austin Kleon,  it'll be a very simple way of logging what you did for the day.   I started keeping a personal logbook using text files a year ago, and really like it.

Logbook uses Clojure, Compojure, and Clabango (I gotta have my templates).

My Clojure Path

The following has helped me get to where I am so far:

So far I'm finding Clojure challenging but fun.   It's a welcome punch in the brain if you feel you've been spinning your wheels.


Thursday, February 21, 2013

Bookmarks migration


I migrated Bookmarks off of Heroku.  Heroku generously offers one free dyno that you can use to try out their services.  I found the Heroku environment, tooling, and documentation excellent.  Unfortunately, when you are only using a single web dyno and it hasn't seen any traffic in one hour,  the dyno is idled out.   The next request requires restarting the dyno process, which takes seconds.   I understand why they do it, and there's no way I'm going to complain about something that is free, but it is unworkable for Bookmarks.  Since I'm the only one using my web app, it would idle frequently throughout the day.  Trying to save a bookmark required a frustrating wait.  Since I already have a VPS with Linode, I migrated Bookmarks over there.

I have several web apps already running on Linode, and a few of them are now years old.  Moving Bookmarks made me revisit the dated setup.  I was running apache + mod_wsgi and nginx with all web apps using the global Python install.    Many Django folks recommend using nginx + gunicorn or uwsgi these days.  I chose gunicorn since it is popular and easy to set up.  Each web app now runs in its own virtualenv and is managed using Supervisor.   This setup makes it much easier to maintain and grow, and now Bookmarks is more responsive. 

Wednesday, December 12, 2012

Bookmarks Status

My horribly named bookmarking webapp "Bookmarks" is coming along.   Reacquainting myself with Django has been fun and informative.   The app currently has user support and basic saving of bookmarks, so I'm switching over to using it for my own bookmarks.  The deployed version can be found here, but signups are disabled so there's not much for others to see.

For the deployment environment I decided to go with Heroku.   The ease of set up, design, documentation and tooling won me over.   I only had to make a few changes to get the app Heroku-ready:   switching from a locally imported and uncommitted settings file (which never sat right with me anyway) to using environment variables, configuring static files to be served from another server, a simple database tweak, and going through the rest of their Getting Started with Django guide.  Once you have your project set up on Heroku, deploying changes is a simple git push.  It's been one of the better experiences I've had setting up a project in a long time.