Monday, December 10, 2007

Another nice shortcut in .NET 2.0

OK, who can tell me what's wrong with the following VB.NET code?

Public Sub MyMethod(ByVal inputString As String)

Try

' Validate input
If inputString Is Nothing Or inputString.Trim.Length = 0 Then
' However you want to handle the error...
End If

' More functionality here

Catch
' Error-handling code

End Try

End Sub

[Jeopardy theme plays...]

Basically, the line where we check the "nothing-ness" or "blank-ness" of inputString will always error-out if the string actually is nothing. This is because And and Or in VB.NET are not short-circuited. Both sides of the operator always run, and Nothing.Trim.Length will cause an invalid object exception. Technically, it's not worth checking the right side of an And if the left is false nor the right side of an Or if the left is true, but VB.NET does it anyways by default. If one argument in an And statement is false, the whole statement is false. If one argument in an Or statement is true, the whole statement is true (not counting exclusive or). To achieve this level of functionality, an earlier version of VB.NET introduced the AndAlso and OrElse operators. Basically, they will stop evaluating if the outcome can be determined after looking at just the left side of the statement. So, our code above would become:

If inputString Is Nothing OrElse inputString.Trim.Length = 0 Then

Now, with VB.NET 2.0, we have a new operator that achieves the same code as above. So, it can be further reduced to:

If String.IsNullOrEmpty(inputString) Then

Microsoft must have realized that people were having issues because they may have been used to languages where And and Or are short-circuited by default. It's a nice shortcut if you can remember to use it!

Sunday, December 2, 2007

Visual Studio 2005 Debugging Bug

I suppose one might say that the title of this entry is somewhat ironic. Regardless, I'm not bashing Microsoft. Indeed, I am actually very fond of Visual Studio and all the features it provides. The problem I recently encountered, though, was a bit of a nuisance. I've gotten in the habit of running the websites I'm developing with Ctrl-F5 to start without debugging when I'm fairly certain there won't be any issues. Internet Explorer opens a little faster and you can continue to edit in Visual Studio even if the browser window is still open. However, I occasionally encounter a flaw in my code during this debugger-less browsing and decide to start the site with debugging to get more details. Here-in lies the crux of the problem. If you forget to close the original browser window that was started with you were running without debugging, the new session with debugging will actually time-out with an error message that your action failed. Even if you then go back and close the original browser window, all subsequent attempts to run with debugging will fail in the same manner. Performing an IIS reset does not solve the issue. The only thing that seems to work is to close and re-open Visual Studio. At one point last week, I actually had to re-boot to get things working again. So, remember to always close any browser window previously spawned by Visual Studio prior to hitting F5 to launch the site you are developing with debugging enabled.

Monday, November 5, 2007

My Latest Favorite Keyboard Shortcut for Visual Studio 2005

So, the Visual Studio 2005 IDE offers a really nice smart tag feature for renaming your variables, constants, methods, etc. Instead of doing Ctrl-H to find and replace (possibly changing more than you planned), you can simply go to the location where the item is defined and type a new name. When you are done, the smart tag for that item becomes active as indicated by a little, red line that appears under the end of the word. You can move your mouse over the red line and the smart tag will expand and give you the option to rename. Selecting this option renames all uses of the item you are changing as opposed to simply changing everything with the same name like replace does. This is a very nice, time-saving feature, and I just recently figured out how to do it without the mouse. Pressing Ctrl-. also makes the smart tag expand with the rename option already highlighted. Then, you can simple press enter. This makes the process a little easier since you don't have to reach for the mouse. If you want to make a custom shortcut (Tools/Options), the command can be found under "keyboard" and is called "View.ShowSmartTag".

Sunday, October 7, 2007

Las Vegas Activities

I know there are some folks from my company planning to attend a conference in Vegas in the near future. For them, and for any other interested parties, here's my list of tips.
  • Allow for an extra 10 minutes to find your way out of your hotel on the first morning. Since you have to pass through the casino, they don't really make the path to the front doors very obvious.
  • Bring some business casual clothes. I wore shorts and t-shirts most of the time, but you feel oddly under-dressed in that attire.
  • Get up early and walk or jog around the town. It's nice to be able to see many of the sites with very few folks around. Note that most things, i.e., fountains and free shows aren't running in the morning, though,
  • For Food Network fans, several of the TV chefs have excellent restaurants there:
    • Mesa Grill in Caesars Palace - Bobby Flay (excellent food, had lunch there twice)
    • Delmonico in The Venetian - Emeril Lagasse
    • B & B Ristorante in The Venetian - Mario Batali
  • The gelato at The Bellagio is excellent even if it does cost $6.50 per cone.
  • You can buy discount, same day tickets to many of the shows and attractions from a few different places. They open around 11:00 AM and close by 9:00 PM. Your best bet is to run out to one at lunch.
    • Tickets2Nite - Showcase mall near MGM Grand
    • Tix4Tonight - Fashion Show Mall
  • Shark Reef at Mandalay Bay (10:00 AM - 11:00 PM)
  • White Tigers, Dolphins, etc. at The Mirage (11:00 AM - 5:30 PM Monday - Friday and 10:00 AM - 5:30 PM Saturday and Sunday)
  • Lions at MGM Grand (11:00 AM - 10:00 PM) FREE as close as would ever want to get to a lion
  • Fountains at The Bellagio (every 15 Minutes starting in the afternoon and going until late evening) FREE and very cool
  • Amusement park rides at New York New York (10:00 AM - 11:00 PM)
  • Crazy rides on top of the Stratosphere Tower over 900 feet in the air
  • Carnival Midway and brief trapeze act at Circus Circus FREE
  • Dragon battle and Motion Simulators at The Excalibur
  • Las Vegas Mini Grand Prix Go Karts (10:00 AM - 11:00 PM)
  • Imperial Palace Auto Collection (9:30 AM - 11:30 PM)
  • Desert Passage Thunderstorm at Miracle Mile Shops attached to Planet Hollywood Hotel FREE but kind of lame
  • SPEED rollercoaster and Nascar Simulators at The Sahara (10:00 AM - 11:00 PM)
  • Sirens of TI show at Treasure Island FREE and mildly entertaining
  • Erupting volcano at The Mirage (every 15 minutes starting in the afternoon) FREE
  • King Tut's Tomb, IMAX, motion simulators, worlds brightest light beam, etc. at The Luxor
  • Star Trek Experience at The Hilton expensive at $50 or so, but discount tickets are available from the previously noted ticket places (11:00 AM - 8:30 PM)
  • You have to be sure to go inside all the various casinos. In particular, The Bellagio, Luxor, New York New York, Paris, and Venetian are pretty cool to see.
  • You can print off a very good map of The Strip from here.
  • You can still get free drinks even if you're only playing the penny slots. You just need to find a spot that's visible to the waitresses serving the higher rollers.
