7 Years As A Professional Software Developer

4 commentsWritten on September 27th, 2009 by
Categories: Off Topic

It's that time of the year again! I have now been working as a software developer for the past 7 years. I don't know why that means something to me, but it does. Last year, i gave an overview of my short career which people seemed to find interesting, so i figured i might as well add this to my list of 'blogging traditions'.

So what have i done in the past year? Well, as i mentioned in last year's post, i finally started working at my company's home office instead of working at client locations, and it has definitely been the best year of my career so far.

When i made the switch, i thought that we (as a development company) were already pretty good, but i had some very clear changes/improvements in mind that i wanted us to achieve in the first year. More specifically, i wanted to see big improvements in the following areas:

  • Increase the efficiency of our automated testing practices.
  • Get people to write loosely coupled code.
  • Increase overall performance and scalability of the code we write.
  • Get people to truly care about code quality and proper software development practices

My coworkers started writing automated tests way before i did. But before i came aboard, none of our automated tests would ever substitute the implementation of a component during tests. No mocks, no stubs, just the real thing all the time. If we had tests for code that was somewhat dependent on data access components, then those tests would effectively be dependent on a real database. If we had tests for code that was somewhat dependent on processing files, then those tests would effectively be dependent on real files.

We had thousands and thousands of tests which took a long time to run, were rather fragile, and required a lot of maintenance effort to keep them running at all times. These days, our tests only use the database when we are testing our queries and our NHibernate mappings. We use mocks to substitute the data layer when we are testing our business code, and we also moved to using MVP patterns in the UI layer so we could start writing automated tests for a lot of our UI code as well. Obviously, all of that required us to write our code in loosely coupled manner, which we now all do with Dependency Injection and using an Inversion Of Control container. So i am pretty happy with the results of the first two goals.

The third goal (performance and scalability) is also coming along nicely. The architecture that we use (and if you've been reading this blog for a while, you'll probably have a pretty good view on what our architecture typically looks like), in combination with the libraries that we use, gives us plenty of possibilities to write scalable and performant code. One of our clients made us perform extensive stress testing for one of the projects we did for them, and the results were good. I'm pretty confident that our usage of the Request/Response WCF Service Layer plays a very large part in getting those results. Of course, we still have performance problems every now and then, but we now do a pretty good job of proactively keeping an eye on it (in most cases), and when performance problems do show up, we can usually fix them pretty easily.

So far so good, right? Then comes the final goal... getting people to truly care about code quality and proper software development practices. I am very happy with the progress that some people have made, but i am pretty disappointed that i can count them on one hand. Some people improved tremendously in the past year, while some only seem to care when they know their code is going to be reviewed. I was very disappointed when i noticed that some people didn't mind resorting to technical shortcuts or not properly testing things when nobody was watching them. As a result, i'm now actually monitoring the commits for most of the projects that we have going and whenever i see something that doesn't look right, i talk to the author of the particular piece of code about it.

I really don't like the fact that i feel the necessity of doing that, but i'm gonna try this approach for a month or two to see if things improve. I hope to see more people actively reviewing other people's changes in the upcoming months because this is a task that should always be shared instead of having only one person who does this. I hope that in a year, we'll have enough peer-pressure to make sure everyone keeps playing it straight. Anyways, i'll let you guys know about it next year ;)

So all in all, it's been a very interesting year. I've worked on some cool things, i get enough variety in my work, i get to see (some) people grow continuously in their capabilities, and the amount of time i had to spend on doing things i'd rather not do was very low. Much lower than i can imagine in any other company anyways. Oh, and according to some of my coworkers i'm also responsible (to some extent) for an increase in our after-hours-beer-consumption as well as pizza deliveries. It has been a good year indeed :)

  • http://itdriven.co.uk James

    Davy,

    I read your comments on fragile integration tests with interest. Like you, we unit test everything non-GUI and integration test our NHibernate layer against the real database schema. That’s working really well.

    We also have a set of integration tests at the controller (we use ASP.NET MVC) level that essentially create an instance of the controller via IoC and test the public methods all the way down to the database. They really do seem to be a maintenance headache with issues such as referential integrity setting up the data, and they also seem quite duplicative of our controller unit tests. We are looking for options to replace them with something that adds more value. Automated UI tests (probably Selenium) are one option.

    Do you get value from your fragile integration tests? What are your thoughts on integration tests?

  • http://davybrion.com Davy Brion

    @James

    We don’t even write integration tests anymore (unless you want to consider the query and data access tests as some sort of integration test). We had so many problems with them that we just don’t bother with them anymore.

    We also don’t write automated UI tests… they definitely could add some value in some cases, but to write them for everything is something that i’m very reluctant to do because i think they will be just as much of a maintenance problem than integration tests are.

  • http://itdriven.co.uk James

    I think that automated UI testing is best suited to areas of an application that rarely change, mainly as an aide to regression testing.

    BTW, we’ve found pairing is a great way to up the quality of code from all team members. Code reviews and broken build emails had limited results. But with pairing you just seem to win on so many levels, providing you don’t over-do it by continually pairing.

  • http://davybrion.com Davy Brion

    @James

    i agree on the pair programming thing, but unfortunately that’s one of the things i just can’t seem to sell to management ;) , even if it isn’t continuous