Archive for November 2004

Comments!

November 17, 2004

Woot! Second comments!

My first comments were from a co-worker. I just got two comments on my blog and I have no idea who this “hojit” is. Cool!

Advertisements

Fiveam Test Framework – 1.2.3

November 16, 2004

Update: if anyone knows how to make Textile 2 not mess with my lisp code and get all confused, I’d be obliged.

I’ve been using the fiveam test framework for common lisp. It has the usual features you’d expect from an xUnit style test framework, but the programmer’s interface to it is far cry from JUnit.
Where JUnit uses reflection and inheritance for test definition, Fiveam presents a more lispish macro interface.

(def-suite lpm-suite)
(in-suite lpm-suite)

(test my-test ()
    (is t)
    (is (equal "a" "a"))
)

The is macro is cool. When the test fails, it can figure out whether to present the programmer with two non-matching values or just show that an expression was false.

Fixtures, instead of being classes, (an OO cluge in my opinion) are just “with” macros.


(eval-when (:compile-toplevel :load-toplevel :execute)
  (def-fixture temp-dir ()
    (let ((tmpname (make-pathname :directory '(:relative "tmp"))))
      (flet ((dumpfile (name contents)
               (let ((target (merge-pathnames tmpname name)))
                 (ensure-directories-exist target)
                 (with-open-file (s target
                                    :direction :output
                                    :if-does-not-exist :create)
                   (write-sequence contents s)))))
        (ensure-directories-exist tmpname)
        (&body)
        (kmrcl:delete-directory-and-files tmpname)))))

(test another-test ()
    (with-fixture temp-dir ()
        (... more "is" tests ...))))))))))

My lisp skills are a bit clumsy, but this framework leaves me with elegant tests. I like it.

How Many Pacers Does It Take To Screw In A Light Bulb

November 13, 2004

Nine, apparently.

Mark Cuban is right. I was at a Pacers’ game recently and was surprised to see that so few fans are coming. I think it’s partly because fans want a winning team and are in a wait and see mode. I also think, though, that the production value of the televised games is pretty low. The game is fine and all, but the in between stuff is just formula game coverage, poorly executed, and lacking passion. The televised games are a huge part of marketing the team to new fans, and not executing that well only hurts ticket sales, in my humble opinion.

Blog Maverick: It was bound to happen, and it did.

November 6, 2004

It was bound to happen, and it did.

Mark,

Can’t be entirely sure, but if a significant Pacer staffer blogged openly and occasionally snubbed the league, I’d be _more_ likely to buy NBA products. It’s about trust. You can’t really trust an organization that has so little self confidence that it fines it’s members for being critical; not now.

Pacers Ring Tone?

November 6, 2004

I just got a new cell phone and am wanting a classy Indiana Pacers related ring tone. I’d like my ring tone to match the song they play before the game when they introduce the players, but I don’t know what it is… I liked the one from last year but don’t know the name of it.

If anyone knows comment here or here.

Pacers Win

November 3, 2004

Ah! The Pacers win the first game of the season. Go Pacers!