C/C++ Compile Time Asserts

The Problem Run time asserts are fairly commonly used in C++. As the MSDN documentation for assert states "(assert) Evaluates an expression and, when the result is false, prints a diagnostic message and aborts the program." There is another type of asserts which can be used to catch code issues right at the time of…

5

Taking my job more seriously

I generally take my work very seriously. However, the following from SICP was still my favorite quote "I think that it’s extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customers got shafted every now and then, and…

3

Silverlight on Nokia S60 devices

In many of my blog posts (e.g.here and here) I refer to .NET Compact Framework and Symbian OS (S60) and obviously folks keep asking me via comments (or assume) that we are porting .NETCF on S60 devices. So I thought it’s time to clarify The short answer is that we are not porting .NETCF to…

1

Who halted the code

Today a bed time story involving un-initialized variable access and a weird coincidence. Couple of weeks back I was kind of baffled with a weird issue I was facing with the .NET Compact Framework Jitter. We were making the Jitter work for Symbian OS (S60) emulator. The S60 emulator is a Windows process and hence…

3

Hex signatures

Frequently in code we need to add bit patterns or magic numbers. Since hex numbers have the alphabets A-F folks become creative and create all kinds of interesting words. Typical being 0xDEAD, 0xBEEF, 0xFEED or various combination of these like 0xFEEDBEEF. However, someone actually used the following in a sample 0xbed1babe No naming the guilty

0

Back To Basics: Finding your stack usage

Handling stack overflow is a critical requirement for most Virtual Machines. For .NET Compact framework (NETCF) it is more important because it runs on embedded devices with very little memory and hence little stack space. The .NETCF Execution Engine (EE) needs to detect stack overflows and report it via StackOverflowException. To do this it uses…

2