ricksp's WebLog

Microsoft Dev Tools Usability

Who is the "Typical" Visual C# User?

The Typical C# User?

My name is Rick Spencer, and I am a Usability Specialist on Visual Studio. Over the past couple of years a large portion of my job has been supporting the Visual C# team, which has been one of the most rewarding experiences of my professional career. I thought I’d start off my first few entries with some history, how did we go about designing Visual C# Whidbey?

 

One of the first things that I helped the team with was using user research to define the “typical” C# developer that we should have in mind when creating Whidbey. I helped the team conduct all kinds of research, from studies in our usability labs, to visiting users where they work. I sifted through all the user data and helped the team identify the common traits that we tended to see over and over in our users. In fact, this work folded into work that I did with the rest of the usability team to define all the users of our developer tools projects. Steven Clarke has written some interesting things about that effort.

 

In any case, here are some of the common traits we identified and designed for:

  • Object Oriented
  • Code Focused
  • Pragmatic
  • Battle Scarred by Memory Management and Pointers in C++

Early Adopters

This was kind of a catch-22 for us. Since the bulk of this research was done pre-Everett RTM, most of the developers we watched and interviewed had a lot of experience with beta version of Visual Studio .NET, and I mean the first version of Visual Studio .NET. As a result, we tended to see people who were looking for opportunities to work with the latest and greatest things, they wanted to be on the cutting edge. Since we were in the early adopter phase of the adoption cycle (I’m thinking of Crossing the Chasm by Moore) we know that we were looking at a self selecting group. We expect that we may see different traits in the post-chasm C# user, and I’m looking forward to doing that research after we’re out of this part of the Whidbey cycle. Who is the post-chasm C# developer?

Object Oriented

Across the board, the C# developers we met felt very natural with OO programming and concepts. This was very different then the other developer groups that we saw in the rest of the dev tools division, where there is a lot more variability in how comfortable developers are with OO and how effectively they can use OO practices. As a result, when we think about Visual C# features we think about how to let the developers leverage OO features of the .NET platform instead of try to walk them through them, or even hide them. In other words, Visual C# developers were pleased with the .NET platform because of it’s OO nature, not despite it.

Code Focused

When we talk about “code focused” this meant a couple of things to us. First, the users we watched were very persnickety about their code. For example, they would spend a lot of time formatting their code the way they wanted. They would write a block of code, and then go back and indent it the way they wanted. They would copy code from somewhere, and then format it in their editor before they even read it. There just seems to be a sense that the code itself can be beautiful, and code that was ugly, and here I mean was formatted in the wrong way, was fixed up.

 

The other part of being code focused has to do with the way they see the designers and other parts of the Visual Studio tools that were not code editors. For instance, the Windows Form designer. Many developers look at programming as designing a form, and then writing “code behind” that makes the form work. The form itself is the program, and the code is annotations that make the program do what they want. The Visual C# developers, however, tend to think of the Windows Form designer as a code generator. For example, we saw one developer use the form design and the sever explorer to bind to data. Then he went in and cut out all the generated data code and put it into it’s own class. He didn’t mind using the generated code, but the code was his, not the form’s. Furthermore, he couldn’t live with having the data code embedded in the UI code, he just had to factor it out or he wouldn’t have slept well that night.

 

As a result of these observations, the Visual C# team included added a set of code formatting features so that our users could have their code formatted the way they wanted, but didn’t have to keep stopping to fuss with it. By the way, a little tip if you’re using a Whidbey pre-release: there is a command called “Format Document” that will format all the code in the current code file. I use this all the time to keep my code pretty, but also, if the code comes out formatted funny, it usually means there is something wrong with my brace matching or something.

We also tried to design as many of the productivity features as possible to work from within the editor. Since the C# developers we comfortable in code, we didn’t want them to have to leave their code to modify it if possible.

Pragmatic

One of the key features that distinguished the Visual C# users from some of our other user groups, was that they thought long term about the code they were writing. They knew the code would be maintained by someone else, so they thought about how to write it in a maintainable manner. They thought about if the code they were writing would be performant under various important circumstances. They considered if their would be security concerns later on, and tended to plan for it. Many of our user groups address these issue only after the code is working and they have fulfilled their functional specifications, Visual C# users tended to think of it up front.

On the other hand, they also made sure that they shipped on time. For instance, if there was a possible perf issue with a part of their code, they didn’t necessarily address the issue until they fulfilled their functional spec and made sure it would actually be a problem.

 

