Archive for the ‘Uncategorized’ Category

LightSpeedContrib

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 Box.net 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 🙂

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 🙂

A few random bits:

April 29, 2006

"Code Camp" was on last weekend and there was a number of cool things shown off. Two classes I picked up on and everyone should check out are ObservableCollection of T and TransactionalCollection of T… No doubt checking out/using those will take you on a little tour of some cool bits and pieces out there in .Net 2.0 🙂

Going completely on another tangent this is also something that people might want to check out especially if you are into FPGA's – I noticed it was just posted up a day or so ago: http://www.netbsd.org/Ports/evbppc/

As for other things I have been working on, I now have sound in my code generator! I installed Quake 3 again for a Lan we had the other day and after realizing that a pk3 file is a zip file (for Quake anyway) I was able to extract some of the sound files. It's definitelly cool to generate with this bad boy now 🙂 The generator uses MyGeneration which is based on .Net 1.1 so I had to use the following to get to play the sound files:

using System.Runtime.InteropServices; …..

[DllImport("winmm", CharSet = CharSet.Auto)]
 public static extern long PlaySound(String lpszName, long hModule, long dwFlags); ……

PlaySound(@"F:\Program Files\MyGeneration\Templates\NHibernate\regeneration.wav",0,0);

(Note the file name! Yeah – thats the buisness!) 😉

Other stuff I'm working on is setting up Lighty + RoR and expermenting with a few different things in relation to hosting. I have Lighty working through scgi with RoR on top of a Postgres database at the moment… Maybe I should post up some details on that? 

My most favourite thing lately must be vmware – if you havent got this – seriously – get the free copy – its excellent to work with 🙂 The only thing to watch out for is if it says it can't find a bootable cd: 1) Check the vm's bios (F2 when you start the vm – move the cd rom drive to the top – the boot order is on one of the last tabs), 2) Check that the virtual machines cd rom is looking at your cd rom – sometimes the auto detect doesnt pick up the right one so just set it to look at your normal physical drive – once you have that sorted it should be smooth sailing.

The only issues I've had so far are to do with installing Fedora (very slow, booting etc, even when there lots of Ram allocated). As for windows/ubuntu – I would say once you install the vmware tools they are just as good as a physical machine…

Oh, and if your into starting working with device drivers on Linux then check out this article: http://www.freesoftwaremagazine.com/articles/drivers_linux With a good book to follow up with afterwards you should be away 🙂