September 29, 2008

Pondering Ponderous Thoughts

People sometimes find themselves doing nothing but sitting on a cheap futon at 4 in the morning thinking tacitly. It’s rarely about anything in particular. That’d ruin the moment. The silence is unsettling, but not uncomfortable. As someone who constantly thinks aloud, letting my mind wander without offering ritualistic verbiage allows me to stumble upon ideas I wouldn’t otherwise.

Those are my best ideas.

Well, I can’t take full credit. After the silence got to be too much, I started listening to some of my podcasts. But the inspiration’s still there. The podcasts could be helping (I’m looking at you This American Life), but I like to believe that just thinking freely yields interesting results. Better results.

So, I’m trying something new with this post. I’m taking that same style of wandering thought and applying it to blogging. It’s not a novel concept, really. Those who enjoy writing do it often enough to great success. Doing it with a keyboard instead of a pencil doesn’t make me a maverick or hip or cool.

I’ve always figured that I wrote posts in much the same way other people do. You know what I’m referring to. An all-too tedious, and unforgivingly arduous process that involves revision and peer editing and being generally picky. I might’ve been a bit lax with regards to the peer editing, but I more than made up for it by constantly rewriting certain sections.

As it turns out, this tendency is ingrained by now. I’ve done it twice. Rule #1: From this point on, the “delete” key is off-limits, typos be damned. Right here, I had 4 words written, and I broke Rule #1. We’ll just say it starts now.

Another thing I’m picky about when writing is the subject matter. There’s nothing I hate more than reading a blog full of posts that made it incredibly obvious that the author either wasn’t aware that their subject matter was so boring that my brain cells were considering suicide en masse, or that they didn’t care. That’s just stupid. Stupid. Not ignorant, not oblivious; stupid. The singular goal authors hold for themselves is to write interesting things. The only other way to get them to read your material is to shove it so far down their throat that it makes the victory completely hollow.

The only subject matter that’s never really boring is that which pertains to Emacs. In particular, my Emacs experiences.

Diving right in, I started using Emacs probably close to a year and a half ago. It might’ve been more recently than that, but for argument’s sake, I’m a super-leet Emacs user who slings Lisp around like the sheriff in a Western movie. I’m even wearing a cowboy hat to write this post. It’s a Stetson. Black. Okay, I don’t have a cowboy hat anymore. I haven’t lived on a ranch since I was 8. Fond memories. One of these days, I’ll have to write a post on the giant snow fort I built one year that lasted up through June. Or maybe that time I managed to fall into and get my leg stuck in those weird grate-like things used to keep cattle from wandering off the property.

Now that I’ve donned my imaginary cowboy hat and got my Lisp loose in the holsters, I’m a bit ashamed of my beginnings with Emacs. “Everyone was a noob sometime”. We know that much. What we often fail to appreciate just how terrible we were as noobs.

I’m fairly sure my first attempts at Lisp looked something like:

(setq foo bar)

(defun baz ()
;; OH DEAR GOD
  ????????
)

I was an idiot. Still am. But I was particularly idiotic about Lisp. I was scared shitless of the paren monster. I was near to the point that I jumped out of my chair every time I had to read a bit of Lisp to figure out how to do X or Y in Emacs. Even copy/pasting code from EmacsWiki had me going into a panic attack.

Thankfully, I’m lucky enough to know people who are not-stupid. Not just “not stupid”. Not-stupid. That is the complete inverse of stupid. Smart, if you will.

Nathan Weizenbaum saved me from being an idiot about Lisp, and Emacs. Well, sort of. Idiot-ism has a tenacity for evolution. Survival of the luckiest. I might have wielded some basic Lisp ability by this point, but I was doing all sorts of silly things.

Really silly things like creating a pseudo-CUA mode. It was one part CUA mode, one part being an idiot, and two parts not respecting Emacs. I had bound C-z to kill-region and C-v to an X clipboard-friendly yank. It was sacrilege of the highest order. That particular idiot-ism stuck with me until about last week. Like most things, time eventually heals idiot-ism.

But back to what I’m calling maybe a year ago. I had progressed, a little. A smidgen. Marginally. Not enough to make any real difference at this point. My Lisp code was now closer to this:

(setq foo bar)

