Community Interview: Ilya Tumanov

August 28th, 2008

Photo of Ilya Tumanov1) Would you like to introduce yourself?

My name is Ilya Tumanov. I’m originally from St Petersburg, Russia (that should explain the strange name). Currently I live in Redmond, WA. I’ve been professionally developing software for over 15 years, more than 6 years with Microsoft.

2) What do you do in your role within Microsoft?

I am a Software Development Engineer (SDE) within the Developer Division (responsible for development tools like Visual Studio). I have been with the .NET Compact Framework team almost from the start and helped shipped version 1.0 of it.

I used to own numerous portions of the .NET CF base class libraries (BCL), for example ADO.NET and LINQ and was responsible for the .NET CF installation story on both the desktop and device sides.

Recently I’ve moved on to another position and now I’m with Microsoft’s Office Labs. My line of work is around mobile productivity, so I’m still working with NETCF, now as a regular developer.

3) What was it like to have responsibility for sections of code that are used by such a wide number of developers? Do you get “warm fuzzies” whenever you see a .NET Compact Framework application?

Absolutely. I love to see NETCF used to create all kinds of cool applications. Often I wonder which technology new apps are built with – and I would say there’s a very good chance it’s NETCF.

We have a huge library of NETCF based applications here for compatibility testing and new applications are coming in all the time. One of the recent applications to come out is a new version of Microsoft’s own Live Search, built with NETCF V2.

4) You are also a prolific answerer within the Smart Device section of the MSDN Forums website. Is this part of your job or something that you do purely as a way to be involved with the community?.

I’m volunteering as a moderator on MSDN forums. This is not an official part of my job. Although my work on the forums is encouraged by Microsoft, I do not receive special compensation for it. Some moderators are community support engineers dedicated to MSDN forums but I am not one of them.

5) For those not aware of the MSDN Forums, would you like to explain the purpose behind them?

MSDN Forums is an online community for developers to support each other. It serves many purposes, just to name a few:

  • Help developers with their current challenges.
  • Share knowledge, experiences and ideas.
  • Educate developers about best practices.
  • Collect feedback and use it for targeted product improvements.

6) For someone using the support forums what would your suggestions be for improving their chance of getting a quick and accurate response?

  • Educate yourself – learn to fix basic syntax errors and learn to read the documentation on MSDN.
  • Search relevant forums and the web. Then search again. In 9 out of 10 cases somebody has ran into the same type of issue before and you can get a solution instantly instead of posting and waiting.
  • Pick one and only one forum which best matches your question or problem.
  • If you know VB.NET learn enough of the C# syntax to enable you to translate code samples provided in that language (the same goes for a C# developer learning the basics of VB.NET syntax).

7) What do you find the most challenging aspect of developing software for Windows Mobile devices?

It’s challenging because it’s unfamiliar. As a developer who is starting out with mobile devices, it’s hard to do things because everything the developer is used to seems to be “missing”. Even the OS does things differently. A good example is the file system: no drive letters, no relative paths – what a shocker for seasoned Windows developers!

However, as soon as this initial shock is over and you learn to live with API limitations and OS peculiarities it becomes much easier.

For me personally it’s not easy to come up with a good user interface that works well for small screens and limited input capabilities.

8) Do you carry a Windows Mobile powered device with you?

I used to not carry my cell phone with me at all – until I got a Samsung BlackJack II phone a couple months ago. I must say I’m now addicted to instantly arriving e-mails. A better web browsing experience is what I would like to have though.

9) If you had one thing to say to potential developers of Windows Mobile applications what would it be?

Go for it! It’s fun!

Auckland Code Camp – 31st August

August 19th, 2008

Logo for .NET User Group Auckland Code Camp 2008

The day before New Zealand Tech·Ed the New Zealand .NET User Group is putting on a developer orientated Code Camp.


The following presentations are planned and will provide an ideal introduction to content covered by TechED itself.


  • Sunday 31 August 2008
  • 9am to 6pm
  • Crowne Plaza Hotel, 128 Albert Street, Auckland


  • Free (lunch provided by sponsors)
  • Afterwards there will be an optional dinner at a restaurant within walking distance (less than $30)


Hurry! Similar to Tech·Ed itself this event is subject to venue limitations. Please complete the registration form at to secure your place.

How I got into programming (meme)

August 4th, 2008

Darryl tagged me with the “How I got into programming” meme recently. So I finally got around to answering the questions (better late than never…).

How old were you when you first started programming?
Probably around 7 or 8.

How did you get started in programming?
My mother decided a computer was important for education. Not knowing anything about computers at the time somehow the family decided to purchase an Atari 520 STe. The package came with a copy of BASIC, and so it began…

What was your first language?
Photo of book cover for 15 Graphic Games for the Spectrum by Richard G. HurleyLike most developers it seems I was first exposed to programming via a combinaion of BASIC and Logo.

A copy of ST BASIC was included with the Atari 520STE package we brought. Although I wasn’t able to understand much of the manual (and had no computer “gurus” to turn to) it caught my interest. I started to devour books in local children libraries. There were loads of books such as “15 Graphic Games for the Spectrum” which enticed me with neat looking graphical games with a page or two of code to type. I never really got many working due to difficulties porting the code to work on the Atari but it was enough to get me hooked.

