Make your site pretty: major CSS headache

Is it just me or most developers like to implement functionality and logic for their websites and freak out when they have to make it pretty? I personally hate writing style sheets – CSS may sound easy, and I understand the concepts, but don’t ask me to apply them. CSS Zen Garden is a demonstration…

1

Can’t load sos when looking at a dump

I sometimes hear people complain that they tried to open a dump file in windbg, but couldn’t get sos running. First, make sure that you are loading the dump with the corresponding debugger – open an x86 dump with an x86 debugger and an x64 one with the x64 debugger. (To learn more about memory…


Interviewing at Microsoft

2 years ago I interviewed at Microsoft for a Software Development Engineer in Test – and I probably did well, since I am now working here. Lately, I interviewed people myself (mostly college hires). Looking back, I realize I did a very good thing at my interview: I asked a ton of questions. It is…

1

Access Violation in a simple C++ program

I wrote a simple C++ program that removes the duplicate spaces in a string. The function doing the work is RemoveDupSpaces: char* RemoveDupSpaces(char *s) {       char *a = s; char *b = s;       while(*a != ‘\0’) {             while(*a != ‘ ‘ && *a != ‘\0’) *b++ = *a++;             // copy one…


The Beauty of Visual Studio Immediate Window

The Visual Studio Immediate Window is a great tool to increase your productivity. A lot of people are not aware that you can test functions in your program without writing any code by using this little tool. Look in the msdn entry for Immediate Window for more information. Here is an example on how I…

1

Working with Streams

The System.IO namespace contains types that allow reading and writing to files and data streams, and types that provide basic file and directory support. Looking at all the streams classes, I sometimes get this overwhelmed feeling: which one do I use? When writing/reading text or binary files it’s pretty easy, but what if I need…


Bad Locking Patterns

Multithreading adds the overhead of making sure data is accessed in a thread safe way. Win32 API uses the CRITICAL_SECTION structure and functions. CLR provides mutual exclusive locks with Monitor and sync blocks. Basically, the Monitor class provides the same mechanism as CRITICAL_SECTION. How it works under the hood: every object in managed world has…

1

Toastmasters? What for? I’m a developer…

In my day to day life, I write code and I debug code. Most of the times, the interaction with others is done via email. I sometimes need to present my ideas, but usually to other developers that understand what I’m talking about. So for a long time I believed that presentation skills are not…

2

Server.Transfer / Response.Redirect

Server.Transfer and Response.Redirect are causing a new page to be processed, but the big difference is how they are doing it. –          Server.Transfer terminates the execution of the current request (Response.End) and begins execution of a new request using the supplied url. No trip back to client is performed. –          Respose.Redirect creates a special header,…

1

ArgumentException when adding objects in Session: Item has already been added to the dictionary

Did you ever see this ArgumentException when you innocently tried to add something to session? I recently saw an instance when someone got this exact error. Basically, they had a couple of pages that ran just fine most of the times; but under high load, one page threw this error at random times: [ArgumentException]: Item…

2