We called the ability to make these trade-offs “pragmatic.” Other parts of being pragmatic included things like using a third party control, even if they knew they could do it better themselves, they were willing to settle, but deliver. Other developers we have seen simply must hand roll everything, because that is the only way to make sure that everything is done right.

Battle Scarred by C++

While by no means universal, a lot of the Visual C# developers came from a C++ background. However, many of them have bitter memories of suffering with bad pointers and memory allocation bugs, not to mention COM. Mentioning iunknown was enough to make some of them shudder. Working within a run time environment that alleviated these pains was a principle reason that they enjoyed .NET programming. Paired with a class library that made their application development much more productive, moving to .NET made programming much more fun and rewarding then C++ programming, and there was a lot less of the painful trouble shooting.

Interestingly, some C++ developers we talked to didn’t like  the idea of working with a runtime. One of them told me that his code was just not symmetrical without the “deletes” to go with the “news”. For him, memory management was an essential part of programming, not a troublesome extra task. He felt that moving to .NET would also mean giving up control over things like performance. It was an interesting difference in personality.

 

Does This Ring True?

I’d love to hear about how these traits do and do not ring true to. Are you all Object Oriented, code focused, pragmatic developers who bear battle scars from C++ but who love to be on the cutting edge? Also, now that we are working on the third major version of Visual Studio .NET, is there a main stream C# programmer who is different then the typical programmer that we saw before?

Published Friday, February 06, 2004 12:31 PM by ricksp

Comments

 

David Cumps said:

The 'Code Focused' part is totally true for me. I'm indenting code before reading it, i actually never noticed myself doing it, but by reading this, fun :p
February 6, 2004 1:49 PM
 

Aaron Weiker said:

Ah... now I don't feel so bad. For a while I was thinking that I was one of the few anal coders. The entire section on "Code Focused" I just kept thinking of how many times I find myself putting a little extra space here, move a { and } there. I can't quite relate to "Battle Scarred by C++". This has to do more with the fact I was a Visual Basic developer first (I always longed to get into C++ but couldn't get my employer's to always agree) and then once I heard of C# eagerly awaited for the day when I could end every line of code with a ";". And now, well I haven't touched Visual Basic in about 3 years. Now don't get my wrong, VB.NET is a great improvement, however as for me, I NEED my case sensitivity.
February 6, 2004 2:37 PM
 

Brian said:

A lot of the above just have me shaking my head and going "You really understand ME!". I do have a lot of the aesthetics stuff. I especially can't stand Visual Basic 6. I had to pick up a program for maintenance and the code never has felt like home. I spent more time formatting and fixing bad programming than I did writing new code. Also, without the brackets, comments, etc. that I'm used to seeing in C++, I hate the language more for it's syntax than for its rampant shortcomings.

Anyway, I'm more of a middle child of the C languages. I came from a C++ background and I was very skeptical of .NET. Now I have taken training and done production in C#. I love it and wish I could use it all the time. However a lot of my old code is still C++ and I spend a lot of time "shuddering" when I run into COM/ATL and just wish I could set it all on fire and rewrite it in .NET.
February 6, 2004 2:38 PM
 

Stephane Rodriguez said:


Formatting styles (rtf, html) are welcome to help the developers feel like he's at home, not a user of some system, something that he tends to become because a lot more ready-to-use plumbing is brought to him than in the past.
February 6, 2004 2:52 PM
 

Peter Blum said:

I fit into the first 3. I became an OOP user on the Mac pre-1990. Its all about the code - clean, reusable, team-oriented. On the C++ battlescars thing, I came from years of Pascal starting on the Mac then in Turbo Pascal and Delphi. While pointers were in my life back then, it wasn't a difficulty because the language made it easy to use.
I totally agree with the guy who wants to see both his 'news' and 'deletes'. I really loved establishing clean try..finally blocks around memory allocs and deallocs. I'm used to the GC methodology now although it took several months to unlearn things. At as this date, I have been using C# for 2 years.
February 6, 2004 3:34 PM
 

John Lewicki said:

Well Done!
4 out of 4 matches for me. Which I guess explains why I like C# so much, and why Whidbey is looking so darn good.

Please keep targeting the 'typical' user (i.e. me)!
February 6, 2004 4:02 PM
 

Mark Allanson said:

I think yoiu might find that a large amount of c# users (such as myself) are experienced C programmers (with Win32 experience aswell as other platforms) who are looking for a good oportunity to cross train into a modern OO language.
February 6, 2004 5:37 PM
 

Corey Kosak said:

Very interesting post. My reactions:

