Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Software   (RSS)

Is interlocked increment followed by comparison thread safe?

Sorry about the blog title, my imagination failed me :(. In our internal alias someone asked the question "Is the following thread safe" if(Interlocked.Increment(ref someInt) == CONSTANT_VAL) { doSomeStuff(); } My instant reaction was no because

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

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.

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

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)

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

Tail call optimization

I had posted about tail call and how .NET handles it before . However there was some email exchanges and confusion on internal DLs around it and so I thought I'd try to elaborate more on how .NET goes about handling tail calls Let’s try to break
Posted by abhinaba | 1 Comments
Filed under: ,

A* Pathfinding algorithm animation screen saver

I'm trying to learn WPF and IMO it is not a simple task. Previously whenever I upgraded my UI technology knowledge it had been easy as it build on a lot of pre-existing concepts. However, WPF is more of a disruptive change. I decided to write some simple

How Many Types are loaded for Hello World

<Updated> Consider the following super simple C# code namespace SmartDeviceProject1 { class Program { static void Main(string[] args) { System.Console.WriteLine("Hello"); } } } Can you guess how many managed Type gets loaded to run this? I was doing

Designer for my path finding boards

I'm writing a small application (or rather a screen saver) that animates and demonstrates A* search algorithm . The idea is simple. On screen you see a start and end point and some random obstacles in between them. Then you see animation on how A* algorithm

Team Foundation Server tool dump workspace details

I juggle around with a lot of workspaces. The reason is .NET Compact Framework is consumed in a whole bunch of things like Windows Mobile, Xbox, Zune, Nokia and most of them are on different source branches. On top of this active feature work happens
Posted by abhinaba | 1 Comments

String equality

akutz has one of the most detailed post on string interning and equality comparison performance metrics I have ever seen. Head over to the post here I loved his conclusion which is the crux of the whole story. " In conclusion, the String class’s
Posted by abhinaba | 1 Comments

Writing exception handlers as separate methods may prove to be a good idea

Let us consider a scenario where you catch some exception and in the exception handler do some costly operation. You can write that code in either of the following ways Method-1 : Separate method call public class Program { public static void Main(string[]

Microsoft Roundtable

Our conference rooms have been fitted with this really weird looking device (click to enlarge). I had no clue what the thing was. Fortunately it's box was still placed in the room along with the manual. It's called the Microsoft RoundTable and it is actually
Posted by abhinaba | 2 Comments
Filed under: , ,

Do namespace using directives affect Assembly Loading?

The simple answer is no, the inquisitive reader can read on :) Close to 2 year back I had posted about the two styles of coding using directives as follows Style 1 namespace MyNameSpace { using System; using System.Collections.Generic; using System.Text;
 
Page view tracker