May 14, 2008

First Moonlight Release

From Miguel de Icaza:

Today we are making the first public release of Moonlight, supporting the Silverlight 1.0 profile for Linux. The release comes in two forms:

  • No-media codecs supported, but easy to install: head to http://www.go-mono.com/moonlight and click on the cute installer for Moonlight. This currently hosts builds for Linux x86 and x86-64 for Firefox.
  • Source-code compilation, but you can optionally compile FFMpeg codecs yourself. To do this, download our moon-0.6.tar.bz2. And follow the build instructions.

Definitely a major milestone. I remember when we announced this at ReMIX Boston last year. Very exciting to see the progress being made here.

First Moonlight Release - Miguel de Icaza

Caparea.net SharePoint SIG Tonight

From my friend Scott Lock:

Overwhelming interest in all things SharePoint has led the leaders of Northern Virginia's .NET User Group to launch a spin-off of the group to meet users' requests. The SharePoint Special Interest Group (SSIG) is focused on delivering the content the users want. While the SharePoint platform is extensive, we plan to deliver speakers able to address a wide variety of topics, including development, information architecture, user experience, governance and infrastructure. All these components come together to create the best SharePoint experience.

We are pleased to announce the launch of the SharePoint Special Interest Group. This group will be meeting on the second Wednesday of every month at the AT&T location. The same place where Caparea.net meets. This is very exciting not only because SharePoint is cool and is big enough to have it's own group, but two of our own members have stepped up to build this new Caparea.net community. David Berry and Gregory Stringfellow have taken the helm as co-captains and founders of this new group. As a member of the Caparea.net family, the SharePoint Special Interest Group will be supported by Caparea.net.

What a better way to kick off the group than with our area's own SharePoint MVP, Sahil Malik! So come on out and see what the buzz is about!

See you there!

Scott Lock

President

Capital Area .Net Users Group

The inaugural meeting is tonight at 7pm at the AT&T building in Tyson's Corner (same place that the regular Caparea.net meetings are held). More details here.

Collection initializer expressions, redux

WARNING: This is a speculative post. Caveat emptor.

When we last left collection initializers, we were discussing default types for collection initializers. Since then we've thought further about the feature and are considering changing the design. The problem is that as nice as type inference is, as we started to dig into what that practically meant it started to become more and more difficult to figure out what a particular collection initializer might mean. Because the meaning of the initializer in the original design depends on the context, it's meaning could change dramatically in different contexts. Of particular difficulty was figuring out just how a collection initializer would participate in generic method type inference (i.e. inferring the type arguments to a generic method)--an important topic given how much generic methods are used in LINQ.

Without going into too much detail, what we're considering is significantly simplifying the design. Instead of inferring the meaning of a collection initializer from context, a standalone collection initializer will always infer an array type. So {1, 2, 3, 4} will always be a single dimensional array of Integer. If you want to initialize a collection type, you use an initializer similar to object member initializers (the initializer that uses "With"). For example:

Dim x = New List(Of Integer)() From { 1, 2, 3, 4 }

The use of the "From" keyword is provisional. It may be the right keyword, it might not, we'll have to think further on that one. However, you get the idea. The downside of the new design is that it's more typing in the situation where you were initializing a collection in a context like argument passing (although in the case of List, you could also say {1, 2, 3, 4}.ToList()) where you weren't going to say the type at all. The upside is that it removes significant ambiguity--when you see "Foo({1, 2, 3, 4})" you know what you're passing and in the case of generic methods, you aren't going to get surprising results. This also makes the feature work more like the way C#'s anonymous arrays and collection initializers work, for those of you who care about that kind of thing.

Comments?

May 13, 2008

Q&A with Program Manager Intern Austin Lin

Ginny As promised, here's my Q&A with Austin Lin, an Information Science major and a Program Manager summer intern with the Mobile team.

Q: Hi Austin! Now that you’ve gone through our PM interview process, tell us your experience (the good, bad and ugly). Were you surprised by the questions asked by the interviewers? What’s one piece of advice you would give students who are about to go through interviews themselves?

A: The PM interview process is a unique experience that tests your design skills, communication skills and problem solving skills.
The good: I really enjoyed doing some of the design questions that tested how familiar you are with the market as well as how creative you are in creating a solution to a problem. I was surprised by the how open-ended the questions were. Ask follow up questions!
The bad: I didn’t leave enough time to visit Seattle after my final round interview. If you can, plan an extra day either before or after your interview so you can sightsee.
The ugly: I thought I botched my first round interview and I was 90% sure I would not make it to the next round. Interviewers know that you are under a lot of stress during interviews so if you mess up don’t worry too much about it. It is more important that you learn from your mistakes and move on.
Advice: The more you can show you want the position and can perform well, the easier it is to get a job.

Q: You didn’t choose to go into the CS program but rather the Information Science program. What is it and why did you choose it?

A: The Information Science program at Cornell is a more holistic way of looking at Internet and technology and how it impacts society. It draws parts from Computer Science, Human Computer Interaction, and Social Sciences. Personally I think it is a great fit for the Program Manager role at Microsoft. The moral of the story is that you don’t need to be a Computer Science major to explore opportunities at Microsoft.

Q: Given program management is about software design, customer empathy and project management, what did you do to prepare for this role? Were there any non-CS classes that were useful?

