News about MVC framework and other bits from MS

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Finally some news. I’ve been really pissed of that as an MVP for ASP.NET I cannot get into the group which gets the early bits of the new MVC framework but it looks like it’s going to be released to the public anyway so ok (although I am still not ok that it was a very closed circuit).

So, the news is… seems like we are going to see it (and allot of other goodies) sometime next week as ScottGu mentions in his blog here:

 

http://weblogs.asp.net/scottgu/archive/2007/11/29/net-web-product-roadmap-asp-net-silverlight-iis7.aspx

 

So, interested in knowing what’s next? Interesting getting the early bits?

Then read the above blog post for more details on the future of the platform and the general roadmap.

 

Cheers!


Filed under: .NET, ASP.NET, ASP.NET MVC, Ajax, Interesting sites, VS2008
Written on: 30 Nov 2007 · 1 Comment »

Visual Studio 2008 Shell… another stab at good practices implemented by Eclipse people?

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

As you know, a week ago I’ve participated in a Eclipse Day here in Split and got to know some of the great architectural ideas behind the tool.

One of the things I liked most about Eclipse was it’s MicroKernel architecture… and possibility to basically have a naked shell of the IDE and customize it to your needs. That is something I would definitely like to have with Visual Studio I thought right away.

 

Then this weekend I stumbled upon some great materials about a little known goodness that the new Visual Studio brings to the table… Visual Studio 2008 Shell.

Basically Microsoft decided to put up a download of the new studio shell online so that people (VSIP) could make their own customized tools and IDE’s based on the studio.

I really appreciate the idea… and as much as I don’t think that new Shell implementations will spawn everyday now, definitely if you are serious IDE vendor, this is a great opportunity to strip out from the Studio what you don’t need and just implement your own functionalities and packages how you like it.

Some reading materials:

http://www.eweek.com/article2/0,1759,2141804,00.asp

http://www.crn.com/software/199900939

http://blogs.msdn.com/usisvde/archive/2007/06/04/visual-studio-2008-shell.aspx

http://www.code-magazine.com/Article.aspx?quickid=0710032

 

One more thing… it’s not all that cherries and blossom :) The shell is still made the “Microsoft way” (overly complicated and with no ease of use)… but it’s a great start, and hopefully partners or even Microsoft itself will improve the tooling around it to make it easier to use in the future.


Cheers!


Filed under: VS2008
Written on: 28 Nov 2007 · No Comments »

Oh nooo… please stop… and other feelings when reading posts about PetShop code

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

It just hurts too much.

When reading about code like this, and especially code that should be an “good architectural principles” and “basic and advanced coding concepts” example it just hurts me to see what people write… believe me people… IT HURTS!

 

I cannot imagine that at any point in time (one common argument is that this is an *old* code, and an outdated example) this was considered good - no matter how old the code is - bad things are bad, terrible practices are terrible. Someone should really stop and scratch their heads before calling something good.


Now, if you want to read the post that disturbed me this morning, go here:

http://ayende.com/Blog/archive/2007/11/28/Code-review-The-PetShop-Application.aspx

 

@Ayende: I feel your pain man. No one should be put to this - no one deserves it.


Ok, I need some more coffee…


Filed under: .NET, C#, General
Written on: 28 Nov 2007 · No Comments »

Replace switch statement + enum combo with a little fluent interface

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.75 out of 5)
Loading ... Loading ...

Well I would rather say, fluentish interface as it is only a tiny implementation of the idea.

As you might know I am against switch statement + enumeration combination in once code… I became grown to a habit of getting that unpleasant feeling in my stomach when I see that in code. Not that I don’t like the language constructs as such… but simply, often when they are a sign of bad programming practices which I’ve done (hopefully only in the past if I can help myself) and see other people do as well.

So, a little bit more concrete. You often write something like:

fluentconfig3

Lets say this is the standard way of doing it.

Some of the problems I have with this approach is:

  • When adding a new timeout value you are doing changes in more then one place
    (enum + dreaded switch, not to mention if you have to repeat the logic somewhere else)
  • It’s not as readable and as clean as it can be

The other way that you could do it (which I like much more then the previous one):

fluentconfig2

Now this I like :)

Hope this give you some ideas for your own code.

Cheers!


Filed under: Best practices, C#
Written on: 20 Nov 2007 · No Comments »

