Scott Hanselman

Hanselminutes Podcast 168 - Successful Cross Platform .NET Development - Mono and Banshee with Aaron Bockover

July 1, '09 Comments [11] Posted in Mono | Podcast | Source Code | Windows Client
Sponsored By

banshee-windowsMy one-hundred-and-sixty-eighth podcast is up. In this one, I chat with Aaron Bockover of Novell about the Banshee Project - a cross-platform Media Player. It's a Mono Application that runs on Linux, Mac OS X and Windows. What are the hard-won secrets of cross platform .NET dev? Aaron and his team know the answers.

I really enjoyed this show. Aaron's team has unquestionably proven that you CAN make a great .NET app that looks great everywhere. Here's Banshee on Windows, OSX, and Linux. Remember, this is written in C#, people. Click the images to see them larger.

banshee-linux

banshee-mac-os-x 

Links from the Show

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

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

Telerik is a sponsor for this show!

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET and Windows Forms. Enjoy the versatility of our new-generation Reporting Tool. Dive into our online community. Visit www.telerik.com.

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

Videos from the Norwegian Developer's Conference

July 1, '09 Comments [17] Posted in ASP.NET | ASP.NET Ajax | ASP.NET MVC | Podcast | Screencasts | Speaking
Sponsored By

All of the talks at this year's Norwegian Developer's Conference were recorded, which is always a treat.

I did four talks as well as a live .NET Rocks show. It was a crazy week. I also recorded a half-dozen great podcasts. Three are already live on Hanselminutes and I've got more in the hopper coming soon.


The HaaHa Show - Hacking with Phil and Scott

In this one, Phil is a hacker and he keeps breaking my websites. I fix them, and he breaks them again. Watch movie.

image


.NET Rocks - Live! With Carl, Richard, Scott and Phil.

This is a really silly show and was entirely content-free. ;) Watch movie.

image


The Magic of Astoria - ADO.NET Data Services

Me talking about REST and SOAP and ADO.NET Data Services. Watch movie.

image


Making Your Blog Suck Less

Warning: I do swear in this one. Dunno what got into me. Watch movie.

image


Tour of .NET 4.0

This one's not working right now. Not sure why. I'll update with a screenshot when it works again. Watch movie.


There's a LOT of greats content over there, and I encourage you to check them out. There's DOZENS of awesome talks, but here's just a few.

All in all, if you're in or around Europe, do stop by NDC next year. I've done it two years in a row and it's been a blast each time. It's a very smart, agile conference.

NOTE: Their website is borked right now and has an "off by 1" error for the Day 1 Talks. The "watch movie" links are all shifted. Pick the talk you want, but CLICK the talk above it, wrapping to the left. I'm sure they'll fix it in a few hours.

Second Note: I am just reporting the news here, so don't get mad at me. I haven't been able to get the videos to work on any browser EXCEPT Internet Explorer. They don't seem to work on either Firefox or Chrome. Again, not my thing, and yes, it sucks. It's probably a result of whatever company they selected to do their video, not due to some global Microsoft evil plot to be mean to you personally. Smooches. YES, we will ask them to make downloadable versions.

Enjoy!

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 167 - Convention Over Configuration with Jeremy Miller

July 1, '09 Comments [0] Posted in Agile | Podcast
Sponsored By

jeremymiller My one-hundred-and-sixty-seventh podcast is up. Scott's Norway interviews continue this week, this time with Jeremy Miller, author of Structure Map. Scott and Jeremy chat about fluent interfaces, Convention Over Configuration and how to best simplify your systems.

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

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

Telerik is a sponsor for this show!

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET and Windows Forms. Enjoy the versatility of our new-generation Reporting Tool. Dive into our online community. Visit www.telerik.com.

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

Twitter: Let the Information Wash Over You

June 29, '09 Comments [24] Posted in Musings
Sponsored By

