Skip to content
Jason A. Heppler

Microblog

Microblog

Start Using CSS3 and HTML5 Now

Smashing Magazine: “Just like the elusive character from Beckett’s classic play, this day of full cross-browser support is not ever truly going to find its dawn and deliver us this wonderful new Web where our work looks the same within the window of any and every Web browser. Which means that many of us in the online reaches, from clients to designers to developers and on, are going to need to adjust our thinking so that we can realistically approach the Web as it is now, and more than likely how it will be in the future.”

Programming

Ruby vs. Python

All Things Progress: “The Ruby language is beautiful. And I think it deserves to break free from the Web. I think the future of Ruby is firmly stuck in Web development, though, so I’m going to invest in a new language for data analysis, at least for now. This is a look at the fantastic language I came to from Java and a look at a possible candidate.”

Programming

FREQr, a Command Line Word Frequency Generator

I wrote this simple Ruby program while enrolled in Prof. Steve Ramsay’s Electronic Text course.  I’m releasing it into the wild for anyone that might find it useful. You’ll need to have Ruby installed on your machine to run the program. Simply pass the program a file name and it will output to the screen a numerically-sorted list of word frequencies.

#!/usr/bin/ruby -w

# FREQr.rb
#
# Basic word frequency generator.
#
# Written by Jason Heppler
#
# Last Modified: Wed Nov 3 23:53:52 CDT 2010

# Pass the program a file to open
# e.g., $ ruby freqr.rb poe.txt
filename = File.new(ARGV[0]).read().downcase().scan(/[\w']+/)
frequency = Hash.new(0)
words.each { |word| frequency[word] +=1 }
frequency.sort_by { |x,y| y }.reverse().each{ |w,f| puts "#{f}, #{w}" }

If you wish to make changes to the tool or download a copy, you can find it in my Github repository.

Digital history

Refocusing on Content

Leo Babauta:

What’s the most important thing a blogger can do to grow his blog and readership? Write great content. Not add links or widgets to the sidebar, not check stats, not reading or commenting other blogs, not even responding to comments or email. Writing great content. That’s by far the most important thing you can do.

That pretty much sums up the reasons behind the redesign of jasonheppler.org.  If you’ve visited here in the last couple of weeks, you probably noticed the theme switching back and forth between concepts.  I’ve finally settled on this one: its minimal, distraction-free, and primarily text.  I’m here to generate great content that others can find useful or challenging or thought provoking.  I’ll make some tweaks here and there in a coming days, but I’m pretty happy with this look.

I’ve taken a lot of inspiration of Babauta’s sites Zen Habits and mnmlist.

Personal

Pianobar, Your Command Line Pandora Client

I’m an avid music listener.  Since I spend a lot of time either programming, designing, writing, or reading, I like to have background noise that usually takes the form of music.  But I’m also not a major consumer of music.  I don’t buy much music to add to my iTunes library; instead, I spend most of my time using online music services that allow me to listen to great music and discover new things.  Most of my time is spent with Pandora, though I often turn to The Hype Machine for a different flavor of music.

However, I despise Pandora’s web interface and their reliance on Flash (in fact, I’ve recently gone Flash-free on my Mac).  So imagine my excitement when I discovered Pianobar, a command-line Pandora client that is rich with features without the bloat of Flash or Adobe Air.  All you need is MacPorts or Homebrew to install Pianobar.  With MacPorts, use these commands:

$ sudo port install libao faad2 libmad cmake git-core
$ git clone git://github.com/PromyLOPh/pianobar.git
$ cd pianobar
$ cmake . && make && sudo make install

Homebrew is even easier.  Just run:

$ sudo brew install libao faad2 libmad cmake git

And you’re ready to go.  Just hit “?” if you need Pianobar’s list of commands.

+ love current song
– ban current song
a add music to current station
c create new station
d delete current station
e explain why this song is played
g add genre station
h song history
i print information about current song/station
j add shared station
m move song to different station
n next song
p pause/continue
q quit
r rename current station
s change station
t tired (ban song for 1 month)
u upcoming songs
x select quickmix stations
b bookmark song/artist

Just another step towards going GUI-free.

UPDATE: Reader David writes in to let me know that Pianobar is now part of MacPorts and is as easy to install by just using

$ sudo port install pianobar

Homebrew is just as easy. Simply run

$ sudo brew install pianobar

Thanks, David!

Tech life

Some Good Words to Live By

The Hacker Ethic:

1. Access to computers—and anything which might teach you something about the way the world works—should be unlimited and total.
  1. Always yield to the Hands-on Imperative!

  2. All information should be free.

  3. Mistrust authority—promote decentralization.

  4. Hackers should be judged by their hacking, not bogus criteria such as degrees, age, race or position.

  5. You can create art and beauty on a computer.

  6. Computers can change your life for the better.

From Steven Levy, Hackers: Heroes of the Computer Revolution.

Tech life

Newsletter

Occasional writing on the American West, agricultural history, and political culture.