Classify your magic numbers in the database

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...

I often see how developers do the same mistake over and over again.

This time it’s concerned with using the magic numbers in the database.

Often you get a request to realize something like:

“If a given piece of data is in positive status 1 or 101 then do this or that” or “Export all data which is in the positive status 1 or 101″

 statuses

Usually what I see as being done then is:

statuses2

Now think about what happens when the client calls you in 3 months from now asking to add another positive status?

Probably you will need to *hard code* it’s positive status in half a dozen places and then even forget about a couple of them… argh… awful.

What can be done?

Well, you can introduce your own level of abstraction - or better said - classify your statuses to avoid maintenance nightmare.

 statuses3[5]

Now you can create your “Positive response” status classification in the Status Classifications table, and connect it to the current and future statuses pretty easily through the third table StatusClassificationStatuses.

Also, then you can do a better and cleaner query with something like:

statuses4

This way your code doesn’t depend on the clients direct changes but on your abstraction - which in my book is a lot better.

As you can see this is a very simple and effective way to get yourself out of some bugs and issues in your applications.

Cheers!


Filed under: Best practices, SQL
Written on: 20 Nov 2007 · No Comments »

YAVSRP - Yet Another Post about Visual Studio 2008 being released!

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3 out of 5)
Loading ... Loading ...

It’s out, the dirty secret… prolonged for so much time is out… Visual Studio 2008 RTM has been released!

(in case your wondering… sarcasm)

http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx

But anyway, do you plan to start using it?

One great thing about it is that it supports .NET 2.0 projects, now if they only hadn’t gone and s…w it out with .NET 2.0 SP1!

Look here:

http://blogs.msdn.com/msbuild/archive/2007/10/09/multitargeting-against-net-2-0.aspx

How do you plan to handle it?

My plan is on the current project to just place it on VS2008 (new Studio has some obvious benefits as described in ScottGu’s blog) and try with this great idea (via FxCop) to continue building against for vanilla .NET 2.0:

http://blogs.msdn.com/kcwalina/archive/2007/10/02/Multi_2D00_TargetingAndFxCop.aspx

Did you try it? Do you, and how do you plan to guide your department towards the new Studio?


Filed under: VS2008
Written on: 19 Nov 2007 · No Comments »

Speedup you Visual Studio 2005 startup times

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

During our meeting today about Eclipse I’ve mentioned what I do to speedup my Visual Studio startup. As those are really short and easy tips, I’ve thought to post them here as well.

Here it goes (in no particular order):

  • Turn off the splash screen of the studio on the options
  • Close all the toolbars (none are opened by default)
  • Turn off the toolbar auto refreshing (or how is it called) in the options
  • Turn off the Start page in the studio - again in the options - and this helps not to have the unneeded screen show up, and that the RSS feed from some site is not synced
  • Install SP1 for Studio - simple: when building projects = less crashes = less opens :)

 

As you can see, these things are very simple and straightforward, but still they do make a difference to me.

Cheers!


Filed under: VS2005
Written on: 17 Nov 2007 · No Comments »

On SoftDevNet

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Since recent time I have been involved in the Software Developers Network in Split, so I thought I’d tell you a bit about it.

We are a group of people in Split, Croatia meeting once in a while to talk about professional and non-professional topics (we might meet for a beer in a pub, or have a monthly presentation with projector and everything in another, or like we did today meet for a whole day, have lunch together, have some presentations and just talk to each other) - much like the SQL&Developers User groups I’ve been a part of in recent years.

One important difference between SoftDevNet and the SQL&DEV Users group I’ve been a part of is that this is more based on informal gatherings and communication than on real presentations as such - note, it doesn’t mean we don’t have real presentations - just that we tend to organize our meetups in more relaxed environments (last two meetings were in a bar with a projector, laptop and speakers, today’s Eclipse day was in a separate section of a restaurant) and that we foster discussions over standards speaker-driven sessions.

Other very important aspect is that SoftDevNet is not Vendor related (this was started by my friend who works for Siemens and doesn’t use any of the MS related dev. tools, and so far in the *organizator* chart I am the one pushing and putting the focus on Microsoft technologies and on things that I think are good about them) - which gives us much freedom as well as helps us broaden our horizons on the good stuff *other* vendors have as well (ok, this was mean a bit from me :))