A: One unique characteristic of the PM role is that there are some skills that cannot be learned within the confines of a classroom. Leadership roles in student organizations or in project-based classes can hone your project management skills. If your major is not Computer Science and you are interested in software, try to supplement your classes with outside research projects or jobs that give you hands-on experience. Understanding the market and the keeping up with tech trends is also a large part of it. A passion for technology is a definite must.

Q: What was your overall experience with our recruiting process? Were there any areas that you thought helped you prepare for the interview process or anything you'd suggest our readers should ask their recruiters?

A: Microsoft’s recruiting process is definitely both fun and educational. An interview process does give the company to get a better sense of your skills and interests. However, more importantly, it allows you to gauge the type of work you will be doing and what kind of environment you will be in. If you find the interview questions challenging and fun, the position is probably a good fit. If the questions are not challenging or not what you were looking for, shop around for other positions.

To prepare for the PM interview process, brush up on basic computer science skills. Read up a little about user centered design and the software development life cycle. Be comfortable thinking out loud and sketching out ideas on a whiteboard. Keep in touch with your college recruiter and try to set yourself apart at recruiting events. They are there to help you get hired so send them emails and talk to them if they come to your campus.

May 12, 2008

Can I get into software development without a CS degree?

dear jobsblogDear Jobsblog: I am in my third year in a non-CS discipline but am very interested into the software development arena. I’ve been told that it seems my skills set would be more suitable for only IT type positions. What are your suggestions?

-Feeling Pigeonholed


GinnyDear "Feeling Pigeonholed": While most of our college hires for the core SDE/SDET/PM roles tend to have CS or CE/EE degrees, we have also hired students studying Mechanical Engineering, Math, Biomedical Engineering, IT and Applied Physics just to name a few. The trend I see that’s allowing them to be successful is the extracurricular activities that exposed them to problem solving, project management, or algorithms. Some students also had experience with coding from high school and simply refreshed the basics while others gained experience through their internships.

But there’s no need to take my word for it. Check back tomorrow for a Q and A with Austin Lin, an Information Science major who just accepted a PM summer internship with the Mobile team (he happens to be one of our 2008 scholarship winners too). He'll share some tips with readers that may be in the same boat.

- Ginny

May 09, 2008

Defeated by IronRuby in my attempts to write tests for my C# code in ruby

In preparation for my upcoming Code Camp session on IronRuby I've been hacking around on the IronRuby source, as well as on Ruby programs that can run on IronRuby.  One of the core areas of interest for me concerning IronRuby is in writing specifications for my .NET applications using Ruby.  While I've been learning Ruby (the real kind) I've become very fond of the testing libraries they have available, most notably RSpec and mocha

Over the last two nights I've been writing some ruby code to test .NET classes written in C#.  With a few of the hacks I have locally, I've had some pretty good success.  The following set of specifications verify the behavior of an Account class I've written.

require "../../trunk/tests/ironruby/Util/simple_test.rb"
require "IronRubySamples"
include IronRubySamples

describe "Account" do
    describe "When depositing money into my account" do
        it "should increase my balance by the amount deposited" do
            account = Account.new(10)
            account.Deposit(10)
            account.Balance.should == 20
        end
    end
                               
    describe "When withdrawing money from my account" do
        it "should decrease my balance by the amount withdrawn" do
            account = Account.new(100)
            account.Withdraw(50)
            account.Balance.should == 50
        end
    end
                   
    describe "When withdrawing money from an account with insufficient funds" do
        it "should tell me I have insufficient funds" do
            account = Account.new(30)
            should_raise(InsufficentFundsException) { account.Withdraw(50) }
        end
    end
   
    describe "When making a withdraw that drops my balance below the minimum" do
        it "should reduce my account by the amount withdrawn + the low funds charge amount" do
            account = Account.new(55)
            account.Withdraw(50)
            account.Balance.should == 4
        end
    end
end

The next step in my quest to test .NET code with IronRuby required me to figure out how to mock out dependent objects.  I considered several different options.  My first thought was to try and use "simple mock", however, I quickly realized via Scott Bellware that while it worked well on IronRuby libraries it wouldn't fit my needs.  My next thought was to give Moq a try.  After downloading Moq, I attempted to run a spec that referenced Moq and created a Mock<T> instance as shown below:

require "../../trunk/tests/ironruby/Util/simple_test.rb"
require "IronRubySamples"
require "Moq"
include Moq
include IronRubySamples

describe "LoginController" do
    describe "When a user logs in" do
        it "should vallidate credentials with login service" do
            mock = Mock.of(ILoginService).new
            #do expects
           
            controller = LoginController.new(mock.Object)
            controller.Login("steve", "****")
        end
    end
end

When running this via ir.exe I got an error that "Moq.Mock is not a generic type".  After poking around a bit I discovered this was due to a bug in IronRuby.  Currently IronRuby has problems when there is a generic and non generic type of the same name within a referenced assembly.  In order to work around this, I first tried to figure out what needed to be modified in IronRuby, however, that wasn't very fruitful so I decided to modify the source for Moq to get around my problem.  After renaming the static Mock class in Moq to MockRetriever, and hacking around another bug in IronRuby related to creating generic types where the type argument is an interface, I was finally able to get IronRuby to create the Mock<ILoginService> type:

