Solution Genrating and creating your own VS Sln files

Recently I have started building my own solution generator to create all the basic stuff that I just want done before I even really start coding.
The generally idea is that I can get a basic working concept application or web site up and running quickly that still follows the basic architecture that I will implement.
As most of the applications I have built in the last few years have been NHibernate based and I follow a similar standard for them why not generate the majority of the code to get me started. Whether I use all the code is irrelevant, its a starting point and saves a lot of start up time.
I have basic table structures that I use such as Customer, Orders etc so I can use those and generate from there and I have a decent size core library for DAL and non functional aspect based stuff.
One little problem I have run into is that VS sln files are not the basic text files they appear to be. The leading characters as well as the first couple of lines dictate the version of VS that they will run under. Get it wrong and VS wont even open the files. For example the leading bytes for vs2005 (followed by the leading few lines) are:

[byte 239, byte 187, byte 191]
[\r\n or byte 13, byte 10]
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005

Otherwise, mostly the project is coming on ok. I think this is going to be a very handy tool in the coming months, where is seem to have a lot of greenfield projects on the horizon.

Less Documentation :(

http://blogs.msdn.com/codeplex/archive/2008/06/06/removal-of-sandcastle-project.aspx

Looks like Sandcastle is gone… hopefully not for long.
M$ feel it is not appropriate to have SC on CodePlex as its source code is not up and CodePlex is an OSS site/repository…. so fair enough, hopefully they find another more suitable place for it and dont keep it a secret.

NB: There are some links for the last release on the link above.

SQL code completion

I am an intellisense addict… I need it..it’s like my crack. I work faster on it and am grumpy when I don’t have it. So needless to say I was pretty excited when I saw
http://www.red-gate.com/products/SQL_Prompt/index.htm?gclid=CLKutfCP7JMCFQJtFQod_hn5Vw

Not having R# at work annoys the living daylights out of me. In 3 hours at home I can do the same amount of work I can do in a whole day in the office (it helps the requirements are a little more fixed)
In saying that, differently implementations of code completion also pisses me off. I love having the help in PL/SQL but I want to use tab for code completion not forced to use Enter… finicky? Yeah… but I switch between IDEs often during the day…

Classic one liner

On the subject of : Creation of Software vs Maintenance of Software in .Net
Scott Bellware is talking about how it is easy to create stuff in .net (such as drag and drop etc) and that developers like creating stuff, but the real issues are in maintenance, to which Ted interjects:
“Sounds kinda like having kids, the moment of creation is short and pleasurable and then you have 18 year of maintenance”

-Ted Neward; classic

Here the show here

VSX

I have just managed to install IronPython on my work PC… but not easily.
None of the problems stem from Iron python, just from the VSX installation.
You would think after years of releasing software M$ could get it right.
You have to download the VS Shell extensions (vs_AppEnvRedist.exe). you then have to install the application(?!?) (vs_shell_isolated.enu) which may install the .net frameworks that are required (this is good!), then you can install the IronPythonStudio, which installs fine.
Why could the VSX installation be one step? Click on the exe and it installs, cleans up the crap left scattered through my c: drive and then let me know we are good to go!

Not a big issue, but one that should not even exists.
Anyway IronPython is going to get a little tyre kicking now 😉

Another IoC Container?!?!

If you are not using IoC by now then you are probably struggling with or not doing TDD. I have been luckily enough to give a few containers a bash including Spring.Net, ObjectBuilder, Castle’s Winsdor/MicroKernal and StructureMap.
Castle is currently my preferred option of the above as I find it easy to use and config, and when needed it has a couple of bonus features.
However there is another kid on the block, which I felt was probably coming.

You see most of the useable IoC container have a fair bit of bloat. Most of the time I just want to be able to say something like:

IFoo foo = Container.GetInstance();

That is it, Really! I don’t care about all of the other stuff that goes on, I basically just want a glorified factory that can handle constructor and setter injection. 80% of the time, that is all I care about.
It just seems to be odd to have a huge framework hanging around, especially on smaller projects just to aid in loose coupling.

Well I guess there are others thinking the same thing, enter Ninject.
Light weight, simple syntax, no bloat and apparently pretty fast.
Check it out if you want DI without all the bells and whistles that you will probably never use.

Still not unit testing?

Another little TDD post:
Firstly: there is a new site up called DimeCasts.net that shows 10 minute crash courses on a given subject. So far the first bunch is really good, they hover around the 10 minute mark and are covering NUnit. So if you have not done any unit testing or want some reinforcement that how you are tackling TDD is correct, check DimeCasts out.

Secondly; BDD
As I work on a several side projects I come to realise how beneficial DDD, your Ubiquitous Language and BDD can be.
My “at work” project is so badly organised, especially in terms of communicating business ideas to code, these concepts could have saved the project. Its a subtle mind shift but a beneficial one. The biggest thing I see is the barriers DDD removes. It becomes less Us vs Them (i.e. Code Monkeys vs Suits) and much more about correctly defining the problems at hand and putting into a language that fits all intend audiences. BDD is not really a new way of think but again a subtle refinement of the DD practices and honing the language. I am going to pushing forward with these concepts with a pretty large scale project I may be tackling solo (initially). The business owners are completely non technical and are still fleshing the finer points of the business. To me these more agile practices should be a perfect fit for the on coming workload. 🙂

I may even venture into the BDD frameworks that support the processes

Bill Poole’s SOA Blog

I have had the privilege of working with Bill Poole after he interview me for a job in Perth, Western Australia for a fantastic company called Change Corporation. I was interviewed by Bill and another great guy Chris Nurse for a senior developer role back in ’06. I was impressed with both gents as soon as they started the banter. You can learn lot about a company at an interview and I knew that CC was good fit for me after leaving that room. Interestingly enough Bill and I were both avid readers of Udi Dahan’s blog, which I am sure earned me brownie points with Bill, a story i was lucky enough to pass on to Udi in person earlier this year. 🙂
Unfortunately I did not actually get to work on any projects with Bill in my time at CC, but had contact at the dev meeting and social events. Fortunately the rest of the crew I worked with were of an outstanding calibre so I was learning form pretty much everyone I worked with anyway, it really was a great company.

Anyway, I have been reading Bill’s blog over the last few months, and I must say it is one of the best SOA blogs I currently read. I enjoy Udi’s insights but sometimes they are a bit too high level and abstract for me to really take anything away. Bill tends to use more concrete examples, while still keeping it general enough for the masses to absorb.
So check out Bill’s blog if services, architecture and SOA in general interest you, I am sure you will be impressed.
Keep up the good writing Bill. 🙂

TDD Wisdom

Just read an old response to a CSLA.Net test question by Chad Myers:
“So far, the best (most easily maintainable, most adaptive, most flexible) designs I’ve ever created were ones done with tests in mind. IMHO, tests are your first and best customer of your API and expose design smells quickly.

So please don’t dismiss ‘testability’ so easily as some secondary, ancillary concern because it’s one of the best ways to flesh out potential problems in your design, rather than giving up and masking it by lifting the CLR’s skirt and messing around in order to test your code.”

So wise… like a miniature Buddha covered in hair…

Having a web presence

The amount of time I want to contact someone in the technical field that I don’t know personally is not that often, but it surprises me when I can’t find their information. There are some guys out there that have technical blogs I enjoy reading, with no web site or contact details to speak of.
If the blog does not enable comments then there is no easy way of me to contact these guys.

I suppose there are a few level of anonymity:
No web presence: Does not know the net is 😉
No public web presence: No active blog, web site etc
Public and un-contactable: Possibly a blog or old posts on a mailing list archive with an invalid email address.
Public: Real details easily found. Usually these people also have an active blog or some sort of regular contact to the rest of the world.

Now I understand having a public profile takes effort. It can in fact be a hassle as you have a website or blog your have to maintain; you open yourself up to spam and other unwanted attention. However recently I have been meeting some very interesting and sometimes infamous people and I am genuinely surprised how many of them have
A) no really public presence such as a web site, a LinkedIn profile, Twitter account or even an active Blog
B) Or a web site that just sucks. I sometimes think none is better than crap, as Dad used to say “Do it properly or don’t do it all!”.

I do not consider my self a pioneer of the IT world nor someone that has any real public following, but was surprised how many people from the Alt.net community knew who I was (even if by my RhysC handle). If any of those guys wanted to find out details about me, I would like to think it would be pretty easy, and a few of them have. This is a good thing! I am a contractor! I want people to be able to find out about me, and when they do see my web site, I don’t want them to think. “Geee.. that sucks!”

So this is me laying it out, to you as a IT geek, sort it out! Especially if you are a contractor or a high profile senior IT employee. Get an online profile. Share with the world your thoughts. You didn’t get where you are by being a dumb ass, people may actually want to hear your thoughts, contact you, offer you a job… who knows 

NOTE: oh yeah, my UK company is FullStack
and the Aussie company i work with is ArtemisWest. AW does need a bit of polish, however we have had some big things happen in personal lives so work goes on the back burner… we work to live, not the other way around!