What happened to my () at the end of my initialization?

In VB.NET 2003, when you create an instance of a class and there are no parameters to pass to the constructor, the parentheses will not show.  You can type them, but the editor will remove them.  They didn’t disappear in VB.NET 2002.

myNewObject = New Foo()
will turn into
myNewObject = New Foo

No matter what you do, those parentheses will not remain.  Why?  I asked one of the program managers on the VB.NET team.  He said that having empty parentheses was too confusing for people.  In VB you can use empty parentheses for declaring arrays.  People would end up accidentally declaring an array of something rather than creating an instance of something.

I don’t buy it.  I think they should have left the parentheses on there.

Keeping web projects organized…

I’m working with the Boise .NET Developer User Group.  We’re doing an MCAD certification study group, using the MS Press study guides as our primary reference material.

I looked at the ton of labs we’re going to be working during our study group.

Then I thought about how cluttered my inetpub\wwwroot directory will become if I let VS.NET create the virtual directory for each lab assignment.

To help keep things in one place, I’ll use this approach:
* I’ve created a folder called “C:\BlizVsNet11\NetDug\McadWeb”
* Inside this folder I’ll create folders for each chapter, such as “C:\BlizVsNet11\NetDug\McadWeb\CH02Labs”
* I’ll use Internet Services Manager (the IIS management console) to turn the chapter lab folder into a virtual directory.  (Most of the time I’ll take the shortcut route here and right-click on the folder in Windows Explorer, Properties -> Web Sharing -> Share this folder.   One note: this route uses integrated security and does not allow anonymous access, which means I have to remember to use ISM for web services.)
In VS.NET, I’ll do the following
* First I’ll create an empty solution for the lab (File -> New -> Blank solution…).
* In the Name text box I type ch02labs
* In the Location text box I type “C:\BlizVsNet11\netdug\mcadweb”
* Once the solution has been created I add a web application project to it.  (Right click on solution name in the solution explorer, Add -> New project…)
* In the Location text box, I type http://localhost/ch02labs for the location.

By taking these steps everything (including the solution (.sln) file) is in one folder.  It takes just a bit longer at the start, but it helps me stay organized.

Thoughts?

Who wrote that?

Last night I was writing some demos that do distributed transactions across databases.  It started getting late (or early, depending on your point of view), but I was making good progress and didn’t want to stop.

I took a break after reaching a roadblock.  I fired off a quick e-mail to myself letting me know I was not satisfied with not finishing by then.

I returned to the task at hand and quickly got it working.  (Funny how distracting your brain for a few minutes helps you reach clarity.)  I went to bed.

Woke up this morning and took a look at the code.  Wow.  Who wrote that?  Couldn’t have been me.  There’s stuff in there that I’ve never seen before.  Honest.  (Ever happen to you?  “The programmer’s morning after.”)

OK.  So this morning I’m refactoring the code so it looks more presentable in a demo.  I still don’t know who wrote some of the original last night.

Notice I’m blogging now?  Yes, I’m trying to reach a bit of clarity.  (Some people might say “procrastinating.”).  But this time, instead of an e-mail to myself I’m doing something a bit more public.  Have to keep it clean.  (I suppose I could use Rory’s bad word substitution scheme (RBWSS)) 😉

Back to it.

Do that newsgroup thing

Newsgroups are such a wonderful resource.  People can post questions and get quality answers.  I use Outlook Express and lurk in the “microsoft.public.dotnet.*” groups.  What’s really cool is that there are people who are experts in their field(s) who provide top notch answers.  And you’ll probably see postings from people with [MVP] after their names…

What’s a Microsoft MVP?  The Microsoft MVP Program is a worldwide award and recognition program that strives to identify amazing individuals in technical communities around the globe who share a passion for technology and the spirit of community. Microsoft MVPs are recognized for both their demonstrated practical expertise and willingness to share their experience with peers in Microsoft technical communities.

Next time you have a .NET question, take a look at one of the newsgroups.  The question has probably already been asked and answered before.

That felt good…

Wow, that rant felt good.

Turns out, all I needed to do was UNPLUG the cable modem from the wall (I went ahead and disconnected the ethernet cable, and the coax just to be sure) for 30 seconds.  Did the same for my laptop and my wireless router.  Just hitting the on/off switch on the cable modem wasn’t enough to reset it.  Why the Comcast rep didn’t mention that fact is beyond me.  (I guess that’s part of the fun of being a tech support person…. and we’ve all probably heard tons of funny stories about stupid things users do in response to things tech support people tell them to do.  (although I’m not calling myself stupid here))

I think I’ll still play some XBOX with Zach for a little while after I get back from taking Pam on a hot date at the IHOP.  (nothing in the world like breakfast for dinner)

Held hostage and it’s not fun!

Well, my VPN capability is being held hostage.

Comcast is my cabel modem ISP.  (Right now, if I could switch I would.)  I’ve recycled my cable modem & PC about a half dozen times.  That didn’t help, so I called Comcast tech support.

