Scott Hanselman

Heading to Mix08 and Tweeting along the way

March 4, '08 Comments [4] Posted in Mix | Speaking
Sponsored By

image In the morning I'm heading to Mix. I'm going to be using Twitter as a microblog during my time at Mix. I'll post where I am and what I'm up to. You can sign up and "follow" me on Twitter, and select optional notifications via SMS or IM.

Scott Watermasysk has a great post called "Why Twitter" and I've been "tweeting" more and more of late. It's a great way to communicate, kind of like IRC except with permalinks and angle brackets. ;) Twitter is a lot more casual and there's a lot more off-the-cuff random discussions.

ScottWater has also setup a series of Hashtags such that any "tweets" on Twitter that include "#mix" "#mix08" in them will show up on this realtime feed. This is a great way to keep up on the hour by hour Mixiness that'll be going on, whether you're at the conference or not.

Also, if you haven't done your Mix Schedule, check out this ClickOnce WPF app that does Mix Scheduling. I'll be speaking on ASP.NET MVC on Thursday at 4:15 in Lando 4201 and Phil Haack and I will be hosting a Q&A in the Mix Open Spaces area immediately following.

I'll be looking to do a number of technical podcasts while in Vegas so if there's certain cool or obscure (or both) questions you want answered, leave them here and I'll try to chase them down. There's also a Mix category on my blog so posts while I'm there will be tagged as well.

See you in Vegas. Man, I hate this town.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

2008 Window Scripting Games - Advanced PowerShell Event 7

March 4, '08 Comments [25] Posted in Learning .NET | PowerShell | Ruby
Sponsored By

Olympic_flameIn a few days the 2008 Scripting Games will come to an end. This is a yearly event that the Script Center does. There's a beginner and an advanced division and a bunch of deceptively hard problems. I was selected to be on of the "Guest Commentators (list here)" which really means they wanted me to solve one of the problems and provide the solution as an example. I'm not sure my solution is the best way, but it did solve the problem they assigned me.

My problem was Event 7: Play Ball! and I was to write a script that schedules all the games for a round-robin baseball tournament. The complete scenario is here, but in a nutshell:

"In a round-robin baseball tournament (or any kind of round-robin tournament, for that matter), every team plays each of the other teams in the tournament one time and one time only. For example, suppose we have a tournament with three teams (teams A, B, and C). In that case, the tournament would consist of the following set of games:

  • A vs. B
  • A vs. C
  • B vs. C

See how that works? Team A plays Team B and Team C; Team B plays Team A and Team C; and Team C plays Teams A and B."

A few other wrinkles thrown in are that the games must be randomized, otherwise Team A will play too many in a row and you need to schedule six teams, A through F. Of course, to be clear, every team must pay every other team once and only once. Here's my solution, hacked together quickly.

#this only works with an even number of teams
cls
[array]$global:games = $nul
function rotateArray($a)
{
 $first, $rest = $a
 $a = $rest + $first
 return $a
}
function makeGames($a)
{
 $i = 0;
 while($i -lt $a.Length/2)
 {
  $global:games = $global:games + ($a[$i].ToString() + " vs. " + $a[$a.Length-1-$i].ToString())
  $i++
 }  
}
$a = "A","B","C","D","E","F"
$z = 0
while($z -lt $a.Length-1)
{
 makeGames($a)
 # hold on to the first one
 
 $first, $rest = $a
 #rotate the rest
 $rest = rotateArray($rest)
 $a = [array]$first + $rest
 $z++
}
#randomize games
$a = [collections.arraylist]$global:games
$r = $a.count..1 |% {$R = new-object random}{$R.next(0,$a.count) |%{$a[$_];$a.removeat($_)}}
$r

Doing this in PowerShell took my brain a while to get. Note the RotateArray method's use of multi-variable assignment to chop up he array into first and rest. That wasn't obvious to me as a C-guy for the last 15 years, but it made my solution simpler when I refactored and introduced it.

