Thursday, 17 May 2012

I still remember reading Programming Windows 5th edition in our college. The book was very thorough and gave a nice introduction to all the Windows programming concepts, although we were more interested in API we could use to get the password text on a window or hacking the key strokes ;-)

But it's been a long time. That was the PC era. Now we have tablets and mobile ruling our lives. New toys for new era. And so we have a new book from our guru Charlez Petzold on how to program these toys.

What is interesting about book's offer it is only $10, but the book is not yet finished yet - only 7 chapters. Windows 8 is still under consumer preview - and so I think the book is following the release cycle of Windows 8. We live in interesting times.

Monday, 14 May 2012

This is a post to store all links to videos, blogs, PDFs relating to debugging .NET applications. I have become particularly interested in this area and getting down to details such heaps, clr-stacks, GC, analyzing dumps is so much fun!

- Tess Ferrandez:

Previously an ASP.NET escalation engineer at Microsoft, based in Sweden, now working in developer evangelism team. But still her blog has some very good info. to get started with debugging. You should check out the labs she has posted on her blog which show how to resolve performance problems.

More recently there are 6 videos posted on Channel 9 around .NET debugging by Bradl Golnaz. I have seen two and they look good.Diagnosing Application Issues - 01 You can find links to all the videos on this link.

- MSDN
Delay's Blog: This post has some good links to other valuable posts.

Wednesday, 2 May 2012

In one of projects I am working on, we have a requirement of showing ‘recent files’ used by the application. The files used by the application are XML files – no custom extension.

Our goal is:

For this task we need the following things:- a RecentFiles class: - should contain the list of recent files - should have methods to load/save the list to disk (persistence) - should have methods to add a recent file used or delete a non-existing file- a MenuItem (with children) to show the list

Now all we have to do is:- add an item to the AppRecentFiles.Files list whenever we load a new file (from the Load option in menu). Tip: add the new item at top of list so that it shows as first item on the menu.- remove file from list if the user selects a file from 'recent files’ is not found, perhaps after a confirmation message box- load the recent files by using RecentFiles.LoadFromFile() method – usually done during Window load or app start- and save (persist) the list by calling RecentFiles.SaveToFile() on App close or window close