mock = Mock.of(ILoginService).new

Unfortunately, this led to me to another roadblock.  When setting up expectations in Moq you do so with lambda expressions such as:

// C#
var mock = new Mock<ILoginService>();
mock.Expect(s => s.Login("steve", "****"));

While IronRuby has blocks and lambda's it doesn't have a way to express the above (at least that I know).  I'm going to dig around in the IronRuby source a bit to see if any ideas pop into my head, but at this point I'm not very hopeful. 

May 08, 2008

Reserved words: what are they good for? (Absolutely nothing?)

Random musing for the day: I was thinking about reserved words in programming languages and whether they're really necessary at a lexical level. As you know, most programming languages define in their lexical grammar a set of words that cannot be used anywhere in the language except when explicitly specified in the grammar. For example, VB reserves the word "Object". So you can't just say:

    ' Error: Keyword is not valid as an identifier.
    Sub Object()
    End Sub

Many languages (such as VB) allow you to work around this by providing some sort of lexical escape that suppresses the reserved nature of the word. So you can say in VB:

    Sub [Object]()
    End Sub

Confusingly, many keywords that we've been adding to VB lately haven't been reserved words, to reduce the need to modify people's code when they upgrade. Instead, they've been contextual keywords, that is to say they're only reserved in certain syntatic contexts. For example, From is not a reserved word in VB in the lexical grammar, but if you start an expression with From and then follow it with an identifier, we say "Oh, yes, you're starting a query..." For example:

    Dim From As Integer = 10
    ' OK: Unambiguously the local variable
    Dim x = From + 10
    ' OK: Unambiguously a query
    Dim y = From a In New Integer() {1, 2, 3, 4}

Which leads me to wonder: why bother with lexically reserved words at all? Why not just make all of your keywords contextual? When I started on VB, I guess I just accepted the practice since that's what the language did before I showed up, but now I'm not so sure. Maybe there's some blindingly obvious reason that I'm not seeing (probably there is). I can think of some historical reasons why keywords weren't all contextual:

  1. Maybe it simplified writing a parser in "the old days," or it simplified building a parser generator.
  2. Maybe it was because people were writing code in editors that didn't have syntax coloring. "int int = 5; int = (int)int * (int)int / (int)int" looks pretty nonsensical if you don't have nice coloring to tell you which are the keywords and which aren't.
  3. Maybe there were grammatical problems with doing it? The previous example makes me wonder about whether C could handle it; I'm not an expert on how the C grammar handles the cast operator.

Anyway, it's not extremely relevant at the moment--we're not going to just start unreserving all the keywords in VB--but just something interesting to think about...

May 05, 2008

dotTrace 3.1 is Released!

JetBrains announces dotTrace 3.1 - the new minor release of the simple and super-fast profiling tool for .NET developers!
 
We keep working on a major upgrade that will represent a big step in terms of functionality and scalability, but as an intermediate release, we’d like to introduce dotTrace 3.1. The highlights of this new version include:
 

  • Support for Visual Studio 2008 and .NET Framework 3.x. You can now launch dotTrace from Visual Studio 2008 and profile solutions running under latest versions of .NET Framework.
  • Support for Windows Vista and Windows Server 2008.
  • Support for web-based JetBrains License Server, a utility that serves as a central source of license tickets and distributes them between workstations seamlessly.
  • A new floating license that any member of your development team can use.
  • Stability and performance improvements.

 
As usual, you can download a 10-day evaluation copy. Current dotTrace 3.0 customers can upgrade for free.
 
For more details on changes in dotTrace 3.1 as compared to 3.0, see Release Notes.

Technorati tags: , ,

Collection initializer expressions

WARNING: This is a speculative post. Caveat emptor.

Well, I appear to be on a rhythm of about once a month posts, which seems OK for the moment. Moving on to another "future" topic, one of the most annoying things that we cut (at least, from my perspective) from VB 2008 was collection initializers. Collection initializers were a little different than the corresponding C# feature, because our plan was to introduce stand-alone initializers that didn't have any intrinsic type. Instead the initializers "snap to" a particular type when they're converted to it, just like lambdas and AddressOf expressions. For example:

' This works since VB 7.0!
Dim a() As Integer = {1, 2, 3, 4}
' This now creates a list.
Dim b() As List(Of Integer) = {1, 2, 3, 4}
' This assigns a new list to b.
b = {5, 6, 7, 8}

' If M takes Integer(), that's what it'll get. If it takes List(Of Integer), that's what it'll get.
M({1, 2, 3, 4, 5})

This is kind of nice, in that you can initialize collection types and arrays without having to state a type at all. We do the same trick C# does about looking for an Add method on a object that implements IEnumerable, so you can also use this syntax to initialize dictionaries:

Dim d As Dictionary(Of Integer, String) = {{1, "One"}, {2, "Two"}, {3, "Three"}}

All this is pretty straightforward, but there is some discussion about what type you should get if there is an absence of a target type. For example, assuming that local type inference is on, what should the following be typed as?

Dim x = {1, 2, 3, 4}

Our initial thought was that we should just infer the dominant type of the initializer and then create an array of that type. So the above example would type x as Integer(). And then the following:

Dim y = {{1, 2}, {3, 4}, {5, 6}}

