LCD-like banners in Python

Back in 1998 or so, I wrote a CD player application for Microsoft Windows in Borland Delphi. It was for a magazine tutorial article, and I wanted a cool LCD-like display to show track elapsed and remaining time. There was a good one available for Delphi, called LCDLabel, written by Peter Czidlina (if you’re reading this, thanks once more for your cooperation). I’ve been thinking about doing a modern version of the LCD display component for several times over the years, and I even got pretty far with one for OS X in 2010, but then abandoned it because of other projects. [Read More]

Learning Clojure

About one year ago I wrote a multi-part tutorial on Clojure programming, describing how I wrote a small utility called ucdump (available on GitHub). Here are links to all the parts: Part 1: The Clojure REPL Part 2: Definitions Part 3: Higher-order functions Part 4: Logic Part 5: Project However, Carin Meier’s Living Clojure is excellent in many ways. Get it from O’Reilly (we’re an affiliate): My little tutorial started with part zero, in which I lamented how functional programming is made to appear unlearnable by mere mortals, and it kind of snowballed from there. [Read More]

Functional programming without feeling stupid, part 5: Project

In the last four installments of Functional programming without feeling stupid I’ve slowly built up a small utility called ucdump with Clojure. Experimenting and developing with the Clojure REPL is fun, but now it’s time to give some structure to the utility. I’ll package it up as a Leiningen project and create a standalone JAR for executing with the Java runtime. Creating a new project with Leiningen You can use Leiningen to create a skeleton project quickly. [Read More]

Functional programming without feeling stupid, part 3: Higher-order functions

Welcome to the third installment of Functional programming without feeling stupid! I originally started to describe my own learnings about FP in general, and Clojure in particular, and soon found myself writing a kind of Clojure tutorial or introduction. It may not be as comprehensive as others out there, and I still don’t think of it as a tutorial — it’s more like a description of a process, and the documented evolution of a tool. [Read More]

Functional programming without feeling stupid, part 2: Definitions

In this installment of Functional programming without feeling stupid I would like to show you how to define things in Clojure. Values and function applications are all well and good, but if we can’t give them symbolic names, we need to keep repeating them over and over. Before we start naming things, let’s have a look at how Clojure integrates with Java. I’m assuming you are still in the REPL, or have started it again with lein repl. [Read More]

Functional programming without feeling stupid, part 1: The Clojure REPL

In my recent post Functional Programming Without Feeling Stupid I took a quick look at how functional programming can be a little off-putting for the non-initiated. I promised to provide some examples of my own first steps with FP, and now I would like to present some to you. Advocates of functional programming often refer to increased programmer productivity. At least some of that can be attributed to the REPL, or the Read-Evaluate-Print Loop. [Read More]

Hearts and HipStyles

It’s Valentine’s Day, and HipStyles for iPhone is free for today only! HipStyles Valentine's Day Special To celebrate and spread the love, we have reduced the price for exactly 100 per cent. This is your chance to save big! It’s available on the App Store, so download it and tell your friends and loved ones what we already know, and you soon will: that HipStyles is the ultimate companion app for Hipstamatic users. [Read More]

Unicode character dump in Python

Sometimes you just need to see what characters are lurking inside a Unicode encoded text file. Your garden variety dump utility (like the venerable od in UNIX systems and the Windows standard hex dump (though I don’t think there is one) only shows you the plain bytes, so you have to head over to unicode.org to find out what they mean. But first you need to decode UTF-8 to get the actual code points, or grok UTF-16 LE or BE, and so on. [Read More]