On testing

Over the last few years I've been mostly blogging about various random topics. Most often those were related to Windsor, discussing its new and upcoming features, announcing releases, and taking in-depth look and its underpinning principles.

Another bucket was one-off posts discussing various aspects of software development, mostly out of larger context and not really caring if you, dear reader, have the experience and understanding of the topic or not.

Back to basics

Recently I had an interesting discussion with several people on twitter about basics. More precisely about basics behind writing tests.

It seems to me, and I'm guilty of that myself, that us, the developers, chasing the latest great thing forget about the basics. When was the last time you read a blogpost about the importance of testing? When was the last time you read about how to write tests, what to look out for, and how to keep the quality of your tests high and the maintenance cost low?

Several years ago I got a lot of value myself by reading blogs that taught me what is important in software, and I wouldn't be the developer I am today, if it wasn't for those people, who dedicated their time to share their experience and knowledge.

I may not be subscribing to the right blogs anymore, but I noticed those posts are much less frequent these days. To help fill the void I decided to concentrate a bit more on the fundamentals in the future, starting with what will hopefully evolve into a series of blogposts about tests.

Feedback

Do you think it's a good idea? Any particular topics you would like me to emphasise, and areas to explore? Let me know in the comments. First post will be coming soon(ish).


Posted 11-27-2012 7:43 AM by Krzysztof Koźmic
Filed under:

[Advertisement]

Comments

Rémi BOURGAREL wrote re: On testing
on 11-27-2012 3:27 AM

I absolutly agree with you, most of the blog posts I read are about the basic. I loved the last series from ayende about the design patterns like I love Jim Bogard's posts about testing.

Looking for your next posts !

Adriaan wrote re: On testing
on 11-27-2012 5:25 AM

Good idea. Looking forward to the series.

Nick wrote re: On testing
on 11-27-2012 9:24 AM

There are a ton of posts on how to do silly simple unit tests.  How about how to make something testable?  Like legacy code, or even the patterns needed to make code testable.  No simple calculators but some real business problem.  That is what I find hard.  If I were writing some calculator I'd know what to do, applying that knowledge to real business code is where I fail.

Wayne Molina wrote re: On testing
on 11-27-2012 11:52 AM

+1 Nick; too many posts say how great design patterns or testing or whatever (IoC, ORM, your choice of acronym) but show some trivial application that doesn't help when you are in the real world.  

Yes, I understand the benefit of unit testing.  I've never worked at any place that saw a need for it, saw a benefit to devoting time to writing tests (to say nothing of TDD), or had a codebase that could support unit testing without spending months refactoring or even rewriting parts of it to be able to write a test.  That's where I get stumped - as nice as tests are you can't justify it when the team has to spend a month refactoring (and, therefore, not providing tangible value) just to be able to write tests around the code.

For all the blogs that I read, all the best practices that I try to adhere to, the reality has always been that this stuff is the domain of the innovators and early adopters; I think in several years as a .NET developer I've met maybe one or two people that even knew these blogs exist, or even bothered to look at open source for beneficial tools, and when I would mention these things I'd be looked at like I was insane.

I really envy you people that get to work with things like MVC, NHibernate, Windsor/Structuremap/Ninject, and the like, because you don't have to fight uphill battles with people that have never even HEARD of NHibernate or NUnit or MVC, and have no desire to learn.  You don't have to risk getting fired for trying to push software craftsmanship and quality.

David Hogue wrote re: On testing
on 11-28-2012 12:43 PM

@Wayne: I have had to push to get several tools like NUnit, NHibernate, MVC, etc adopted. It wasn't always an easy process and things didn't always turn out like I wanted. One downside of that, at least in my head, is because I did push for these things I feel a little bit responsible when the code ends up really ugly or the concepts are harder to teach than I would have thought. I still think it's been worth it though, the code is more reliable and maintainable than in the old days.

Unfortunately because these tools and techniques are something to build apps on top of, they aren't that visible and there probably won't be a push from the higher ups in the company for them. The thing that works best is if you can show how you were able to get things done faster or better than without them.

As far as going back to the basics, I think it could be helpful. I sometimes search for posts like that to forward on, and if the post is from 2002 when NUnit 2.0 came out I'll be less likely to pass it on.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)