September 4, 2007

My mates at Mindscape have been working on an awesome product called LightSpeed. I haven’t had been able to use it in a commercial  setting yet (although some co-workers have – lucky devils 🙂 ) but I have been tinkering throughout their complete beta program and think there could be some awesome tool support put around this product to make it even that much better.  So… I decided to start an opensource project called LightSpeedContrib (I’ll put it public when I have some code stubs mocked up and ready to go in) sitting under the CodePlex site. The idea being that any generic supporting “stuff” surrounding LightSpeed could sit in here. Initially I see the following going in:

  1. A complete rework of LightGen (a little domain class to sql file generator and sql to class file generator that I cut over a couple of nights a while ago) and recompile to the released version of LightSpeed. Initially break this into just a console app and a MyGeneration template. If someone (or even me 🙂 ) wants to write a Windows Forms/WPF version then that could go in later.
  2. Some more validators – write some extra validators/get people using LightSpeed to put in any reusable validators so everyone can benefit 🙂
  3. Anything else people think is relevant. As a side project, a couple of nights ago I started looking into getting MonoRail sitting over LightSpeed (scaffolding support etc – got the basics going – yeyah!). Maybe these type of components could go in too… More info on MonoRail on LightSpeed to come 🙂

Any thoughts?

Keep an eye open for when the community site goes up too – the more interest the more its likely to take off/get some dedicated input 🙂

Silverlight and mouse scrolling

September 4, 2007

Silverlight currently doesn’t have any functionality for telling you about mouse scrolling so I wrote some bits to get the job done (no gurantees 🙂 ). Key points to note: Your browser supports detecting scroll events – Silverlight doesn’t. Silverlight can talk to javascipt and vice versa. The work around = get the javascript to hook the scroll event and fire that back into a Silverlight class which will raise the event to objects that have registered an interest. Result = Silverlight detecting scrolling 🙂 You can grab some code here if you want a look

WCF and the WebHttpBinding

September 4, 2007

One new binding with Orcas Beta 2 and WCF I’m really excited about is the new WebHttpBinding – got to love the Json all built in 🙂 Plus the new WebGet attribute to get your REST services on the way. One thing I thought was missing was the ability to be able to specify a callback method when you call a service and want some Json back (I couldn’t find an option/see anything in Reflector but maybe there is a way to get it in there?). The point being that if a browser does an HTTP GET using a script tag then it may want to put the Json it gets back through a callback function or assign it to some variable – not just dump the Json into the page 🙂

So to get this built in I made an http module which you can get from here. When you call the service and attach a query string parameter of callback=your_javascript_function_name_here it will wrap the Json getting spat out in the function specified 🙂

Hosting via bluecog

September 4, 2007

JD kindly hooked me up with an FTP drop so I can finally chuck some bits up. Cheers JD!

Other options I looked at where and drivehq + a couple of others if anyone is also looking for some file storage…

As for an FTP client I’m using SmartFTP –  found this guy along time ago and is very handy – if anyone hasn’t seen this app its pretty cool – and free for non-commercial users so check it out 🙂

Anyway, I’ll chuck some stuff up soon!

Chucking some posts up…

September 1, 2007