So far, I am very happy to be a part of this movement and to be able to help Brane with some ideas and general help on organizing the meetups. Very soon I plan to do some talks (actually should have done it already (even promised)… but simply my other obligations kept me away from some preparations I wanted to do) so I am excited even more.

One thing I will try to do from my Microsoft side is to get MS more involved with the story as well as MSCommunity which I am a part of.

What’s next?

We have a Christmas party coming up, and afterwards again our regular monthly meetings as well as maybe some weekend ones like we did today with Eclipse. First of in January is a discussion which Siniša Dolinac (my colleague) and myself are hosting on Software Estimations (more on that after the Christmas party :))

So, anyway… if you are in Split, drop us a note, join our mailing list or simply follow our work on the SoftDevNet site!

Cheers!


Filed under: SoftDevNet
Written on: 17 Nov 2007 · No Comments »

Eclipse day

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

So, finally we were able to organize the Eclipse Day as a part of our Software Developers Networking group we are organizing in Split.

First of, all I can say is that it was great… for me personally much better then a standard user group meeting, simply because of the interactivity which we’ve all had.

There were approximately 10 people, 3 of them were presenters - but the whole idea was in interactivity. The presenters would start talking about a subject from Eclipse (Antonio talked about Eclipse in general and later on on CDT - a C++ dev. addition to Eclipse, Srečko talked about the Java integration with the tool, and finally Goran talked about the extensibility) and we would chime in with our questions and thoughts.

From my side, I was the main Visual Studio propagator - every good thing the guys mentioned from Eclipse, I’ve challenged with my opinion on how you would (or wouldn’t) do the same thing with the Studio.

Some of my conclusions were:

  1. Both are great tools, with still my preference being on Visual Studio (not because I live in it, it just suits me a little bit better - at least on the first look)
  2. With functionality they both follow each other - Visual Studio *took* some great things from Eclipse, in turns Eclipse did the same from Visual Studio, the same follows with Java and C#, both are good - although as you might have guessed, C# to me seems better and more forward thinking - but still they follow each other
  3. Resharper + Refactor Pro still brings the experience topped over the one the presenters had with Eclipse

 

Some things I see VERY lacking to Visual Studio (or better said, some things Eclipse has fundamentally better):

  1. MicroKernel idea + distributions - Visual Studio is overloaded with stuff I don’t need, nor use - while this is great to have generally, it would be great to be able to have a really good and stable *Kernel* or base of the IDE, and then build it up with everything I need (and only I need) - because of the MicroKernel architecture and it’s plugin architecture (OSGi), you can (or some other vendor) can make specialized distribution of Eclipse for different purposes (e.g. have a Wizard based one for some developers, and a completely wizard-less, designer-less one for me :)) - that said with only manipulating the plugins you can narrow down that implementation as well by turning off some plugins, and their initialization (by the mentioned plugin standard) is Lazy, so they are loaded once you need them - and not a minute earlier. This gives me a pretty great idea how a *hog* of a IDE can quickly become all you need, and only what you need.
  2. OSGi plugin architecture - It’s great to see that the whole extensibility story of an IDE is centralized over a standard. While Visual Studio currently does have a great Plugin architecture, it would for sure be better if they would have something a little bit more as according to some standard (first to my mind pops up easier adoption, shared learning resources, etc…)

Some things I think are better with Visual Studio (or better said… I don’t know that they are better with Eclipse, by what I saw they are not):

  1. Visual Studio + ReSharper + Refactor Pro - nuff said, check out the tools (the guys asked if I could do a presentation on that, maybe I could in the future?)
  2. Visual Studio is going forward with giant steps - I don’t see that with Eclipse (on the other hand, probably I didn’t see enough plugins - which are everything with Eclipse)
  3. Software Factories initiative - while this is platform independent idea, the ideas which are behind it in the MS world (DSL’s and GAT) are really nice

 

 

Final thought… I still wouldn’t give my Visual Studio for even 2 Eclipses, but Eclipse is really made on some GREAT foundations… and is all you want it to be, meaning - if you don’t like something or think something could be better - you just need to change it.

Final thought 2… I need to get to know a little bit more of Eclipse to be able to really judge it… all the thoughts here are just me thinking out loud (you can think of it as Brain Draft’s :))

 

Cheers!