The solution (remember, it's randomized) will look something like this:

B vs. D
B vs. C
A vs. D
B vs. F
C vs. D
A vs. F
A vs. B
C vs. F
E vs. F
A vs. E
D vs. F
B vs. E
D vs. E
A vs. C
C vs. E

Enjoy. Here's the same solution in Perl from Jan Dubois and again in VBScript. Who wants to do the F# version and the Ruby version? What about just LINQ to Objects?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Six Months in the Inside - Am I evil yet?

March 3, '08 Comments [58] Posted in Microsoft | Musings
Sponsored By

imageYikes, I got an email from HR today that said "Congratulations on your 6th month anniversary at Microsoft!" Has it been that long? Apparently so, although it feels like maybe three months, tops.

I learned a lot about the culture in the first three weeks. There is a lot of groupthink and echo-chamber type behaviors from folks that have been there a long time, but most people I've interacted directly with are always re-asserting their independence and catching themselves thinking old-style thoughts, which is comforting to me.

It's one thing to exhibit an undesirable behavior, but it's much worse to be ignorant of that behavior. I think Microsoft's biggest problem right now is answers like "We've always done it that way," whether it's naming, versioning, documentation, conferences, whatever. I like to keep things a little more agile and tighten up the feedback loop. I think a process of continual improvement and self examination is so important.

What is my job?

I get this a lot. Seems like an obvious question. I took the title "Developer Division Community Liaison" because it was very broad. Phil likes to say I'm paid to be Scott Hanselman, but I don't like that very much because it implies some kind of punditry. If I ever start sounding Dvorak-esque, please let me know.

When my dad or the public (read: non-computer person) asks what my job is, I tell them "I'm writing a book that will never end (blog) and create training materials like videos and tutorials for Microsoft." When a technical person asks, I say the same thing with more detail. Also, if ScottGu coughs, I get him lozenges. Ahem. Yessir!

My boss runs http://www.asp.net, http://www.silverlight.net, http://www.windowsclient.net, etc, but our team is very small, only four FTE (Microsoft-speak for Full Time Employees). But, we're growing. At Microsoft we're graded on our ability to "meet our commitments" and my commitments (which were written up in a formal meeting) are mostly metrics like "write n number of significantly technical blog posts, write such-and-such book, give x number of presentations." Commitments are supposed to be a stretch, and I've got 7 different significant commitments so I've had some really late nights. The "liaison" portion of the job is also becoming more formalized in the next month, so I may take over some specific MVP-type groups.

This paragraph added for clarity (see comments): No, my job isn't to blog, although the blog is a good place to point to stuff I do. Folks originally wanted me to make a blog at msdn.com but I thought that was silly. For my day job, I do screencasts, tutorials, presentations, community outreach, books, articles for MSDN, internal presentations, advocate for the customer (this takes up more time than you'd think), provide direct feedback to the product groups, route your feedback (you know this if you've ever emailed me with a problem) and troubleshoot obscure bugs, as well as working on technical strategy with certain wonks at Microsoft. As I said in the Blue Badge post, the podcast is still belongs solely to Carl and me and I pick the guests with tips from the audience.

When I write, there's no editorialization, meaning that no-one reads my posts before I send them, although I often check with product groups to make sure I'm not completely wrong on some technical detail. Microsoft is pretty mellow and says "blog smart." That said, I'm sure I could get fired if I wrote something truly bogus, but otherwise there's no ghost writing. (Yes, ScottGu still writes his own posts...so far).

Sometimes ScottGu will email me with a one line note like this one yesterday about IIS7 and FTP7 "This might be a cool blog post to cover.  It has a ton of new features (including integration with membership/roles), new admin tool and a bunch of cool new features."

However, I already had FTP7 on my list of cool things since I've been talking to the IIS7 team and that'll hopefully be done today or tomorrow. It's funny we usually think about the same general things and I'm mostly either a day ahead or a day behind whatever cool thing is going on.

Am I Evil yet?

P0000259 I haven't been invited to any evil (or eeeveeel) meetings and haven't found the evil mailing list. As far as I can see Microsoft is less evil as it is unorganized. Within groups, communication is pretty good, but between divisions is trickier because there's always a doppleganger out there, like Evil Spock who is working on the same thing you're working on. I guess that means there's a Scott Hanselman out there without a goatee writing a similar post as this?

That pic is me in my early twenties. If Chins Could Kill...I'm trying to find a non-bearded pic but that's the best I can do! That guy doesn't look evil, right?

Working Remotely

0900aecd8054e6ca_null_null_null_10_09_06-2 The Remote Office thing is still lonely, but I'm making up for it with regular lunches and LOTS of video conferencing thanks to ooVoo. My master plan to make a robot out of a Roomba has fizzled due to lack of a battery (and my lack of a mechanical engineering degree) that could last a full day. My new "Plan B" is get a 42" LCD (as seen at right) and make a Portal into my house.

What have I done well?

I thought the first practice videos turned out well, and I have taken all the feedback you've given and applied it to a new four-part tutorial on MVC that will be coming soon, hopefully formalizing those best practices.

I think the Wiki (beta) is turning out pretty cool. I seeded it, but there's already contributors who have exceeded the number of posts I've added and greatly improved it.  I think there's a lot of work we can do to make the administration better for moderators, but it's looking nice regardless, so far.

I've had a lot of fun speaking lately. When I spoke while I was working at Corillian, I usually had to take vacation days or do it on the sly side, although for large conferences my boss at the time was exceedingly cool about it.

What have I done poorly?

I am not managing my time very well and since we've got a 3 month old and an enthusiastic 2 year old and I'm working from home I feel like days are very fragmented. It's good to be home, but my wife thinks I'm actually around less which is definitely a not good thing to feel. I need to do a better job of getting up earlier and banging out work. I like being informed, but I think I may need to go on an info-diet to find more time to get things done.

Have you started a new job in the last year? How is going for you?

Related Posts

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

How to attach MP3 sound effects to PowerPoint animation elements

February 29, '08 Comments [6] Posted in Musings | Tools
Sponsored By

imageI'm working on a presentation for the DE (Developer Evangelists) the day before Mix. Since so many MSFT folks are getting together in one place, we usually take advantage and do some side meetings, etc.

I'm doing this cool slide (at least I think so) and I added a small animation as picture comes in from off screen.

I wanted to add an MP3 to that effect so that it'd play as the animation happened. I wandered around the UI for a white, trying to figure this out.

It's a little counter-intuitive, but each Effect Element can have its own sound attached, so you have to Right Click on the Element in the Custom Animation Pane, as seen at right.

Click Effect Options and you'll see this dialog:

image

When you select Other Sound... you'll get a File Dialog prompting you for a WAV file. Here's where I got stuck for a moment. It ONLY allows WAV files and I wanted to play an MP3. Well, I could have converted the MP3 to a WAV, but not only would it have made the file a lot bigger, but I would have had to go looking for a converter.

It turns out that the WAV format can support MP3-compressed audio as long as the WAV header (wrapper) is correct. So, rather than "uncompressing" my MP3 into a fat WAV (using RAW PCM Audio), I can just run this little command line app "MP3 Decoder" and it will create a .WAV file with the MP3 inside.

Run the little app by Niklas Beisert and you're on your way. The file will be roughly the same size (still small!). Attach the "now WAV" to your animation and you've just successfully attached an MP3 to an animation in PowerPoint.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Hanselminutes Podcast 102 - Mike Pizzo on the ADO.NET Entity Framework

February 29, '08 Comments [13] Posted in ASP.NET | Learning .NET | LINQ | Podcast | Tools
Sponsored By

figure1 My one-hundred-and-second podcast is up. In this episode, I sit down with Michael Pizzo, the Principal Architect of the ADO.NET Entity Framework. He gets technically down and dirty pretty fast and I get answers to all the hard questions like "Are LINQ to SQL and LINQ to Entities competing?" and "Which one should I use?" A very cool guy and a fun interview that finally set my head straight about the data stack.

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

If you have trouble downloading, or your download is slow, do try the torrent with µtorrent or another BitTorrent Downloader.

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.