Here are a few pictures.

The erupting volcano in front of The Mirage Hotel and Casino

Inside part of the Miracle Mile shops attached to The Planet Hollywood Hotel

The free Pirates of TI show in front of The Treasure Island Hotel and Casino

The Paris Hotel and Casino

Planet Hollywood Hotel and Casino

The fountains at The Bellagio - probably the coolest free attraction in Vegas

A sleeping lion at The MGM Grand - I was standing in a glass walkway upon which a pair of very large males were sleeping.

New York New York Hotel and Casino - I've heard that the roller coaster is hard on your neck

The Excalibur Hotel and Casino - Attached to The Luxor, the two seem to offer the most family entertainment if that's what you're looking for. Keep in mind, though, it's definitely not Disney... :)

I apologize if any of this information is inaccurate. I've tried to ensure that the hours and locations are accurate but things may change.

Wednesday, October 3, 2007

SANS Network Security 2007 (Post Conference)

Well, I'm back from Vegas, and I've finally found a few minutes to post. The Securing Critical Web Applications and Web Services class was quite good. Interestingly enough, it wasn't actually a SANS class. Instead, it was taught by Jeff Williams, the founder and CEO of Aspect Security and the current chair of the Open Web Application Security Project (OWASP). Basically, we covered the security vulnerabilities in the OWASP Top Ten list plus some discussion specifically about AJAX and web services. We also used an intentionally very poorly written web application called Web Goat and a proxy tool called Web Scarab for some hands-on experience. Both are available for free on the OWASP site. At the very least, I highly recommend that anybody doing web development should thoroughly read and understand the vulnerabilities noted on the top ten list. It's a little frightening to see what a decent hacker can do and the complexity of the tools readily available to them. For anybody that uses the internet, here's my tip of the year:

Never use tabbed browsing to open any other website at the same time as one that contains any secure information or has the ability to perform transactions that involve anything important like money or your identity. Keep in mind that once you log in to the secure site, the sites in other tabs can access the secure site because they are open in the same browser. For more information on how this is done, check out the OWASP page on cross-site request forgery. To be even safer, use the profiles feature of Firefox to run under a limited profile with scripts disabled when accessing a highly secure site.

Since we often reference OWASP where I work, it was very interesting to meet and converse with the chair of the project. He was excited to hear about somebody actually making use of their work. As he noted, there must be many people doing the same because the traffic on their site is high. However, he seldom gets the opportunity to meet most users. If anybody is interested in the field, he did mention that Aspect Security is hiring, and it seemed like it would be a good company to work for. Certainly, Jeff knows his stuff and would be a good person in the industry with whom to connect.

That's it for tonight. I'll post again soon and share some tips on things to do in Vegas if you're there for a couple days at a conference.

Thursday, September 20, 2007

SANS Network Security 2007 (Pre-Conference)

So, I just booked my limo ride to the airport for Sunday. I'm heading to Las Vegas for the SANS Network Security 2007 conference. Should be pretty fun. I haven't been to Vegas for more than 20 years. At least I can gamble without getting caught by the authorities this time around. Of course, I was only 8 or so last time, so I didn't know any better.

I'll be attending the Securing Critical Web Applications and Web Services class. Although I'm already fairly knowledgeable on the subject matter, it will be nice to get some hands-on experience in a more intensive environment. Since the class is 9-5 Monday through Thursday, I'll have my evenings free. Unfortunately, my company isn't sending anybody else, but I'm planning to keep myself occupied wandering around the strip and taking photos to post here on my blog.

Let me know if there's some place/thing/food I absolutely must see/do/eat and check back next week for more posts.

Thursday, August 30, 2007

ID Consistency Across Data Stores

