Archive | March 8, 2004

Food for thought…

From OSNews: *The Command Line – The Best Newbie Interface?*. “This essay describes the surprising results of a brief trial with a group of new computer users about the relative ease of the command line interface versus the GUIs now omnipresent in computer interfaces. It comes from practical experience I have of teaching computing to complete beginners or newbies as computer power-users often term them…”.

Think Globally, Buy Locally

I’ve been in the book and publishing business for a while. I take advantage of the fact that there are local retailers by buying from them whenever possible. Perhaps I could use an Amazon or a BookPool or another online service, but if I’ve used the local bookstore to browse the stacks, look through possible purchases, I’ve used their services, what they pay rent for, and I owe them fair compensation. Tim O’Reilly notes similar thoughts here, and my thoughts were spurred on by receipt of my monthly email newsletter from SoftPro. The folks at SoftPro are great – they know their titles, they can order what you need. They’re working hard to make it through this “jobless recovery” when the joblessness is hitting hard in the IT sector.

Their “Regular Reader” program is a great deal – a percentage off list price in exchange for an email address for monthly newsletters. In addition, they sponsor the discounts sent on by their publishers, like O’Reilly’s “Buy Five, Get One Free” promotion. And to top it off, they throw in their own promotions of T-shirts and coffee cups.

And SoftPro is a cool store, the geek equivalent of a kid in a candy store. Wall-to-wall books, and they’re all computer books. O’Reilly, Addison-Wesley, Prentice-Hall, APress, No Starch Press, Microsoft, sometimes even Hentzenwerke. I was sad to hear they were closing the Marlborough, Mass, store, although the Waltham store (recently relocated from Burlington) is my favorite. Check them out if you’re in the area (or near Denver, where their other two stores are).

MySQL Connectivity with Python

Great article over at DevShed on connecting to a MySQL database using the Python language. Folks familiar with ADO or with SQL Pass-through and the VFP way of manipulating cursors will be comfortable with code like this:

#!/usr/bin/python
# import MySQL module
import MySQLdb
# connect
db = MySQLdb.connect(host="localhost", 
user="joe", passwd="secret",db="db56a")
# create a cursor
cursor = db.cursor()
# execute SQL statement
cursor.execute("SELECT * FROM animals")
# get the resultset as a tuple
result = cursor.fetchall()
# iterate through resultset
for record in result:
        print record[0] , "-->", record[1]

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.