Filed under: SoftDevNet
Written on: 17 Nov 2007 · 1 Comment »

Moving to Wordpress

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5 out of 5)
Loading ... Loading ...

As you can probably see by now… this is my new blog!

Note for the content:  I’ve put a 301 redirect on all urls with .aspx extension to this post, so that you don’t get those freaky “Not found” messages. If you need to find a tutorial, download or a post - just use the search on the right.

To continue… after having my own blog implementation (using the News Articles module in DNN) and being cirpled because it’s not a full blown blog engine (most things which I’ve missed were that it didn’t use any blogging standards… MetaBlog API, BlogML…) I’ve was fed up and wanted something for which I don’t have to develop every good thing that the blogging community comes up with (not that the engine I’ve used was bad… but simply it wasn’t a full blown blogging engine).

My effort to move to Wordpress lasted for a couple of days, and I can hapily say that I now have here every tutorial, and every post I made on my previous blog… I am very happy about that.

So far I am very happy with the new enviroment (no matter that it’s not my prefered ASP.NET)… simply it’a great blog engine!

Hope you enjoy my new blog - I am already!


Filed under: General
Written on: 15 Nov 2007 · No Comments »

Being professional…

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Can you imagine being a professional and writting a stored procedure for a client like this?





The guy got fired of course, not because of this procedure… but because of his attitude which was equal to this procedure.

Aargh!


Filed under: C#
Written on: 09 Nov 2007 · No Comments »

Object disposal in c#

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4 out of 5)
Loading ... Loading ...

A question came up on the mailing list about what is the equvivalent for object disposal to the using() statement.

Here it is, enjoy!





Filed under: C#
Written on: 07 Nov 2007 · No Comments »

New Team Members - Finding the balance between teaching them to fish

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

A great discussion spawned on the Alt.Net mailing list… it was about helping the younger team members blend in easier.

I am pasting here my answer on the subject (it was lengthy, thought I’d paste it here as well).


……………………..

I have no problems with people joining the project… I get them up to speed, and eventual questions we solve either on our daily stand-ups or as we go, my issue was more about mentoring someone through the help I provide them when they ask me something – and here my experience here is diverse, from good ones to some really bad ones…

Basically I see it as three types of people:


a) Those who ask everything (reasons being: they are lazy, they are on the deadline, they think it’s more efficient to ask me then try to find it themselves)

I see several problems here, and I deal with the accordingly:

1. My time is not spent efficiently because of constant interruptions - in the long run my projects are off course

2. That person forgets to be resourceful - I will not always be there, I want them to grow up and get on their own feet - by asking me all the questions

3. That person cannot excel at any point


My approach here is of course to teach them how to fish, and not feed them - I will tell them that the answer lies in xyz technology, namespace or something… but will not tell them do this or that. One more approach if I see that it makes sense is to just tell them “I don’t know, go Google…” even if I know the answer - I will do an exception when that guys has a deadline or in a really stressful situation - then I will give them food, instead of learning them how to fish.

Also I push them to learn new things, send them links to blog posts and stuff to try and make them Non-Morts - this way in the long run they will stop asking questions and see that they can find things themselves as well.


b) Those who don’t ask anything (reasons being: they are shy, they are too proud, they think they can handle it)

I like these a little bit more, but still there are a couple of problems:

1. Usually it goes until the bubble bursts - then you have a situation with a deadline, missed opportunity and stuff

2. The persons motivation goes down rapidly - he/she gets down on self and just digging themselves a deeper and deeper problem hole


The approach here is encouraging them to communicate - communicate the good and the bad things, talk about problems (daily stand-ups are a great thing for this, as well as weekly development department meeting we have).

I still push them in the same direction as the first group, only I emphasize the communication and openness to ones colleagues - I tell them - Just raise the flag, tell me or the project manager in time so we can plan for problems, see if takes too long to help and generally mitigate that risk and problem - nothing more nothing less.


c) Those who know when to ask (or ask moderately)

This is the state I try to achieve with everyone.

My suggestion is - Read the problem statement (error, request or something) - think and re-think it several times - be sure 100% that you understand it -

If you can solve it - solve it, if you can’t:

1. Re-think it again

2. If you still can’t solve it - Google for it smartly (think how to write a smart Google query)

3. If you can’t find it with Google I’ll try to write a better query to search with you

