Robots and Silverlight and XBox, Oh My!

Dani Diaz, the local Microsoft Dev Evangelist who was the hookup for the recent XBOX party at IndyHall, asked me to post a couple of events that are coming up this weekend out at their Malvern, PA HQ. I know there are some local dev types reading, so this might be something you’re into. Also, a portion of the day’s programming involves robots, and WHO doesn’t love robots. C’mon.

Really, I want to encourage you to go, if for no other reason , to meet Dani if you haven’t already. I’m pretty openly not a Microsoft user, but Dani and I have had some EXCEPTIONAL conversations about the more overlaying issues in software development and the tech industry today. He’s a smart guy coming at it from a different angle than I am, and I think it’s totally rad.

From Dani:

Microsoft is hosting 2 great events this Saturday at the Microsoft office in Malvern, PA. We have a full day of free Silverlight training and a full day or XNA Game Studio and Robotic Studio. XNA Game Studio is free tool that makes it super easy to create great video game for the XBOX 360 or the PC.

You can find more information on my blog http://www.smallandmighty.net. Both events are FREE.

We are giving always one XBOX and 2 Zunes as well!

Registration information for the Silverlight event is here

Registration information for the XNA/Robotic Studio event is here

anything but firefox

some day, maybe some day, ill listen when microsoft lectures me about “compliant browsers.

In the mean time, ill keep on using one that follows standards. And still works their livemeeting client just fine.

non-compliant.png

throwing/chucking a wobbly

I think modifying the verb “throwing” to “chucking” makes the phrase that much more colorful, and therefore, my goal for the next 7 days is to use the phrase in conversation…it seems like it would be alot of fun to say, I’ll report back once opportunity strikes.

Oh, yeah. This probably seems way out from left field, but it came from the blue slice of this chart posted by Sean over at alwaysBETA.

![Chucking A Wobbly](http://www.dangerouslyawesome.com/wp-content/uploads/2006/07/Chucking-A-Wobbly.png)

who is reading my blog?

So my first ever comment in this blog since opening it up last week just came through…see my post on why Microsoft Business Contact Manager sucks.

Anyway, it appears to be coming from someone inside the gates (pun intended) of redmond’s finest establishment…thats right, whois of the Ip address is none other than One Microsoft Way! They point me to a feature that either exists in a newer vesion of the application than we had, or i simply could not find (obscured features in a microsoft product? i should bite my tounge!!!)

so that makes me wonder, do they have someone searching the internet for “* Microsoft * sucks *” ???
and if so, are they searching with google or msn? creeeeeeeeepy

.net event model strikes again

Often times i’ve heard other programmers complain about the .net event model doing dumb things, today i ran into an issue that i believe ended up needing far too much work to get it to perform correctly. To summarize my issue, i had a single aspx page, and one of my layout user controls (the footer). The page contained a number of literals, which were toggled on and off from button click events within them. My task was to add an item to the footer (a copyright notice) that was only to appear on certain pages…so my thought was to create a label in the footer, declare that footer control on my page, and use that declaration to call a method on the footer control to toggle that label’s visiblity along with the toggling of the literals, as i saw fit. Seemed simple enough, but i was sooo wrong.

Toggle methods

[code lang="c#"]
public class Footer : UserControl
{
protected Label streetPilot;
public void showStreetPilot()
{
streetPilot.Visible=true;
}
public void hideStreetPilot()
{
streetPilot.Visible=false;
}
}
[/code]

Problem: because of the fact that the page was being built with a pagetemplate class, the page was not aware of the footer on Page Load. So my instantiation of the footer control that was needed to call the method on said control would throw an error, since as far as the page was concerned, that control wasnt there yet.

Pre-Render method on the aspx page

[code lang="c#"]
private void Survey_PreRender(object sender, EventArgs e)
{
if (CopyRight == 1)
{
Footer foot = this.FooterControl as Footer;
foot.showStreetPilot();
}
else
{
Footer foot = this.FooterControl as Footer;
foot.hideStreetPilot();
}
}
[/code]
Pre-render to the rescue. By instantiating the footer control in the pre-render, i had access to the toggle method i had created on the user control. Great. But now i needed something for the pre-render to check each time the page was posted or posted back, to see if it should run the show or hide method. This time, viewstate was necessary. I created a property called CopyRight

Copyright property that handles viewstate

[code lang="c#"]
public int CopyRight
{
get
{
if (ViewState["copyright"] != null && ViewState["copyright"] is int)
copyRight = (int) ViewState["copyright"];
return copyRight;
}
set
{
ViewState["copyright"] = value;
}
}
[/code]
Ultimately, each button click had to set the property CopyRight as either 1 to turn the line of text on, or -1 to turn it off.

What an inordinately complicated dance to change the visiblity of a single line of text. Yargh.

Much thanks to my co-worker Seth for his help with this one.

MS Business Contact Manager sucks

I spent the better part of my day today wearing the OTHER hat that i keep on my coatrack…I got to play IT guy, fixing one of my coworker’s defunked toshiba laptop. The routine was typical: data backup to external drive, wipe windows, reload windows, dig up drivers, reload software and then reload data. Everything was going smoothly, until we hit the restoration of MS Business Contact Manager information. My coworker relies on this to manage the large number of contacts he handles, and it integrates with Outlook 2003 which we already use heavily.

Let me take a step back: we run a Microsoft Small Business Server with an Exchange Server. Since all email, calendar, and tasks are sync’d to the server, one would think that contacts would sync just them same: evidently not the case. Maybe someone can explain to me why. Thats alright, i did a full backup of the outlook data file as well as the MSBCM database before wiping. The snag came when we got restoration: since we werent 100% sure we were going to use MSBCM after the wipe, i decided to handle the backup with a CSV, since it would be more portable to get the data into..well…anything else. What got confusing was when we got to hooking up MSBCM to the database, it wouldnt read the exchange server for data so i had to create a new database locally and load our backup into it. But importing from a CSV requires mapping of the data fields…all 50 or so of them. I guess this isnt as daunting as it seemed, but it was still a pain in the neck.

Also worth mentioning is that MSBCM caused the otherwise snappy, P4 2.0gHz with 1 gb of ram, to take a serious performance hit when running outlook. Not that I was already an outlook hater, but that configuration is teh suck.


Clicky Web Analytics