Social Icons

Menu

Tuesday, October 27, 2009

Have you ever taken a screwdriver to your TV just to find out how it works?

Do you know how your computer looks form the inside?

Ever pressed a button just to see what it does?

Sounds familiar? probably because part of being a software developer (I assume you are a software developer) is finding out how things works. Reading code someone else wrote is part of our job.

If you want to walk the extra mile and learn from monumental works of software development there is a book I recommend reading:

Dissecting a C# Application: Inside SharpDevelop

Ever wanted to learn how visual studio works – right now you’ll have to work for Microsoft or wait till they release the source code for their IDE (ETA a few minuets after hell freezes) instead you can have a look at another .NET IDE that is open source and has a book that explains how it (used to) work.

If you don’t know what #Develop is – shame on you. But you do not have to be a hard core user to learn from this amazing project. The book is a bit outdated and #Develop has changed a bit since the book came out but a few of the core architecture decision still live in the project.

The book explains the architecture and design decisions taken along the road and how various problems were solved along the way.

Read more about this book here. Unfortunately the book is not currently available from Apress (due to site maintenance problems) so until they get thier act together (read perhaps never) you can download it from daieng blog instead.Shared Source CLI Essentials

Wednesday, October 21, 2009

During the weekend I got an invite to Google’s new (or rather newer) product – Wave and I’ve decided to find out what it’s all about.

What is Google Wave for?

Reading the answer from the about page:

Google Wave is an online communication and collaboration tool that makes real-time interactions more seamless -- in one place, you can communicate and collaborate using richly formatted text, photos, videos, maps, and more.

A wave is a conversation with multiple participants -- participants are people added to a wave to discuss and collaborate on its content. Participants can reply any time and anywhere within a wave, and they can edit content and add more participants as a wave develops. It's also possible to rewind waves with the playback functionality, to see what happened, and when.

In other words… I don’t really know - at least not yet, what I can tell you is what Google Wave does:

My initial experience

This how wave looks the first time I’ve opened it – a clean slate:

Later that day several “welcome” waves (I don’t really care for that word) appeared. Explaining about Wave (that word again) and how to collaborate with your contacts and how to add new widgets and slowly my contacts started playing with the new system discovering what we can do with it

After a while a troubling thought started in my head - could that be it? I’ve only got eight contacts that were invited is that the extent of my world?

So I’ve used Google and searched to what other people had to say about this new product and found a useful tip:

When starting new Wave (ouch) the author can decide who to invite to that conversation, but there is another option a wave can be defined as “public” for everyone to see and participate. Using a simple search (with:public) you can see all of the public Waves out there – and there is quite a lot. It seems that there are “social network” options in Wave not just collaborate with your fellow employees and friends but also have a user group/facebook/twitter kind of experience.

My final rants

Google Wave still got me confused - it’s good for meeting minuets and note taking and can enhance collaboration just like another product called Google Docs.

I really don’t get the reason GChat wasn’t used instead of “pings”.

And finally I’ve explored the various widgets that can be added to a message and there are quite a few from video chat to Sudoku you can play with all of your friends but no table, that’s right a tool for taking notes that cannot put a simple 4X3 table that I can feel – why?

After a few days of playing with Google Wave I’m still looking for ways to use it – so if you have Wave and tell me how you use it (in the comments).

Monday, October 19, 2009

It’s that time in the month when I shed a light on cool tools releases that every (.NET) developer should know about.

Visual Studio 2010 Beta 2

The new Visual Studio is one step closer to it’s release. Today MSDN subscribers (yours truly among them) can download the latest release of the upcoming 2010 version and it’s amazing, if you do not have MSDN subscription don’t worry Microsoft will release this version to the whole world to see soon.

It has (almost) everything that a software developer needs - performance profiling, threading and concurrency profiling, historical debugger (called IntelliTrace), the much requested performance improvements are finally implemented and don’t forget about the new extensibility via MEF - although it seems that the old extensibility model (DTE) is here to stay (at least for a while).

I plan to try it out soon and find if they finally fixed that annoying delay whenever I accidentally try to “add reference”.

ReSharper 5 nightly build go public

R# 5 brings some additional productivity boost to the .NET developer in the form of the following new features such as structured patterns, project refactorings, call and value Tracking, Visual Studio 2010 support (almost done), ASP.NET markup and ASP.NET MVC support, intellisense improvements, bookmarks and much more.

If you want to try the new version or if you do not have R# license and want to see what it’s all about you can download the nightly build and try for yourself – I know I would.

Typemock Intellitest

I work at Typemock and I’m damn proud about it, I usually don’t write about new Typemock product releases in my blog (I use Typemock Insider blog for that) but this time I just can’t help myself – because we have a little surprise as part of the new Isolator (5.4.2) - a new add-in called Intellitest.

We’ve decided to make writing unit testing easier and Intellitest is the first step in that direction.

Monday, October 12, 2009

Unit testing success is determined by several factors: the project, team commitment and the tools used. Having a unit testing framework is a must, having an easy way to run your tests is just as important.

Although every single unit testing framework in the market has way to run tests from a console and a dedicated GUI it’s a quite a hassle switching between Visual Studio (where you write the tests) and the place where you run your tests.

