Home avatar

Thoughts and code

Interface Naming Notation - To "I" or not to "I" - Part 2

While discussing with JP Boodhoo why he stopped to use the I notation for the interfaces, I think we got to the point where it was clear why would someone drop the “I” or opposite, adopt it.

As a developer, I want to differentiate between a pure abstraction and a concrete thing. So to ease on ourselves, we put the I as a differentiation, rely on the visual interpretation that our brain (little one in my case) is doing (“association” as against to “memorization”). And that would be the justification of using the “I” notation.

Interface Naming Notation - To "I" or not to "I"

While reading  R.C. Martin’s book converted to C# by M. Martin “Agile Principles, Patterns, and Practices in C#” I could not ignore the fact that the Java notation for interface naming was used all over the place. Trying to be open-minded (or should I use “pragmatic” these days) I want to pop a question what is the benefit of dropping the I-prefix and how it does or does not influence the daily work.

.NET Framework 3.5 Affects 2.0

I have installed .NET Framework 3.5 along with already existing 2.0 as a part of Visual Studio .NET 2008 installation. What a surprise it was to find out that the old “web site” projects were all broken… after a few hours of investigation, my coworker, Glen and I have found that the 3.5 is not so innocent and  it writes to 2.0 new version of assemblies. Why in the world it would do it?! So far this is under MS engineers investigation and I hope it was an error on our side.

When I Grow Up I Will Be A...

Kids are original. My wife and I were kidding about who our 3.5 years old son will be when grows up:

“You will be a software developer” my wife says.

With all the disappointment in his voice he replies - “but I wanted to be a pumpkin!…”. :)

Firebug and Prototype

Today had to spend a bit time on client side code for FireFox. Since I'm coming from IE development only, the whole thing was not so pleasant (plus the fact that either IE sins too much or FF is not really a saint, probably both). So I ended up with 2 things that literally saved my time - Prototype JavaScript framework and Firebug addon for FF. Great to things that just made my day.

Enable MbUnit with MSBuild from Visual Studio

Editing the project file and adding this section will ensure the MbUnit tests are executed on successful builds.

    "$(ProjectDir)<*location in the project*>\MbUnit.Cons.exe" "$(TargetPath)"  /sr /rt:text

location in the project - something that I picked up from JP Boodhoo. The idea is to keep all the tools used for the development encapsulated with the project. That way maintenance and setup on new workstations is not an issue.

Life Without R#

I am not making any news by saying what was said before - R# folks were surprised as much as we were by so early release of  VS.NET 2008. I wonder what was the reason to this early release and how soon as a result of that we will be rushing to download SP1 for it... The point is not that. What I would suggest is do not run R# in VS.NET 2008 without proper support on R# side. Wait a bit, it will come. I am saying so because coding in VS.NET 2008 without fully capable R# running is PAIN...

SVN Addin For VS.NET

The adding is free and allows to work with SVN from the VS.NET (from the context menu). If your preference is not to leave the IDE and you want visual indication of the file status, AnkhSVN is the one you should check out.

Nothing But .NET, Calgary 2007 - Day 5

The final day. People are tired and some ‘deliverables’ are slightly trimmed, but we are heading towards the target. My personal target was to wrap around the idea of agile and TDD. I defiantly do not consider myself as a person that understands exactly all the details, but I definitely see the difference and know towards what I should be heading.

Saying this, I would like to thank JP for the ‘injection’ he provided. Not only the motivation to change, but also sanity check to stay alert and be aware of the professional skills.

Nothing But .NET, Calgary 2007 - Day 4

‘Almost’ productive day - seeing how it works in reality is hilarious. TDD is not only allows testability,  but also to design better your code with regards to not ‘what if’, but ‘what now’. Really powerful tool that would be great to have in my skills set. Script of the day:

10:00 Domain Model (Rich Domain)

  • Domain object is more than just properties, it’s also behavior
  • 14 AA Points - here or -> jpboodhoo.com -> search for “Getting Started Learning Some new Developer Habits”
  • R# -> Autocompletion -> Letters and Digits
  • DynamicMock vs. CreateMock (dynamic will always provide the default value when “created” mock has to be told everything)
    11:15 Domain Driven Design- Thin service layer & Transaction Script () patterns
  • Use R#, don’t accept naked Visual studio - naked it’s really ugly.
  • TestDriven.Net
  • [Setup] is for the hard dependencies of the SUT (ie DynamicMock)
  • Book: xUnit Testing Patterns
  • Department / Products: DB relationship is one to many, Domain Model is one to one (ie not Department.GetAllProducts(departmentId), but Catalog.GetAllProductsBelongingTo(departmentObject) )
    14:15
  • Service Layer
  • interaction test can later involve into integration testing
  • REQUIREMENT: Important to understand the RhinoMock in order to use it and learn TDD
  • R# CTRL-Shift-E parse the exception from clipboard
  • Hard dependencies should be be dynamic ones and defines for the whole test class
    16:10 Container
  • Principles that container helps to respect: DIP, OCP
  • Container (our) should be a static gateway that also an adapter to allow with variety of different containers
  • Concrete dependencies should be removed by using container to decouple from concrete implementation
  • pair-programming / TDD ping-pong
    23:50
  • JP is SO tired that reads for a minute a result of breaking test :)
  • Building rich domain model = building smarts with objects (example: ShoppihgCart with CartItem through Factory)
    00:50
    Toasted…