twitter-duck-01aThere's a lot of information, both useless and useful, on Twitter. When you get started on Twitter the shear amount of crap can be totally overwhelming.

Twitter's a lot like Tivo (Digital Video Recorders). It'll record everything and everyone you're interested in, and while this seems like a great idea, just like your Video Recorder, what was once a joy quickly becomes a chore. I've got dozens of shows on my recorder...I thought TV was supposed to be fun, now it's become a To-Do List. The same thing happens with Twitter. If you expect Twitter to be high signal and low noise, it's not the medium for you.

If you make Twitter into another list of crap to read, you will be sad. The sooner you realize that Twitter is just a list of crap, the happier you'll be.

Just let it flow over you like water on a duck's back. When you follow someone on Twitter, you're following the whole person. You might find out where @levarburton went to lunch that day. You might see pictures of me taking my kids to see Thomas the Tank Engine. You may see @BillyMays (RIP) last tweet as he gets off a plane. You can get news and opinions, pictures of planes in the Hudson, and find out where famous folks use the toilet. Truly thrilling.

Twitter is a lifestream and just as you'll miss stuff in life, you need to accept you'll miss stuff on Twitter.

Sometimes people will "unfollow" you (or me) and they'll tweet why. I have had a lot of people unfollow me because there's "not enough .NET content" in my tweets.

However, as @unclebobmartin says:

Twitter is not a single topic medium. If you follow someone you follow the whole person.

This statement might seem obvious, but it's not obvious to everyone. Uncle Bob and I don't agree on politics. That doesn't mean I'm going to unfollow him. I'm also not following him because I think I'll miss some deep insight on Software Architecture. I follow Uncle Bob because I like Uncle Bob. He is a full and complete person and he's interesting. When he stops being interesting, well...let's just hope for his sake, he stays interesting. ;)

I use a few tricks with Twitter to stay on to of things without them becoming stressful. That's the key. If Twitter stops being fun, consider Quitting Twitter rather than following everyone.

Twitter Rule #1 - Follow Liberally

Twitter without People isn't Fun. I'll use me as an example, because I'm on Twitter, but note that I'm not the point, just an example.

Sometimes someone will tweet that I've (personally) "filled their twitter timeline." Then I'll take a look at their Twitter account and notice that they are following maybe 7 people. Usually something like 6 friends, the me. This would be like going to a cocktail party with, well, 6 of your friends, and me. That would be obnoxious, or rather, _I_ would be obnoxious. No one would want to go to that party, it would be lame.

To have a real cocktail party, you need a lot more people. Forgive me as I quote myself (ya, I know):

It's a river of uselessfulness and truthiness. It's a permanent cocktail party where you know some folks, and don't know others. Some are famous, some are your friends. There's a the constant background of overheard conversations, except on Twitter, it's socially acceptable, nay, encouraged, to jump in. No need to say, "oh, I couldn't help but overhear, excuse me but..."

To really get something out of Twitter you need to follow at LEAST a hundred people of various backgrounds. Really mix it up. If you're really into just .NET and only want to see .NET tweets, I'll talk about how you can filter in a second.

Still, take a moment and drink this in. Follow liberally. You're following people, not topic experts. They'll tweet jokes and stupid stuff as often as they'll tweet code and useful tips. You'll need to follow a large swatch of people in order to get a wide and diverse experience on Twitter.

Some folks say that they can't find anyone interesting to follow. This is nonsense. Here's a tip. Find ONE interesting person, and see who THEY follow. Rinse, repeat. I've found 1000 interesting people this year. Turns out the world is full of them, and 0.1% of them are on Twitter.

Twitter Rule #2 - Use Search Effectively

Search is integrated into Twitter's website now, when it wasn't before, so that's useful, but I'm still surprised how few people notice that little search box. Make sure when you select a Twitter client that you select on that supports Search Columns. This is how you find info on topics when you're not necessarily interested in particular people.

For example, if you don't want to follow me, but you want to listen to conversations on ASP.NET MVC, make a search column with "ASP.NET MVC" in it.

I recommend these Twitter clients that effectively support search:

  • TweetDeck - The original "deck" full screen client. The first thing you need to do after you install is go to the settings and turn off the "All Friends" notification as it'll drive you insane. The second thing is to setup some columns for topics you're interested in.
  • bDule - A very nice client for Windows with a lot of of flexibility in how you can layout the columns. It also supports Facebook comments and likes.
  • DestroyTwitter - The new kid on the block, it's very minimalist in style but supports many themes. It can be small and thin or be like TweetDeck and have columns.

TweetDeck (2)I have columns in TweetDeck for Friends, Replies, Direct Messages, a search for "hanselman OR hansleman", a search for "Win7", a search for "asp.net", a search for "mvc," and a search for "diabetes." I also add searches for topics that I may find interesting that day or week, but then I'll delete them later. I had a Michael Jackson search for a few days, as an example.

Point is, make sure your Twitter Client supports search. Otherwise it's useless.

Twitter Rule/Tip #2a - Groups

Another way you can segment things is to use Groups. TweetDeck lets you put, for example, all your .NET people in one group and all your diabetics in another. This forces you to break up your party and assign labels to folks, but it's your party. That's another good thing to remember.

Twitter Rule #3 - Favorites as "Read Later"

When things are moving fast you often need a "read stuff later" button. While there is a service called Instapaper that is starting to get integration inside of some Twitter clients, it hardly has the broad support of a TwitPic or other 3rd party tool.

To solve this, I use "favorites" as my "read later." That means if I'm on my phone or my desktop and someone tweets something interesting or a link I don't have time to follow, I favorite it, then I came back later to read it. This simple technique has made things a little calmer for me when there's tweets coming in faster than I can read them. I just hit the little "star" icon in my twitter client that every client supports and I'll get to it later.

Conclusion

So, if you want to follow the Whole Person, follow me on Twitter. If not, just hang out on the blog, there's no hard feelings. :)

Also, consider reading my post on How To Twitter - First Steps and a Twitter Glossary

*Twitter Duck Image courtesy of Paul Söderholm

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

The Weekly Source Code 43 - ASP.NET MVC and T4 and NerdDinner

June 25, '09 Comments [9] Posted in ASP.NET | ASP.NET MVC | NerdDinner | Source Code
Sponsored By

UPDATE: David's put the T4 template with some nice updates on CodePlex - It's the last download here.

I really advocate folks reading as much source as they can because you become a better writer by reading as much as writing. That's the whole point of the Weekly Source Code - reading code to be a better developer.

Reading code in Open Source projects is a good way to learn, especially if the project has been around a while and been successful, or if you already respect the team of people working on it. Less reliably, you can find snippets of code by searching and sharing code.

David Ebbo is scary clever. You know someone is smart when they come up with something you don't think you yourself could come up with on your own, but you still kick yourself for not thinking of it in the first place.

David's been experimenting with ways to make ASP.NET MVC better, specifically in the area of strongly-typed helpers. He's trying to get rid of strings, magic or otherwise.

