ASP.NET

.NET Technical Interviews

Posted in .NET, ASP.NET, C#, Interview on May 13th, 2010 by msposato – Be the first to comment

In the past year I’ve participated in several job interviews related to .NET development, both as interviewee and interviewer. Which leads me to write this short list of suggestions.

1. Don’t ask .NET trivia questions.
We all know the .NET framework is huge. Too big for mere mortals to know it entirely. Hence it’s easy to create arcane, esoteric questions about some obscure part of it. Failure to answer these trivia questions only proves someone doesn’t know 100% of the framework, which frankly is most developers.

2. Be humble
I feel this applies to both sides of the interview. I’ve seen interviewers use their position to push around a candidate. It’s a real turn off, especially to experienced candidates.

3. Don’t ask the .NET Interview questions posted on Scott Hanselman’s blog
No disrespect to Scott Hanselman. I like the interview questions he’s listed (here and here). But they’re a victim of their own success. I’ve heard them asked in at least half the interviews I’ve attended since Scott posted that article. Think of questions related to skills and experience listed on the candidates resume.

4. Reply to questions with focused, short and related answers.
I recently interviewed someone who answered each question with a long, rambling and almost irrelevant answer. The less he knew, the more he talked. He start off trying to answer the question and ten minutes later was still going on some unrelated topic. Maybe he was really nervous. I think a good, general rule is to not speak for more than two or three minutes.

Here are a few of the questions I like to ask when I’m conducting a technical interview. I prefer questions that anyone can answer, from a recent college graduate to an experienced professional. Answers can be short and simple or can lead to in depth discussion.

What are your favorite books, websites, magazines, podcasts, conferences etc. related to software development?
Anyone with a passion for creating software can name several sources they use to improve themselves. The ones who can’t, are, in general, not growing and learning.

How does .NET manage memory?
Even a beginner should be able to talk about garbage collection and the stack versus the heap. More knowledgeable developers could discuss the various generation heaps, the large object heap, heap promotion, finalizer queue, weak references, GC.Collect, etc. It’s a question you can use to plumb someone’s understanding of .NET. For the record, I’m not an expert and thoroughly enjoy finding someone who thoroughly understands this topic.

How can you make a website fast and scalable?
I like this question because there are so many different answers. Webpages could designed to have a small footprint on the wire. Someone could discuss the scalability of webforms vs. asp.net MVC. Answers can be specific to webform, e.g. viewstate and outputcache. The discussion could focus on architecting a site with separation of concerns that allows different layers to be hosted on other servers. Answers can also involve hardware and network designs – clustering, load balancing, etc. People who have configured web servers can discuss the tradeoffs between compression, caching, memory usage, cpu usage, response size, et. al.

There’s a few other questions I like, which I’ll add to this post shortly.

Using ValidationGroups in Dynamic Data Prior to .NET 4.0

Posted in .NET, ASP.NET, ASP.NET Dynamic Data, C#, ValidationGroup on December 3rd, 2009 by msposato – Be the first to comment

In ASP.NET webform pages, validation groups create sets of controls that are validated separately from other controls. For example, on the same page, one set of controls could be validated when inserting a new product, while a separate group of controls are validated when searching for a product. More information is available here.

The current (.NET Framework 3.5 SP1) Dynamic Data controls do not have the ValidationGroup property. This is problematic when there are different sets of DynamicValidator and ValidationSummary controls on the same page. For example, controls for managing products and product subcategories might be on the same page and each set of controls would have validation (required fields, date format, etc.). But without the ValidationGroup property, validation errors in one set of controls would show error messages in both ValidationSummary controls.

Starting with the .NET 4.0 Framework, ValidationGroup will be a property of the Dynamic Data controls. However it is possible to use validation groups without the entire 4.0 framework. Here’s how.

First, download and unzip ASP.NET Dynamic Data Preview 4.

Second, from a Dynamic Data web application remove the existing references to System.ComponentModel.DataAnnotations.dll and System.Web.DynamicData.dll. Then add references to the following assemblies, which are in the  DynamicDataPreview4\DynamicDataVNextSamples\CommonFiles directory.

  • Microsoft.Web.Extensions.dll
  • System.ComponentModel.DataAnnotations.dll
  • System.Web.DynamicData.dll

You’ll have to decide if the risk of using preview assemblies is worth the benefit of extra functionality. Personally, I’ve had no problems with the preview assemblies and would use them until I upgraded to the 4.0 framework.

Third, you will need to update the version number of the System.Web.DynamicData assembly in  the web.config file. The version number must match the one being referenced. In the system.web/compilation/assemblies node, change

<add assembly=”System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″/>

to

<add assembly=”System.Web.DynamicData, Version=99.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″/>

And in the system.web/pages/controls node change

<add tagPrefix=”asp” namespace=”System.Web.DynamicData” assembly=”System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″/>

To

<add tagPrefix=”asp” namespace=”System.Web.DynamicData” assembly=”System.Web.DynamicData, Version=99.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″/>

Last, add the ValidationGroup property to the Dynamic Controls. Attached to this post is an example page with two sets of Dynamic Data controls. One set is for products, the other for product subcategories. The DynamicField, CommandField, ValidationSummary and DynamicValidator controls are in their respective ValidationGroup, which as expected eliminates cross validation.

ListDetails.aspx

Presenting to the Richmond Software Craftsmanship Group – July 30th 2009

Posted in .NET, ASP.NET, ASP.NET Dynamic Data, C#, Miscelleanous, Presentations on July 29th, 2009 by msposato – Be the first to comment

Tomorrow I’m leading a discussion on ASP.NET Dynamic Data to the Richmond Software Craftsmanship Group. Part of this discussion will likely compare and contrast with scaffolding in other frameworks, like Ruby on Rails. Also we’ll discuss and demonstrate some useful applications of scaffolding. I’ve attached my presentation slides and the demo projects.ASP.NET Dynamic Data Presentation

ASP.NET Dynamic Data Presentation – Powerpoint slides

Dynamic Data Website – no customizing

Dynamic Data Website – with customizing

Photo courtesy of Kevin Hazzard

Photo courtesy of Kevin Hazzard