Just thought I would share an amusing story about ID consistency. More accurately, I suppose, the lack of ID consistency. Without getting too specific, a friend was telling me a story about a process flow he ran into recently. Basically, the system had two places where data was stored. In the first, new items were added with several pieces of data including unique internal and external IDs. Each item would then be copied to a second data store via an automated process. Once in the new system, the item became available to end users so that they might add an additional set of information. Another automated process would see changes the users made in this second system and copy certain pieces of the data back to the corresponding item in the first data store. This was the most important part of the process because the primary goal was that the final data be correct in the first data store. Although a little complicated, this doesn't seem like a bad solution at first glance.

The problem for them started because the first data store used the internal ID as the unique identifier for the items while the second used the external ID. Then, they allowed the users to change the external ID for any item in the first data store. Hopefully you're starting to see where I'm going with this. Imagine an item in the first data store that has been around for a while. It's got all the data that was initially added plus the important data that was copied from the second data store. One day, a user comes and changes the external ID of the item in the first data store. The automated process picks up the change and attempts to copy it to the second data store. However, because the external ID is now different, the item is "new" as far as the second data store is concerned. So, a new row with just the minimal set of data coming from the first data store is created in the second. The automated process that copies changes from the second store to the first runs and finds the "new" item which is lacking any of the important information that users typically add in the second data store (previously added to the item with the original external ID). So, when the data is copied back to the first data store, all the information already there is simply deleted. A little while later, all the users are asking what happened to their records in the first data store.

I hope my story made sense. I found it amusing and thought I would share. Obviously, there are several things one can do to remedy the situation. However, it could have all been easily avoided by simply ensuring that both data stores used the same ID for each item.

Tuesday, June 19, 2007

TechEd 7 (Summary)

Well, it's been a little over a week since I got back from TechEd. I was planning to post a summary of my experience several days ago, but I actually caught something resembling the stomach flu on the flight home. That put me out of commission for 4 days, and I've been scrambling to catch up on things ever since. Anyways...

All things considered, TechEd was great this year. I had never attended a pre-conference session in the past, and I'm glad I did this time around. Jeff Prosise is the best, most consistent technical speaker I've experienced. His pre-conference session on ASP.NET AJAX was excellent, as were the 3 other sessions of his I attended during the week. I have to say that Marcus Murray's presentation on security was probably more entertaining and had the audience laughing, applauding, etc. However, the content wasn't nearly as useful and applicable to most IT folks. Several other presenters were also quite good. Others, not so much, but that's the thing about TechEd. There are always a ton of options for what to do during any given time slot. Worst case, you can leave the session and head down to gather swag and talk with representatives from Microsoft and assorted vendors.

Having the attendee party at Universal Studios Islands of Adventure was definitely better than the standard Universal Studios. I like the roller coasters, but I can't hack the simulator rides any more. If the visuals don't 100% match the motion, I get nauseous. Just getting old, I suppose.

Sounds like the conference will return to Orlando in 2008. Then, I heard talk about it possibly being in Houston or Chicago in 2009. Having it local to me in Chicago would be interesting, but not quite as exciting as flying off to another part of the country. So far, I've been to one large Microsoft conference every other year for the last 4 years (PDC 03, TechEd 05, and TechEd 07). Typically, that's long enough in between each for me to forgot just how exhausted you get at them and how uncomfortable the chairs are. :) So, I'll have to see if I feel like going back to Orlando next June. Alternatively, PDC will hopefully be re-scheduled for 2008, and I can head out to L.A. next October. Something to look forward to.

Alright, that's it for TechEd 2007. Thanks for reading.

Friday, June 8, 2007

TechEd 6.5 (Thursday, 6/7)

I wrote in the last post about the various prizes being given away here at TechEd. Shortly after I submitted the post, a company called Brocade gave away $10,000 to a single winner. I think that was the biggest "cash" prize this year. An ironic thing to note about Brocade is that their website is actually written in Java (.jsp). Kind of amusing since they're here at TechEd advertising their services.

The sessions I attended yesterday covered network hacking, features in Windows Mobile 6, data caching, data mining, and top web blunders. By far, the best session was "Why I Can Hack Your Network in a Day" with Marcus Murray from TrueSec Security.


He was very entertaining and explained how he can hack wireless networks like 128-bit WEP in 5 minutes and even WPA if your key is not strong enough. Plus, he showed how easy it is to build and deploy a Trojan that gives him 100% access to everything on the infected PC (even Remote Desktop) and potentially many other PCs around the company. The most interesting thing, though, was that he showed that you can log in to a windows PC or server using only a password hash without even needing to decrypt it, and he had any number of ways to obtain password hashes. Very interesting stuff. I think the webcast of his presentation should be required viewing for the Microsoft IT folks where I work. And at other places, for that matter. The speaker at the session on data mining sounded like the German Kermit the Frog. It was a little disconcerting at first, but the guy really knew his stuff. Overall, the session was very good. I also took advantage of the massages available in the Seagate Crystal Reports booth. It actually worked out very well because I got in 15 minutes before they closed, and the massages were supposed to be 5 minutes. People stopped showing up, so I got the full 15 minutes. It managed to fix my back for about 30 minutes until I sat in the very uncomfortable seats of the next session.

On to the attendee party at Universal Studios Islands of Adventure. You can see the rain clouds moving in.


