Spot any errors? let me know, but Unleash your pedant politely please.

Monday, 9 March 2009

Am I writing Java in Python ?

That's what's bugging me today. Or rather Am I writing is like an Ada programmer would write Java ? It's going through too many filters.

It doesn't really matter, but I've been writing stuff as methods of classes, and maybe they could just be functions. I suspect my code is 4 times the size of a 'proper' Python programmer's code.

I've never used a tuple. I'm using dictionaries, but I fear not in a good way.

I want to overload _init_ all the time.

On the other hand, I'm starting to slip into Test Driven Design. I'm mostly writing unit tests for some code I'd already written, which is to support some functional tests that I'm automating. I had three levels of classes, and at the highest level, it was more of a sketch than an attempt to get it right. Once I started writing and running tests, it all got fixed up and fleshed out. Maybe I'll start with some unit tests tomorrow and then write the code.

No comments:

Post a Comment