Russell Gilbert

Freelance Agile Software Developer & Clean Code Enthusiast

Russell Gilbert

Code...

New Code

I believe that my code should work & and I believe I should be able to show that it works. I write tests to be sure that my codes works. I write my tests first, then I write the code to pass the tests & then I refactor to ensure my code and tests are the best that I can make them.

I believe the greatest value in my code is that it can be extended and adapted over time as the problem it tackles and the scope it covers evolve. To support this I do my best to ensure that my code is well written and easy to understand and follow when I come back to it weeks, months or years later & I think hard about making life easy for other developers who might have to work with my code in future.

Legacy Code

Legacy code matters too. Sometimes its hard to write tests for and changing it can often be fraught with risk. I always approach legacy code with care and I always strive to leave it better than I found it.

With these tenets in mind I never stop learning and I never stop trying to get better at my craft.



Russell's Blog

Code Smell of the Week...

Code Smell
For fun, and to remind myself of my sins, I'm going to publish a list of code smells I've seen or committed. Here's the first...

Early Streaker
By & large the shorter your methods the better. If they do only one thing how long can they be? A while ago I came across a class that had a number of methods that were several thousand lines of code! Not one of mine I'm pleased to say. The whole potbellied, corpulent monster of a class was over 18,000 lines - the author considering that the Single Responsibilty Principle was a mere passing fad, a bit like streaking. "Llanfair­pwllgwyn­gyllgo­gery­chwyrn­drobwll­llanty­silio­gogo­goch" is a great name for a village in Wales but, with places names, like methods, short and snappy is easier to read, understand & discuss.

Recent Blog Posts