Todd and I arrived maybe 30 minutes early, so we were at the front of the line at the gate. When it opened at 7:00, we actually ran to The Hulk coaster just for fun. Oddly enough, the average IT person isn't very fast :). So, we were in the first 20 people on the ride. Then, we ran next door to the Spider Man attraction. How often do you get the chance to ride both The Hulk and Spider Man rides in less than 20 minutes!?

After that, the rain started to come down and all the coasters stopped operating for a while due to lightning warnings.


So, we took the opportunity to grab some free food and drinks. Let's see. I think we had subs, beef kabobs, popcorn, pizza, black beans and rice, potato salad, and various sweets. Neither of us drink, so we didn't take advantage of the free booze, but others most definitely did. The park was covered in beer bottles by the end of the night. Not the healthiest of evenings, but at least we had that little run at the beginning...

What else happened... The old professor from Jurassic park called us sissies for wearing ponchos on the water ride. At least we were dry. I "greyed-out" twice on The Hulk and Dueling Dragons coasters. Not sure what's up with that, but it was an interesting feeling. Finally, I took Todd's picture with a few of the performers around the park. Here are three photos. Can you pick the one that's not like the others?




All in all, the party was fun. You have to put up with thousands of drunk IT folks, but they were mostly harmless. I'll finish up my final thoughts on the Friday sessions and the conference as a whole over the weekend.

Thursday, June 7, 2007

TechEd 6 (Thursday 6/7)

Since we have a longer lunch break, I decided to sit and post something early today.

The rain eventually ended last night around 11:00 PM. Amazingly, it rained steadily (very hard at times) for 8 hours starting at 3:00 PM. That's a lot of rain. I actually headed over to MGM around 9:30 to hit a few rides. My shoes are just now getting to be completely dry. I went on the Twilight Zone Tower of Terror twice, the Aerosmith rollercoaster twice, and the Great Movie Ride once. All in all, it was a nice evening even with the rain. What's the deal with Aerosmith and roller coasters by the way? I don't understand the tie-in, but it was a good ride none-the-less. Unfortunately, I didn't bring the camera due to the rain. So, I don't have any photos to share.

If any of you are thinking that TechEd might be fun next year (in Orlando again, by the way), let me add a little fuel to the fire. EMC has been giving away $6000 ($1000 x 6) to six different developers each day. All you had to do for a chance to win was register at their booth and show up at the designated times when names were selected. One company is raffling off 42" LCD TVs. Others have Zunes, PSPs, Wiis, XBox 360s, PS3s, Windows Mobile 6 phones, Sling Boxes, etc. Quest Software is giving away $15,000 today ($2500, $5000, and $7500 to three winners).


Finally, another company whos name I cannot recall at the moment is raffling-off a Ducati motorcycle, and the tickets are free (one per person). Even if you're not excited by t-shirts, hats, and other swag, those larger prizes have probably caught your attention.

Just a note... I don't mean to play down the educational aspects of this conference. If you put in some time and pay attention, you can definitely learn a ton of useful stuff. I'm bringing back hundreds of pages of slides and my personal notes. For this blog, I've just opted to stay light-hearted and focus primarily on some of the more "fun" aspects.

I'll try to post again tonight with pictures from the attendee party at Universal Studios Islands of Adventure. If not, then I'll put them up tomorrow or over the weekend. Time for another session...

Wednesday, June 6, 2007

TechEd 5 (Wenesday, 6/6)

As I sit here and type this evening, I'm a little disappointed. We were supposed to be at MGM Studios, but the rain has just been pouring down in buckets for the last almost 5 hours. The park is open until 1:00 AM, so we're still planning to give it a try later. Here's a shot I took of the weather earlier today when the rain first started. We even had some good thunder and lightning.


On to TechEd.... My guess of french toast for breakfast this morning actually turned out to be correct. The TechEd meals (breakfast and lunch) have been excellent thus far. It's amazing that they can achieve the level of quality they do for so many people, but I guess that's how the catering company makes its money. I also managed to pick up 1 more hat and a few more shirts bringing my total to 3 hats and 14 shirts. Not quite as much as the guy I noted in a previous post, but respectable. A couple of the vendors I spoke with today actually had some good ideas when it came to Sharepoint and UI controls. I've got quite a bit of stuff to give away as quiz prizes at work including a copy of Crackdown for the XBox 360, pens, random blinky things, and some of the shirts and hats.

Microsoft has finally made the slides available in advance of the sessions. They must be reading my blog! :) Probably not, but I can pretend. It's just such a better way to take notes as I previously mentioned. On a side note, I was getting 2.5MB per second downloading the slides over the wireless g network at the convention hall. That's pretty impressive for wireless and the MS server hosting the files.

The sessions I attended today covered hidden gems in ASP.NET 2.0, unit testing and test-driven development, combining Windows Presentation Foundation (WPF) with standard Windows forms applications, and JavaScript performance. The most enjoyable session was given, again, by Jeff Prosise and covered hidden gems in ASP.NET 2.0. I had already heard most of the subject matter covered from Fritz Onion, but Jeff did a great presentation. It's nice when the speaker can actually get the audience laughing and interacting a little. However, the presentation with the most interesting content was given by Cyra Richardson of Microsoft and covered JavaScript performance. I can honestly say that I've never given the subject that much thought, but she pointed out a bunch of easy things that can be done to optimize your JavaScript. You just need to be careful because many were geared towards IE. I also find it funny that her site doesn't work at all in Firefox.:)

