Posts

About testing method parameters against null

"Unless I’m publishing an API for general use, I don’t worry about testing method parameters against null . It’s too much code and too many duplicate tests. Besides, I would be testing the wrong thing. When a method receives null as a parameter, the invoker—and not the receiver—is missing a test." - J. B. Rainsberger

DSL & ANTLR

Martin Fawler in his good "Domain Specific Languages" book  heavily uses  ANTLR  to describe topics related to external DSLs. So, I pick the thing up and got to use it. It can generate lexers and parsers in C# (as well as in some other languages - java, c, c++, python). ANTLRWorks is a IDE with syntax highlighting, grammars visualization and even graphic debugger! What's rather strange and annoying that the latest ANTLR (3.2) and ANTLRWorks (1.4.2) generate wrong C# code - some attribute classes are just not defined in any assemblies. However, as ANTLRWorks 1.4 (with ANTLR 3.2 integrated) generates proper sources, I quite happy with the tool :) I recommend the DSL book and ANTLR to every senior developer who needs introduce a DSL into his project instead of tedious XML files or handwritten parsers.

GOOS paper book is here!

Yesterday the GOOS paper book was brought by FedEx! Although I've read the e-book three times, I felt necessity to say 'thanks' for the authors by buying a paper copy. Then, thanks Nat and Steve!

Think twice before make big refactoring to code is new to you

"...[existing code] rewrites should be avoided because the programmers will not have been able to understand from the code why the software does what it does and, when rewriting, will revisit all the same mistakes the original programmers made. The same can be said [...] about making big refactorings to code that is new to you when you are not adding any new functionality to the system. It's only by adding a new feature that you can get a feel for the structure that the code needs to have. Otherwise you're just noodling about aimlessly and your refactoring will very probably make it harder to add new features in the future." Nat Pryce

GOOS. Again :)

A couple of days ago I've started reading the excellent book I've ever read - GOOS . For the 3rd time :) And I find it even more useful than earlier.

DDT is an awful thing

The book from my previous post turned out to be a one about POSIX process which in short is old big-up-front design mythology with huge class- and unreadable sequence diagrams, reverse engineering and all the dirty stuff I was absolutely sure died some years ago... Reading the book was a waste of time (especially by the Red See).

DDT

Just started reading  Design Driven Testing: Test Smarter, Not Harder  by Matt Stephens, Doug Rosenberg. The authors declare that DDT is better than TDD. I'm looking forward to get whether it's true :) Anyway, it seems as a wonderful reading in Egypt :)