He started with a BuildProvider (not a lot of folks know about BuildProviders...it's a powerful secret.) David didn't like these kinds of links in ASP.NET MVC:

<%= Html.ActionLink("Home", "Index", "Home")%>

So his BuildProvider would get added to the web.config:

<buildProviders>
<add extension=".actions" type="MvcActionLinkHelper.MvcActionLinkBuildProvider" />
</buildProviders>

And it would give you better methods like this, by poking around in your project and dynamically generating helper methods for you:

<%= Html.ActionLinkToHomeIndex("Home")%>

image_7Then, just days later, David got the T4 religion (I've argued we are doing a poor job of promoting this, so I'm telling everyone I know) and you should too. David explored the pros and cons of CodeDom vs. T4 for CodeGen then recreated his ASP.NET MVC Helpers using T4.

He's enabling not only better ActionLinks, but also Action Url Helpers, Constants for View Names, and a very clever thing, helpers for View Models, courtesy of David Fowler.

I thought this was particular cool, because it's a really visceral example of what you can do with Code Generation when you start exploring what you know at compile time with what you wish you knew at Design Time. It also reminds us that it's more than just Compile/Test/Run - your projects become more "meta" when you've got Inspect/CodeGen/Compile/Test/Run.

For example, if you have a ViewModel that say, has a string, rather than:

<label for="Name">Name:</label>
<%= Html.TextBox("Name", Model.Name) %>
<%= Html.ValidationMessage("Name", "*") %>

Why not this instead:

<%= ViewModel.Name.Label() %>
<%= ViewModel.Name.TextBox() %>
<%= ViewModel.Name.Validation() %>

This ViewModel stuff is in the earlier CodeDom templates, but not (yet?) the T4 templates. I hope we see it again, don't you? What do you think, Dear Reader, of this approach vs. the "Opinionated Input Builder" approach?

Just recently David put out his "new and improved" MVC T4 template, which is the one you should check out. I'm gently pushing him to put it on CodePlex somewhere and bake this goodness in. (Go tell him and Phil!)

He was doing some stuff at runtime, but has since moved to a pure design-time approach.

David Ebbo's ASP.NET MVC T4 Template applied to Nerd Dinner

image_d417b977-3d4c-4d3c-88e6-438b7a32582c David took the NerdDinner app as his base, and installed his T4 template. Just drop it in, and magic gets generated. How does it work, though?

Before he was using reflection but since this is a Design Time Code Generation process he had to delve into the *gasp* COM-based VS File Code Model API. However, this does really show off the power and flexibility of T4 itself. Kudos to David for looking COM in the face and not blinking!

Go download his template (direct ZIP here) and open it up.

T4 files can be scary to view in a text editor as they are constantly switching between <% code blocks %> and the code that's being generated. I use Notepad2 to view them, using the (interestingly enough) XML Document option that gives me rudimentary syntax highlighting.

If you're serious about T4, go get the Visual T4 Community Edition from Clarius for half-way syntax highlighting, or pay for the Professional Edition. They'll register themselves with Visual Studio and give you a better experience than just all-black text.

The first line in David's T4 template that made me chuckle was the the first line that's executed:

<# PrepareDataToRender(this); #>

As they say, it's funny because it's true. This is typical of code generation templates of all kinds. It's the "DoIt()" method that takes the left-hand's code (the COM crap) and prepares it for the right-hand (the template itself).

In order for David to make his template tidy and enable this nice clean level of abstraction:

<#  foreach (var controller in Controllers.Where(c=>c.IsPartialClass)) { #>
namespace <#= controller.Namespace #> {
public partial class <#= controller.ClassName #> {
protected RedirectToRouteResult RedirectToAction(ControllerActionCallInfo callInfo) {
return RedirectToAction(callInfo.Action, callInfo.Controller, callInfo.RouteValues);
}
...snip...

...he has to prepare an object model, and that's what PrepareDataToRender does. It's funny also because it's buried at the end, as it should be. It's really a pleasure to read and does a LOT considering it's only a 415 line template.

He has a number of cute gems like this one-line helper function that combines a little COM a little LINQ and a little magic to a list of methods to his template using the Visual Studio API. I laughed at the "functionFunction" enum. "Do you like her? or do you like her like her?"

// Return all the CodeFunction2 in the CodeElements collection
public static IEnumerable<CodeFunction2> GetMethods(CodeClass2 codeClass) {
// Only look at regular method (e.g. ignore things like contructors)
return codeClass.Members.OfType<CodeFunction2>()
.Where(f => f.FunctionKind == vsCMFunction.vsCMFunctionFunction);
}

David is clearly deep into this exploration right now, and is asking your opinion about the design. I would encourage you to flood him with feedback, or leave it hear and I'll tell him. ;)

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.