Well, I think we're going to head over for a couple of wet hours at MGM. Gotta give Todd a call. More tomorrow. I didn't get many pictures today, but I'll try to get a bunch from the attendee party at Universal Studios tomorrow night if it's not raining too much.

Tuesday, June 5, 2007

TechEd 4.5 (Tuesday, 6/5)

I just had to add a special post to complain about the fact that Microsoft isn't making the slides available BEFORE the presentations. For those of us running OneNote 2007, it works really well to print the slides into OneNote, follow along, and type or pen (with a tablet pc) notes right on the slides. Maybe they'll learn some day. OneNote is their software, after all. I've requested this maybe 6 times over the last couple months. They actually had links to all the slides on Sunday at the TechEd site, but they didn't work. Then, the links were gone until this morning. Now that they've showed-up again, there are only a few. It seems like maybe they are only posting them after the session, but I can't understand why they would take that approach.

TechEd 4 (Tuesday, 6/5)

I have to start off tonight's post by apologizing for the low quality of many of my pictures. I'm not much of a photographer, and I've been using a Canon SD900 which apparently doesn't do very well in low light. Although, Todd pointed out that I should put it in manual mode and mess with the settings. I just haven't had the time. Anyway...

I take back any degree of cockiness about getting swag that came through in my post from last night. Todd and I bumped into a guy today who had just picked up his 7th hat and 37th t-shirt. That's just ridiculous!

The sessions I attended today covered custom Windows Presentation Foundation controls, service-oriented architecture, coding standards, VB.NET tips and tricks for Visual Studio 2008, and using XML in SQL Server 2005. On the whole, they were much better than those from yesterday. The coding standards meeting was fun because it was what Microsoft calls a Birds of a Feather session. Basically, it just means that it's an interactive discussion instead of a monologue. I think I ended up talking almost as much as the moderator. Oddly enough, though, the best session of the day also contained the least technical content. Juval Lowy from IDesign talked about service oriented architecture, and he is a very good presenter.


The session should be available soon as an on-demand webcast from Microsoft. Everything he suggested about the way projects should be architected, staffed, and managed made sense, but I'm not sure how achievable it all is in the real world. Definitely worth working towards, though.

After the sessions, Todd and I made our way over to Epcot.


It's not the most exciting park, but it was the only one with late hours tonight. At this point, the rides go something like, "Now, we'll take a look into the future - all the way to the year 1995...". We just went on Test Track and then headed over to Morroco for a decent but overpriced dinner. Turns out there was entertainment as well (see below). The next two nights should be much improved. Tomorrow is MGM studios and Thursday is the Microsoft party at Universal Studios Islands of Adventure with free food, drinks, and rides only for TechEd attendees!


Monday, June 4, 2007

TechEd 3 (Monday, 6/4)

All I can say is that it's a good thing the TechEd bags this year are big. Mine started off at 4-5 pounds today and weighed more like 20 by lunch. Gotta love TechEd swag. Today's take included 7 t-shirts, 1 baseball hat, 2 squeezy balls, 4 pens, 1 tape measure, multiple light-up thingys, 1 Sharepoint book, 1 multi-tool thing with a level, screwdriver bits, and LED light, and an USB SD card reader. Not bad for one day. Actually, it only took an hour or so. The vendors are so tightly-packed there...

You can see just a small portion of the vendor area in this shot.


At any rate, today started at 5:45 AM and we got to the convention center shortly after 7:00 for breakfast.

You can see how nice the weather has been and what the Orange Counter Convention Center looks like in this shot.


The keynote address started at 8:30. They had a pretty funny spoof video featuring Doc (Christopher Lloyd) from Back To The Future and Bob Muglia, Senior VP, Server and Tools Business from Microsoft. The gist was that Bob had just finished his presentation (90 minutes in the future) and was booed off stage. Doc explained that the reason was because people are sick of Microsoft's "visions" for the future and just want practical applications that actually work. They went on a humorous adventure in the past featuring people trying to use previously failed software that resulted from Microsoft's grand visions. At one point, they ended up in an alternate future run by giant Bob and Clippy characters (previous, annoying interactive MS icons). Clippy said something like "You look like you're about to scream. Would you like me to help you scream?" with a text bubble just like in Office. It was pretty entertaining. The rest of the presentation was pretty average, but still interesting. If you are interested, the keynote should be available on the Virtual TechEd site soon. If you watch it, you can test Silverlight at the same time! Try it with Safari on a Mac.

You can see the size of the room where the keynote was held. Roughly 14,000 seats (all full shortly after this photo), and 12 25-30 foot diagonal screens.


Doc and Bob came out on stage in the Delorian.


Here, they discuss the goals of the presentation. The red ball you see in Doc's pocket is attached to a horn that he referred to as his MS-BS detector that he threatened to use if Bob started talking about "visions".


After the keynote, I attended several sessions on Visual Studio Tools for Office, Visual Studio extensibility, and IIS 7 for Visual Studio developers. By far, the best session of the day was a trip around Silverlight presented by Scott Guthrie from Microsoft. That product just keeps looking better and better. Man, it would be nice to do browser independent web development without need to write HTML or JavaScript...

Scott in action.


After the sessions ended, Todd and I headed over to Disney's Animal Kingdom to hit the Everest roller coaster since neither of us had been on it. We rode it three times and had a pretty good dinner at The Rainforest Cafe. For the second time this trip, I was surprised by the quality of the food. Having never eaten there before, I assumed it would taste a little more "mass-produced" or something.