Despite its name, I think of C# as a "better Java" rather than a "better C++". My history is C++ -> Java -> C#. I think C# and Java will be in an "arms race" for some time, with respect to adding language features.

I love the runtime and the garbage collector. I have absolutely no problem "losing control" of things like memory allocation, but at certain critical times I need to check to make sure the implementation matches my expectations. Like checking that the JITted x86 code is sufficiently optimized. As a simple example, if I make liberal use of C# properties, will the runtime inline them aggressively? You may tell me "Don't worry about it" and I will tell you "Trust, but verify." I recently learned that Visual Studio's "Show Disassembly" doesn't show you the final, optimized x86 code. If you want to see that you have to run the cordbg command line utility. It seems like this is misleading at the very least and should be improved.

The IDE should make me as efficient as possible with respect to typing. IntelliSense does some things well, but there is a lot missing. IDEA from IntelliJ/JetBrains is a great java IDE. It makes me more efficient because it saves me a lot of laborious boilerplate typing and mouse clicking. Simple things like "generate constructor", "generate getter and/or setter properties", "generate equals and hashcode methods", "suggest 'using' directive", "go to next error in the compiler output", plus a zillion other things including refactorings. If you are not familiar with it, I would suggest that you study it extensively.
February 7, 2004 2:16 PM
 

SBC said:

"Battled scarred by C++".. indeed!
During my Win32 days much time was spent with Numega's BoundsChecker (still available from CompuWare). The problem was not with the C++ language per se but the environment (memory models, legacy code, nested pointers, etc). C++ Libraries (e.g. STL) were certainly helpful and hope to see something similar with C# generics soon. Also helpful was lint-like tools (see Gimpel's PC-Lint). It made code-review more painful but focused.
Somehow, one survives it and ships it out the door.. :-)
February 7, 2004 4:51 PM
 

Louis Parks said:

Aaron, I know exactly how you feel! It just isn't natural to code without semis.

I'm very OO, very Code Focused, and mostly Pragmatic. I too came from a ASP/VB background, so I haven't had much dealing with C++.

I jumped on C# as soon as it was posted to MSDN Subsriber Downloads back in fall of 2000. I've done everything possible to only code in C# since then.
February 9, 2004 1:49 AM
 

Sean said:

How about adding "VB6 Transplants" as one of the categories? I was about 90% VB6 and 10% VC++ before becoming a C# .NET developer. I love C# and really don't like VB.NET (with the exception of the edit-and-continue feature coming soon).

Personally, I'm sort of a mix between "code focused" and "OO" (which is somewhat amusing considering VB6 pretty ugly from an OO standpoint <g>).
February 9, 2004 12:34 PM
 

Sean Terry said:

I started programming in C, but then got a job working with VB6. When .NET came out, I found that C# was more my style (verbose syntax, but with plenty of abstraction) than VB, so I've been writing in C# ever since.

Never burned by C++, but the others match me to a "T".
February 9, 2004 3:38 PM
 

Luc Cluitmans said:

Highly interesting. I guess I score about 3.7 out of the four points there. The first three apply completely to me.

As for the last point, the essence applies to me, but the details don't. I still regularly use the C++ part of visual studio, mostly for writing DLLs to be accessed through PInvoke in C# programs (most of that code is actually C code, not C++). Or for making wrappers to legacy code using managed C++. I think I have mastered using pointers without having sustained too many battle scars :). But I simply don't like C++ much as a language.

That being said, a point I missed in your list: I suspect that I'm not the only C# coder having a decent experience as a Java coder. Or did I just use a word that shall not be uttered in this blog?

Btw, I absolutely love the auto-indent feature of VS (using VS2003). Similar to what you wrote about whidbey, seeing that the indent is messed up after hitting '}' is a great way to catch typos just after you make them (and not later). The few glitches of the auto-indenter are quite survivable (e.g. when realizing a string you type is too long, typing a return in front of it, and seeing no indent takes place at all. Or trying to put a while{} loop inside a do{}while).
February 10, 2004 3:51 PM
 

Rick Spencer said:

"Java" is not a bad word to me at all. It seems that we have a lot of customers who use both Java and C#. Of course I want Visual C# to be their tool of choice though ;) But to earn that honor, we need to make a tool that is productive and a pleasure to use in every way.

I really appreciate the feedback from everyone. I think it basically says that the traits we identified were pretty much on target, but Visual C# users come from more varied backgrounds then just C++.

I'm getting ready to post my next blog entry on the usability study we ran on Generics. Hopefully I'll get it up before I go home this evening.

Cheers, Rick
February 10, 2004 4:27 PM
 

Michael Giagnocavo said:

