by Carlos Ble | Mar 10, 2009 | Software Development
When it comes to version and API changes, Python optional arguments are evil. Say you define a function like this: def someFunction(param1, param2, optParam=None) # code And you are calling it from module whatever.py like this: retValue = someFunction(x, y, z) A few...
by Carlos Ble | Mar 10, 2009 | Software Development
Same behavior in Python and C#… Wrong code: try: # some code except Exception, e: # log the exception or whatever raise e Right code: try: # some code except Exception, e: # log the exception or whatever raise # JUST RAISE!!! Wrong code: try { // whatever }...
by Carlos Ble | Feb 6, 2009 | Test Driven Development
I’ve realized that test code difficult to write and read is sometimes a code smell. It could mean the test code is wrong or the SUT (subject under test) itself is wrong. I’ve got myself thinking of how to test a method X of a class C which is calling...
by Carlos Ble | Jan 30, 2009 | Software Development
Hudson and Cruise Control are very popular among Java/.Net developers but when it comes to Python, … Hudson also seems to work on python!. Open source tools for Python continuous integration: Hudson Buildbot Bitten However, I just want a simple way to check out...
by Carlos Ble | Jan 20, 2009 | Test Driven Development
Part of this information has been got from the testdrivendevelopment group. The main enemy of TDD is…. the lazy developer. I’d rather say, the lazy programmer. It’s good to read that it is just not only me who thinks that laziness is the most...
by Carlos Ble | Jan 16, 2009 | Software Development
What I’ve got browsing today: REST Explained Web services VS REST Free book: Scrum and XP from the Trenches. Traducido al castellano tambien!!!!: Proyectalis.com
by Carlos Ble | Jan 15, 2009 | Software Development
Dar el salto a los generics de .Net 2.0 supone un cambio en la forma de pensar. Como dicen en inglés, un “mind shift”. En este artículo voy a tratar de explicar los generics mediante reglas que hagan fácil el proceso de detectar cúando se pueden usar y de...
by Carlos Ble | Jan 9, 2009 | Software Development
Esta es una traducción del artículo de James Carr, TDD Anti-Patterns. En dicho artículo algunos antipatrones han sido escritos por Frank Carver, Tim Ottinger, Cory Foy, Joakim Ohlrogge y Kelly Anderson. Como en otras traducciones, la terminología de dobles de tests es...
by Carlos Ble | Jan 9, 2009 | Software Development, Test Driven Development
Another nice feature in mocker is passthrough. It is perfect when you want to ask if a given call was performed but calling the real object rather than the mock so getting a real result. This is an example. def testRetrieveServicesList(self): dataSource =...
by Carlos Ble | Dec 30, 2008 | Now Reading, Software Development
Just done reading this nice book: SOA in Practice, by Nicolai M. Josuttis. I find it a good book to ask yourself if your architecture smells good or stinks. It does not include source code so it is more about the SOA tenets than explicit samples. Before reading the...