Here's a pretty poor shot of the inside of the restaurant.


This is the dessert we really wanted to get but managed to restrain ourselves. Doesn't it look good?! I think the family in the shot was wondering why I was taking a picture of their son blowing out his birthday candle.


I couldn't figure out how to fit these last two photos into the rest of my write-up, so I'm just sticking them here. :)

This is roughly half of the dining area where we get breakfast and lunch. I don't know how many tables there are in all, but it's a lot. The food is actually pretty good, too.


This is the band that provided entertainment over lunch today. They were pretty good.


That's it for today. Goodnight, all.

Sunday, June 3, 2007

TechEd 2 (Sunday, 6/3)



OK, so maybe I'm cheating by posting my first and second entries back-to-back, but I was just too tired last night. Today started with a wake-up call at 6:30 AM. After getting ready, I met up with Todd in the Rotunda of the hotel and we headed over to the Orange County Convention Center around 7:30. The pre-conference session didn't actually start until 10:00, but we wanted to get there early to register, have breakfast, and walk around. I've attended this conference in the past, but it still surprises me to see just how big it is. You can't really tell from the pictures, but I'll take more once all the vendor booths are set up and everything is opened-up.

We got a nice convertible bag/backpack this year plus some beta software, a black TechEd t-shirt and hat, and an Office 2007 t-shirt at registration. It's always fun to go through all the stuff they stick in the bags even if much of it is just advertising junk. You can see my bag in the photo below under the banana. For some reason, I've gotten hooked on bananas this year. Since they didn't have the official dining area set up, everybody just had a picnic on the floor for breakfast.


At 10:00, we headed to our pre-conference session on ASP.NET AJAX with Jeff Prosise from Wintellect. I had actually spoken with Jeff on the phone several months ago and was looking forward to meeting him in person. The presentation was quite interesting and contained a bunch of good information and tips that you can't just find on the internet. All in all, Todd and I were both impressed with his knowledge and presentation skills. It's also nice to have a presenter who is actually excited about his topics. That enthusiasm is often infectious and leads to a more enjoyable experience for the audience. He actually finished 30 minutes early and announced that because Microsoft's other big conference this year, PDC, was cancelled, he wanted to talk about Silverlight for the last half hour. I guess he's been working on Silverlight presentations for PDC and was disappointed that he wouldn't be able to give them. That was fine by me because the Silverlight technology looks very interesting. Here's a shot of Jeff in action. Sorry it's so blurry. I didn't want to distract him with the flash, so the shutter speed was pretty slow.


The demos Jeff presented are available here if you're interested.

Today's session ended at 5:00, and we stopped by the TechEd store so I could pick up a Microsoft golf shirt. I'm such a geek. This is actually a shot from earlier in the day before the store opened. Doesn't the security woman look like she's having fun? :)


After that, we headed out to Downtown Disney to walk around an have some dinner. We ended up at Wolfgang Puck's Cafe. I'm always a little suspicious about his food because he's become so commercialized and seems to put his name on anything, but the food was actually excellent. It was mainly the smell that drew us to the restaurant. They cook most everything over wood. We were happy when everything actually tasted as good as it smelled.



Good night, all. More tomorrow. Or is it today at this point? I need some sleep...

TechEd 1

Hey, all. Well, I'm down here in Orlando for TechEd. Actually, my friend, Todd, and I flew in late last night. So, if I'm doing daily postings, then I guess I owe two tonight. :) The trip down here was a little bit of an adventure. Since there has been a tropical storm passing through here, we departed an hour or so late and the flight got pretty bumpy as we approached Florida. Not really a big deal, though. Apparently, there must only be one guy working the late night shift at Orlando International because it took over an hour for our luggage to get from the plane to the carousel. I suppose we can just be happy that nothing got lost or broken. All in all, we were just happy to get here. We made it to the Dolphin hotel around 1:00 AM and ended up splitting a pizza in the all-night cafeteria before heading to our respective rooms for a couple hours of sleep. It's really not as bad as I make it sound. I'm mainly just trying to make an excuse for not posting last night. :) Here are a couple of really "exciting" photos from our travels.

Todd waits for the monorail to get from our terminal at the Orlando airport to the main terminal. In Orlando, the rides start right after you get off the plane! :)

That's me waiting "patiently" for my luggage. Interestingly, Todd's bag was the very first one out from our flight. I'm not sure what the odds are on that.

Tuesday, May 22, 2007

Photosynth from Microsoft Live Labs

Looks like Microsoft is taking a page from Google's playbook with their approach to R&D. At least, they're buying-up cool technologies and releasing them via Microsoft Live Labs. Some of you may have already heard of Photosynth, but for those who haven't, here's Microsoft's description.

"The Photosynth Technology Preview is a taste of the newest - and, we hope, most exciting - way to view photos on a computer. Our software takes a large collection of photos of a place or an object, analyzes them for similarities, and then displays the photos in a reconstructed three-dimensional space, showing you how each one relates to the next.

In our collections, you can access gigabytes of photos in seconds, view a scene from nearly any angle, find similar photos with a single click, and zoom in to make the smallest detail as big as your monitor."

If it's even half as cool as their claims, then this could be a really fun and useful application. I literally just started playing with it, so no real opinion yet.

