.NET Quiz Question #1

What happens when I compile and/or execute the follow code (in VB.NET, but it’s the same for C#):

Private Function DoSomething() As Boolean
Try
Return True
Catch ex As Exception
Finally
MessageBox.Show(“Here I am!”)
End Try
End Function

Here are your three answer choices just to make it easier:

1) The function simply doesn’t compile (if you pick this, then say why it won’t)
2) The function returns the value “true” (if you pick this one, say why does the message box not show)
3) The function shows the message box (if you pick this, then say what is the value returned from the function)

Quite interesting isn’t it? 🙂 (BTW, I took this from Glen Gordon’s blog…BUT don’t read the answer or try it until you’ve guessed.)

Mac Mini and more

Have you seen the new Mac Mini that was just released a week or two ago? It’s a tiny little box that has a whole Apple computer in there. Now, I love my Windows machines (especially my TabletPC) and I would never think of switching to a mac, but I am seriously considering getting one of those things just to play around with it. I know it comes with the iLife ’05 package which is pretty cool looking. It looks like this little box would be excellent for those people that would like to make movies and/or music (I hear GarageBand is excellent)…you would need a SuperDrive upgrade (that’s the Apple term for DVD burner) which means the system is $499 (base) + $100 (SuperDrive), but that’s still not a bad deal.

I also ran into an article this week by Robert Cringley about why he thinks Apple released a little unit like this out of the blue…and it actually sounds like he is on to somethiing…

I wonder if Microsoft will ever get into this market (kinda did with Xbox in a way) beyond the Media Center PC. If Cringley is right, then is might actually make sense for MS to built their own Media Center Mini PC as it would be awesome and it would make a lot of sense to have a low cost PC (in the $600 range) that was a complete media center. The current generation of machines are nice, and I really like the Media center interface and all, but the machines just aren’t something you want to sit next to your entertainment center (or I should say, I wouldn’t want to put it there).

ASP.NET Security

I just ran into this post on blogs.msdn.com talking about what a hacker could do to an ASP.NET hosting provider by simply running webpages… I guess I really hadn’t thought about it that much, but it does make sense since anything you can do in .NET can be done in ASP.NET including disk access (like reformatting the system), messing with the system services, etc. Obviously there are user level permissions and things to help protect the system and there are various trust levels you can use to turn down ASP.NET permissions in general, but still something interesting to think about.