Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
DebugView is a very nice tool from Microsoft (by SysInternals), which allows you to see debug output from the kernel or Win32, local and remote!

Providing debug messages trough this system has been available from Windows 95, so you can trust having debug capabilities everywhere. I strongly belief this to be a very powerful way to provide information about your application, without having to write to logfiles, or attaching a debugger. Debugging ASP.NET applications should also be easier when incorporating this.

But how do you make C# use this? You use the System.Diagnostics namespace!

I have created a small demonstration program which writes two messages and a third one conditionally. Putting a prefix in front of the messages will help you filtering them out in DebugView afterwards, since other applications might be writing to it as well.

[csharp]using System;
using System.Diagnostics;

namespace CumpsD.Demo.DebugView
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Demonstrating System.Diagnostics");
Console.WriteLine("--------------------------------" + Environment.NewLine);

Console.WriteLine("Turn on DebugView to look at results.");
Console.WriteLine("http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx");
Console.WriteLine();
Console.Write("Press any key to continue . . .");
Console.ReadKey(true);
Console.WriteLine(Environment.NewLine);

Debug.Write("DemoCategory: This is written trough System.Diagnostics.Debug.Write.");
Console.WriteLine("This is written trough System.Diagnostics.Debug.Write.");

Trace.Write("[DemoCategory: This is written trough System.Diagnostics.Trace.Write.");
Console.WriteLine("This is written trough System.Diagnostics.Trace.Write.");

bool inDebug = (new Random().Next(0, 2) == 1);
Debug.WriteIf(inDebug, "This is written because inDebug is true.");

if (inDebug)
{
Console.WriteLine("This is written because inDebug is true.");
}
Console.WriteLine(Environment.NewLine + "Look in DebugView to see the messages.");
}
}
}
[/csharp]

When you run this program, you will get the following output in DebugView:

DebugView Output

It’s also possible to connect to a remote computer, and intercept these debug messages remotely.

DebugView Remote

This tool is completely free, which is really amazing for such a powerful and useful tool.
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
When using the Windows Search functionality, you can search for words inside files. By default this doesn't seem to work for .sql or .php files however.

To enable this, add the following key to the registry:

HKEY_CLASSES_ROOT\.sql\PersistentHandler\(Default) : {5e941d80-bf96-11cd-b579-08002b30bfeb}

This will associate the plain text filter (System32\Query.dll) to the specific file type, making it possible to search the content of the file. The reason not all extensions have this enabled by default, is due to performance considerations from Microsoft's point of view. I personally haven't noticed any visible performance problems from enabling it for SQL and PHP files.

Log off and log on again. From then on you can use the search box to search inside SQL and PHP files. A quick way to make Windows recognize the change, is by killing the explorer.exe process and starting a new one. That way you don't have to close any programs.

At pilif.ch you can find a nice tool to set the PersistentHandler to the plain text filter.

Give it a try and search for 'SELECT'.
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Let me start by introducing myself on this fresh blog..

David CumpsMy name is David Cumps, I'm a developer, mainly dealing with Microsoft software, not too shy of dabbling in other technologies either however.

I've been coding since 1998, started with Quick Basic and got my way op to VB6. Before that I mainly entertained myself with HTML, and hex editing all kinds of things. Computer age for me started at 7 years with an Amiga 500. Since 2001 I got into PHP and since then everything went a lot faster. Thanks to PHP I started learning Object Oriented programming, and it was also the language that brought me in contact with businesses, the first thing I coded for someone else was in PHP.

When I reached this point, I had learned everything myself. And then came the time I started learning to code in school.

Some languages I saw were:

  • Batch

  • Bash

  • Perl

  • COBOL

  • RPG

  • C++

  • ASP

  • SQL

  • Java


And most importantly: C#

The year before we started getting C# in school, I already started learning it, and it's great. I'm addicted to C#, even more then I ever was to PHP.

C# got me in contact with everything .NET related. I love the framework, the power. It makes things much easier. It's even easy to convert code from VB.Net to C#! :)

Now I'm at a point where I got a decent coding background, I made all the usual coding mistakes (and probably will make a lot more), I got business experience, worked in a team and alone, big and small projects, internal and external. Technology still dominates most of my life, it's even relaxing in a way.

Have a look at cumps.be to get a more detailed overview of the projects I've worked and my skill set.

That's about it for now. If you want to know something, drop me a line!
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Hello there!

The day is finally over. After being up from 5 o' clock this morning, I arrived back home at 1 o' clock this night.

A bit of Coca Cola, a Snickers and sitting behind a PC and I'm awake again :)


Public transportation in London has the remarkable ability to take hours over very short distances, for ridiculously high prices. It took me 2 hours to get to Reading this morning.

But luckily, the day ended good. I found a radio station which broadcasts Armin van Buren - A State Of Trance, apparently the only non-British DJ to play weekly on Kiss FM.

Photo's will follow later since it was forbidden to take pictures if you didn't mention it in front, which I of course forgot ;)


Started the day with a session about Microformats (Glenn Jones), which are basically nothing more then HTML elements with specific classes assigned to functional data. This makes it able for search engines and other machine code to interpret the page and easily retrieve the functional data to process. I'll give this a try in a next project, it seems very nice.

More info: microformats.org

The second session I attended was about CSS (Patrick Lauke) and how you use it to separate content from lay-out. Which was pretty basic stuff in my opinion, but I still picked up some tricks. It seems very nice to use CSS to provide a printer friendly version of a page.

Then I watched a session about Ruby On Rails (Dave Verwer), which gave an overview of possibilities combined with some demo's.

Lastly there was a session about Unobtrusive Javascript (Dave Verwer) which provides a very clean way to provide fall-back functionality to clients which have Javascript disabled. It was good to listen to this to hear another point of view, not that much about how the technology works. I'm currently using this on my personal (Dutch) blog to display special effects on images :)


Slides will be available from webdd.org.uk soon.

Afterwards we went for a drink with some people and some food in Pizza Express where I got to know some other people who are working in the financial world as well, and got some more information about gatherings in London about .NET development. This was the most important part of the day for me, since it was quite special as a foreigner to be among such a bunch of English people, without knowing anyone and making new contacts.

WebDD was a very nice event, with gave me a break from all my day to day development work and brought me back in touch with the technologies I love, around web development.
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Today I got a letter from Microsoft UK personally confirming my registration for the WebDD event for next weekend.

Attached with a security badge to enter the Microsoft Campus.

Security Badge

I must say I'm pretty impressed about the effort put into this, since it's a free event after all. Especially since they had to send it abroad and everything :)


When it comes to logistics, I'm always impressed at Microsoft. Receiving stuff from them coming from the US, Ireland, Germany and other places, without any problems.