Monday, May 14, 2007

Pre-TechEd 1

So, the Microsoft TechEd conference is quickly approaching. For those who don't know what that is, check out the website. As in 2005, the conference is being held in the 2.1 million square foot Orange County Convention Center in Orlando, FL. There should be roughly 12000 people in attendance this year, and I'm really looking forward to it. I will be traveling down there with a friend and, as time permits, keeping a daily photo diary here on my blog. Stay tuned for more information.

Friday, March 23, 2007

Windows Home Server

For those that haven't yet heard about it, Windows Home Server is a very interesting new operating system offering from Microsoft. As suggested by its name, the target audience is home users, but it is built upon the business-proven Windows Server 2003 SP2. Its goal is to simplify mass storage, backup/recovery, health monitoring, and more for the home user with multiple PCs. Check out this Wikipedia page for more information. I've been participating as a tester on the Beta 2 version for the last month or so and have been pretty impressed so far. If you want to sign up to participate, visit the Windows Home Server page on Microsoft's Connect site.

Wednesday, February 14, 2007

Exporting/Importing Settings in Visual Studio 2005 - Part 2

As a follow-up to my February 5th post....

I must be getting a little slower with age, but I eventually realized that the reason the Visual Studio 2005 installation on my tablet PC was so different from the one on my desktop was because it was the Standard Edition, versus Professional on the desktop. According to this chart, the Standard Edition features "Simplified menu options and defaults". I guess that's what I was running up against. Well, since importing the settings from my Professional installation, the Standard edition has been "transformed" with most of the menu and toolbar options that were previously unavailable. It's solved all of my issues, at least. Seems like another instance of Microsoft simply hiding functionality instead of eliminating it for lower versions. I just stumbled upon a way of unlocking it, I suppose.

Tuesday, February 13, 2007

Interesting Free Software from Microsoft

Here is a list of a few interesting pieces of development-related software from Microsoft in no particular order. Each is either free or at least has a free version available.

  • Microsoft Robotics Studio - "The Microsoft Robotics Studio is a Windows-based environment for academic, hobbyist and commercial developers to easily create robotics applications across a wide variety of hardware."
  • ASP.NET AJAX (formerly ATLAS) - "ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers."
  • Microsoft CodePlex (think SourceForge for .NET) - "CodePlex is Microsoft's open source project hosting web site. You can use CodePlex to create new projects to share with the world, join others who have already started their own projects, or use the applications on this site and provide feedback."
  • XNA Game Studio Express - "The XNA team is proud to announce the availability of the 1.0 release of XNA Game Studio Express and the XNA Framework, aimed at helping students and hobbyists build games for Windows and the Xbox 360. This release supports both Windows game development and Xbox 360 development (subscription to the XNA Creators Club is required in order to run XNA-based games on the Xbox 360)"
  • Microsoft Expression - "Expression Studio, a key component of Microsoft's strategy for improving the user experience delivered by applications, provides designers with an end-to-end tools platform that boosts collaboration with developers in the delivery of next-generation user experiences for the Web, Windows Vista™ applications and beyond."

Monday, February 5, 2007

Exporting/Importing Settings in Visual Studio 2005

OK, so maybe I'm cheating with this post by referencing ScottGu's Blog, but I just love it when you do a web search and find exactly what you are looking for.

I was getting annoyed with the fact that my toolbars and other settings were different on my tablet PC than my work PC. Even more annoying was trying to figure out exactly where the settings were to change them. Add to that the fact that my tablet was using one setting to assume a default location for all projects and wouldn't allow me to specify different folders for each.... As an aside, I realize that it's really my fault and not my PCs. :) But if anybody asks, the computer did it!

Anyway, at this link, you will find Scott's tips on setting up, exporting, and importing custom profiles for the Visual Studio 2005 IDE. Over time, I had forgotten all the changes I had made to my work PC to get it to a point where I was happy. Simply exporting the settings and importing them into my tablet saved me quite a bit of time. Thanks, Scott!

Sunday, February 4, 2007

One Note 2007 / Adobe Reader 8 Bug

So, I recently finished installing Office 2007 Ultimate on my desktop and tablet. Very nice piece of software so far. I spent a few hours configuring One Note 2007. I use it for taking notes and scanning/organizing/searching technical articles, recipes, and projects from woodworking magazines. I should say that I use One Note 2007 for this. Prior to this version, it's capabilities were a lot more limited, and I was struggling with ScanSoft PaperPort 11 for my scanning/organizing needs. At any rate, I'm not writing this to give a review of Office. Instead, I would like to point out a bug that I found that may help others out there.

One Note 2007 has the ability to import various different types of documents. There are several ways, but I like to simply drag the document into a page in One Note and select the "Insert the file as printout so I can add notes to it" option. The result is that you get a "printed" copy of the document on the page in One Note. Then, you can scribble notes, full-text index it, etc. Behind the scenes, it appears that One Note actually launches the program it knows can read the file (e.g. Adobe Reader for PDFs) and then simply prints using a special driver that results in the file going into One Note. The bug I found was with Version 8 of Adobe Reader. I tried various things to get it to work. It seemed like it was printing, but the document never showed up in One Note. Then, I happened to go into my office and saw that there was a stack of paper in the printer outfeed, all copies of the same thing. Apparently, the PDF was going to the printer instead of One Note. I had an older version of Acrobat (6.0.1) on a different PC that was working just fine, so I ended up just uninstalling 8 and installing 6. Everything worked just fine after that. Other than simply reading PDF files, I don't use Adobe Reader for anything else. So, I wasn't deriving much benefit from 8 over 6 anyways. You can download older versions of Acrobat from Adobe's website.