Wow. You mean there are other coders who spend time making sure that there are the same number of spaces between same types of declarations all throughout their code? It's so accurate for me, it's scary.

Looks like the C# people love us though, counting the number of C# code formatting options available in Whidbey.

What was wierd was that I moved from VB.NET (I had used some C and various Basic languages for many years before) to C# after complaining about how in VB all formatting was handled for me. Now, if I ever have to write a piece in VB.NET, that really annoys me (I wanna lay things out my own way).
February 10, 2004 6:19 PM
 

Tim said:

Gee, I'm not as strange as I think. I'm guilty of reformatting code before reading it. I've always considered that smart. Why read a book where indents happen in the middle of a paragraph?

I've had mainly a C/C++ background, and only a little VB. I've done a few major projects in Java. I've not been burned by memory allocations or bad pointers, but then I've only done one COM/ATL project. The rest are high performance server applications. I've been burned repeatedly by bad GCs, so I'm wary of them. I've been playing with C# for about 6 months, and wrote a serious project in it a couple of months ago. I struggled with the ThreadPool on this, and eventually abandoned using it in favor of doing it myself. I like the language design, but I fell in love with generics and STL, so I can't wait for them in C#.
February 10, 2004 11:49 PM
 

Angel said:

I always loved VB because it allowed me to *think* while I was programming. C++ was fantastic for the OOP architecture, for the freedom to create and for the performance, but I felt that I was spending more time avoiding the traps than creating functionalities.

C# is a killer. I feel that I can think while I'm doing code, and I have power to create.

Ah, don't forget the Visual Studio IDE. Fantastic! It's anothes advantage over java.

On the aesthetics issue. Of course. When I have to learn some new code, the first thing I do is to indent and comment it...
February 13, 2004 4:19 AM
 

JoeN's WebLog said:

February 16, 2004 12:36 AM
 

Bryan Livingston said:

I was totally a non-typical programmer, I've programmed just about everything but didn't take a liking to OOP.

C# changed all of that and made me have all those traits listed.
February 18, 2004 4:48 PM
 

Nicholas Schweitzer said:

When I saw the article title I never imagined I'd actually fit the mold...

I do have to say that I always considered myself a hard core C++ guy... and still miss some features of C++ since I've been programming in C#. I never considered doing deletes to be a burden either, and always considered people who ran into memory leak issues to simply not be good object oriented programmers. For me, memory management was not the key reason to switch to .NET.

Of course the things I miss the most are: Templates (thank God for Generics), and const reference! Where did it go!? Having used enough 3rd part libs... I want the safety that comes from knowing that something I pass into a function won't get modified. Period.
February 19, 2004 1:11 PM
 

Ignat said:

Hi.
"Typical user"?
I think it's a man who came from Java-world, not from C++ (he like to have access to all comp - ports etc., not only what C# decided to give him.. only MY opinion). It's a man who want to write applications very fast and don't want to think about all things in porgramm - just to call functions. Is it bad or good? I cann't say.
What else can I say..
To be honest, I'm very young - I'm only 20 - I'm Russian student.
I "looked through" languages: ASM, Delphi, VB, VC++, PHP, Java, C#.NET etc.
Why I still not only on C#?
1) I donno what will be tommorow, may be Microsoft decided to stop support .NET. It'll be the END. For example, if Sun stop supporting Java - another company will do it (IBM, for example, or Oracle..)
2) sometimes I need SPEED. (sort algorithms etc.). The porgramm on C# works much slowler then on FASM/MASM.
3) I want to have access to HARDWARE.
and many-many more..

As for me, I think typical C#-user - it's DB-programmer or web-programmer.
Eh... To be honest, .NET - is a great idea. Really, but.. (see 1)-2)-3)..)
And..
May I give small suggest to C#-language?..
I Java I can write something like:

for (a = 1, b = 4; a < b; a++, b--) {
System.out.println("a = " + a);
System.out.println("b = " + b);
}

Why it's not supported in C#? As for me, it's really will be great!
Thats all. Tahnk you for attention.
MfG, Ignat.

P.S. Plase, don't be angry for my bad English..and..sorry if I shouldn't post this message here..


April 18, 2004 3:57 PM
 

ricksp s WebLog Who is the Typical Visual C User | Wood TV Stand said:

May 31, 2009 7:25 PM
 

ricksp s WebLog Who is the Typical Visual C User | Wood TV Stand said:

June 2, 2009 5:22 PM
 

ricksp s WebLog Who is the Typical Visual C User | work from home said:

June 16, 2009 7:48 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker