Chris Donnan : Programming - Brooklyn Style
software, trading, family, fun
Oh day of Joy ! Jetbrains Resharper 2.0 - Released!
Posted .net, Development Tools, c# on Monday, May 22nd, 2006.
Well - the day has come - Resharper 2.0 is out of beta. It is out in the world.
Enjoy the new plug in features etc
Here
Bijection and “Subversion of Control”
Posted Development Tools, c#, java, patterns and principals, programming on Tuesday, April 4th, 2006.
So
Been using SpringFramework.net on my current project for ~5 months now. All in all - it has been very helpful in a few ways. One of the things that I have needed in the past was to associate objects created dynamically with stuff IN the spring context.
For example: I need to take some logon information at some point - with this logon information - I need to pass it to legacy objects that NEED to use constructor injection - else the throw exceptions etc. So - I want to push dynamically created content.
Enter Seam…
Interesting…. As usual - the folks at JBoss are doing interesting stuff. One of thier many sub-projects; Seam - “Contextual Components” is one of the more interesting things they have going on IMHO. Seam does lots of stuff - but this I found most interesting:
excerpt: (wouldn’t xlink/ xpointer be handy for things like this excerpt)
The notion of inversion of control or dependency injection is an elegant means for a container to assemble stateless components or services. But for stateful components it is insufficient. Subversion of control (or bijection) is a unique feature of Seam that allows auto-assembly of stateful components.
WOW. Isn’t that just fantastic! Bijection, Subversion of Control. Anyhow - I will be posting more about Seam as there are several truly noteworthy things that they are doing over there with Seam. This is essentially where a variable can be annotated with an “In” and/ or an “Out” marker. Then the container can get data off of and/ or inject data into, thus providing ‘bijection’ for objects created at runtime - with state.
(** this is NOT the same as this reference to ‘Subversion of control’ where a container ref is passed to the object.)
I will also mention - as I have in the past - that another alternative to Spring on .net (2.0 only) is the Object Builder in CAB is one of them. I would love to work on a ‘bijection’ update to spring.net, objectbuilder - or something new
Excited about technology as always.
-Chris
Mock Frameworks - C#/ .Net and Java
Posted .net, Agile Development, C++, Development Tools, coding, java, patterns and principals, programming on Friday, March 24th, 2006.
I just wanted to make a few quickie comments on mock frameworks. I have been using Rhino Mocks daily. It is great. In the past I had tried NMock and just found it too clunky.
In short - NMock leaves you with a lot more ’stringy’ stuff to deal with. Rhino is MUCH more in the language. You type normal code. Your refactoring tools work. Your IDE helps you, etc.
The purpose of using a mock framework is basically so you can just work on testing the CUT (class under test). The CUT should usually be the ONLY concrete class in the test. This all works when you are practicing IoC. When you are using IoC - you pass in dependencies from the outside. When you do this - and you are seperating your interfaces from implementation - you can pass mock interfaces to your CUT. Once you do that - the mock can act as a spy.
- The mock lets you wriggle into code branches so that you can test pieces of the code that are otherwise difficult to get to.
- The mocks make your tests simpler. You do not have to instantiate lots and lots of classes correctly - you just set up interfaces and expectations and you are good.
- The mocks make your tests more stable. You do not have to worry about changing test data etc.
- The mock can act as a spy and tell you if it is being treated as you expect while it is ‘on the inside’
This used in conjunction with a code coverage tool (like Clover or NCover) helps you to really work your tests to cover your codebase fully.
Carry this over to the Java world - Rhino is much more like EasyMock which I am now writing some tests with. I had formerly used JMock (sort of like NMock in usage) - but I just replaced my jar reference and updated several tests. The tests are immediately more understandable, cleaner and therefore - better.
More another day
- Maybe I will get around to posting comparison examples.
Chris
SCBAT, Guidance Automation, Code Generation and Rails
Posted Developers, Development Tools, User Interfaces, c#, coding, patterns and principals, programming, ruby, trading, work on Friday, March 17th, 2006.
While reading Sam Gentile’s blog today I came across an article regarding the SCBAT (Smart Client Baseline Architecture Toolkit) and GAT (Guidance Automation Toolkit). I was also discussing this stuff this morning with my friend and collegue Marc. In any case - this stuff reminds me of something I had advised doing (and have begun doing) for a current project. It also reminds me of something in Rails.
The essence of all of this stuff:
You have some application patterns, structures and practices. You want to create all the ’stuff’ you need to use the architecture pattern effectively and efficently, with as little confusion as possible.
For example:
In the now famed Rails web development framework - when you want to create a new project, new view/ controller etc, you just issue some command line .. commands.
For example - to create a new application you can issue a command like:
rails path/to/your/new/application
This will create the folders, base files, etc for your new web application: folders for views, controllers, models, etc. You can also use the rails generate command to create new controllers etc. like:
rails script/generate controller SomeController
Now you have the basics of your Rails application.
SCBAT with GAT
Now - looking at the SCBAT - these great fellows are trying to do is to allow you to enter some data - and it will spit out all of the folders, code etc to make a compliant CAB application. This automates away all of the grunt work, it makes it clear what is needed and it provides the guidance needed to use the frameworks. This is what Sam is talking about in his post here. Cool stuff - making it easier for the team to work effectively with the frameworks.
Frameworks/ System architectures for non-trivial applications are complex. It is a fact of programming life. That being said - doing as much ‘Guidance Automation’ as possible sets the team up for success and takes away increasing amounts of potential error.
Prototype Spiked for a current project as Guidance Automation
I will be leaving my current project (a credit derivative trading smart client application) in 6 weeks. I will be going to a new project (FX options trading stuff). As I have been trying to set up the team I am leaving behind up for continued success using the application infrastructure we have developed - I considered making a custom sort of code generator that functions as these other GAT type things/ Rails type things do… it would take the basic data and go create all the classes, events, folders, etc needed to use the framework effectively.
A screenshot of the basic code generator.

In a few hours I was able to create an application that would take in the information about what the View was to do - and to automate the creation of many classes needed. Since we are using a Model/ View/ Presenter pattern where the View communicates with the Controller via events, there is a set of pattern classes that we can simply create if we know what the view/ controller are trying to do. Hopefully before I leave here - I will be able to leave the team with their own custom Guidance Automation type applicatio that will help keep them on track. This was in truth inspired by how rails works. I am looking forward to using CAB, SCBAT and enabling more and more code generation and other types of guidance automation.
-Chris
Fisheye - cool tool for watching your SCM repository growth
Posted Development Tools, Software Project Management on Wednesday, March 1st, 2006.
I have been a using fan of DevMetrics for some time now (since it came out I believe). That being said - we have been using CruiseControl to do daily and checkin builds. We have been chatting about using NAnt tasks to keep historical copies of the DevMetrics reports so we could watch the codebase over time…..
LO AND BEHOLD :
FishEye
For example:
Spring.net in FishEye action.
and:The ‘real’ spring framework (lol) in FishEye action.
Unfortunately they are ‘working on’ support for Perforce and ClearCase… Sooner than later we hope!
Filter by user, show for directory, show diffs, etc, etc…
-Chris
Mono build running in no time
Posted Development Tools, c#, linux on Wednesday, February 1st, 2006.
Well - I was able to EASILY take the portable part of my optimzation and classification software - import the projects into the latest MonoDevelop (v0.9), add a reference to db4o - and it built immediately. There you have it c#/ .Net, Linux (Suse10) working just like that.
The intellisense looks nice and works well - Again - I am spoiled by IDEs like Visual Studio and Eclipse that offer real refactoring support etc (natively or via plug ins at least). Still - not bad. It is too bad that I will not be able to port over the LOTS of UI code. Infragistics, TeeChart, lots more will just not be easily run on a nix machine.


Dev machine software/ tools
Posted Development Tools on Monday, January 23rd, 2006.
Someone at the office was asking about the melange of tools I have installed on my machine - admittedly I am a tool/ software addict….
What I have on my current project’s machine (win2k….. man) (at least this stuff - and plenty more of lesser note)
VS .Net 2003
Resharper
devMetrics
GhostDoc AddIn
Regions AddIn
Xsd Object Generator
VSWindowManager AddIn
Spring.net
CodeSmith
NDoc
RegexDesigner.NET
CruiseControl.NET
CCTray
NUnit
FxCop
Textpad
Reflector
XmlSpy
Eclipse
Log4net
Infragistics 5.3
Rapid SQL
ClearCase(hatred!!!)
ClearQuest (hatred!!!)
Tomcat
Snippet Compiler
Rhino.Mocks
Simian
Solvent VS.Net Add In
CopySourceAsHtml VS.Net Add In
Things that when they do not kill my machine I keep installed at my current project
Compuware DevPartner
What I add on other machines as must haves (Windows Server 2k3 @ Home, some XP Pro @ Home) (at least this stuff, along with the above list for the most part - and more of lesser note)
VS.Net 2005
SQL Server 2005
Eclipse Ruby
Tomcat
Axis
Spring (for Java)
Ruby
Omea Reader
Subversion
TortoiseSVN
TortoiseCVS
Apex SQL Edit
SQL Server 2000
Microsoft CAB 2.0
Linux Machine must haves (Current Suse 10)
KDevelop
KDevelop Ruby
Eclipse
MonoDevelop
Subversion
Thunderbird
Firefox
Krdc
Akregator
EditpadPro
Butterfly XML
I could go on - but I am back to work.
-Chris
I Got the Clearcase/UCM Blues too
Posted Development Tools, Software Project Management on Thursday, November 3rd, 2005.
Oh how I echo my colleague’s thoughts!!!
Marc
We are surely suffering!!! - Oh how I long for my friend Perforce!!!
Just some new links
Posted Agile Development, Development Tools, books, c#, java on Monday, September 12th, 2005.
Good book in the making: Agile Planning
http://www.mountaingoatsoftware.com/agileplanning/index.php
Download the book, check it out.
Good continuous integration tool
http://draconet.sourceforge.net/
My group is preparing to roll with an automated build tprcess - we shall see.
db4o Open Source Object Database- for .Net AND Java (been working with it - it is great)
http://www.db4o.com/
Resharper
http://www.jetbrains.com
New 2.0 coming out soon - GREAT PIECE OF SOFTWARE I COULD NOT LIVE WITHOUT!
Resharper - my goodness -get it !
Posted Developers, Development Tools, c# on Tuesday, February 8th, 2005.
If you program C# in Visual Studio - and you do not use Resharper - you are wasting too much time. I am not the testmimonial type - BUT…
I started using this tool - then started many members of my dev staff using it with the expectation that what is good for me may only be good for a few of them. EVERY developer is hooked on Resharper like crack.
http://www.jetbrains.com/resharper/
I can say that there are things that you would waste HOURS on the resharper does for you. Just go download a trial and TRY to use it. There is NO WAY you will try it and not realize that it will save you time.
-CD