Would infer a type of Integer(,), a two-dimensional array of Integer. With more nesting, you'd get more dimensional arrays. However, as we talked about it more, it seemed like maybe it might be more useful to infer List(Of T) for the 1-dimensional initalizer, Dictionary(Of K, V) for the 2-dimensional initializer, and nothing for more dimensions. So the type of x would instead be List(Of Integer) and the type of y would be Dictionary(Of Integer, Integer).

Both seem reasonable, so I'm curious what people would think. Remember, we will only fill in a type if we're in a context (like type inference) where there's no target type to use. We'll always use a target type if there is one.

May 04, 2008

ReSharper in Detail: Code Completion in ReSharper 4.0

ReSharper extends Visual Studio’s native IntelliSense with a set of three Code Completion features to make it more convenient and adaptable.
 
ReSharper’s Code Completion is a natural candidate for in-detail review. However, a full-fledged description is out of agenda, because Ilya Ryzhenkov’s Code Completion with ReSharper says it all. Or does it?
 
While his post is comprehensive, it was written back when R# 3.0 EAP was far from being complete. That said, a number of corrections and additions are due to be announced as of late R# 4.0 EAP.
 

  • There are still three Completion features, but what was previously known as Basic Completion is now called Symbol Completion, while Type Name Completion was renamed to Import Symbol Completion.
  • In ReSharper 4.0, all three completion features support CamelHumps - for example, you can complete a long type name by entering only its uppercase characters (can you say “DecoderReplacementFallbackBuffer”? forget it - just type DRFB instead)
    To make sure it works, clear the Case-sensitive prefix matching check box in Resharper | Options | Environment | IntelliSense | Completion Behavior. Note that the Use CamelHumps check box in ReSharper | Options | Environment | Editor doesn’t have any impact on how CamelHumps works in completion.
  • Needless to say, Code Completion as of R# 4.0 supports C# 3.0 features, including:
    • Extension methods. Both Smart Completion and Symbol Completion are enabled to suggest extension methods. Import Symbol Completion works after dot for extension methods and inserts required using directives:
    • Object and collection initializers. Smart Completion in initializers displays available properties/fields to initialize:
    • Lambdas. Smart Completion generates lambda-expression syntax as an alternative for anonymous and named methods:
  • Complete Statement. Complete Statement is a feature that inserts necessary syntax elements with a simple shortcut - Ctrl+Shift+Enter. It comes to the rescue in numerous situations, including auto-closing parentheses, adding semicolons, completing if, while and for statements, declaring classes, methods, and structs, and so on:
  • There are also some minor changes and fixes, including completion for boolean fields in XAML files, auto-inserting closing single quotes in XML attributes, and so forth.

 
Additional references

April 30, 2008

JetBrains Development Academy To Serve the Community

You might have already heard about the brand new JetBrains Development Academy. Launched in April 2008, the Academy fosters a community of experts and evangelists to champion best development practices and promote software innovation worldwide.
 
The JetBrains Development Academy serves as a connection point for developers who strive to adopt top methodologies and use JetBrains products to help them achieve that goal. It plans to provide support for Java and .NET user groups, support educational institutions, conduct in-place presentations, publish articles on the Academy’s website, and help users learn about popular and innovative technologies. These benefits will be provided courtesy of the Academy members, who are recognized experts representing various areas of software development.
 
The Academy website also features a Q&A section, where you can ask questions, get answers and gain valuable insight into the technologies, products and best practices relevant in today’s world of software development.

April 28, 2008

.NET Micro Framework Library FusionWare.SPOT

Library of classes and tools useful for development with the Microsoft .NET Micro Framework. This library originally shipped as part of the SDK for the EmbeddedFusion Tahoe Development kit. All of the code was covered by a BSD like license, however since it was only included in the Tahoe kit that fact was lost and most users didn't realize that. So the plan came to place the code up on CodePlex so there as no confusion about what is covered under the BSD license.

This is the new home of the FusionWare.SPOT libraries. We hope that developers will find this code useful in exploring and using the Microsoft .NET Micro Framework. We are excited about the future of the Micro Framework in embedded systems as it brings the development experience of .NET to embedded systems. There is a LOT of interest in the Micro Framework from hobbyists and academics as well as professional embedded developers. We hope these libraries make things easier and even more fun - enjoy!

There are a number of useful classes in the FusionWare.SPOT libraries including:

  1. Support for creating device drivers for devices attached to SPI and I2C buses
  2. Enhancements to simplify creation of custom emulators
  3. Classes for serial streams, MemoryStream and much much more!

Download it today, keep checking for updates and have lots of fun creating the next "gotta have it" gadget with the .NET Micro Framework!

There are new firmware updates available, too.

April 21, 2008

Ad Funded MS Works

There has been some info on the web on a new version of Ad-funded MS Works that would basicall be free to the end user. Works has a stuff like a low end version of Word, address book etc. I have never used it as I have always had access to Office Professional.

Though most people in the US do not seem to like the idea, I think this is something that would be of great value in a country like India. I think something like Office Home funded by ads would be a great sucess in India or other countries where buying a license of Office is very expensive and there is a growing number of home users. For such non-technical users, like my parents, this would make a perfect way to use Office software legally. Most of these set of users currently use illegal copies of Office (most probably provided by their vendor or friends). I have rarely come across this user set using OpenOffice (I mostly find OpenOffice being used by techies rather than end customers) or other free tools. So it would make perfect sense for MS to have a Ad-funded version of home office for these customers. Though MS Works is not Office Home, I think this is a good first step and maybe it would lead to a ad-funded Office suite at sometime in the future.

