Monday, February 28, 2011

Quotes of the Week: Frameworks

quotes2.jpg

You and your internal development team of architects are not going to build the next great framework. You’re not going to build a good one. You’re not even going to build an acceptable one.

 

True code reuse between projects in the OO world is mostly a pipe dream. That's why so many good OO guys end up being toolsmiths and writing frameworks -- out of a desperate desire to create true reusable pieces of code for common problems.

 

Reusable code is overrated a majority of the time. The focus should be on creating well designed software that is easily maintainable. Much more software can be built in a shorter time frame this way.

 

If there is one thing more frightening than mapping your way through a maze of twisty little libraries, it’s getting mired in the framework swamp.
- Mike Taylor, PragPub April 2010

 

Responsibility trap number one: Building a platform to make other (lesser) programmers more productive.
- Eric Evans, SET 2010

 

I can't read the article, the term "framework team" makes me shivering inside...
- Bertolami on Twitter

Thursday, February 24, 2011

Quick picks from Gojko's "TDD breaking the mould"

Images

Interesting perspectives on Gojo's presentation: TDD breaking the mould:

  • "TDD leads to good design" revisited: There is a symmetry between good design and TDD. The inverse is also true: "Good design enables TDD".
  • Quote Nat Pryce:
TDD does not drive towards good design, it drives away from a bad design. If you know what good design is, the result is a better design.
TDD doesn't drive good design. TDD gives you immediate feedback about what is likely to be bad design.
  • Good design, rapid feedback and TDD are inextricably linked: The three enable each other, the three depend on each other.
  • Enforce "Baby Steps": Pursue he mindset to commit every 15 min, and when we are not able to commit after 15 we should reflect why not, and work with the goal to commit in the next 15 min.
  • Exercise "Baby Steps": TDD as you mean it
  • TDD is a process: Originally Kent Beck wanted to give the first XP book the title "Test Driven Development" then he decided that this would confuse people.

Tuesday, February 22, 2011

Looking at BDD from the perspective of requirements engineering

A listener to the Hansleminutes Podcast about Executable Specifications was asking me:

All of the examples of BDD I’ve seen follow mostly the happy path with only an occasional nod to the unhappy path and don’t seem to go into as many corner cases and essentially code coverage as unit tests too, but this feels incomplete.

Gojko also recieved the question and published an extensive answer on his blog: Duplication between BDD and Unit tests

 

1279316 question mark

My answer was the following:

One approach how I look at BDD is, that I do not look at it as an extension for Testing/TDD but rather an extension to requirements gathering.
The crucial thing from this perspective is to develop a shared understanding by working out concrete examples. Don't yet think about tests, ask you what would I write down in a specification, so that everybody understands what the system should do.
These are then the scenarios that you should strive to automate.
Later in the project you may add more scenarios to cover special cases/edge cases but it is not the goal of BDD to completely cover all possible paths through the system. For non-trivial systems this is usually not possible, so the challenge is to find the key-example that provide the most value regarding the shared understanding.

Of course this BDD approach is orthogonal to unit-testing/TDD. Here you rather strive for combinatorial completeness in the sense of code coverage.

Saturday, February 19, 2011

SpecFlow: The Awakening

Recent internet fame and a trip to the East are evidence that SpecFlow is growing up and getting around.

So I think it is time to unveil to the world the first 10 month in the life of SpecFlow. Some might say: "From birth to adolescence", some might refer to the "The Awakening":


(watch in HD for best experience)

It's amazing to really see open-source at work. Thanks to all the committers!
I hope SpecFlow is striding forward into a bright future and I wish it all the best on its way to adulthood and greatness.



Video created with gource and ffmpeg on my MacBook with the following commands:
gource -1280x720 -s 0.1 -r 60 -o ppm.out
ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i ppm.out -vcodec libx264 -fpre /opt/local/share/ffmpeg/libx264-max.ffpreset -threads 0 specflow_20110218.x264_max.avi
Thanks to pweibel for the instructions.

Thursday, February 10, 2011

From Visual Source Save to Team Foundation Server

Aa570302 banner 1078 trainings de ch MSDN 10 My colleague Csaba Gero and I will hold a talk about migrating Visual Source Save to Team Foundation Server (TFS).

The event is delivered under the umbrella of the Microsoft MSDN TechTalks and will take place on March 3rd in Technopark Zürich.

