Archives

Archives / 2004
  • Comment Spam

    Am I the only one being hammered by comment spam all of a sudden?

  • Where is Form's Loaded event?

    Wow, it’s been a while since I last posted something here. We’ve recently moved to BC so I’ve been pretty distracted. I hope to be able to post more regularly in the coming weeks.

  • App Lockdown Sample Code

    MSDN Magazine recently made the sample code for my App Lockdown article available online. Unfortunately the code and structure was changed accidentally, resulting in the sample code not compiling. Download the original sample code, which should compile and work without any errors or warnings with Visual C++ .NET.

  • MSIL and Beyond

    As you might have gathered, the MSIL series has come to an end. I originally set out to write a brief introduction to the Microsoft intermediate language to help programmers better understand managed code and also allow me to use MSIL in more interesting discussions without having to repeatedly explain the basics of MSIL. I could go on forever but I think the introduction is sufficient to allow interested readers to explore it further on their own.

  • App Lockdown Supplement

    The original draft of my latest security article for MSDN Magazine, App Lockdown, included sections covering web security. They were ultimately removed as they overlapped slightly with other articles already featured by MSDN Magazine. They are however part of the story I wanted to tell and so I include those sections here.

  • Application Lockdown

    MSDN Magazine has made a preview of my new security article available online. App Lockdown features in the special security issue of MSDN Magazine coming next month.

  • Introduction to MSIL – Part 6 – Common Language Constructs

    In parts 1 through 5 of the Introduction to MSIL series we focused on MSIL and the constructs it provides for writing managed code. In the next few sections we are going to examine some common language features that are not intrinsic to instruction-based languages like MSIL. Understanding the intermediate language instructions that are generated for common, programming language statements is critical to acquiring an instinct for the performance characteristics of your code as well as to more easily track down subtle bugs.

  • Introduction to MSIL – Part 1 – Hello World

    When describing C++/CLI and how it relates to C#, I am often tempted to discuss the Microsoft intermediate language (MSIL) that the Visual C++ and Visual C# compilers generate. The trouble is that most programmers are not familiar with MSIL and programs like ILDASM aren’t that helpful to the newbie because the MSIL they display, although painfully correct, is not very readable. For this reason I decided to post a few entries introducing MSIL at a basic level. Since I doubt anybody reading this will actually go and start writing code in MSIL, I will skim over some of the uninteresting details and focus on things like defining types, writing methods, calling instructions and handling exceptions.

  • kennyandkarin.com has moved!

    As I mentioned a few weeks back, I moved our website and family blogs to EAServe web hosting. Well I just wanted to report that I have had a great experience. Their support team has been very responsive and they provide a great service including ASP.NET and access to a SQL Server database for just $9.95 (about $13.30 Canadian depending on the weather). They even provide SMTP-based e-mail accounts, though I have been unable to use this since my service provider blocks outgoing TCP traffic on port 25. How annoying.

  • Beautiful British Columbia

    Greetings from beautiful British Columbia. Karin and I have just had some dinner in a lovely restaurant overlooking the bay at White Rock. Looking south I can see the equally beautiful Washington State. Now we need to run to catch our flight back to Toronto. We’ve been out here just two days looking at houses. Wish us luck.

  • Explicit Constructors

    A reviewer recently noticed the use of the explicit keyword in some of my sample code and wondered what it was for.

  • On Code Quality and Pragmatism

    My good friend Ari Glaizel has just started blogging. He is one of the most well-rounded software developers I have come across. I’m looking forward to some interesting posts. He does however tend to be quite pragmatic towards his approach to software development. Talking about working on a deadline he writes:

  • Using Namespaces

    There are some subtle differences in how C++ and C# handle namespaces and scope. I have had a few people ask me about it so I thought I would talk about it here. First the basics: a namespace allows you to group names in your program together to provide some context for them and to avoid conflicts with names declared in other namespaces. How you actually make use of names and namespaces in C++ and C# differ quite a bit.

  • Programming with Credentials

    Writing code to deal with password-based credentials can introduce many subtle bugs into your code. Having a good understanding of credentials is important in writing robust and correct code, not to mention secure code. In this piece I will focus on what makes up a set of credentials and how you should interpret them as a provider and consumer of credentials.

  • Character Disassembler

    Every so often I need to convert one or more characters to their numeric equivalents. This can be especially painful when dealing with Unicode characters. So I wrote a little tool called the Character Disassembler to help out.

  • Visual C++ 2005 Beta

    The Visual C++ 2005 (and of course Visual Studio) beta will be available to MSDN subscribers in a few days. Subscribe to the downloads feed to be notified of its availability.

  • New Arrival

    Our baby boy finally arrived this morning just before 10 am. Daniel James Kerr weighed in at nine pounds and nine ounces. Danny and his mom are healthy and doing well.

  • On Productivity and API Wars

    Joel Spolsky recently posted another essay, this time ranting about Microsoft, platform shifts, runtimes, etc. I'm a big fan of Spolsky's and I strongly encourage anyone who is at all interested in software to read all his essays on software. He seems to be showing a bit more bitterness than usual these days though. One of the points he tries to make is that the reason developers are more productive with programming platforms like Visual Basic or the .NET Framework compared with traditional programming languages like C and C++ is because the former have automatic memory management.

  • Exploring Installations and Security Identifiers

    With a shared computer you can get into a situation where one user installed a program and a different user wants to uninstall it. The trouble is that the program may not be listed in Add or Remove Programs when the second user logs in. You need to log in as the original user to view the program as an installed program in the list. So how do you discover who originally installed the program so that you can chase them down?

  • Displaying .NET Framework Versions

    In supporting or diagnosing .NET based products, I often find it useful to check what versions of the .NET Framework are installed on a given machine. Most programmers know by now how to do this by checking the registry or some file on disk. But when you’re on the phone to a customer you want a simple solution that does not involve them cranking open the registry. What you need is a simple, low-tech solution.

  • Virtual Server and COM Security

    The current beta of Microsoft Virtual Server 2005 includes some changes to the API when compared to the original alpha build that had been around for quite a while and was effectively a Microsoft-labeled Connectix build. Besides for some changes to the interface and class names to improve consistency, the most noticeable change to the API is in the security requirements.

  • Rewards for Parents

    Being a parent is hard, but the rewards are huge. One such reward is having my two year old son call me at work while I’m away from my desk and having the message recorded. He hasn’t learnt about voicemail yet.

  • Toward Better Design in Native C++

    When you need to write a Windows service application in C++, does it end up looking something like this? If you don’t understand this code, don’t worry we’ll get to that in a minute.