E-Scribe News : a programmer’s blog

About Me

PBX My name is Paul Bissex, and e-scribe.com is my consulting business. I build web applications using as much open source software as possible. From September to June I teach web design and other important non-photographic professional skills to photographers. In the '90s I wrote technology commentary and reviews for magazines, newspapers, and web publications, including Wired, Salon.com, FamilyPC, the late lamented Web Review, and the Chicago Tribune. Feel free to email me.

Colophon

This runs on Django, served by Apache and mod_python. The database is SQLite. The operating system is FreeBSD, on a VPS hosted at Johncompanies.com. Comment-spam protection by Akismet. Vintage topo imagery from the Maptech archive. The markup engine is Markdown.

The Book

Book cover I'm co-author of "Python Web Development with Django", an excellent guide to my favorite web framework. Published by Addison-Wesley in October 2008, it is available from Amazon and your favorite technical bookstore as well. Click on the book title above to learn more.

Pile o'Tags

Stuff I Use

Akismet, del.icio.us, Django, dpaste.com, Emacs, FreeBSD, Freenode, jQuery, LaunchBar, MacPorts, Markdown, Mercurial, OS X, Postfix, Python, SQLite, Subversion, TextMate, Trac, Ubuntu Linux, wmii

Spam Report

At least 45597 pieces of comment spam killed since January 12th, mostly via Akismet.

Software, meet hardware

My friend Matt recently got a microcontroller kit as a present. It's pretty geek-tastic -- you wire up circuits on a little breadboard, write code on your PC, download the compiled code to the microcontroller, and run. At which point, depending on your skill and ambition, your LED blinks, your piezo buzzes, or your robot limbs and sensors do their thing. And your cat runs into the other room.

All very cool, but the language -- a BASIC dialect called PBASIC -- overwhelmed my delicate sensibilities. For example, take this bit of code (found on the web)...

x VAR Byte 
IF x=1 THEN lab1   ' test for case 1
 GOTO lab2         ' case 1 false, try case 2
lab1:              ' case 1 true, do this... 
 HIGH 0:LOW 1
 GOTO lab5         ' done with case 1, exit
lab2: 
IF x=2 THEN lab3   ' test for case 2 
  GOTO lab4        ' case 2 false, try next case
lab3:              ' case 2 true, do this...
  HIGH 1: LOW 0
  GOTO lab5        ' done with case 2, exit
lab4:              ' this is case else
  LOW 1: LOW 0     ' do this...
lab5:              ' point of exit
  END

...how could you not want to rewrite it into something like this?

if x == 1: 
    high(0)
    low(1)
elif x == 2:
    high(1)
    low(0)
else:
    low(1)
    low(0)

Maybe the fact that I was thinking about these things means I'm truly a software guy, and not a hardware guy. I'm sure that at my level (zero) it doesn't really matter what the high-level language is. But in order to really scare the cat, we're going to need something more powerful...

Monday, January 8th, 2007
+

Post a comment

Comments use Markdown syntax. Your comment will not appear until approved, which may take a few hours or more. Spammers will be torpedoed.


(Will not be shared)

(Optional)