I haven’t blogged in a long time but thought I should start to chuck some of the stuff I’m working on out there. I had a bit of a think about what went wrong last time I was blogging and worked out some new things I’ll try this time around 🙂

  1.  Keep posts short – blogging != coding time – last time I was blogging I found posts could take a little while to format/gather content for and that meant less coding (which is a bad thing). This time I’ll try to keep the posts smaller so the code can keep flowing.
  2. Trying to keep pace – content can quickly get out of date – especially when you are working on some code that gets picked up/put down over a length of time in anticipation of a post. This time I’m just going to chuck stuff up when its done rather than worrying that it’s not the latest and greatest. In addition to this point when content is lacking rather than keeping the machine going I’ll just give up blogging for a while, do some more coding and then come back when I find something cool 🙂 This way I can still put out the odd post without trying to dig stuff out of the box.
  3. WordPress! Grrr – The updates and things going missing from the dashboard (like the stats graph for a few weeks) can be really annoying. I’m obviously still on the free WordPress platform so I’ll give it another shot and review over the next few months…
  4. Online storage – obviously not having your own private host can be a bit of a pain when it comes to posting example code etc. I’m looking into some options on this one.
  5. Lack of code formatting support and trying to make the front page still layout correctly (Hmmm – seems to be a common theme here for not just hosting my blog myself 🙂 ) I can’t find an option to add widgets anywhere but maybe a google will sort this one out – the other option is to not really post code in the post itsself but just chuck an attachment on (I see that has been added to WordPress now) or put on a file download.
  6. Actually getting the post out worts and all plus focus on one short and sweet post at a time! I’m looking at my dashboard now and have around 6 reasonible posts that never even got published since last time I logged in (months ago) – They range from things like the SQL CLR to using DotMSN. I’ll ditch those ones because they obviously aren’t completely finished but from now on I think I’ll limit my use of the draft functionality to keep me on track with my posts.
  7. oops – I’m now going to refer myself to point 1 🙂


September 20, 2006

I was looking around our wiki the other day and Gang had a link to this little guy: It’s a little app for notifying you when you should take a break from the computer. Pretty cool – non intrusive but does an awesome job. Its amazing how often you should actually just take a little break and chill out 🙂 Definitelly worth checking out!

NVidia drivers and Vista

September 14, 2006

Once again time has flown and there’s been lots I should have been posting about – general stuff here and there, lots of cool stuff at tech ed, the XNA Beta 1 release etc etc. Yet too much work/playing not enough time for posting 🙂

One thing I decided to wack up is a little post about getting vista and all it’s glassy effects (Aero) to work on an nvidia graphics card. Mine is a 6150 GO version running on a laptop (ATI cards seem to be way better with running Vista as far as my playing as gone – seem to just work) so it might not work for all cards but it seems to have worked for mine. Firstly you need to get Vista on your box and then download the RC1 drivers from nvidia. Run those and it will extract the contents out to something like C:\NVIDIA\WinVista\96.33. When it runs up it will undoubtly crash out and say it can’t find a driver for your card… so

Go to that folder and find the file nv_disp file. Now you will need a program to find out the device id for your card. A program which can do this (free trial download) is EVEREST Ultimate Edition by Lavalys. For my 6150 GO card it’s PCI\VEN_10DE&DEV_0244

Now that you have the device id – add two lines into the nv_disp file (look in the file and you will see where to add these lines – just follow the same pattern):

%NVIDIA_C51.DEV_0244.1%  = nv_NV3x,      PCI\VEN_10DE&DEV_0244


NVIDIA_C51.DEV_0244.1  = “NVIDIA GeForce 6150 GO”

Save the file, go to device manager, goto update driver and then browse to this folder. It will give you a warning about non-signing but just go install anyway. After a reboot you should have all the glassy effects – ye-yah 🙂


July 21, 2006

I’ve been trying to write some drivers lately (using Linux) – the problem has never really been understanding the code – its more been setting up a build environemment (pretty stupid huh)… Not really ever having been forced to use Linux I found it a bit of a mission – I’ve normally just used it for pretty standard stuff and only just to play with. Anyway, I tried setting up a few environments using various distributions (they worked fine – just not for making my own drivers – there was obviously something I was missing but I couldnt seem to get them to work…) but I seemed to find 1) they were bulky, and 2) even running make at the source tree level would cause it to blow up/would blow up when I tried to run the module build which I needed for making v2.6 kernel drivers. Finally I gave up and ran with gentoo.

