Wednesday, April 23, 2008

Greenfields project

I am setting up a Greenfields ASP.Net service based app for a "friend". It is not completely a self less act. The work I do on a day to day basis bores me to tears so this is an opportunity for me to play with new tools, frameworks ideas etc and stop me hating being a coder.

Also as a contractor I often come in after the initial set up has occurred, which means I suck at setting up solutions. I am using the TreeSurgeon project and Mike Roberts article to guide into best practise here. So have a single batch file to call a single NAnt build script to build and test all my stuff. As there are a bunch of empty projects and empty tests this is pretty bloody fast!!! LOL

So straight off the bat I have in my Development IDE
  • VS2005 (waiting form my copy of 2008)
  • TestDriven.Net
  • Ghost Doc
  • ReSharper (old but still happy with it as i am not 3.5 yet)
.Net aspects I am using
  • WCF
  • Old Skool Asp.net WebForms. the first Web layer will probably be throw away especially as it uses AP.Net Security which doesn't suit the requirements. I may move to MVC later, but I honestly have never had issues with WebForms mainly because everything I usually kept very simple. Plus i wasn't TDD last time i did a web app, certainly not in the web projects at least.
  • SQL 2005

Frameworks I am using
  • Castle stack for IOC & AOP
  • NHibernate 2.0 (alpha)
  • MBUnit (because i haven't used it)
  • Rhino Mocks (because i am yet to use it properly), possibly TypeMock too for odd stuff
  • Nlog/Log4net... who cares some sort of logging... actually probably L4N as it is in other assemblies already.
Deployment and source control
  • NAnt 0.86
  • SVN
  • CC.Net or Team City. Not set up yet.
  • Assembla.com for svn and project management
Quality Control Tools
  • FX Cop
  • NDepend
  • NCover
  • Sandcastle
and would like to use Spec# but its too much of a hassle to have it in "real" code.
I think that pretty much covers it.
Thoughts?

I am keen to discuss lot of the architectural side of things in weeks to come. I am probably going post a few of the questions on the altdotnet list (yahoo group) too.

Rhys

Monday, April 21, 2008

Alt.net Lessons for 'tards

What I learned:
-TDD is not as simple as it seems. There are many approaches, frameworks, & schools of thought. MBUnit, TypeMock, MoQ need a decent looking at by yours truly and delve a bit deeper into RhinoMock and NSpec.
-There are some real smart in this movement. The Distributed Domain Driven Design session with the likes of Udi, Martin, Greg, Drew and Alan(?) etc. was awesome.
-Understanding other languages helps you understand the benefits and limitations of "your" language that much better. I really need to play more with Ruby, Python, F#... just something... anything!
-Spec# should not be know as Spec# it should just be C#. This, IMO is f*&king ridiculous. These guys are working hard to help us improve the the code at design, compile and runtime... why would we all not want this? IF this can be pushed into the C# 3.5 then just make it part of .Net 4.0.....Anders: Make it so!!!!!
-Hansleman is not only a sharp witted & entertaining guy but is smarter than a lot of his podcasts let on. (Are you dumbing this down for us Scott? ;) )
-We need to bottle the water in Israel and Austin TX and combine it and include it in your MSDN subscription... they are hubs for smart dudes.
-Everyone was a lot nicer than I expected.. even Bellware (jokes!)... I hope this continues as it was a big nice warm fuzzy environment :).
-Special note goes to Glenn Block from Patterns and Practices. Kudos for jumping in the firing line and being prepared to take flack... even if the products are well before his time. I hope that very open and receptive attitude continue amongst the PnP team :)

*Oh.. the tard is me

Post Alt.Net

Well I have arrived pretty late in London after delayed flights and nasty Heathrow.. so going to work is off the cards... sorry John...

I just wanted to say a quick thanks to everyone involved in organising the event and a special thank to the people who took the time out to share knowledge with me, debate and talk about the virtues of a diet high in salt sugar fat and volume...
particularly: Ian, Tim, Chris(es), Jarod, Jason, Ray(s), Roy, Scott(s), Udi, Martin, Greg, Dru et al
Thanks for everything hope to see you all in the near(ish) future; keep in touch!

For those that didn't attend, you missed out. The stuff learned was the stuff you needed to learn. the people you meet are the people you need to meet. This is better than Tech-Ed because you are the ... if only we got free stuff... actually we did! Cheers Roy!

Friday, April 18, 2008

Alt.Net day 1

End of day one here in Redmond... only 2 hours of actual Alt.net time and already I am well impressed by the amount of knowledge. A fish bowl session started with C# and it running improvments and possible moves into dynamic aspects.... moving into general talks about languages, their place in a project, stack and programmer general arsenal.
Its also nice to see all these uber smart guy being respectful enough to each to let every one and any one have their say... hopefully this last the weekend!
So far have jumped into the edge of some conversations with the architects of the moment Mr Fowler and Mr Dahan... very cool.

am shattered so off to bed.

Thursday, April 17, 2008

Redmond... Hey-O!

Well I have arrived in little old Redmond (next to Seattle), the home of M$ ready to see what happens in this alt.net weekend.
Redmond itself is pretty small and quaint. Oh and its raining. Apparently this is not uncommon. No worries, I'll be inside most of the time any way.

Friday, April 11, 2008

Ignorance

My ignorance of stuff often astounds me. My complete lack* of understanding of data binding on the UI is hilarious. Our UI guy just schooled me on it and I am very impressed. Just another reason why I think coding in layers is best. We work in verticals so my ui stuff sucks compares to his.. please just leave me in the back end server side stuff. Obviously one could argue that working in verticals means we get exposed to these concepts, but i would rather that be done more formally in weekly code/nerd talks where the UI guy gets up and does a Data binding or Win UI Validation talk , in the same way i do TDD, or WCF or Nhibernate...

OK, not “complete lack”, more “prematurely dismissive” notion ;)

Thursday, April 10, 2008

NMock2 RemotingException

Test method XyzUnitTest.TestSomething threw exception: System.Runtime.Remoting.RemotingException: ByRef value type parameter cannot be null.

It turns out that this is caused by not having a return value in the expectation when returning a primitive:

The line of tested code that was failing:

int id = this.Foo.GetId(arg1, arg2, arg3);

The expectation that was causing the failure in the test code was:
Expect.AtMost(1).On(foo).Method("GetId").WithAnyArguments();

Need to be changed to:
Expect.AtMost(1).On(foo).Method("GetId").WithAnyArguments().Will(Return.Value(Id));

I think this is especially important as a (non nullable) int is being returned so the proxy is treating it as byref, hence it can not be null. This may have been missed if it was returning a object as a null object can be returned in this scenario.