8 Jun 2011 nikodemus   » (Journeyer)

Endless Loops and Interactive Development

Tip of the day. Don't write:

(defun foo-loop (foo) (loop ...loop body...))

Instead, write:

(defun foo1 (foo) ...loop body...)
(defun foo-loop (foo) (loop (foo1 foo)))

It's a small thing, but it makes it much easier to debug the loop while it's running. If you need to instrument it, you can just add whatever code you need to FOO1 and recompile it.

If you open code almost anything inside the body of an endless loop, it becomes much harder to intercede -- and interactive development is all about intercession with running code.

Syndicated 2011-06-08 17:56:02 from Nikodemus Siivola

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!