Get the details and free registration here: MSDN TechTalk “Visual Source Safe 7… wird nicht erscheinen”


Update 2011-03-06: Slides are available on MSDN.

Tuesday, February 8, 2011

Tidbits: GitHub Users

315116528_480edcad4d.jpg

According to This Developers Life 1.1.2 GitHub has over 560'000 users. That's quite a lot ...

Another interesting story from that podcast: Tom Preston-Werner, one of the founders of GitHub, turned down a 300'000$ bonus (plus a "big" salary) that Microsoft offered him for joining Microsoft. This was back in 2008 when he was in the beginning of starting GitHub ... (read his blog post about that decision)

 

As a sidenote: I am really positively suprised about This Developers Life, I did not think it possible to keep up the real interesting non-technical content for so many episodes. I am wondering how long they can sustain that quality of content...

Thursday, February 3, 2011

Resetting the SQL Server Express Password

This is mainly a note for myself, since I already had to google for this several times.

I am using the VS-2010 VM image from Microsoft to experiment with TFS 2010. This image has a SQLEXPRESS instance installed. The given instance has an ‘sa’ user with admin rights. The local machine administrator user ‘Administrator’ however has not admin rights on the instance.

Unfortunately I could not find the password of the ‘sa’ user of the SQLEXPRESS instance.

I am playing with the SourceSafe to TFS converter tool (vssconverter). To actually run the source-control migration, the tool wants to create a database on the ./SQLEXPRESS instance. I am running the tool with the local ‘Administrator’ account, which does not have this right … bummer!

The solution: Start the SQLEXPRESS instance in single-user mode. In the single-user mode local admin accounts have admin rights on the instance.

  • Start SQL Server Configuration Manager
  • Select the instance you want to start in single-user mode
  • Right click, select ‘Properties’, chose ‘Advanced’ tab
  • Prepend ‘-m;’ in ‘Startup Parameters’

image

  • Restart the instance
  • Connect to the instance with SQL Server Management Studio using the local Admin account
  • Under Security->Logins double-click ‘BUILTIN\Users’ and add the aproriate server roles (i.e dbcreator)
  • (optional) double-click ‘sa’ login and set a new password
  • In SQL Server Configuration Manager, remove the ‘-m;’ from ‘Startup Parametrs’ and restart the instance

Now you can connect with ‘sa’ and the new password.
And you can run vssconverter with the ‘Administrator’ account, and it is able to create a database.

This solution should also work for regular SQL Server instances, not only for Express instances, however I did not test that.

Tuesday, February 1, 2011

Programmers Stockholm Syndrome: Don't get addicted to crappy projects!

Ps mcnsgvwi 170x170 75 4

Episode 1.1.1 of "This Developers Life" discusses an interesting theory: Programmers Stockholm Syndrome.

Why are we participating in Death March Projects? Why are we staying in dysfunctional environments? Why are we putting up with jobs we don't like?

The answer: The Stockholm Syndrome. The more we get abused by our project environment the more we get sucked into it and the more we define ourselves by the project and its goals, however stupid they are. We get dependent, even addicted to the dysfunctional environment.

Read Chad Fowlers blog post bringing up that theory.

Scott has another interesting theory in this podcast: Like the career of successful Hollywood actors is defined by the scripts they have turned down, programmers careers could be defined by projects they have refused to be part of ...

Then Scott goes on and gives the opinion that failed projects finally are the experiences that makes us good developers. We should write on our CVs in how many failed or botched projects we have worked...

On this last point I tend to disagree. Of course I believe that we can learn from failures, but this learning is limited. And it diminishes with every additional failure. I think you can learn much more from participating in successes and in reflecting them.

I think in our industry a lot of us have assumed this pseudo-darwinistic position of "what does not kill us, makes us stronger". We use this as an excuse to stay on a failing or botched project. We say "at least we learn how not to do it" and try to stay through it. However if we never learn "how to do it right" all this learning "how not to do it" will never help us. We can take a thousand ways of "how to fail" to our graves without ever having experienced any success ...

 

As expressed by the guys from 37signals:

Learning from mistakes is overrated!

 

Or as Tony Hoare puts it:

If we could only learn the right lessons from the successes of the past, we would not need to learn from the failures.

Related Posts Plugin for WordPress, Blogger...