April 20, 2008

For SharePoint & Groove Users - Collaborative Solution Survey

Collaborative Solution Survey

This survey is in support of a graduate-level special project by students at Central Connecticut State University. The purpose of this project is to create a model which evaluates available collaborative solution(s) for their applicability and fit for common tasks in the software development lifecycle.

Please find below a link to the survey:

http://www.surveymonkey.com/s.aspx?sm=A63ZF8m5ufzdBdZpyUC6Jg_3d_3d

In the survey, you will find questions regarding: the team that participates in specific collaborative tasks, and the solutions used to support that task. A few questions to gather demographic information about you and your organization are also included. Please fill out the survey as accurately as possible. If any particular part of the survey is inapplicable to you, please use the available options to skip ahead.

We truly appreciate your time in completing this survey. It will be a tremendous help to the success of the project. Please respond to the survey by May 1, 2008. If you're interested to know the results of the survey, leave your contact information in the space provided on the last page of the survey.

Please email any questions or concerns pertaining to this survey to:
collaborativesolutionsurvey@officeliveusers.com

Contributing to IronRuby

As I continue on my quest to get more information about IronRuby, I figured it was worth figuring out what needs to happen in order to contribute code back into the project.  The source code for IronRuby is synced with RubyForge every so often, and patches to the source code can be submitted on the RubyForge project here.  Before making any contributions to IronRuby a contributor agreement must be electronically signed.  John Lam's post to the IronRuby mailing list can be found here, and the actual agreement is available at: http://www.ironruby.net/contributor.pdf

The agreement appears to be pretty staight forward, the main point worth attention is that you grant Microsoft all rights to the contribution.
For good and valuable consideration (including without limitation the opportunity to contribute to the Project), receipt and sufficiency of which is hereby acknowledged, Assignor hereby assigns and agrees to assign to Microsoft its entire right, title,
and interest (including all intellectual property rights) in the Contributions.

Microsoft then licenses the contribution back to you to do with it as you wish.
Microsoft grants You a non-exclusive license under the rights assigned to Microsoft in Section 3 to use, reproduce, modify, license or otherwise distribute, and exploit the Contribution as You see fit.

If you're interested in contributing you need to send an email to ssiadmin at microsoft.com requesting to be added as a contributor to the IronRuby project.  I sent an email this morning so I'm not sure what happens next, but I'm assuming the electronic signing of the contributor agreement will be the next step.

April 18, 2008

MFDeploy and MAC Address / DHCP

Today I got a Embedded Master development kit from GHI Electronics. First I tried the examples that are already on the board, wow, working great. To get a network application working I had to change the IP address (or change it to use DHCP). I downloaded MFDeploy (MSDN Library) from the Microsoft Download site. The manual says that you have to enter 00-21-03-80-00-00 and for the last two numbers you have to use the hex value of the serial number of the board. I tried this but MFDeply didn't accept my value until I have noticed that I have to use the colon instead of the dash as separator.

image

For those of you trying to use DHCP enter 0.0.0.0 for all IP addresses, but don't forget to put in your MAC address as DHCP servers need this.

April 11, 2008

Generating object initializers with ReSharper

ReSharper provides both a quick-fix and a context action to transform assignment statements into C# object initializers, and both are called “Use object initializer”.
 
So what’s the difference between them?
 
Suppose that you create an object with three assignment statements:
 

 
Putting the caret over the “new” keyword lets you apply a quick-fix that will put all assigned fields into an object initializer:
 

 
Putting the caret over the object variable or a field name in any of the tree assignment statements lets you apply a context action that will put only this assignment in the object initializer:
 

 
That is, using the context action, you can selectively put field assignments into the object initializer, leaving some of them to be declared explicitly.

Feedback received

Thanks for sharing your thoughts and demands in the previous post. Your input will hopefully push us to pay more attention to screencasting in the near future.
 
Meanwhile, in case that you’ve missed it, take a look at our existing collection of demos.

April 10, 2008

Learning SQL 2008

If you want to learn what is new in SQL 2008, MS learning has a couple of free trainings that could help you.

What's New in Microsoft SQL Server 2008

Note: You need an understanding of either SQL 2000/2005 for this to be useful

April 08, 2008

What should you be learning this year?

I do get asked a lot of questions on what is the best technology to learn. Obviously, depending on what a person currently knows, this question also has options added. So it is usually, .NET or Java, VB or C#, SQL Server or Oracle etc..

And in most cases my answer depends on what I know of the person asking the question. Obviously, a generic answer is mostly useless. But then I do have some advice for you this year if you are a web application developer working on ASP.NET or related technologies.

Learn MOSS 2007.

2007 was a busy year for Microsoft. A new OS in Vista, a new Office platform in Office 2007 and lots of new versions of existing servers (BizTalk R2, SharePoint etc). Obviously the biggest marketing hype was around Vista and Office platforms. But personally, I think the most successful product (not from revenue, but rather the impact on enterprise IT) has been SharePoint or rather as it is currently called MOSS 2007.

