Gifted Slacker

The dog always eats my homework

Programming Style

with 3 comments

I’ve been programming way too much lately. The upside is that I am starting to notice some general characteristics of the way I write code.

I was looking at some of my code tonight and realized that I tend to mix metaphors, in a manner of speaking. The code I’ve been writing has been pretty off the cuff, and it seems to come out in a weird mixture of object-orientation, modular-procedural, and functional programming.

For instance, one of the tasks I’m working on is a fairly sophisticated blog scraper. My initial approach had two large, complicated classes: one to determine which urls to visit and another to get data from these and store it in a database.

As I’ve gone along the classes have shrunk considerably. In fact, the first class has disappeared altogether and is now just a module. That module is now decomposing into smaller and smaller functions.

I think my “style” is converging toward functional programming.

At some point I want to go back and rewrite some of this project to make it more functional.

Written by Grant

February 1, 2008 at 11:25 pm

Posted in Filler, Software

3 Responses

Subscribe to comments with RSS.

  1. LISP.

    ethan

    February 2, 2008 at 4:15 am

  2. Arc is out now too.

    I want to give it and emacs lisp a try… Yeah, I’m weird: Scheme was my favorite language we used in school.

    Grant

    February 2, 2008 at 9:16 am

  3. Couple years ago, I wanted to be a LISP ninja. I guess I got distracted.

    ethan

    February 3, 2008 at 4:18 am


Leave a Reply