Category Archives: Python

State of the .NET Culture

I listened to a podcast the other day from the guys at Herding Code that I found a bit disturbing, mostly because I think there is a some amount of truth in it.  The podcast was about some fairly well known .NET developers who in the past few years have moved away from .NET into the Ruby world.  Mike Moore and Scott Bellware were very active in the ALT.NET community and had a fairly well publicized split from the group.  Google it if you want, I am not interested in rehashing it here.  Jeff Cohen was a .NET developer who switched over to Ruby on Rails several years ago.  Jeff also has a book out called Rails for .NET developers that looks interesting.

These guys have all switched over to primarily Ruby on Rails development.  I have never developed any production Ruby code, so I can’t speak much to the benefits of Ruby, but the part of the podcast that really concerned me was the characterization of the larger .NET community as not being interested in design, testing, or having clean, simple code.  And what really scared me is I think there is a fair bit of truth to it.  As a .NET developer who cares a lot about TDD, good design, continuous integration and automated testing, I had to admit to my frustrations in the past at a larger community that may not care as much about these core principles as they might what the is in the next framework or set of tools.

I am not talking about the thought leaders in the .NET space like Jeremy Miller or Ayende Rahien, or the folks that I meet at local developer events.  These are people that are either pushing the envelope, or at the very least trying to learn better ways to build great software.  But I can’t tell you how many times I have gotten less than satisfying answers while interviewing candidates to questions like…How do you test your code?  What blogs do you read?  What new languages have you tried recently and how does it compare to what you are using in terms of ease of use, testability, performance.  Why did you use a particular tool/framework and what were the strengths/weaknesses.

I have been able to do a little Python recently and have to say that the Python developers I have worked with are very familiar with the variety of tools available to them.  Testing (especially TDD) and the goal of clean, simple code seem to be more baked into the culture and frameworks.

I am hopefully the the .NET community will continue to embrace good software development practices and be willing to look outside the Microsoft stack for good ideas and technologies.  At the same time I plan on looking more at the Ruby and Python development communities.  Give the podcast a listen, you may find it interesting and hopefully a little thought provoking.

PyCon on the Charles – Part I

I have been doing some work with Python the last few months and recently joined a Python Meetup group in Cambridge that had a meeting last night at Microsoft NERD. The purpose of the meeting was a chance for some people who are presenting at PyCon to do a dry run on their presentations. The meeting was called PyCon on the Charles – Part I

This meeting definitely met my one good thing rule, in fact I thought all the presentations were interesting. There were three presentations

  • Python for Large Astronomical Data Reduction and Analysis Systems by Francesco Pierfederici
  • Python’s Dusty Corners by Jack Diederich
  • Tests and Testability by Ned Batchelder

Francesco Pierfederici talked about how he uses Python in “Big Astronomy”, particularly for the LSST project. The code base they are using has a pipeline framework that I am interested in looking at. There is a lot of simulation that needs to be done before building a large telescope and the supporting computing infrastructure. Most of the high level code is developed in Python, with the computation intensive code written in C.

I was most interested in the Ned Batchelder’s Tests and Testability presentation because I am interested in the tool support for testing in Python. He presented techniques to using mocking to make your code more testable, as well as ways to structure your code to support dependency injection. The mocking framework was Michael Foord’s mock.

I would have liked to have seen more emphasis on addressing testability early in the development cycle. As a proponent of TDD, I think you need to begin testing as soon as you start developing. In my experience it leads to a better design through loose coupling and you avoid having to make a major refactoring to put in test hooks after the fact. I think Ned did a nice job presenting the techniques and some of the tools available in Python to make testing easier and with better coverage.

All in all, an interesting evening and if you are a Python developer in the Boston/Cambridge developer you may want to join up. There is a follow up on scheduled on 2/3/10 called PyCon on the Charles – Part II where there will be three more practive presentations for PyCon.

And once again, kudos to Microsoft for making their space available for different groups. This is the 4th event that I have been at in their space and exactly none of them were Microsoft specific. I think having a space where developers can get together is something that has been sorely lacking and they deserve credit for trying to make that happen.