Scott Hanselman

Sez You Architecture and the Architecture Ninja

July 10, '07 Comments [5] Posted in Musings | Programming
Sponsored By
image

I don't like getting into architecture arguments with people who are fundamentally interested in the argument being constructive. There's discussions and there's arguments. Having an argument doesn't mean that it has to turn into a shouting match or a "measuring contest."

I try to remind whoever I'm arguing with that we're both on the same side, with the same goals.

Sometimes, though, these Architectural Arguments devolve into what I call "Sez You Architecture."

These kinds of meetings usually go something like this:

"I'm concerned about the lack of Unit Testing on Project A. I'd like to see a little less coupling and some better code coverage numbers, otherwise I won't feel comfortable signing off on a Go-Live."

"Sez you. My team has done a great job and I don't see a problem."

Sometimes I feel like Harvey Keitel as "The Wolf" in the movie Pulp Fiction.

"Pretty please, with sugar on it, fix the ****ing build server." - Scott 'The Wolf' Hanselman

Discussions that devolve into "Well, sez you" are never healthy for anyone. Nobody wants to be the bad guy, and it's rarely a good idea for management to go get "The Smart Guy" and have him come crashing down through a stained glass on a zipline ready to save the day. However, doesn't that so often seem to be the case?

Bringing in external assistance or even oversight/governance can be a good thing, but only if the tone of the engagement is set properly. Everyone should agree what the goals are and what success looks like. The person coming in should understand they are there to help, not to dictate rules or order people around. It is very likely that the Architecture Ninja has little context and has only been told that things are messed up and that a few specific people should be killed to get the project on track.

Instead, in my experience, folks should consider two primary issues:

  • The folks ON the project may not be able to see the holistic view, as they're just too close.
  • The Architecture Ninja can't possibly understand the complete history of why certain decisions were made.

If everyone remembers these two basic facts, things might turn out better. The project team remembers that the ninja is here to help, while the ninja should focus on highly leveraged actions and avoid going over things line by line.

A crappy project can't be fixed by a line by line code inspection, no matter how good a ninja one is. Sez me.

Technorati Tags: ,

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

Home Page, Category, and Item Paging in DasBlog

July 9, '07 Comments [0] Posted in DasBlog
Sponsored By

