Archives
-
Introduction to MSIL – Part 8 – The for each Statement
The for each statement; popularized by Visual Basic, humbly accepted by C++, and forever immortalized by a creation lovingly known as ECMA-334 (OK so some people simply call it C#).
-
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.
-
Introduction to MSIL – Part 7 – Casts and Conversions
After a brief hiatus, I decided to post a few more parts of the Introduction to MSIL series.
-
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 theoriginal 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 5 – Exception Handling
In this part of the Introduction to MSIL series I will introduce the constructs that the CLI provides for exception handling.
-
Introduction to MSIL – Part 4 – Defining Type Members
In Part 3 of the MSIL series, I introduced the basic syntax for defining types. Using the .class directive, you can define reference types and value types. Choosing the type attributes correctly, you can exercise complete control over the definition of your type.
-
Raymond Chen defeats MSDN Magazine
After Joel Spolsky reported the defeat of Raymond Chen by MSDN Magazine, Chen made a great comeback. MSDN Magazine Executive Editor, Joshua Trupin, has decided to throw out the whole idea and start a new magazine. Trupin: “I'm bitter about the whole thing. We're tossing it all out and starting TechNet Magazine just to make sure it doesn't happen again.”
-
Introduction to MSIL – Part 3 – Defining Types
In this installment of the MSIL series, I describe how types are defined.
-
Introduction to MSIL – Part 2 – Using Local Variables
In part 2 of the Introduction to MSIL series, I will be exploring the use of local variables. Without variables, programs would not be very interesting. To illustrate the use of variables, let’s write a simple program to add numbers together.
-
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.
-
IIS Web Site Port Numbers
Thanks for all the interesting comments on my previous post. I plan to talk more about the subject of code quality and pragmatism in the future.
-
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:
-
My Articles
Layered Windows with Direct2D
MSDN Magazine – December 2009 -
C++/CLI Language Specification Updated
A new version of the C++/CLI language specification was posted today. You can download it here. After reading my article on C++/CLI, you may want to keep an eye on this document for more information on the language design.
-
kennyandkarin.com is moving...
I'm in the process of moving our website from Yahoo's hosting service to http://www.easerve.com. Unfortunately www.kennyandkarin.com won't be available for a day or two. Yahoo cut the service earlier than expected.
-
Stelnyk Life
I just noticed that my colleague and friend, John Stetic, just started blogging and they have some exciting news.
-
C++/CLI: The Most Powerful Language for .NET Framework Programming
My latest article is now live on MSDN. It should be headlined on the Visual C++ Developer Center soon.
-
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.
-
I'm in German!
I just noticed that MSDN has translated my security article into German...
-
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.
-
.NET Reflector Support for Visual C++ 2005
Lutz Roeder has released a new build of the .NET Reflector that fixes some problems I ran into while trying to browse assemblies built with Visual C++ 2005.
-
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.
-
Boost for Visual C++ Developers
Beman Dawes has written a nice introductory article about the Boost C++ libraries on the Visual C++ Developer Center. Well worth reading if you haven’t played with Boost before.
-
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.
-
Introduction
Welcome! I have been blogging for almost three years on my personal website (http://www.kennyandkarin.com/Kenny/). Trying to maintain a blog on a static HTML page was just proving to be too much of a hassle. I’m looking forward to blogging more frequently now, using Scott Watermasysk’s excellent .Text weblog software.