Sheen Space

A good programming series – “Quality Matters”

leave a comment »

Quality Matters
by Matthew Wilson


Written by Ying

12/07/2012 at 17:30

Posted in Technology

Link: 2012-June

leave a comment »

A brief note on object mortality

Joe Duffy

Author explains “premortem finalization” .Net uses and its disadvantages comparing to “postmortem finalization”. Although .Net doesn’t provide way to use postmortem finalization, things we can learn is that keep finalizable class simple.

Sayonara volatile

Joe Duffy

Volatile is evil

Anatomy of a Stack Smashing Attack and How GCC Prevents It

Oliver Mueller

Latest good article explaning how stack overflow attach works and modern C++ compilers’ detection mechanism.

Scope Regions in C++

Dan Saks

This is a very good and clear article about C++ scope and linkage for beginners. Sometimes it is not bad for experienced C++ programmers to go back and briefly review these concepts. The other parts of this series are posted here:
Linkage in C and C++
Storage class specifiers and storage duration

Written by Ying

23/06/2012 at 16:42

C++ Accelerated Massive Parallelism: Digest

leave a comment »

C++ AMP is coming with Visual Studio 2011. Here are information and good articles introducing it:

Herb Sutter: Heterogeneous Computing and C++ AMP

MSDN overview page

PDF: “C++ AMP : Language and Programming Model” – the specification

A list of articles:

Written by Ying

26/05/2012 at 22:46

Posted in C++, Programming, Technology

Tagged with

Start-up process of WPF application

leave a comment »

This is my WPF study note. I don’t guarantee it is error-free. Please kindly post comment when you think anything is wrong.

There is a top-level user-defined application class derived from System.Windows.Application. Let’s call it MyApp. After compilation, C# compiler generates two functions for MyApp class:

  • static void Main()
  • void  InitializeComponent()

Compiler prohibits you from defining the same functions.

MyApp.Main() calls MyApp.InitializeComponent(), and then calls System.Windows.Application.Run().

MyApp.InitializeComponent() has information of XAML file of main window of the application, and calls System.Windows.Application::set_StartupUri() with the XAML file path. It knows the XAML file path of main window because the file path is specified in <Application/StartupUri> in MyApp.xaml.

System.Windows.Application.Run() executes like normal WinForm code, initialising the main window and entering window message loop.

Written by Ying

23/05/2012 at 00:09

Posted in DotNet, Technology, Windows

Tagged with ,

A banking infrastructure white paper published by Microsoft

leave a comment »

Microsoft Industry Reference Architecture for Banking

The intended audience of this document includes financial institution CTOs, technical and business architects, consultants, financial services technology vendors and others who are involved in making technology decisions within the banking industry. It assumes the reader is familiar with business and IT operations in the banking industry.

Written by Ying

17/05/2012 at 13:09

Posted in Technology

Tagged with ,

Notes about improving your Visual C++ debugging skill

leave a comment »

Good Start Point

One useful link to start: PDB Files: What Every Developer Must Know

Summary from the blog article:

1) PDB files are as important as source code!

2) Every development shop must set up a Symbol Server.

Other useful things

Microsoft Windows Symbol Server is introduced here.

Source Server A tool to further facilitate debugging public build.

Symbol Proxy Advanced tool to give you centralised symbol store and performance boost on debugging. 


Written by Ying

05/12/2011 at 18:34

Posted in C++, Programming, Technology, Windows

Tagged with ,

Unnecessary relink caused by “/DYNAMICBASE” in Visual C++ 2008

leave a comment »

I am working on a big C++ solution which includes many DLL and EXE projects. It is created before Visual C++ 2008. Now we migrate to VC 2008, and I create new DLL projects in the solution.

I find that everytime there is change in my new DLL code, no matter how trivial it is, for example, only comment change in .cpp file, all dependent projects relink. It happens on my new projects, not those existing projects. So I spent some time comparing project settings, and found the cause:

/DYNAMICBASE (Use address space layout randomization)

By default, /DYNAMICBASE is on.

This option modifies the header of an executable to indicate whether the application should be randomly rebased at load time.

Address space layout randomization is supported on Windows Vista.

There is also another technical article from MSDN blog:

Address Space Layout Randomization in Windows Vista

This is a new program security enhancement setting introduced in VC 2008. It causes compiled binary to change everytime. Switching this setting off makes problem gone.

If your solution is big and you don’t need this level of security, switch it off for all your new projects.

Written by Ying

14/10/2011 at 10:33

Posted in C++, Programming, Technology

Tagged with , , ,