(defun baz ()
;; OH DEAR GOD
  (stuff
    (more-stuff
      (cond ((wtf) "WTF?!")
            ;; SO MANY PARENS
            (t (funcall (lambda () "Seriously, wtf?")))))))

Not much better. That’s roughly the Lisp equivalent of hitting one of this paper-thin trees in GTA4 and consequently launching yourself about 932984 times further than the real world allows, scraping your face along the pavement the whole way. It’s not very pretty, it’s messier than a public restroom, and it’s a contributing factor to hypertension.

(Let’s call that the end of “Part One”. I’m going to sleep. The very much unofficial “Part Two” will continue tomorrow when I wake up.)

[OH GOD, I USED PARENS AGAIN]

Part Two

So, here we are, a good 8 hours and one Macroeconomics test later. The Geek Strikes Back. Moving along.

A year ago I was doing silly things with Emacs. I might’ve called them stupid. Regardless, what I was doing was plain wrong. A lot of people complain about the keybindings or editing or any other millions of things about Emacs that just grind their collective gears. That’s also wrong.

It’s not as black and white as my defiling of Emacs standards, but it’s still wrong. Mind you, I wouldn’t have admitted it and I doubt readers X or Y will either. Afterall, we’re all super-leet Lisp-toting sheriffs around these here parts, and I tell you what, we know a crapload more than Emacs.

I got a little help (probably closer to a lot) from Nathan here and there. He even sent me a copy of the hands-down best introduction to functional programming and lispy Scheme (or scheming Lisp?) known to man. I still go back and read it from time to time. It’s a bit of a Holy Grail crossed with barbecue wings. It’s tasty and bad for you. You can’t go wrong.

Equipped with my newfound knowledge, I started being more productive in Emacs. Not so much in the sense that I had a clue what I was really doing (I thought I did, but I didn’t) as it was that my Lisp no longer looked like absolute shit. It was shitty, sure, but it wasn’t so shitty that it didn’t work. That’s progress of some sort or another.

It was about this time (again for the sake of argument, we’ll assume it’s 6 months ago this time) that I started slowly realizing all the cool things about Emacs. Prior I was like a raccoon. “Ooh, shiny! I should try it out!” Turns out that’s not very lucrative. My .emacs had grown from some small bits of Emacs Lisp into a gargantuan 600+ line ode to lack of self-control. I had chunks of code that weren’t useful, or worse, plain weren’t being used at all. When you test out every feature of something that has an arguably infinite number of potential features-to-be, you quickly end up with a clusterfuck of useless ideas and wasted time.

At the time, I did what I had to do. Emacs bankruptcy. Full-on brain surgery with lasers. Not the boring lasers you see in real life either. I was using those Star Wars-esque “Pew Pew” lasers. I was quickly becoming a laser-wielding space sheriff with a handle-bar mustache made of parens.

Except, I didn’t really learn my lesson. Over the next months, I again and again let stuff creep in that wasn’t needed or used. It was a bit like an addiction without the getting busted and the cops finding your stash and arresting your ass. I almost wish they did arrest people for this (just for an over-nighter though). It’d have saved me several months of wasteful configuration.

Hell, I even wrote a silly “now playing” doohickey for rcirc that supported both Banshee on Linux and iTunes on OS X simultaneously. Don’t get me wrong, I love annoying people on IRC with information they couldn’t care less about, and I have a special place in my heart for Banshee, but was that sort of thing at all useful, necessary, or even worth writing?

Hell no!

Only, I didn’t really realize it until a few days ago. See, it’s only in sheriff retirement that I really “got it”. Emacs is quite a bit smarter than me. Hell, it’s nearly twice my age. It’s wisened and such. That isn’t to say that there aren’t some weird behaviors that need shaping up (I’m looking at you splash screen), but that on the whole, Emacs does things the way it does because it’s usually the better way of doing them. It’s not perfect, but it’s definitely close.

A lot of readers (all 3 of you, possibly the guy sitting next to you reading over your shoulder too) are either nodding their heads in agreement or laughing hysterically right now. The former is made up of those who are new to Emacs and scared shitless of it, or they’ve used it or vim long enough to “get it”. It’d kill most of us to admit it, but the collective wisdom of a group of really smart people is usually better than the singular wisdom of one person.

