I’ve updated the PyMigrate test

February 13th, 2009 by ScottK | 7 Comments | Filed in Python

I set up the PyMigrate files on http://code.google.com/p/pymigrate/ without any tests because PyMigrate at that time was a prototype. I’ve created and refactored PyMigrate into a solid form and there the tests are included and these will continue to be maintained.

I haven’t written the tests to the library files yet because Pete’s comment about other libraries, and the sqlalchemy-migrate egg got me thinking. I’m thinking that since SqlAlchemy already supports multiple database types why should I re-invent that using a multitude of plug-ins? Why should I take on the maintenance responsibilities for doing so.

Nay I say. I’m thinking about using SqlAlchecemy exclusively, and it can deal with all the database types and queries. I’ll just create an adapter to work with it from my format.

Thoughts?

Tags:

ObjectMentor as a Reference For Pragmatic Programmers

February 12th, 2009 by ScottK | 1 Comment | Filed in Programming

In searching for something yesterday I stumbled upon the resource page of  ObjectMentor and found it a gold mine of information about software practices and systems. ObjectMentor is a company of industry experts and started in 1991 by Robert C. Martin. As a company they also helped define Extreme programming and helped form the Agile Alliance.

Luckily for us, ObjectMentor offers resources for use to look at the form of articles, books, downloads,etc. One might also assume that resources from them would be highly technical. That assumption would be incorrect.

Case and point, I highly recommend the articles in the craftman series. It’s written in the form of an apprentice programmer writing into their diary the conversions of the day between them and the journeyman programmer they paried with. I find myself learning the concepts the author is trying to instill, using a natural conversation between two people.

I personally re-thought my impression of test first in article The Craftsman #4: A Test of Patience. The article starts with the apprentice writing a very simple program and it conforms to the practices that the journeyman taught in articles #1,2,3. Then the apprentice starts to write the tests for it. The journeyman makes the apprentice delete the whole program. Which of course make the apprentice angry.

The article then proceeds to follow through writing the same program test first, then refactor until completion. The article does include the original program before testing, and includes the code until completion.

At the end of the article it shows, and instills, that testing first produces a leaner more pragmatic code base than writing the tests afterwards.

I would have included links to the mentioned articles but they open in pdf’s, so I chose not to. I highly recommend this site to everyone involved in software engineering.

Tags: , , ,

ActiveRecord:Migration for Python

February 9th, 2009 by ScottK | No Comments | Filed in Python

I’ve made a couple of posts about how Python lacks the ability to use the Ruby on Rails like ActiveRecord:Migration and how I have come up with a way to incorporate such an idea. Well today is the 9th and I have finally released what I have.

You can find it here: http://www.techraving.com/pymigrate-activemigration-for-python/

Tags: , , ,