Because of the #!@ blaster worm, according to Comcast, the Department of Homeland Security has issued an advisory that all “RPC ports” and ports 135, 139, and 445 be shut down.  The Comcast helpdesk person and her supervisor said there is no ETA on when the ports will be opened again….

This really stinks.  Big time.  Makes it hard to work from home without VPN access.

If I could get hold of the author of the blaster worm I’d pluck every hair from his (or her) body, one at a time using a pair of tweezers..  Or maybe I’d use an Epilady.  I’ve heard those can be very painful.  (Never tried one myself.  (Honest))

I think I’ll go play some more XBOX.

(at least I can blog and read others’ blogs)

Down time…

Last week was pretty hectic.  Two of the accounts I work with were on campus last week so I traveled to Redmond to be with them Monday – Thursday.  While I was in town I went to the NetDA user group meeting on Monday evening, the NetBAT group meeting on Tuesday evening, and an informal gathering of bloggers at Crossroads on Wednesday evening.

On Thursday evening, rather than sitting in the I-5 southbound traffic jam for a few frustrating hours, trying like everyone else in the world (or so it usually seems) to drive home (Vancouver, WA), my daughter and I found a good place to take a break from the traffic — we went to see the Seattle Mariners play Toronto.  The M’s lost the game, but it was great to be in Safeco Field again.  We left in the top of the 7th inning and wound up in Vancouver around midnight (with no traffic worries).

As a result of all the daytime & nighttime activities last week, I didn’t crack my newly received “Applied XML Programming” book.  Technology had to wait.  Instead I spent several hours planted in front of my TV, playing XBOX with my son (rented Midnight Club II).

But here we are on Monday morning and I’m ready to get back to the technical world.

Let’s go!

Got MSIL?

I went to an informal gathering of bloggers last night at the Crossroads.  Met a number of cool people.  Caught up with Joshua Allen, an old friend from my consulting days at Microsoft.

I only had a side view of one person, and from what I could read, his shirt had the letters “OT  IL”.  I thought it was a geek takeoff of the “Got Milk?” ad campaign, this one for cool people who use .NET and compile to MSIL (Microsoft Intermediate Language).

When the “OT  IL” fellow stood up a bit later, I could read the entire message.  It was a statement, not a question: “NOT EVIL”.

Heh.  I think “GOT MSIL?” is much cooler.

Blogging software

I went looking around for blogging software written in a .NET language and saw DasBlog 1.0.  It’s available in a GDN workspace.  Pretty cool.  Written in C#.  Just saw that they’ve posted a 1.1 release.  I’ll have to take a look.  (I had made of list of changes I would have to make to 1.0 before I used it for my upcoming separate web site.  Perhaps 1.1 has already fixed some of these.)

Another blog application that’s just been released is .Text, available from a GDN workspace.  Also written in C#.  It’s the engine that drives weblogs.asp.net, and I’m familiar with the UI and many of the features.  I downloaded both the binary and source distributions.  (It only took a couple of minutes to get the binary installation up and running on my laptop.  Very nice!!!)

MCSD for .NET … was it hard?

A couple of people asked me if it was difficult.  Well, yes and no.

First, the ‘No’:  I’ve been working with .NET full-time for a year and a half.  I worked on several .NET projects while I was in Microsoft Consulting Services.  Fortunately the projects spanned WinForms, ASP.NET, Web Services and .NET Remoting.  So I ended up with a lot of hands on experience, which was invaluable to passing the test.  As a result I didn’t study for any of the 3 MCAD exams I took.  (But believe me, I did my share of studying, puzzling through things, etc. while I was working on those projects!  I just didn’t use any of the study guides or review any of the ‘topics to be tested’ for the exams.  (From that standpoint, I appreciated the exams: they tested things I had used in real life (or could figure out based on the wording of the question and answers 🙂 )))  (I need parenthesis nesting highlighting in my blog editor.  I don’t know how Rory keeps his parenthesis matched up so well…  (But that’s a topic for another blog entry.))

Second, the ‘Yes’:  The exams can’t be taken lightly.  There’s a lot to .NET, and a lot of things that can be tested on.  Since I just took the 70-300 exam for the second time, I’ll talk about it for a moment…  It exam seemed to have a number of loaded (some people may say ‘trick’) questions.  That was the only exam I had to retake.  The first time I didn’t study and I thought I had done quite well on it.  Bzzzzt!  Wrong!  This time I glanced at one of the Exam Cram books for about 15 minutes, just to check on a couple of topics I thought I might have missed the first time around.  This time through (today) seemed much easier than the first.  There didn’t seem to be as many trick — uh — loaded questions.  There were still some that required rereading about 10 times, though.

Should you do it?  Yes!  Go for it.  .NET is fun.  Get a book, or get some hands on experience, or take a class, lurk in the newsgroups, and take an MCP exam for MCAD.  You’ll be glad you did.