That second group though, they’re the ones who should really be paying attention. They’re laughing because they don’t “get it”. I’m not just talking about whether or not they use Emacs. Emacs isn’t for everyone. But it is for a lot of people. So’s vim. This isn’t about using the same editor I do; it’s about understanding why tools like it are so preferred by the “programming elite”.

The “programming elite” are sneered at by group #2. Afterall, why should you need to type keybindings and write your own code when you can click buttons all day? These #2s aren’t computer illiterate people trying to fit into a programmatic world. They’re those young whippersnappers who graduated from X university/college and know the typical Computer Science degree material, but have no zeal for the field. They’re the sort of people who aren’t reading books on the side or using some language that’s so new and underground that the lexer isn’t even written yet. They’ve been talked about at length by a lot of people smarter than I, but with a different approach.

I think some assume that there’s some magical gene or what-have-you that says X person is going to be a #1 and Y person is going to be a #2. End of story. It’s deterministic, it’s naive—and worse, it demonstrates a lack of knowledge about one’s self. The truth is, we were all a #2 at some point. Not just in the noob-ish attempts at code. We all started out simply not caring about the wider world of programming and Computer Science.

It’s nature vs. nurture, but without all the baggage that comes with the average debate on that topic. Generally, there’s one single thing that inspires and drives us to continue learning about programming. That can be said of a lot of fields, but it’s especially true for programming. Why? Because it’s boring as crap if the passion’s not there! It’s worse than underwater basket-weaving for goodness sake!

For some people, it’s the thought of designing video games. For others, it’s all about making a hip, cool web application and just being a complete badass. For a distinct few, it’s the dream of having Donald Knuth’s man-children. There’s literally a million reasons you could pick from. That’s the redeeming quality about our field: it’s literally limitless.

The name of the game is to instill that passion in the #2s of the world.

Nothing I’ve said will really have a profound impact on the first group, and it probably won’t for the vast majority second group. I wish circumstances were different. There are some amazing programmers trapped in #2 bodies. Secretly, deep down, they’re Emacs users and vim users. They’re Lispers, and Haskellites, and Erlangians. Hell, they’re Rubyists and Pythonistas as well.

What does that have to do with Emacs? It was my inspiration. The thing about Emacs is that it forced me out of my comfort zone. It was kind of like thinking freely from a futon at 4 in the morning. It’s liberating. As I’ve used Emacs, I’ve learned more from it than anything else. It took a lot of time, and some elbow grease, but Emacs made me into a #1.5. It got me started. Other Emacs users kept me going. I spent a lot of time making mistakes, and even more time realizing just how bad they were. But time heals all wounds, even the dumb mistakes. It worked out just fine in the end.

And now it’s your turn. Dive in if you’re a #2. What’ve you got to lose?

Tags: Emacs, Life

Comments (Feed)

wingo September 29, 2008

You appear to be following the Steve Yegge school of blogging ;) I caught humorous snippets here and there, perhaps one day I will read the whole thing ;)

ermo October 05, 2008

“And now it’s your turn. Dive in if you’re a #2. What’ve you got to lose?”

(tongue firmly in cheek): From the looks of it, my soul. Or my sanity. Or perhaps both? ;)

You might know the psychological term ‘zone of proximal development’. Being a somewhat cautious soul myself, I find that I rarely jump in feet first intending to either sink or swim. Instead, I prefer a gradual introduction to new concepts and ideas, so as to not be overwhelmed. And I believe that The Little Schemer will suit me nicely, so thank you for the recommendation.

10 years ago, I was introduced to programming via the medium of Standard ML of New Jersey (which had been formalized in ‘97 and was considered The Next Big Thing at the university I attended). I am rather amused that you did not mention that particular language in your brief survey of popular functional languages, although I must confess that the term ‘essemellers’ might not be quite as catchy as the others. And yes, I used Emacs back then; perhaps now is as good a time as any to pick up that habit once more.

And do keep writing. I find your whimsicial and self-irreverent style highly entertaining.

Oh, and if you haven’t tried it, I highly recommend using night trips in sail boats as a medium for unlimited thinking. I find that “Awesome” only begins to approximate its potential.

(And re. being a #1, check out this Fat Boy Slim album cover – (and the journal appears to be quite interesting as well…))