4. If we can’t find it together I will help you with guidance (still not writing the answer myself, but more pair programming style)


Of course there can be exceptions to this… for example when we have a deadline (me = so I can’t help them, them = so they must solve it quickly and move on), but then act based on the problem at hand.



This is a general approach I try to take… when I identify the type of person I am talking to I communicate to them accordingly… I figure everyone can be resourceful, it only takes practice (otherwise you forget to use your brain). And don’t get me wrong… I don’t mind helping anyone or people asking… but I do mind them forgetting they have their own brain as well.

……………..

What do you think? How do you handle it?



Filed under: Education
Written on: 06 Nov 2007 · No Comments »

The Alt.Net Youngsters

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

= people who believe in the values proposed by the Alt.Net crowd, and are still lurking in the shadows learning the finer art from the peers like Oren Eini, Scott Bellware and Jeremy Miller.

Just thought of it while reading the Alt.Net mailing list

(in case your wondering… I am an Alt.Net Youngster :))



Filed under: ALT.NET
Written on: 06 Nov 2007 · No Comments »

Provable value of BDD (or YABDDIP – Yet Another BDD Intro Post)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

As I am a semi-novice TDD developer (although the following remarks are more intended for your classical Unit testing developer, simply because I am talking about testing, not designing which is the point of TDD. And also I am considering myself as a semi-novice because I’ve actually been convinced with the idea for so long, even done some projects, but I am still having problems enforcing it in my company) I’ve always found myself troubled by a rather simple question:


How can I know that a given functionality (or a piece of code) is tested? Or how do I know that a developer working with me in a team has tested it and/or written it completely?

I mean… I can write 5 tests for a given functionality, my colleague can write only 1 and a TDD expert can write 20.

We will all be convinced that we have done a good job testing that piece of code – I will test it partially, TDD expert will test it probably 90% and my colleague will only smoke test it.

Without looking in details at the tests, how would I know who of us made a good job of it?

And even better… did any of us?


To be able to answer that… we would need to set up a baseline – or even better, what are we measuring against?

If you think… the code did not brake… well, in all 1-20 tests of all three of us it didn’t?!?
If you think… it does what it needs to… how do you know that it does? Even if TDD expert did write 20 tests, maybe he missed a couple of important use cases of a given code fragment.

Note that this concern is even magnified with TDD – where you try to write as little code as possible to satisfy a given functionality – this is one of the core ideas of TDD – and one of the areas where I see it really excel – not writing un-needed code and tests.

I can write a code to satisfy 90% of the logic – and that part will be 70% tested – how do I know these numbers? Well I don’t. I can only guess – as much as anyone – what is important that our tests cover our imaginary design – and it is imaginary – because at a given fragment of time – we only think that our functionality is done, or that our design fits correctly into the bigger picture – we can think it is, we can even have some indications and be reasonably sure it is – but is it really?

Or a better question – when a developer comes to us and says, I’ve developed it – it’s tested and working – I’ve written 50 tests to cover the code – is that enough? Is the functionality done?


What I am missing in both cases (and have been when thinking about these ideas) is the acceptance criteria – plain and simple – I want to be 100% sure that if I wrote 5 tests – that those tests mattered, and that they test what they need to. I don’t want to rely on my (or my colleagues) experience and proficiency at testing – nor design for that matter.

(I sound harsh… sorry! I am not putting names or blames on anyone – nor do I miss confidence in my dev. team - but we are all professionals – and if I want to be professional about what I do – I must be exact and correct – and more important – I cannot go check every bit of my colleague’s code and tests against the client’s requirements)


Now… before going further… please don’t think that I see the following (BDD) as a silver bullet to answer the asked question – simply a technique to improve my teams scoring on the subject.

So, what would I want – I would want something measureable - for example, with a given task, a check list of things that a given piece of code must do or rules it must conform to.

That is great – but the problem is that it’s still not executable, and thus must be confirmed manually – so really yuck!


Here is where I see that Behavior Driven Development comes into play.

If we start with the behavior – and work towards the functionalities – and that behavior is pre-defined in the form of scenarios of a given story – we can have pretty solid acceptance criteria for our team’s developers to follow.


Before moving on, take a look at these great links:

http://dannorth.net/whats-in-a-story