We on the DasBlog still struggle with documentation (and we're always looking for folks who want to help). Any skinnable/themeable blog engine with templates and macros like DasBlog has literally hundreds of options that you can opt-in or out of.

DasBlog uses a macro engine with macros in the form of <% macro(param, param) %>. These macros go into two main template files (although there are others), called hometemplate.blogtemplate and itemtemplate.blogtemplate.

The first is not just the home page, but the whole basic layout of the blog. The second is the template for any one single blog post.

We recently added a couple of options for paging to DasBlog, but we haven't added them to all of our 16+ default themes, and if you have a custom theme - and most of you do - then you'll note get these new features unless you add a few things to your templates.

There's a couple different kinds of pagination, in an attempt to answer Jeff Sandquist's good question.

Home Page Paging

imageThere's "Older Posts" that you'd use to get to older ports from the home page. This takes the form of an "Older Posts" link usually at the bottom of your blog's main page, and a "Newer Posts" link if they are already off the main page. The URL will change to include a page parameter like: http://www.hanselman.com/blog/default.aspx?page=1

All this assumes that after someone has read the first page they'll want to continue reading backward in time. You can get that by adding these macros to your hometemplate.blogtemplate:

<div class="post-paging">
 <div class="previous-posts">
  <% DrawPostPagingPrevious() %>
 </div>
 <div class="next-posts">
  <% DrawPostPagingNext() %>
 </div>
 <div class="clear"></div>
</div>

The divs are, of course, totally optional. These are just what I use.

Category Paging

imageA lot of features are added after someone uses your product for years. I've got five years of blog posts now and I didn't have a problem with too many posts in one category in 2002, but now it's a problem. So, there's category paging, that appears only when you're on a category page and you've turned on category paging in your EditConfig.aspx.  To turn on category paging do two things, one, uncheck "Display All Entries in Category View and second, ensure there is a value in the "Entries per page" textbox.

image

The macro you'll need to add to your hometemplate.blogtemplate is:

<% DrawCategoryPaging() %> 

and I usually put in in the template TWICE, once above the "bodytext" macro and once below so folks can get to the next page regardless of if they're at the top or bottom of your page.

Single Item Paging (Navigation)

Finally, there's item paging. Not really paging, as it's navigation. It means being able to go from single post to single post. That's done by adding this to your itemtemplate.blogtemplate, usually at the top:

<%PreviousLink("&laquo;&nbsp;",40)%>
<%MainPageentryLink("Main", "|")%>
<%NextLink("&nbsp;&raquo;",40)%>

For the first and last macro, the HTML entities that are passed in are the characters that you want prepended or appended to the name of the previous and next title, and the number is the number of characters to show before truncating the title.  for the "Main" macro, the word passed in is the text to display to indicate the home page. I use the word "Main," myself. The second parameter is the separator.

image

Again, there's LOTS of cool stuff you can do with DasBlog that we are doing a lousy job of Documenting. If you want to get involved, join the DasBlog Developers Mailing List (Archives) and jump in. We're harmless.

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

Lenovo T61 - The Battery is too hot, run!

July 6, '07 Comments [12] Posted in Musings
Sponsored By

I swear I can break any computer just by being in the room. You do realize, Dear Reader, that these crazy message boxes and errors that I bring to you week after week are real, screenshoted from my own machines, unmodified. Some of these things are just unreal. Like, I have to look around sometimes for the hidden camera because I MUST be on TV.

Today, the IBM Craplet Message Center had these choice tidbits for me.

The next messages let me know a battery error is detected? What kind of error could that be? Did it suddenly STOP being a battery? Then, seconds later, "irreparable damage" was detected. Who or what service detected this? Not just regular damage, mind you, but irreparable damage.

Then, I'm told it's too hot. Hm. Feels find. No fever or anything. Either way, I removed it because I don't want my ThinkPad to explode like Alan Cox's did.

Best part: Notice the "Advertising" message from 14-Mar telling me to pick up some of these great ThinkPad batteries.

Message Center (3)

Welcome to my life. I hate computers some days.

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 71 - Windows Home Server - Interview with Charlie Kindel

July 6, '07 Comments [11] Posted in Home Server | Podcast
Sponsored By

image My seventy-first podcast is up.  I've talked about Windows Home Server on my blog before and even said once that I was more excited about WHS than Vista. I've personally been running it for about 6 months now at home and I love it. In this episode I sit down with Charlie Kindel, the Product Unit Manager (PUM), behind the Windows Home Server team. This guy has worked for Microsoft for 17 years, so he knows his stuff. He helped design and ship COM/DCOM. Oy. Get some old hardware together and go get Windows Home Server RC1. Also check out the Home Server SDK as there's a USD$50,000 Developer Contest for the Best Home Server Add-Ins.

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?

Technorati Tags: , ,

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

Xbox360 XNA Game Development - Hanselman Conversation Simulator

July 6, '07 Comments [14] Posted in Gaming | Programming
Sponsored By

image Madness I say. George Clingerman has created an XBox360 game using the XNA Framework called "A Conversation with Scott Hanselman."

Yes, you read that right and I'm as shocked as you are. I've been told that conversations with me are as fun as watching paint dry, and I believe my wife when she says this.

George based his game on his theory that I have only a certain attention span while talking to you and will run away if you're not interesting. (No comment. ;) )

He says:

"It may have been my imagination (the drinks WERE free), but about 10 seconds into the conversation it suddenly occurred to me that Scott Hanselman was timing me. It was like the second I walked up to him, he visually assessed me and gave me a set conversation time, say about 2 minutes and 27 seconds. He was keeping this internal timer running in his head and after the timer reached 0, he'd wrap things up and move on. It makes sense, he's a busy guy, got a lot of geek fame and if he's going to circulate or get anything done, seems like a practical thing to do. So as we're talking and I'm watching this timer that I'm imagining running just behind his left eye, I begin to wonder if there are "checkpoint" bonuses. Like maybe if I hit on an interesting conversation topic or say something in a clever way, will Scott increase my allotted conversation time? And then on the flip side, if I drone on or bore him, is he decreasing my allotted time and preparing to move on sooner?

So yeah, I spent my entire 2 minutes and 27 seconds playing this imaginary game in my head. You do XNADevelopment? +10 seconds. Want to help me make a web browser for the 360? No? -10 seconds. You seem pretty drunk. -30 seconds. That was actually funny +10 seconds. Well, got to go."

Now, you too can have that kind of fun on your Xbox or Windows machine. Seriously though, it's a pretty interesting little sample that shows a lot of the 2D Gaming Concepts that you'd need to know in order to create your own - more interesting - game.

Sounds like George had a great time and tried something new, coding this in a weekend using techniques from a 4 Hour Work Week

"The whole weekend demonstrates once of the concepts I picked up from Scott's interview with the author of the 4 hour work week. Create an environment to set yourself up for success. That's how I finished this game in a weekend. I took away the distractions, surrounded myself with the materials I needed to develop and I got it done. I had an absolute blast."

If you want to download the XNA Game Studio Express, get the 1.0 Refresh here. If you want to download just the XNA Framework, get the 1.0 Refresh here. It's a single download and the FAQ explains lots. There's also lots of good samples and tutorials at the XNA Creators Club. The game will run on Windows if you have an Xbox Controller attached, but perhaps someone will add keyboard support or make it a ClickOnce App...

This was a total surprise to me and I had nothing to do with it, but I want to give Big Thanks to George for this fine bit of fun and for, on his own, using his weekend project to help me raise money for Diabetes Research!

Seriously, come on, does that REALLY look like me?

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.