I set this up inside a vm following the online instructions and it all went pretty smoothly. The only problem I had is that when I tried to compile the kernel using my own build options I wasnt sure what drivers the vmware’s virtual hardware needed – resulting in a little bit of a headache – although I learnt lots on the way which I was stoked about 🙂 – finally after a few builds I just went with the full blown build – but even that didnt work – grrr – after adding the flag “doscsi” (im running on sata drives) to the grub kernel boot line I managed to get it to kick off 😀 (I now need to go back and try this with my original “slim” buid)…

 Anyway – I’m now loving gentoo – straight off the bat everything compiled fine and the first driver I wrote worked first time – Yee yeeah! The only extra bit I chucked on there was the “vim” editor – just so that I could get some color syntax going on… the problem was that the vim package I emerged in using emerge didnt ship with the c and c++ syntax files 😦 – So I grabbed the main vim source (which has them :-)) and just manually copied them on… good times!

 So – anyone thats trying to write some drivers and is struggling a little off the bat – maybe this is the way to go 🙂 gentoo seems a little daunting at first (just because you configure everything) but honesly – just follow the online help and you cant go wrong 🙂

Subversion + .Net

July 21, 2006

I set up Subversion + continous integration (Cruisecontrol.Net) + testing (NUnit) + code analysis (NCover.Net) + VS2005 Subversion IDE integration on the weekend. Seems to be running pretty sweet. Why? Well its free – because I can 😛 – and its good to practise this stuff + I find on my little pet projects I seem to edit files and then sometimes need to rollback – now with some source control I can get back to where I was yesterday 🙂

I like the subversion model for editing files in a disconnected mode – makes it really good for working on stuff, when your out and about on some random machine, that may be offline for a while. Anyway, here’s all the bits that I used:

A 1 click subversion and subversion client setup:

or alternativelly: The main Subversion page: , and the TortoiseSVN install (subversion client):





Subversion VS IDE package: (this has a merge tool but maybe TortoiseMerge might be better – I havent checked it out…)

To get it all running I used the following in my ccnet server config (a snippet of the file):

<sourcecontrol type=”svn”>
   <executable>F:\Program Files\Subversion\bin\svn.exe</executable>
   <workingDirectory>F:\Program Files\CruiseControl.NET\server

    <executable>F:\Program Files\Subversion\bin\svn.exe</executable>
    <baseDirectory>F:\Program Files\CruiseControl.NET\server

    <buildArgs>checkout svn://ghost64/TestProject/trunk/ TestProject–username ccnetbuild –password *****</buildArgs>
    <executable>F:\Program Files\nant\bin\nant.exe</executable>
    <baseDirectory>F:\Program Files\CruiseControl.NET\server\TestProject\

     <file>F:\Program Files\CruiseControl.NET\server\TestProject\WorkingDirectory

     <file>F:\Program Files\CruiseControl.NET\server\TestProject\WorkingDirectory


I found I needed a task to pull the source and build it – the main source block didn’t seem to want to do it… I don’t know what that was about… anyway I just put in a task to get a working set and away it went. After that I had the main nant build task (where the build, tests, and coverage where run) and finally I merged all the results in :-). I edited the main environment path variable to include the paths to the nunit and ncover executables and then I could run the following from my nant file (actually this was in a batch file the nant script called out too – note TestLibrary was the name of the test project in the solution):

ncover.console nunit-console TestLibrary.dll //w .\TestLibrary\bin\Debug

By wrapping ncover around the nunit tests it has something to run against… you cant just run it against a raw dll – it needs something to be running the code – this way nunit will exectue the code so you can cover a dll.

Anyway, overall it seems to be running really well 🙂 Check it out some time!

NHibernate 1.2.0 Alpha

July 20, 2006

This has been out for a little while… but I just thought I’d post a couple of bits I noticed in going forward.

1) Find is being deprecated – the new query stuff seems to look pretty tight and makes it heaps better – gives the comfort of some compile time checks which we all love 🙂

2) You now need to supply an interface for each of your mapped classes (well this is what I seemed to have to do when I recompiled my solution and ran it up). Fortunatelly I already had interfaces for each of my mapped classes but I had to add the following to the mapping file (the little proxy bit):

<class name=”Mappings.Client,TestConsole” proxy=”Mappings.IClient,Mappings”  table=”[Client]”>

 That seemed to get me to a point where I could just run my app that I had originally written on 1.0.2 🙂 Hopefully that helps someone else out there get there 1.0.2 stuff running smoothly on the new build 🙂