What was your first real program you wrote?
At the time computer hardware typically came with schematics and programming documentation. So I also learnt a lot by writing small programs to control our dot matrix printer, changing fonts and drawing basic images etc. This is probably where I got my interest in writing software that interacts with physical hardware.

My first “real” program was probably a small music scheduling app. You could create text based playlists of music and sound effects from various sources (wave files and CD audio tracks) and play them back in sequence with simple next/previous buttons. It was used for a small stage production at my high-school.

What languages have you used since you started programming?
Following on from various forms of Basic I was introduced to Pascal in the form of Turbo Pascal. A natural progression was to want to write GUI based windows applications. After a false turn with CA Realizer I used Delphi 4 (object pascal) to great success.

My interest in electronics and embedded devices introduced me to machine code and assembly for various platforms (Microchip PIC, Motorola 68K, Atmel AVR and MIPs among others) and eventually C.

Along the way I have also used various other languages such as Javascript, Java, VBScript, Prolog and Haskell. I have held professional jobs programming in both C++ and C#.

What was your first professional programming gig?
Holliday Group Limited logoPhil Holliday was kind enough to offer me a part-time job while I was a student at Holliday Group Limited (now called Blackbay). I helped develop PalmOS and then Windows Mobile applications primarily in the freight logistics area.

If you knew then what you know now, would you have started programming?
Most definitely, but I may have done things differently…

If there is one thing you learned along the way that you would tell new developers, what would it be?
Technology is only part of the equation. Most projects don’t fail for technological reasons, but instead due to human factors. People who have a strong command of the human factors of software projects are in very short supply. Try to complement your technical study with aspects of business and team building.

What’s the most fun you’ve ever had… programming?
Playing a catch up game, developing a product that didn’t fully exist but was already sold to an overseas customer. This involved many long nights and pulling all sorts of tricks out of the bag. At one stage we purposely used SQL injection attacks to work around the lack of remote access to a server!

I tag Simeon Pilgrim and Kevin Daly.

Leveraging Microsoft Embedded and Mobile Platforms

August 3rd, 2008

Thank you to the members of the Dunedin and Invercargill .NET User Groups which attended my presentations late last month.

As mentioned if any of you have any questions or would like to discuss embedded and mobile development further please feel free to contact me.

As promised I have also attached my slides and a series of links for anyone interested in investigating further.

.NET Micro Framework

Windows Mobile (.NET Compact Framework)

XNA Game Development


Introduction to .NET Compact Framework – Data Syncronisation Techniques

July 9th, 2008

Thank you to the members of the Nelson .NET User Group who managed to work around the unusual meeting time to attend my presentation on Thursday last week. It was great to meet you all.

As mentioned if any of you have any questions or would like to discuss Windows Mobile development further please feel free to contact me.

As promised I have attached my slides and a series of helpful links for developers wanting to learn more.

Demo Applications from presentation

Database Syncronisation Techniques

Control Libraries

Techqniues for screen resolution/orientation awareness


Other Frameworks and Tools our discussed

Device Application Development MVP!

July 8th, 2008

Microsoft Most Valueable Professional Logo As of last Tuesday (1st July) I have became a Microsoft Most Valued Professional (MVP) in Device Application Development!

I see this as a validation that my desire to help the developer community via my blog and forum postings is starting to head in the right direction.

I would like to thank Peter Nowak, Darryl Burling, Andrew Leckie, Peter Jones, Daniel Wissa and many others who have helped encourage me to grow into the position I now find myself within. I am sure that without your support I would not have got this far this quickly.

.NET Micro Framework presentation links

June 26th, 2008

A big thank you for those who attended my presentation at the Christchurch Embedded .NET User Group last night. Although it was a small turn out it seemed there was a lot of interest in this platform.

As promised here are the slides and some links to various resources I referenced during my presentation:

Sample Applications

Device Solutions (Embedded Fusion) Hardware

Original origins of the .NET Micro Framework


Some of my blog posts

Additional Resources

What’s wrong with my product name? Why special characters need not apply.

June 23rd, 2008

Recently while porting another subset of Chris Craft’s 30 Days of .NET applications to C++ I came across another example where the Visual Studio Smart Device CAB deployment functionality has a small trap that could trip up developers new to the tool, and it all depends upon the name you choose for your product…

Day 10 introduced an application named “What Is My IP?“. While creating the CAB file to deploy this application I followed Chris’s lead and set the Product Name to “What Is My IP?”, as shown in the screenshot below.

Screenshot showing Product Name property for CAB file

Everything compiled without error but when I went to install the CAB file I was greeted with the following error message:

Screenshot showing Windows Mobile device failing to install CAB file

Alternatively in some circumstances I could install the application, but uninstallation would fail without removing a single file or shortcut!

The Problem

In a previous blog post I discussed the internal structure of Windows Mobile CAB files. It turns out the problem is to do with the question mark at the end of the product name.