I remember a discussion I had with a fellow architect around 6 months back, when I said, SharePoint will move from being a Portal server to a web application platform. Currently I see this happening a lot and in really big enterprises (I work mostly with Banks and Financial institutions and they are perhaps one of the biggest spender on IT). More and more enterprises are looking at SharePoint as a web application platform and making Enterprise IT decisions based on that.

So going forward, if you are a web application developer, you will have to also know MOSS, both from a configuration and developer perspective to work with really big enterprises that have made a decision to use MOSS as their web application platform.

I also see MOSS being increasingly adopted for its core competency of document management, content management etc. These adoptions are mostly in smaller and mid-sized businesses, where the low entry cost and rich out-of-box features make this the best way to make their doc mgmt and other task more streamlined.

The other thing that has helped MOSS is the integration that MS is doing in some of its other products. Eg. The MS BI stack (Performance Point Server), Visual Studio Team System etc. actually depend a lot on the SharePoint services and MOSS for their UI.

So whether you are looking at being a web application developer in a big enterprise, create doc mgmt applications in mid-sized companies or work on the MS BI stack, knowledge of MOSS is very important.

I don't see ASP.NET going away (obviously, custom development on MOSS uses the ASP.NET model), but will most probably the number of pure ASP.NET applications being developed may go down (in large enterprises). We also see more integration of MOSS concepts like webparts with ASP.NET and I assume more integration will happen going forward. As Personalization, per user customization requirements and Integration of enterprise wide search increase, MOSS becomes a more and more convincing story for enterprises, both medium and large.

April 07, 2008

Feedback wanted

This post serves to gather feedback regarding any particular ReSharper features that you’d like to see reviewed in this blog.
Please have your say!

Updated! This post is not a place to suggest new features/improvements for whatever version of ReSharper. The most efficient way to do it is using JIRA.

Windows 7 - Is Vista's end near?

With all the latest excitement on whether we would get a new version of Windows in a year or so, Supersite for Windows, has a few screenshots of what may end up as Windows 7.

Currently as mentioned in the page, it seems to be Vista with a few things added. It is still in design stage and it will take quite a while before they clear up on what new features will go in and what will go out.