Over the years I’ve used several runners but among them there are three runners I prefer:

MSTest

If you’ve been using Microsoft’s unit testing framework that’s bundled at part of visual studio then you already have an integrated runner to run all of these tests.

The upside is that you have a test list editor and can run all of the tests in the solution by pressing a single key combination. It has integrated test coverage support and like the other runners you can also debug the tests.

Unfortunately it won’t run other framework’s tests – so if you’re planning on using NUnit or XUnit you probably need another test runner.

R# Test Runner

JetBrains has a unit test runner as part of the amazing ReSharper tool. First and foremost it has a very good visual studio integration - just like I come to expect from ReSharper, it has a unit test explorer that is refreshed with new unit tests as if it was built as part of visual studio.

It runs NUnit and MSTest tests (and even has XUnit support via add-in) and if you have JetBrains DotTrace profiler you can profile your tests as well.

The fact that it’s part of a ReSharper and that it can run NUnit and MSTest tests is probably the reason it was voted as the most used .NET test runner in the following poll.

TestDriven.NET

This one is my all time favorite, this test runner does it all – not only does it runs tests written by almost any .NET testing framework there is it enable visuals studio integration of several well used tools:

it’s the only runner I know that can run as a 64bit process from within visual studio.

The only catch is that you have to buy it if you want to use it for commercial use, but it’s well worth the cost.

Conclusion

I’m sure there are other alternatives out there and choosing the right runner for your project is just a matter of trying some of them to see which you prefer most. I hope that this post will help you decide which runner to use.

And now to the Lynch part – Joel Spolsky has gone against the public opinion and answered that perhaps IoC containers should not be used:

“I believe that if you use IoC containers, your code becomes, frankly, a lot harder to read. The number of places you have to look at to figure out what the code is trying to do goes up by at least one.”

Of course there is more to his answer (and you should read it) but in a nutshell the guy that’s been writing about how to write better software (and one of the creators of StackOverflow) thinks that IoC containers are evil.

You can see from the score the answer got (-22 and counting) and from the angry comments that Joel has pissed a lot of people.

The funny thing is that at the beginning Joel’s answer was selected as the correct answer for the question but after much pressure from the community (i.e. negative score and more angry comments) the questioner has changed his mind a choose a more “popular” answer – guess what was recommended there.

What I did like is the fact that SO democracy seemed to work here. The masses has spoken!

I’m sorry to say I agree with Joel, IoC containers tend to cause less readable code and makes debugging container related problems a little hell. I do not think that like all development tools there are places that IoC containers can solve a real problem but developers should be aware of their cost.

Of course there is no right or wrong answer here – sometimes you should use IoC but don’t overcomplicate your design if you do not need to.

Monday, October 05, 2009

For the last 24 hours I had problems compiling one of specific project.

The project won’t compile because apparently: “O/R Designer validation failed for file: <FileName>.dbml Error: The operation could not be completed. Unspecified error”. The weird thing was that I didn’t change anything in that project, in fact that project was not changed since the beginning of this year when a single comment was added in one of the project’s files.

It seems that the project was not to blame. Further checking of Visual Studio showed that indeed he was probably the cause of the problem.

Sunday, October 04, 2009

Unit testing your code is easy – all you need is to write simple test code and run it from time to time to check if your code misbehaves. But there is more to successfully using unit tests then just write these tests, in fact I saw quite a few talented developers get frustrated and stop unit testing for several reasons.

I don’t think that there is a single factor that can cause the success (or failure) of unit testing integration as much as your team.

The Team factor

Your co-workers and your team leader are the ones that will cause your unit tests to be effective or just a waste of time (or make you feel that way).

Unit testing the code is just not as much fun when you’re the only one doing it, all is needed is for someone else to commit a change (without running unit tests) and you’re back to trying to find out why your tests stopped working.

Unit testing is a team sport and like other team sports it is much more fun with the whole team. Shooting hoops is ok but playing basketball with your team will be much more fun!

When you got your all team onboard the whole “unit testing” experience (or better yet TDD) things get much more easier. If every member of your team is responsible to run the project’s tests before commits the build will break less.

In a nutshell – it’s nearly impossible to keep using unit tests when you’re the only one doing so.

There are other benefit of getting your team support:

Test reviews – improve your skills by by reading your fellow developer test code and by having your code reviewed . This is exactly the same as learning best practices from code reviews – for tests.

Track improvement – in order to show management and other teams in your company that your project improve because you use unit tests you need to be able to measure the actual improvement, when the team works using the same methodology it becomes easier to measure success.

How can it be done

Luckily for me my employer is a big believer of agile methodologies and that developers should write unit tests, but what if you’re the only one that seen the light and you want to show your team how software development can benefit from unit testing?

Depending on the organizational culture of your company you might want to try and pitch the idea to your boss, team lead or friendly neighborhood architect, if you have an ally that can help you convince the rest of the team.

Or you can start from your co-workers and convince them to join you and see if it makes your work better.

Use facts and explain why this is a good change, because there is nothing more convincing then actual experience try to suggest a “trial period” to see if unit testing is good for your organization.

If you want to learn more about how to implement unit testing in your team – you will find this webinar interesting.