Super Secret Project Pt 2

Sketch_upAs I explained in Part 1, I’ve been working on a super secret project (Christmas present for my wife).

Don?t worry my wife hardly ever reads this site so I doubt she?ll read all this and anyway she?s unlikely to puzzle out what I?m up too, but because I don?t want her to know what I?m building I?m going to stick to describing the technology and tools I?m using and show snippets of code but try not give it all away.

Continue reading

Super Secret Project Pt 1

mono-logo-300x261I’ve been working on a super secret project (Christmas present for my wife), the coding for the project has been done in C# using Mono on my Windows Vista laptop, although the plan is to run the code on Linux.

Don’t worry my wife hardly ever reads this site so I doubt she’ll read all this and anyway she’s unlikely to puzzle out what I’m up too, but because I don’t want her to know what I’m building I’m going to stick to describing the technology and tools I’m using and show snippets of code but try not give it all away.

Continue reading

SQL – Find all triggers in a MS SQL database.

This script will find all the triggers in a Microsoft SQL database, its come in handy when I’ve been trying to work out where in the system people have tied there code into. I’m not a huge fan of triggers as they tend to make things behave unpredictably, its even worse if you don’t know there is a trigger or where it is.

SELECT S2.[name] TableName, S1.[name] TriggerName, 
WHEN S2.deltrig =  THEN 'Delete' 
WHEN S2.instrig = THEN 'Insert' 
WHEN S2.updtrig = THEN 'Update' 
END 'TriggerType' , 'S1',s1.*,'S2',s2.*
FROM sysobjects S1 JOIN sysobjects S2 ON S1.parent_obj = S2.[id] WHERE S1.xtype='TR'

Found this little script on this site.

Howto Debug an odd problem – “Load Datalogic Scanner XML Settings Failure!”

I had an odd problem today with a USB barcode scanner and its OPOS driver. The scanner in question is a DataLogic 2200VS USB scanner and I’m using its OPOS Driver (USBScanner is the OPOS Device name) on a Windows Vista machine with UAC switched on.

When I lauched the application I was running it kept giving a error when it tried to open the device “Load Datalogic Scanner XML Settings Failure!” No amount of searching online was able to reveal the answer to this error and because its load via the OPOS control which is in my application via COM.Interop there is no easy way to step into the code and see why its going wrong.

After a little testing and debugging I discovered that it works if the application is “Run As Administrator” it’ll work fine so it had to be a permission problem just wasn’t sure which permissions were wrong.

If only there was a way to see which files and registry entries the driver was trying to access and which failed because of a access denied error… Thats where this cool tool called Process Monitor comes in. Lauching the app it’ll show you everything going on in your system, a few quick filters so that it only shows my apps calls then tried to use the scanner, it gave the error again but this time I could track down the cause.

It turned out that it was trying to write to the C:\Program Files\DLSOPOS\ folder and was failing and was trying to access these 2 parts of the registry and getting access denied errors.


Changing the permissions on those registry keys and the folder fixed the problem.

Generating PDF’s using Javascript

Stumbled across this code to generate PDF’s clientside using Javascript.

It works, although it didn’t work in Firefox 3 correctly, perfectly in Google Chrome though. The idea is pretty awesome though, I wonder what other formats could be created this way… Going to keep an eye on this project and see how it develops, could be useful perhaps for a site where server side PDF generation is not available or not possible?

Anyone using Google App Engine?

I’ve been reading up about Google App Engine, which sounds interesting. It sounds like yet another “cloud” computer although one of the advantages is that this one is free, or at least some of the services are free and it integrates with the rest of the Google services which could be rather nice.

Of course there are disadvantages as its tied into Google which some people think is evil and your code could end up only being able to run on there platform and not others.

Has anyone used it? What do you think of it? Anyone done anything more than a quick look at the introduction page?

Open Source/Free Utils and Applications

I thought I would list a bunch of Open Source / Free utils and applications that I use almost every day. I’m excluding the obvious ones like Linux (in my case Ubuntu).

The list below is what I use in my day to day job, normally on my laptop running Windows Vista, the order really doesn’t matter its just as I thought about them. Everything listed below is available for Windows and most are also available for Linux and other OS’s. I’m a programmer, web developer and computer geek so I’m sure the list of software below reflects that, but no matter what you do there is probably at least one application that might be handy.

If you have a favourite please add a comment and share it with us. Continue reading

Anyone have any experience with

Anyone have any experience using CSLA.Net ? I’ve seen it being used in the past but more as a Data Access Layer, which is not exactly what it was designed for.

I’m working on a project that would basically envolve creating a bunch of “Business Objects” that do all the heavy lifting that can easily be bound to an user interface. These business objects are not going to be using SQL based data though but rather be talking to an ERP system via a COM/Webservice interface in an xml format.

I want something that allows me to creat an object that I can then define how it should be loaded, saved etc. I would also ideally like to be able to put in validation rules on the properties of the object.

If you have any ideas of frameworks other than CSLA let me know too. Ideally it must support WPF and if at all possible Silverlight.

AJAX – Do I dare code it from scratch?

When “ajaxyfying” (my new word for when you add AJAX to a site) a website do you code all the java script your self or do you go use one of the many AJAX libraries/frameworks?

I’m currently working on something that has lots of forms for inputing values and tables for viewing the values, and I would like to make the interface a little snappier by adding some AJAX to update things without reloading the entire page. Obviously this is relatively simple to do and can be done without a fancy library by coding things myself… but is it actually worth it? I realise that knowing how AJAX works “under the hood” is a good idea, and the ability to actually code that yourself is an important skill, but other than a simple test app is it actually worth doing it yourself?

At the moment I’m playing with Prototype, it wasn’t chosen through some kind of scientific process it was just the first tab I happened to open in Firefox. I’m trying to make the webpage more responsive, not “flashy” so I don’t need any fancy visual effects just want to limit the amount of times a page loads when things are clicked on.

Any opions? let me know below.

Edit: After writing this I took alook at the WordPress code and found out it uses jQuery, so I’ve downloaded that and gonna have a go with that too.