But the problem with a new version coming out in a years time, is more to do with applications. For example, Lotus Notes just added support for Vista and they still do not support 64-bit (Personal Experience :( ). There are quite a lot of applications that need to start supporting stuff like 64-bit and UAC. With a possible new OS in a year or so, how many of these applications would be able to keep up??

April 03, 2008

ReSharper in Detail: Hints - a New Level of Code Inspection in ReSharper 4.0

Until recently (that is, until R# 4.0 nightly builds became available), ReSharper had three levels of code analysis:
 

  • Errors (to highlight uncompilable code)
  • Warnings (to mark code items that don’t prevent your code from compiling but may nevertheless represent serious coding inefficiencies)
  • Suggestions (to draw your attention to things that are not necessarily wrong but useful to know)

 
R# 4.0 introduces a new, considerably less intrusive level of code analysis results - hints.
 
Unlike errors, warnings and suggestions, hints are not taken into account when you navigate to next/previous highlights, not shown in the Marker Bar and therefore do not influence the color of the Status Indicator. A hint simply brings your attention to a particular code detail and recommends a way of improvement. Code items that have associated hints are highlighted with a solid green underline. Move the mouse pointer over a highlighted item to view the corresponding hint in a tooltip:
 

 
Putting the caret at a highlighted item allows you to display the hint in the status bar.
 
As usual, for any code inspection item that is shown as a hint by default, you can modify inspection severity to display it as a suggestion, error or warning. You can do that in one of the two alternative ways:
 

  • using the general list of code inspection items in ReSharper | Options | Code Inspection | Inspection Severity, or
  • using an item-specific Inspection options dialog box (which is new in ReSharper 4.0, by the way) that you can open by Alt+Entering a specific hint and choosing Inspection options for [name of inspection item] in the drop-down list.

 
In practice, hints turned out to be a convenient way for ReSharper to suggest migrating to C# 3.0 features without disturbing your coding sessions too much. That’s a reason why they’re somewhat left out of ReSharper’s traditional “show code highlights and let user navigate between them” routine.

DSG!!

Came across a interesting article titled
_blank">
_blank">
_blank">Do You Have a DSG (Dumb SOA Guy) Issue?
in the SOA World Magazine. This is something that I come up against regularly, in multiple places.

This is always a problem when there is what I call the in-thing technology. SOA is currently one of them and is reaping the hype created mis-information...:(

March 25, 2008

ReSharper 3.1 vs Plain Visual Studio

Personally, I’ve been a fan of comparison tables for ages, and now there’s one that hits the nail on the head!
 
Ladies and gentlemen, please welcome ReSharper 3.1 vs Plain Visual Studio - face to face, feature to feature!

March 23, 2008

My Office Groove presentation (in stereo)

In a prior post I had mentioned that I was to present at the CTAUG group meeting (on March 10th @ Microsoft Farmington CT) - entitled: Microsoft Office Groove (In Stereo). It went very well - I was awaiting CTAUG's response and here it is -


Main Presentation: Microsoft's Peer-to-Peer Office collaboration product, 'Groove'.


Microsoft MVP 'SB' Chatterjee (who is acting Director of the Connecticut .NET Developers Group) was our main speaker. SB has been instrumental in bringing Groove to it's current state of development (sic: not quite true albeit I did do some beta testing over the years). Groove makes it easy for teams to work together, communicating peer-to-peer (primarily) over the Internet, no matter their location, time zone, or work hours. A Groove collaboration can be set up quickly and is highly encrypted, making the product ideal for use whenever such features are valuable, for example in natural disaster situations (think FEMA). Groove's peer-to-peer architecture can be more robust than central-server products such as Lotus Notes and SharePoint.


SB's demo was visually stunning. He had two clients/servers running, each separately connected to the internet (using the WiFi capability now provided by Microsoft at our meetings), and with both their screens visible to the audience through the use of side by side projectors. He demonstrated Groove's ability to create and update documents (sketches, pictures, notepad, etc) on one machine and see the changes appear almost instantly on the other machine. Groove uses peer-to-peer communication to keep one or more clients in the workspace synchronized. SB demoed workspace setup, Forms, the SDK, the central role played by the Windows registry, and coordinated everything with a PowerPoint presentation.
Lot's of questions during the entire session.

 

Create an overloaded delegate quickly

Sometimes it is necessary to create method overloads that just pass default values to other overloads. ReSharper allows you to do this quickly and easily.

Take this simple method for example:

screenshot_01.jpg

We need to take the CreateUser method and add a new parameter to it. However, we also need to keep the old CreateUser method signature around for other code that still uses that version of the method signature. Using ReSharper’s Change Signiture (Control-F6) feature will allow us to create an overloaded method to solve our problem.

screenshot_02.jpg

When the Change Signature dialog opens for this method, we will go ahead and add our new email parameter to this method.

screenshot_03.jpg

In the above screenshot, notice the option “Delegate via overloading method” circled in red. Clicking this box is what will take the signature changes and turn them into a new overloaded method.

When the changes are ready, clicking Next in the Change Signature dialog will now produce the following code.

screenshot_04.jpg

Notice that in the SaveNewUser method, the original method signature remains intact, but it is now delegated through an overloaded method. The CreateUser method now has two overloaded variations, the delegating method and the main method, where we can now add code to handle the new email parameter.

Jeff Pennal
JetBrains .NET Evangelist

March 15, 2008

Custom Templates

ReSharper templates enable you to quickly generate predefined code constructs. Many templates are provided ready to use; you can create new templates, edit existing ones and easily manage them.

Creating and using your own templates is a quick and easy way to help eliminate repetitive code or to automate common tasks. To demonstrate this functionality, I am going to show how to use custom templates to add log entries using the Apache log4net library.

Lets start with a class that looks like this:


    public class SampleClass {
        public void doSomething() {
            try {
                String value;
	
                value = getSomeValueFromDatabase();
                Console.Out.WriteLine(value);
            } catch(Exception e) {
            }
        }
	
        private string getSomeValueFromDatabase() {
            return null;
        }
    }

The first thing we want to do is to create a template that will allow us to add a new logger to a class.

To do this, we’ll open up he ReSharper Template editor, under the Visual Studio.Net menu
ReSharper -> Options…, and then in the options dialog, choose Live Templates.

ReSharper Options Dialog

Next, we’ll create a new template by selecting the User Templates item from the available templates and clicking the Create Template button . This will bring up the Edit Template dialog.

Now we can start to write our template, the first thing we want to do is to give our template an abbreviation. This is the name that we will use to activate this template and make it run, for this example, we’ll call this “logger”.

The next thing we want to do is to give our template a description, for which I will enter Create a new logger instance for a class.

Once these values are filled in, we are ready to write our template. In the Template Text box, we’ll fill in the value:

protected static readonly ILog log = LogManager.GetLogger(typeof($CLASS$));

You’ll notice the declaration $CLASS$. A word surrounded by a $ sign indicates to ReSharper that this is a variable that you want to do something with. In the section below Template Text, called Template Variables, ReSharper has automatically created an entry for $CLASS$ that looks like this:

The power of templates comes when you click the Choose Macro link. The macro that we want is called “Containing Type Name”. When the template is run, this variable $CLASS$ will run that macro. This will take our template text and replace $CLASS$ with the name of the type containing it. In our case, this will be SampleClass.

You’ll notice that there is a check box for this variable for Editable Occurrence. This allows you to have the user edit the value once it has been applied. We don’t want it for this case, so we will uncheck this box.

Now, click Save and you’ll see that you have a new User Defined template. Click Ok in the Options dialog to go back to your code.

Lets see this template in action. Under my class declaration for SampleClass, I will place my caret and hit Control-J, Insert Live Template. In this list that appears I will see my new template logger.

After hitting tab, I now have:

So now, every time I create a new class and I want to create a log field for it, I only have to use my new template to do it automatically.

Let’s do just one more example. For my code, in my try…catch block, I want to write an entry to the log file that looks lik this:
log.Error("[SampleClass::doSomething] An error as occurred", e);
But I want this entire line to be automatically created for me with the values already filled in.

Let’s create a new User Template, following the same procedure as before and create a new template that looks like this:

This template is a lot more complex then our last one and works like this. In our Template Text, $logger$.Error("[$CLASS$::$METHOD$] $MESSAGE$", $EXCEPTION$); we are using five variables.

When the template is run, these five variable will fill in the following information:

$logger$ ReSharper will suggest that this variable will be replaced by a variable in the current class of type log4Net.ILog
$CLASS$ This variable will be replaced by the name of the current class
$METHOD$ This variable will be replaced by the name of the method that this template is executed in
$MESSAGE$ This variable doesnt have a macro, but it is an editable occurrence. This will allow the user to tpe the specific error message in this spot once the template is run.
$EXCEPTION$ This variable will be replaced by a variable of the type System.Exception. Since this template is intended to run inside of a catch block, this will exist.

Finally, when we save and run this template, we see the following:

Step 1: We find our new template “le” and run it

Step 2: Our template is created with our editable area surrounded in red. We type in our message

Step 3: With our message typed in, our template is finished

Now, every time I want to write a log.Error entry, I can use my le template to do this automatically for me, saving me the trouble of writing it out each time.

As you can see, custom templates can be very powerful. If you would like more information on what you can do with custom templates, check out ReSharpers help contents. There is a lot of information available on what you are able to do when creating your own custom templates.

Jeff Pennal
JetBrains .NET Evangelist

December 27, 2007

(Almost) final VB 9.0 language specification posted

I wanted to let people know that an (almost) final VB 9.0 language specification has been posted on the download center. The spec is missing some copy-edits from the documentation folks, but is otherwise complete. Since I'm not going to get a chance to incorporate the copy-edits until I am back from vacation in January, I wanted to get the spec out there for anyone interested in documentation of the XML features that weren't present in the previous version of the spec. (I apologize for the lateness of this vis-a-vis the release of the product itself, it's been a busy fall.)

This updated language specification corresponds to Visual Studio 2008 and covers the following major new features:

  • Friend assemblies (InternalsVisibleTo)
  • Relaxed delegates
  • Local type inferencing
  • Anonymous types
  • Extension methods
  • Nullable types
  • Ternary operator
  • Query expressions
  • Object initializers
  • Expression trees
  • Lambda expressions
  • Generic type inferencing
  • Partial methods
  • XML Members
  • XML Literals
  • XML Namespaces

Questions, comments or criticisms can be sent to basic@microsoft.com. Thanks!

December 12, 2007

Volta released...

Just a little shout out to the latest project by that crazy language pimp, Erik Meijer. (He's the guy you have to thank for much of LINQ and especially for XML literals in VB.) In its own words, Volta is...

[...] a developer toolset that enables you to build multi-tier web applications by applying familiar techniques and patterns. First, design and build your application as a .NET client application, then assign the portions of the application to run on the server and the client tiers late in the development process. The compiler creates cross-browser JavaScript for the client tier, web services for the server tier, and communication, serialization, synchronization, security, and other boilerplate code to tie the tiers together.

Although my focus continues to be on client programming by directly emitting IL for the runtime, I think Volta has some extremely interesting ideas contained within it. I'll be interested to see how this project fares, especially given the success of his previous ideas...

November 20, 2007

Did something important happen today?

Oh, yeah, that's right. We shipped. Hard to believe we've finally reached the finish line...

April 12, 2007

Ask me something in Japanese, please...

For those readers of my blog in Japan (or who can speak Japanese), I'm being features on MSDN Japan's "Ask the Experts!" page this month. There's a short introductory video I shot, plus the opportunity to submit questions (or so I'm told) which I will answer later this month. So, if you've got something to ask, submit it and I'll be happy to answer!

December 19, 2006

VB 2005 SP1 is released...

In case you missed the announcement, VS 2005 SP1 is released. You can get it here. Beta support for Vista coming soon!

November 16, 2006

VB Hotfixes, now easier to get...

I discussed a little while back that we've made a few hotfixes available to address some performance issues people have seen with VB. There's now a program that makes these hotfixes available as a regular download, rather than forcing you to call support. I'd recommend anyone running into performance problems give them a try...

September 15, 2006

A quick update on me.

It’s been over two years since I blogged.  Although I remain happily (perhaps even ecstatically) working at Microsoft, I left the CLR team and the Developer Division about a year ago.  I’m now on an incubation team, exploring evolution and revolution in operating systems.  This is a fascinating area that includes devices, concurrency, scheduling, security, distribution, application model, programming model and even some aspects of user interaction (where I am totally out of my depth).  And, as you might expect with my background, our effort also includes managed programming.

 

Anyway, this blog will remain available indefinitely.  It continues to be useful for certain technical details which are unavailable elsewhere.

 

In the meantime, if any readers are interested in working on a deep systems incubation with me and a team of truly outstanding developers, please send me email (cbrumme).  We are holding to some very high standards for this effort in terms of insight, experience and hard work.  But if you are like me, I am confident you will find it a dream opportunity.

 

April 26, 2004

Updated Finalization and Hosting

My original posts on Finalization and Hosting had some hokey XXXXX markers in place of content, where that content hadn't already been disclosed in some form.  Now that the Visual Studio 2005 Community Preview is available, I've gone back to those two posts and replaced the XXXXX markers with real text.

Also, it's obviously been a while since my last post.  I started writing something this weekend, but the weather here has been spectacular and I was compelled to go outside and play.  I'll try to have something in the next couple of weeks.