Tonight was my first ever CodeFest event, physical or virtual (yes, there are virtual CodeFest’s being held via Second Life). The doors opened around 5pm, and I was there a little after that. There was an abundant supply of Papa John’s Pizza (+2 points) and free soda. Looking over the room, it’s pretty interesting to see all these laptops and power strips plugged in. Defiantly not something the fire inspector would approve of. Let’s hope I don’t have to break out the back window to escape a giant electrical fire.
Dave Bost and Larry Clarkin are our Microsoft hosts this evening, and they brought a boat load of prizes to give away. They also brought about 7 USB hard drives for people to copy the lab VM’s and labs for those who didn’t know, or didn’t bother to download stuff. With the exception of the labs, getting a VM provided to me is a bit to easy, so I decided to setup stuff myself. For the CodeFest tonight, I’m running on VMWare server 1.05, with a Win2k3 SP2 guest OS. I loaded up VS 2008 Team Suite, .Net Framework 3.5 beta 1, and SQL 2008 RC0 (I told you, I like a challenge). I’m rolling with Win2k3 for my guest because I only have 2 GB of ram on my laptop (note to self, hit up boss for 2 more GB of ram and reinstall server 2008), and windows server 2008 takes about 350MB more memory in my experience over Win2k3.
Linq and new Language Features
Here is an example of Linq with an Object Initializer. The var we are creating is named contacts and is declared with var, as it’s not a strongly typed class. Notice that while there is a T-SQL feeling, the order of the expression is somewhat backwards with the from statement coming first (which I believe helps with intelli-sense among other things). The last line declares a new class (which you could call contact), that has two public properties, Name and Phone. “var” is not a dynamic declaration like it is in VB6, it is strongly typed, it just saves you the hassle of writing the type on the left side of the =. The compiler inspects the right side, and figures out what the type should be. You can mouse over “var” in VS, and it will tell you what type it is.
1: var contacts =
2: from c in customers
3: where c.State == "WA"
4: select new {c.Name, c.Phone);
What you can’t see in the above code snippet (because I just typed it in manually), is that the auto formatting of the Linq statement in VS absolutely rocks, formatting the statement exactly the way I would have manually. It really makes the code more readable, and I can appreciate this little feature.
WPF
We pretty much jumped right into the lab/demo/code for WPF, so I didn’t take many notes, as you can see. The demo we were working on was pretty cool, it had some nice animations, graphics, etc. While we didn’t code all of the animations ourselves (copy/paste from the lab files), you can easily go in to the source and look to see how the designer (person) accomplished the various animations.
Conclusion
Overall I was very pleased with the CodeFest, and will defiantly be checking out the next one. I didn’t have any issues with my custom VM I put together, as the lab files were provided as stand alone downloads prior to the class.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.