The Visual Studio Smart Device CAB Deployment project also makes use of the Product Name as the default installation directory. Within the *.INF file produced behind the scenes you will find a section similar to the following.

AppName="What Is My IP?"

When this file is processed to produce a CAB file, the _setup.xml file within the CAB will contain the following XML snippet:

<parm name="InstallDir"
      value="%CE1%\What Is My IP "
      translation="install" />

Since a question mark is not a valid character for a directory name it has been replaced with a trailing space. It seems this additional space is enough to trip up something within wceload.exe, the executable responsible for installing CAB files on Windows CE based devices.

The Solution

The only solution I’ve been able to come up with is to ensure that your product name does not end in a character that is not valid for a directory name. In this example I renamed the Product Name to “What Is My IP”.

Another alternative is to manually create your CAB file by writing your own *.INF file. By doing this you will be able to default the installation to a directory which isn’t mapped 1 to 1 to your Product Name.

30 Days of Windows Mobile – Day 04: Mileage Tracker

June 15th, 2008

Screenshot of Mileage Tracker applicationWith petrol prices reaching record highs across the globe people are starting to pay more attention to fuel efficiency.

Day 4 of Chris Craft’s 30 Days of .NET introduces a Mileage Tracker application to help you check the efficiency of your vehicle and perhaps driving habits!

This blog post covers a number of aspects of porting the original C# source code into C++.

Transparent Labels

Windows CE does not support windows with true transparency. Instead we have to fake it. A common technique is to revert to manually drawing the elements of the user interface which require transparency over top of the background of their parent control.

// Draw the string "Hello World" in the rectangle
// (x1=10, y1=20) - (x2=60, y2=40) using a transparent
// background.
RECT rcBounds = {10, 20, 60, 40};
WCHAR szBuffer[] = L"Hello World";
DrawText(hDC, szBuffer, wcslen(szBuffer), &rcCtrl, DT_LEFT);

Getting a little bit more advanced (with better design time support) the .NET Compact Framework solution suggested by Alex Yakhnin is equally implementable in native code and is the technique used in the source code available for download.

Gradient Background

The original C# application used a bitmap for a background. For this conversion I decided to demonstrate an additional API by implementing the background programatically. The solid colour part at the top is easily implemented by calling FillRect within the WM_PAINT message handler. The shaded gradient underneath can be implemented with a call to GradientFill.

Filtering edit controls

For this application it is desirable to restrict input in the edit controls to only decimal numbers (a distance of “abc” miles does not make much sense). Although the edit control has an ES_NUMBER window style which restricts input to numeric digits we can not utilise this as we also want to accept a decimal point.

Another approach is to subclass the edit control. Subclassing a window allows us to override or alter the existing behaviour of the control. The article “Safe Subclassing in Win32” provides a great introduction to this technique.

Similar to a dialog procedure, each window (control) has an associated window procedure. The first step in subclassing is to replace the window procedure with our own custom one.

// Replace the window procedure associated with the
// 'hWndCtrl' window with one called 'MaskedEditProc'
SetWindowLong(hWndCtrl, GWL_WNDPROC, (LONG)MaskedEditProc);

The new window procedure has the opportunity to process or filter window messages before they are passed along to the original window procedure. For example by filtering the WM_CHAR window messages seen by the original window procedure we can make certain key presses disappear.

static LRESULT CALLBACK MaskedEditProc(HWND hWnd,
         UINT uMsg, WPARAM wParam, LPARAM lParam)
  WNDPROC pfnOldWndProc =
      (WNDPROC)GetWindowLong(hWnd, GWL_USERDATA);
  // Process messages of interest
  switch (uMsg)
    case WM_CHAR:
      if (iswdigit(wParam)	// digits
        || wParam == '-'	// negativeSign
        || wParam == '.'	// decimalSeparator
        || wParam == '\b')	// backspace
        break; // This character is allowed
        return 0; // This character isn't allowed
  // Allow the original window procedure to process
  // the message.
  return CallWindowProc(pfnOldWndProc, hWnd, uMsg,
                                 wParam, lParam);

A more advanced (and reusable) implementation of this technique is described in James Brown’s Masked Edit Control Input tutorial.

Sample Application

[Download - 61KB]

Within the sample application available for download there are a number of possible tasks left as exercises for the reader.

  1. Modify the MaskedEditProc window procedure to make it reject input such as “1.23.4″. I.e. accept a maximum of one decimal point.
  2. Modify the decimal number parsing to be locale aware. Some locales for instance use a semi colon (;) as a decimal separator.
  3. Handle screen orientation and resolution changes.

EDNUG Meeting 3: Introduction to .NET Micro Framework

June 15th, 2008

The third meeting of the Christchurch Embedded .NET User Group is coming up on Wednesday the 25th of June. More details can be found on the EDNUG website.

I will be providing a presentation that covers the basics of .NET Micro Framework based development. This will use an example of a small digital timer with a few unique features.

Andrew Leckie will then provide a “where next for version 3.0″ overview of Microsoft’s plans for the next version of the .NET Micro Framework due to release later this year.

Time permitting there will also be a 3rd topic yet to be finalised.