So the public beta for Visual Studio 2010 has been available for a little while, but I’ve been to busy to grab it even though I could have gotten when it was MSDN only. I’m still too busy to spend a lot of time but I wanted grab a couple screen shots and offer one feedback item.
I have Win7 RC 1 running in VMWare Fusion on OSX, and VS2010 didn’t install smoothly for me. I downloaded it from MSDN and used 7-Zip to extract the files with which to install it. Unfortunately I got a missing or corrupt file 3-4 times. It’s possible that something was corrupted during extraction, or it could be caused by the fact I was running the install in win7 on fusion in the background while I did other things on this Mac. Either way, I don’t think it was VS2010.
The improved Start Page is nice, but nothing shockingly new or different during install and initial launch.

I created a Test project with the default name. I prefer to start with unit tests and figured it would be a good, simple way to try a couple things. I tried some tests for List<> and delegates/anonymous methods.

I’m not very familiar with the MSTest way of doing things because I typically use nUnit or MbUnit. To me this view looks different, and it’s odd when you’re used to using TDD.Net for running tests. Not bad, just different. (I recommend all of the tools I just mentioned.)
The default colors and fonts do look a lot better than the previous version; not sure if that’s Win7 or VS2010.
I was taking this next shot to show you my preferred test naming style, and noticed something nice. The line number are on by default. I didn’t notice at first because turning those on is the second thing I do to VS after I install it. (The first being to change the default theme/color/font settings.)

So far it looks nice and runs well in my vmware machine of win7. I didn’t push it that hard so I can’t say just yet but it looks good to me. Should probably build something, target .Net 3.0 and deploy it to the website just to see how it goes.
My one feedback item so far is that the intellisense seems a bit overly aggressive. Maybe its because it’s in a VM but it gives the sense of jumpy, slightly confused itellisense choices while I’m typing. Does anyone else get that?
-j
blog comments powered by
I was at the Scott Gu Conference in Phoenix yesterday, which was a great event as it always is. Many thanks go to Joe Guadagno of SEVDNUG and Scott Cate of AZGROUPS. You know what you’re going to get when Teh Gu talks. He’s a good presenter; natural, funny, open, and accessible. There were two other softies presenting too: Glenn Block and Jaime Rodriguez. Both were great. Glenn did an excellent job, which I poorly covered here. I knew a little about Glenn so it wasn’t a surprise, but Jamie was a surprise. He too did a great job. I don’t know where MS finds these techies who also happen to be good public speakers. Maybe they train them?
I was thinking about the people working for Gu and how different those teams are from the image of the rest of Microsoft. It really seems like the culture is shifting, and Gu has just a great group of people. They are open and accessible, and in many cases helpful beyond my expectation. I think you should always give credit where credit is due, and accordingly I want to point out how this has come about under the leadership of Scott Guthrie.
I know of cases where Tim Heuer, Glenn Block, and Rob Conery were voluntarily helpful out of their own kindness. Several people under Gu are also OSS contributors or founders. I think its a great thing, and it appears they all have fun doing what they do. Just a bunch of smart, good people. Here’s a list of a few of them:
- Scott Guthrie (twitter, blog)
- Scott Hanselman (twitter, blog)
- Phil Haack (twitter, blog)
- Glenn Block (twitter, blog)
- Hamilton Verissimo (twitter, blog, ms blog)
- Rob Conery (twitter, blog)
- Jamie Rodriguez (twitter, blog)
- Brad Wilson (twitter, blog)
- Damien Guard (twitter, blog)
- Scott Galloway (twitter, blog)
- Tim Heuer (twitter, blog)
There are a lot more of course, but just a little credit where a lot is due. Thanks to all.
-j
blog comments powered by
I actually didn’t expect this to compile, but what I did expect didn’t compile. Since I was in the mood to attempt compilation instead of looking it up on MSDN..
1: public static T2 Find<T2, T>(DataConnection connection, List<IWhereCriteria> criteria)
2: where T2 : EntityCollectionBase<T>, new()
3: where T : EntityBase, new()
4: {
5: var collection = new T2();
6: collection.Initialize(criteria);
7:
8: return collection;
9: }
I’m not sure this is really kosher with the cool kids party, so feel free to rip me on it. I’d rather learn now than pay for a mistake later.
At least this test now passes as a result:
1: [Test]
2: public void can_fetch_collection_with_query()
3: {
4: var criteria = new List<IWhereCriteria>();
5: criteria.Add(new EqualToValueClause("applicationID", "CON001"));
6:
7: var results = TradingAccountCollection.Find<TradingAccountCollection, TradingAccount>(Connection, criteria);
8:
9: Expect(results, Is.Not.Null);
10: Expect(results.Count, Is.EqualTo(1));
11: }
-j
blog comments powered by
I have some interesting in MEF for future projects. We are already using Unity for a dash of composite in on project, but there is so much more potential there than just that. It so happens that I’m as a Microsoft Conference today with Scott Guthrie, Jaime Rodriguez, and Glenn Block giving presentations.
I’m gonna live-blog this as he goes, so you may need to update this. Not time-stamping the updates though.
Fragments & points from Glenn’s talk:
- Phoenix is hot
- worked on Prism, Unity, and MEF (currently) [also working on View Model Infrastructure]
- not a comedian, not magician, not rock start.. just a guy who cares about maintainable software
- Extensibility
- Open-Closed Principle – open to be extended but closed to modifications
- Compose – composed, modular apps are a good thing, glossed over this so far..
- Where MEF is being used – Visual Studio Extensibility.. sample from VS2010 (oh why wont you install on win7 in vm fusion!)
- Really interesting demo in vs2010 popping up a regex dialog from intellisense. create new regex or use saved ones. way cool.
- Very cool demo of a came using MEF. Just opened a new dll while it was running to get a while new set of shapes. No reset.
- MEF basics
- Export it
- Import it
- Compose it
- MEF is not type based. huh, i’m curious what he means. “not based on any types, but uses types for convenience” –glenn block
- Parts (components), Catalog (container - library of available parts). sounds like type registration to me. still not sure how it’s not type based.
- Compose it – type catalog, assembly catalog, directory catalog, aggregating catalog. this is starting to sound familiar: find and ways to load modules.
- showing how to create and register a rule. audience sample rule: IncrementByOneRule
- switching from manually registering types to AssemblyCatalog to find the types (rules in his sample) defined in his demo.
- Intersting, for demo which was only taking one rule, switched to [ImportMany] IEnumerable<IRule> {get;set} to accept a collection of rules instead of a single rule.
- But they are getting rid of [Export] in future release so the demo code is nearly obsolete. otherwise very cool
- [distracted by Ayende blog post. sry]
- Power of being declaritive. conventions, export. MEF just cares about contracts.
- lifetime management with MEF container (related, another)
- now showing a catalog form Ruby code. very very interesting. now MEF with XAML? impressive.
- I like how MEF is finding the click action for a button in the demo. not sure what I would do with my usual design as a result.
That is all. Nice intro and overview of MEF.
-j
blog comments powered by
I’m at the Scott Guthrie Event in Phx (Scottsdale actually), and have already see Dave Campbell, Rachel Reese, Scott Cate, Tim Heuer, Joe Guadagno, and some other old friends. ScottGu is talking now so I’m keeping this short. Rachel is trying to take pictures and hopefully you can see some pics on Rachel’s twitter feed. Scott and Joe are taking pics too.
blog comments powered by
This isn’t the usual topic here, but I wanted to point out that today is Memorial Day here in the USA. It is a day we memorialize those who have died in the service of our country. On Veteran’s Day we honor all those who served. My dad served and is still living. There is at least one member of the local .Net user group who also served. Just to let you know.