http://persistall.com/archive/2007/11/02/bdd-with-just-nunit—a-first-attempt.aspx


If I see it through the eyes of BDD – my talk to my fellow developer might be:

When showing the list of customers, note that that list must be:

- Should return an appropriate message if no customers are found in the database
- If shown should be paged with 10 records at a time
- Should show the customers ordered by their first name
- Should have options to edit or delete a customer

So I am talking about the context:

“…When showing the list of customers…”

And I am giving the acceptance criteria to my fellow developer:

- Should return an appropriate message if no customers are found in the database
- If shown should be paged with 10 records at a time
- Should show the customers ordered by their first name
- Should have options to edit or delete a customer

That developer can now easily make a Fixture:

When_showing_the_list_of_customers

With the tests:

Should_return_an_appropriate_message_if_no_customers_are_found_in_the_database
If_shown_should_be_paged_with_10_records_at_a_time
Should_show_the_customers_ordered_by_their_first_name
Should_have_options_to_edit_or_delete_a_customer


This is a lot more un-ambiguous from the start! I see advantages from all 4 points of view:

Team Leader – I am happy to finally be able to communicate to both developer and the client the acceptance criteria of a given functionality and to hold and be held accountable by it (remember that being a professional part?)

Developer – I am happy to know 100% what I need to do my job correctly – there should be no misunderstandings or “I think…”, “But, You said…” troubles

Client – I am happy with the level of professionalism at which the team communicating with me. I am can easily add to the list things that I see missing (it is so simple). I get more predictability and accountability for my money

Manager – I get more predictability (and managers really dig this oneJ) for my (clients?) money


Sounds good doesn’t it?

To me too :)


And all of this while practicing the great ideas of TDD and Unit Testing!

Disclaimer again: It is not a silver bullet! You will hit a wall with C# limitations, with questions you will ask yourself (see Brian Donahue’s post above for some self-questions) – but it is a huge step up and in the right direction!


What do you think?


Filed under: BDD
Written on: 04 Nov 2007 · 2 Comments »

A very interesting post on Visitor, Double Dispatch and Composite patterns…

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

You know that one blog post which you leave for the weekend? Maybe print it out? Re-read it several times while drinking your first morning coffee on Sunday?

This is one of those posts… I’ve printed it on Friday for the weekend, left it for my first Sunday coffee in the sun by the sea and enjoyed reading it several times over - that’s how much I’ve liked it :)


As I am kind of new to the Patterns and Principles scene (well not new actually, more seriously paying attention) I reall enjoy articles like these, especially from people like Jeremy which explain all the right details with great timing.


Go check it out:

http://codebetter.com/blogs/jeremy.miller/archive/2007/10/31/be-not-afraid-of-the-visitor-the-big-bad-composite-or-their-little-friend-double-dispatch.aspx


Hmm… maybe I can read it again tommorow morning before work (again with my first daily coffee)? :)

Enjoy!




Filed under: C#
Written on: 04 Nov 2007 · No Comments »

Ones of the best BDD intros I’ve read so far…

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

… which doesn’t mean that I’ve read quite a bit of them, just that it finally explains the *context* (since I am new to it) of BDD to it.

I especially like this part (which hits the spot for me):

“…Now, if you already do TDD (and Model-View-Presenter as in this example) you might say “big deal, I already do it this way, without the ridonkulously long test names!”. And you’d probably be right. But in my experience, instead of this context focused test, I’d end up with one big OrderHistoryPresenterTest in which I’d try to test everything that would ever be asked of the OrderHistoryPresenter and I’d probably get stuck a bunch of times wondering if X or Y function belongs on this presenter, or somewhere else. Then I’d move on to the OrderService and hit the same problems. With BDD, I can focus on one behavior, and drive it all the way out down through my entire application stack. …”


Go read it, it’s definetly a great read:

http://persistall.com/archive/2007/11/02/bdd-with-just-nunit—a-first-attempt.aspx


One more thing I’ve found while reading the AltNet mailing list, a stab at being more BDD with C# 3.0 by Scott Bellware:

http://codebetter.com/blogs/scott.bellware/archive/2006/12/18/156436.aspx


All I can say that I am bought with the idea… now I need to find some more concrete samples (like the example above) to get me up to speed…


Cheers!


Filed under: BDD
Written on: 04 Nov 2007 · No Comments »