Thursday, February 1, 2007

Whole-house video distribution on a budget

So, I finally "perfected" my distribution system for TV in my house, and I thought that my findings might be useful for others. The general idea is that I wanted to get the signal from two Dish Network DVRs and an HD OTA antenna to every TV in the house. This way, I could install an HDTV on any outlet I wished and also watch shows recorded on either DVR in any room. Any room with a TV, that is. Obviously, there are fancier ways to achieve this, but I wanted to keep it cheap.

I've had Dish Network for quite a while and always took advantage of the fact that control over tuner 2 on their modern receivers can be set to respond to radio frequency. Technically, you can set it up for tuner 1 as well. The general idea is that you can send the signal from tuner 2 to a remote TV and still control the receiver via RF without having to install an IR-forwarding system. So, the key was to figure out how I could combine the signal from both receivers and my HD OTA antenna. Then, I found this 3x8 distribution amplifier. It takes in 3 signals, amplifies all of them, and outputs 8 signals. Plus, it has the bandwidth to handle HD. This was enough to feed all of the TVs in my house. I left the amplifier for the OTA antenna in place as it is required to get a quality signal and added a second, one-input/one-output amplifier for the long run up to the attic for the TVs on the second story.

Since the OTA antenna picks up both analog and digital signals, I had to find channels for the signal from the Dish Netowork receivers with little interference. In the end, I opted for 63 and 69. Unfortunately, the signal degrades faster over the coaxial cable runs as the channels get higher, but anything lower had too much interference from the OTA channels. So, any TV in the house can watch Dish DVR 1 on channel 63 and DVR 2 on channel 69. Those with ATSC tuners can also watch the HD channels from the antenna. No HD feed from the one Dish DVR that does HD, but I can at least watch HD recordings down-sampled to SD. To watch HD from that receiver, I just use the primary TV hooked to tuner 1 via HDMI.

To make it easy to remember, I set the remote code for the receiver on channel 63 to 3 and that for the other on channel 69 to 9. By simply changing the remote code on the UHF Pro remote, I can control either receiver. Add a UHF Pro remote from ebay for each TV around the house, and you can watch whatever you like, wherever you like.

All-in-all, everything works quite well. The only major negative (depending upon your perspective) is that it leads to upgrading your other TVs to HD TVs. If you've got the signal coming out of every port in the house, why not have a TV there that can display it in all its HD glory! :)

Friday, January 26, 2007

ASP.NET control naming (.ClientID and .GetPostBackReference)

If you've done much development with ASP.NET, you know that all of the controls you include in your ASPX code get renamed for the resulting HTML script. For instance, "MyControl" might be converted to "ctl00$MyControl" on the client side. You probably have also read that you shouldn't assume the name of the control on the clients side if you need to access it via JavaScript. This "best practice" is intended to avoid errors resulting from Microsoft switching naming conventions in subsequent versions of the .NET framework. Thus, they provide a number of server-side calls to determine what the ID of the control will be once it gets to the client. This post is intended to point out an issue that I noticed when using MyControl.ClientID and Page.ClientScript.GetPostBackEventReference(MyControl).

MyControl.ClientID returns what you might expect, the ID that the control will have in the client HTML code.

The latter method, GetPostBackEventReference returns a string that is the client-side, JavaScript code to execute if you want to cause the page to post back targeted at the specified control. For instance, calling GetPostBackEventReference(MyControl) would return "__doPostBack('ctl00$MyControl','')". Executing this code in JavaScript causes the page to post back and attempt to execute a server-side postback event handler on MyControl. It achieves this by submitting a form value, "__EVENTTARGET", that is automatically read on the server side to determine which control caused the postback. Anyways, that's the gist of what happens. What was the point of this post again? :) Oh yeah, I remember...

I created a page with a custom control on which I wanted to be able to force postback via JavaScript. In order to implement this, I used GetPostBackEventReference(MyControl) to create the line of JavaScript code to execute and then simply called eval() on it at the appropriate time on the client-side. When postback occurs, the load event handler for the page always runs prior to any other event handlers being called. In my situation, I wanted to perform special functionality if MyControl caused the postback (versus the other controls on the page). To determine this, I decided to simply compare the value available in Page.Request.Params("__EVENTTARGET") to MyControl.ClientID. It seemed simple enough. If the two were equal, then I could assume that MyControl caused the postback. I was surprised to find out that this approach does not work. The client ID returned by GetPostBackEventReference was equal to "ctl00$MyControl" while the value returned by MyControl.ClientID was "ctl00_MyControl".

All in all, it's wasn't a major issue. A little string manipulation and the use of MyControl.ClientIDSeparator did the trick. However, I think it is resonable to expect the two values to be equal since they refer to the same control. The fact that they are not seems like a bug.

On a somewhat related note, shouldn't there be a constant for "__EVENTTARGET" somewhere in the .NET API? After all, you're not supposed to assume the client ID of the control or the postback method call. What happens if Microsoft decides to change the ID of the form element some day. It's odd that they didn't seem to take the same approach as they did with the other client values.