blog comments powered by
I’ve only seen this mentioned on the forums, so I figured I should post it. Apparently there is a bug with future posts in be.net 1.5.0.7. I tried to update to update to the latest but ran into a problem with .Net runtime. It’s something I can handle when I get time.
In the meantime, be advised; and see help on the forums if you need it.
-j
blog comments powered by
I mostly work with code and application or data design. I’ve been doing this long enough that I can often see what would fit based on the needs and feature requirements. At times when I’m not sure or want to check my assumptions, I whip out some unit tests and see how it goes. Test Driven Design helps drive application and data design things nicely.
So what if you are starting completely from scratch? I tend to collect the requirements and identify the features. Then translate that into models, data, patterns, tests, and code. I had a recent discussion with someone who is more of a UI designer, and made the viewpoint that it’s upside down. That’s his viewpoint, and that’s fine.
So where do you start? Do you look at what user experience you want to provide or do you dig into the guts and think about the interface later?
Application design or architecture is important, but ignoring user experience is a mistake. You could build the perfect code base, but have it all go to waste if no one is willing to use it. Apple knows this, and excels at building attractive hardware. That’s a large part of their recent success.
As a reminder to myself and recommendation to others, don’t ignore the UI. Think about your target audience and what they would want. Think about how they would want to use your application. I find a lot of UI flaws when I have to repeatedly use a particular feature in an application. If I run through something often enough and it starts to annoy me, then there is probably something about the UI that could be improved. Or I’m being extra picky; there’s always plenty of those users. Which reminds me: You can’t please everybody so just aim for the majority.
I don’t know that it helps with user experience design, but testing your UI is also important. Here’s a few libraries for unit testing ui:
- watr for Internet Explorer (how I was introduced to Ruby)
- watin is a .Net library inspired by watr
- NunitForms for testing WinForms
- silverlightut for testing silverlight
- white for multiple ui technologies
Other essentials
-j
blog comments powered by
Win7 can boot directly to a VHD aka Virtual Hard Drive. ScottHa explains it here. Basically, your virtual machine becomes a dual boot OS if you want. I like the option and will begin to campaign for the same thing with OSX and/or Fusion.
Fusion can boot a Bootcamp partition as a vm, but that’s not the same thing.
-j
blog comments powered by
Outline:
- Introduction
- Inheritance
- Polymorphism
- Abstraction
- Encapsulation
Introduction
In the last post in this series, I talked about Object Oriented Programming in less technical terms. We’re going to jump into the deep end here though. You see, I’ve already explained this stuff. Now I’m just telling you the technical terms for it. Hopefully even if you are not already a programmer, you will understand this stuff after.
Inheritance
Ok, the first one is a curve ball. I haven’t clearly talked about inheritance (technical term, not financial). It’s not hard though. Going back to the Hammer example we’ve been using, let’s say you want to make another hammer that does everything exactly the same but doesn’t smah your fingers if you miss the nail. You can do that, and you don’t have to build a whole new hammer. Just use the same one as before, but add a smarter new case around it. Like this in c#:
1:
2: public class SmartHammer : Hammer
3: {
4: public override void OwwThatReallyHurts()
5: {
6: }
7: }
8:
9: //from our old hammer...
10: public virtual class Hammer : IHammer
11: {
12: public string Color = "red";
13: public virtual void Swing()
14: {
15: }
16: public virtual void Nail()
17: {
18: }
19: public virtual void Break()
20: {
21: }
22: public virtual void OwwThatReallyHurts()
23: {
24: }
25: }
Some of you may notice the extra word in the old hammer code: virtual. That’s just a C# keyword that tells the computer that the new hammer can do something different.
So we have our new hammer, and we can make it better by changing OwwThatReallyHurts(). Like this:
1: public override void OwwThatReallyHurts()
2: {
3: DontHitMyFingers();
4: }
That’s hit.. I mean, it. (Yes I really did type “hit” at first, and decided to roll with it.) You made a better hammer with minimal work, and it does all the same things as the old hammer with the exception of that one change.
Polymorphism
So by some magical coincidence, that altered method, OwwThatReallyHurts, happens to be an example of Polymorphism. Polymorphism is the the ability to override a default and make it do something else. That is exactly what we just did. We took the Hammer class and all it already did, but changed one method by overriding it. This is what “virtual” and “override” are for in the above samples. Virtual tells the code that, yes, you can change me. Override tells the code that, yes, I am going to change this code.
Abstraction
An abstraction is basically hiding details so you don’t have to think about too many things too deeply all at the same time. The fact that I’m using sample code which doesn’t define every single piece of code is an abstraction. Specifically, DontHitMyFingers() is an abstract placeholder for some undefined code. It doesn’t really matter what it does, as long is it does it correctly. I could have used sample code like this:
1: public override void OwwThatReallyHurts()
2: {
3: if(hammer.location - fingers.location < 100)
4: hammer.move(-10, "feet");
5: }
It really just doesn’t matter though, not in order to understand what polymorphism is or the other points made here. For this point it does matter. It is exactly the point, and so is the fact the Hammer has the code for Swing() but SmartHammer doesn’t. SmartHammer doesn’t need or want to have that code, it’s only purpose is to not hit your fingers while doing everything else the same. So the code which performs Swing() is abstracted out of the code for SmartHammer; even though SmartHammer can still perform a Swing() action.
Encapsulation
Encapsulation (define) means to enclose in a capsule or small container. Honestly, it’s easy to confuse it with abstraction. Abstraction is the representation of features while encapsulation is hiding those things which aren’t essential. When you use a hammer, you don’t need to know the physics of how it works in order to use it. That’s encapsulation. You do need to know how use it to swing it. Knowing about the Swing() action without needing to know how it works is abstraction.
1: public interface IHammer
2: {
3: void Swing();
4: void Nail();
5: void Break();
6: void OwwThatReallyHurts();
7: }
8:
9: public class Hammer : IHammer
10: {
11: public string Color = "red";
12: public void Swing()
13: {
14: }
15: public void Nail()
16: {
17: }
18: public void Break()
19: {
20: }
21: public void OwwThatReallyHurts()
22: {
23: }
24: }
25:
26: void Main()
27: {
28: //IHammer is the encapsulation. we can still swing it but not know that the color is Red
29: IHammer hammer = new Hammer();
30: hammer.Swing();
31: }
Look again at our Interface and a sample Hammer class (above). If we look at and instance of the Hammer class, we know its red. However, IHammer hides that detail because you don’t need to know it just to swing it.
Conclusion
Hopefully you can see this stuff just isn’t hard. I hope my explanation has helped you to understand if you didn’t already. There is so much more depth to this and the other areas I’ve covered, but would be overwhelming to both the reader and myself to try to cover all at once. I hope you’ll continue to read my posts and other blogs. If you have any interested, then I encourage you to read a book or take a class. For those already programming or technical, I will be covering topics directed at you soon.
Links:
-j
blog comments powered by