New GIS and Python programming blog

I stumbled onto Solving GIS Problems today. It has an ESRI bent, but it's Python, and there's code – a rare thing in the geoblogosphere. And we agree on a bunch of things such as how logging wins and arcgisscripting cursors fail. Subscribed.

Comments

logging vs testing

Author: Jonathan Hartley

Hey there.

Is logging still relevant when you have unit and functional tests? I suspect not, but I'm asking because I genuinely don't know.

I used to use logging in previous projects. My current one is heavily tested, which seems to work really well for us, and we don't ever seem to need any logging, so we've stopped putting any in. Are the two factors correlated?

I think so, but I can't prove it. Clearly the two techniques don't do the same thing, but they do provide similar information (eg. what the code did on one particular run, verses what the code does under all the circumstances that the test writer could think of)

Anyone got any insight to add?

Re: New GIS and Python programming blog

Author: Simon Norris

Thanks for posting this. An ESRI bent can be useful!

Re: New GIS and Python programming blog

Author: sharkinsGIS

Thanks for posting your discovery. You may want to check out my latest post at http://foldingspace.wordpress.com/ as well.

Re: New GIS and Python programming blog

Author: Sean

Unexpected things happen even if your code is well tested: inaccessibility of network resources, topologically invalid user data, you name it. You'll want to log those events and move on when you're processing batches of data or providing a web service.