Scott Hanselman

Monetizing your Blog

October 08, 2006 Comment on this post [7] Posted in DasBlog
Sponsored By

Unless you're a top tier blogger (I'm not one, and I'm not sure what the demographic of one is, as I don't know any REALLY big bloggers.) you're not likely to make a lot of money blogging. I make enough to pay my hosting company (ORCSWeb) and pay for lunches along with the occasional gadget or shareware app.

However, paying for your hosting costs and getting a little spending money isn't a bad thing to aim for. Here's the programs I use on my blog to make extra money:

  • Google Adsense - I've got some Google Ads running just above the first post. I don't think it's too obtrusive and they'll do a direct deposit when the earnings get over a certain amount.
  • Amazon Associates - Any time you post about books you read like I did last year, you include your Amazon Associates ID
    If you have a Cuecat, I made it easier to create Amazon links just by scanning the books directly into Windows Live Writer and blogging from there. You can also use Roy Osherove's Amazoner tool to create these links. Amazon will pay you in Amazon Gift Certificates or real money.
  • Sell premium advertising space directly. If you know what your traffic is like and you know your demographic (I've got a good idea of both) then you can offer premium space directly. However, only support products that you personally recommend. Xceed has had a banner at the top of my blog for the last several months. Their libraries are gold, especially their ZIP stuff.
    • Some other companies have products that offer affiliate programs where you get a small percentage (~5%ish) if someone orders from your link. Often you'll be able to offer a coupon or deal to your readers. Again, only do this when a product kicks ass. I dig MaxiVista the virtual network Video Card software (kind of has to be seen to be believed and understood). SyncBackSE is another application that I recommend highly. I use it to synchronize trees between three local harddrives and an FTP server. Both these programs have affiliate programs that pay small dividends.
  • I almost forgot (thanks Phil!) the best for last - FeedBurner and their FAN (FeedBurner Ad Network). They are starting slow, so you have to apply to get into their advertising system, but I've found them to not only be a classy bunch of guys, but also meticulous about metrics. They measure freakin' everything and give you reports up the wazoo. I was very down on RSS Advertising, but these guys changed my mine. I have control over exactly what ads I will show and how often I show them. I can decide against any ads that I think might be wrong for my audience.
  • UPDATE: Another idea is jobs.codebetter.com and their referral program. They are a jobs posting site, except you can insert javascript in your own blog to spread the word about the jobs. You get a finders fee if a job is filled from an ad on your blog.

Again, none of this adds up to rent money, but if you're going to write blog posts occasionally, you should at least make US$6-10/hr doing it, right?

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Google Code Search - Now you can search the Bathroom Wall of Code

October 06, 2006 Comment on this post [8] Posted in Programming
Sponsored By

Everyone is agog about Google searching code.

I find the language detection stuff to be really interesting. Are they using heuristics or just the file extension to figure out what language the code is? Probably extensions, but it'd be clever if they also used code keywords to guess.

One point that I think should be addressed by a future version is tuning of relevance data. If you search for DasBlog (not a really valid code search), you'll find folks that reference DasBlog libraries, and source inside ZIP files, but not the ACTUAL source at the ACTUAL location. It'd be nice to see them understand where the authoritative source of source is.

A few advanced tricks are:

  • Restrict search to "C"-based languages
    • lang:^(c|c#|c\+\+)$
  • Avoid GPLed code
    • -license:gpl

You can also include Google Code Search on your own side as a GDATA (~GoogleRSS) feed.  However, you can't restrict code searches by site using site: which is a bummer and limits its usefulness. I'd like to be able to have folks search for source on my blog.

Be sure to read their Google Code Search FAQ if you want to block them (robots.txt) from crawling your code.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Professional ASP.NET 2.0 Special Edition (Hardcover) now available at Amazon

October 05, 2006 Comment on this post [18] Posted in ASP.NET
Sponsored By

Professional ASP.NET 2.0 Special Edition is finally out. It's such a huge book physically that there was trouble at the printers.

If you haven't already bought the original one, this updated book is only $37.79 on Amazon, which is pretty good for 1584 pages. Here's a PDF of the Table of Contents. Here's the index as well.

The four new chapters and two Appendices we added are (from Jim's blog):

  • Chapter 14 "Introduction to the Provider Model"  - 38 pages
  • Chapter 15 "Extending the Provider Model" – 36 pages
  • Chapter 30: Localization – 26 pages
  • Chapter 32: Instrumentation – 38 pages
  • Appendix B: Migrating ASP.NET 1.x projects – 12 pages
  • Appendix C: Using Atlas – 16 pages

Then there's a long list additions within existing chapters:

  • Chapter 2: Added Class Designer File and Open Test Bench
  • Chapter 3: Added Build Providers
  • Chapter 4: An additional more complex callback example
  • Chapter 6: Added Uploading multiple files from the same page
  • Chapter 11:
    • Added: SqlDataSource Configuration Wizard to add optimistic concurrency
    • Added SqlDataSource Events, Using the SqlDataSource with Oracle, AccessDataSource Control
    • Added GridView events that fire when the data binding occurs
    • Added Using the TemplateField Column in the GridView Control
    • Added Using the TemplateField’s EditItemTemplate
    • Added Expressions and Expression Builder
  • Chapter 12:
    • Added Using Oracle as Your Database with ASP.NET 2.0
  • Chapter 13: Added "Generating Custom XML from SQL 2005"
  • Chapter 16 "Site Navigation"
    • Added what a HTTP sniffer does
    • Added Security Trimming
    • Added Setting up Role Management for administrators
    • Added Nesting SiteMap Files
  • Chapter 17 Personalization: Added new section at end on Managing Application Profiles.
  • Chapter 18: Membership and Role Management
    • Added locking out users who provide bad passwords
    • Added generating random passwords
  • Chapter 19: Web Parts
    • Added 10 new pages on connecting Web Parts
  • Chapter 24 File I/O and Streams
  • Chapter 25 User and Server Controls
    • Added Loading User Controls Dynamically – about 4 pages
  • Chapter 31 Configuration:
    • Added about 2 pages on trust levels
    • Added about 3 pages on encrypting configuration files

Beyond that, there were numerous sections where a page or less of material was added, replaced, examples replaced, and so on.

You also get a DVD with the 180 day Trial edition of Visual Studio 2005. There's a CD with PDFs of chapters from 15 or 16 other Wrox ASP.NET 2.0, C# 2005, VB 2005, .NET 2.0, and SQL Server 2005 books. Most of the books on the CD provide 2 meaty chapters, plus full TOCs and indexes. There are more than 1000 pages of chapter content on the CD.

It's also hardcover so you can beat off hobos.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Hanselminutes Podcast 35 - The State of HDTV

October 05, 2006 Comment on this post [5] Posted in Podcast
Sponsored By

My thirty-fifth Podcast is up. Carl and I discuss the current state of Hi-Def Television (HDTV).

We're listed in the iTunes Podcast Directory, so I encourage you to subscribe with a single click (two in Firefox) with the button below. For those of you on slower connections there are lo-fi and torrent-based versions as well.

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Links from the show are also always on the show site, although this show had no links to speak of. Do also remember the archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Check out Aspose, the .NET and Java Component Publisher. They produce a wide variety of components with versions in both .NET and Java. Do check out their Aspose Demo Downloads as they have a huge catalog of tools to explore.

Our sponsors are Apose, /nsoftware, CodeSmith Tools and the .NET Dev Journal.

There's a $100 off CodeSmith coupon for Hanselminutes listeners - it's coupon code HM100. Spread the word, now's the time to buy. This coupon is good for the CodeSmith Professional With 1 Year Premier Support option.

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)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

What is Abandonware?

October 05, 2006 Comment on this post [7] Posted in Musings | XML
Sponsored By

TumbleweedI referred to MbUnit once as "abandonware" only to be corrected (rightly so) by Andy Stopford (here's a listserv about the issue). In this case, it was not clear at a cursory glance if it was being "actively developed."  Here's some metrics that were provided by Jay Flowers that prove that MbUnit is very alive:

Google Groups:
MbUnit.Dev - 62 Members with 60 posts last month
MbUnit.User - 120 Members with 35 posts last month

8 Dev Leaders with rights to Subversion

Here is the Svn FishEye:
http://www.mertner.com/fisheye/browse/MbUnit

4 Devs committing changes in Aug
264 files changes/28 revisions in Aug

Other folks have done the same thing to DasBlog that I did to MbUnit. Take a cursory glance at the DasBlog SF.NET Projects Page a few weeks back and you'd fine many unanswered questions. In both instances - DasBlog and MbUnit - the project owners needed to take into consideration the external perception by the community of the projects and tighten the screws a bit, all to avoid the label of "Abandonware."

Another word invented by Roy Osherove was "frozeablilty" (or chance of being frozen/abandoned. Perhaps frozeabilitishipfulness is a better word?:

MbUnit is also one of the topics that I continually have a dilemma about using. Since its not the de-facto standard out there, I always feel there's a chance of it being frozen in mid development, making all those who depend on it frozen along with it.

[Update: Andrew, one of the leads on mbUnit,  makes some good points on why he thinks this is far from happening - which is reassuring, and I'd like to hold out longer before making a final call on it's "frozeability".]

Now, we're picking on DasBlog and MbUnit here, but both actively developed projects that aren't abandoned. But let's talk about the real issue. Is software that has been abandoned bad? Is it un-usable? Should we only use software that is actively developed?

Abandonware Example - A .NET Implementation of Schematron

We recently needed to do some data import work, and we were using XML as the source format and XSD to describe the constraints of the validity of the data. Xml Schema isn't well suited for complex data with conditional interrelationships.

For example, if I have a Payment in Xml Schema, it might have a FromAccountID and an optional DateCompleted (and many other things):

 <xs:complexType name="Payment">
  <xs:sequence>
   <xs:element name="FromAccountID">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:maxLength value="25"/>
      <xs:whiteSpace value="preserve"/>
     </xs:restriction>
    </xs:simpleType>
   </xs:element>
   <xs:element name="DateCompleted" minOccurs="0">
    <xs:simpleType>
     <xs:restriction base="xs:date"/>
    </xs:simpleType>
   </xs:element>
...

But, there's a business rule that indicates that if FromAccountID is "PAID" then there must be a DateCompleted. This kind of condition isn't expressable in XSD. I started looking for other solutions like RelaxNG or Schematron.

Schematron is an interesting spec, but the nutshell explanation is that you can augment XSD with additional assertions using XPath. You can also (with some implementations) include Schematron patterns inside of existing Xml Schemas using the xs:annotation element. Schematron the spec is being actively talked about (article at IBM from this July), commented on by Microsoft PMs (quote from July) but there's a reference implementation using XSLT but it hasn't been looked at since 2001. Some bloggers have commented on the uneven state of Schematron.

I can extend this XSD with Schematron like this:

 <xs:complexType name="Payment">
  <xs:annotation>
   <xs:appinfo>
    <pattern name="Payment Rules" xmlns="
http://www.ascc.net/xml/schematron">
     <rule context="Payment">
      <assert test="(FromAccountID = 'PAID' and DateCompleted) or 
          (FromAccountID != 'PAID')">
             PAID Payments must have a Date Completed
      </assert>
     </rule>
    </pattern>
   </xs:appinfo>
  </xs:annotation>
...

And this simple example gives me the semantics I need and I get output like this from a console test application that are exactly what I need:

Results from Schematron validation
    From pattern "Payment Rules"
        Assert fails: PAID Payments must have a Date Completed
        At: /FI[1]/Relationship[1]/Payee[1]/Payment[2]
            <Payment>...</Payment>
            (Line: 73, Column: 5)

However, doubts about Schematron persist. Uche Ogbuji says:

"It has been a sketchy time for Schematron fans. Rick Jelliffe, the father of Schematron has had pressing matters that have prevented him from putting much work into Schematron for a while. Many questions still remain about the technology specification, and alas, there appears to be no place to keep discussions going on these and other matters (the mailing list on SourceForge appears to be defunct, with even the archives giving a 404. Here are some notes on recent Schematron developments I've come across."

However, it is moving towards being an ISO spec (or may already be?) and there's active talk going on at the SchematronLoveIn mailing list.

There's also a great (but oldish) article on Introducing the Schematron here. Looks like it might be a fine idea. The XSLT implementation worked group, but I also noticed a native C# .NET implementation at SourceForge. This implementation has the very much added benefit of giving me not only an event when a Schematron assertion fails, but also the line number and additional context. However, it's not been touched since 2002.

Is that a bad thing?

I asked the author of the .NET implementation of Schematron, Daniel Cazzulino, what he thought and he said:

"Mmm... schematron is mostly abandoned as the new compiled XSLT in .NET 2.0 makes the need for an "xpath native" implementation pretty much useless. If you use the reference meta-stylesheet and provide a nice .NET API over it (alongside better results reporting, such as an object model that can also be serialized into XML and/or XSLT'ed into HTML reports), you should be OK. And you would be in a better position feature-wise, as I never got to complete support for diagnostics elements, etc., which is readily implemented in the meta-stylesheet."

To translate Daniel's techno-speak into regular-guy-speak he's saying

"Ya, that sucks. You can write a wrapper around this other thing yourself, and that'd be a good idea in the long run, but ya, that sucks."

However, this project isn't using .NET 2.0 (client requirements) and the existing .NET Schematron stuff not only works, but it works great. It's many times faster than the XSLT implementation and did I mention, it's open source. That means, I have the source.

It's not like the Open Source Fairy is going to delete the software (and source) off my hard drive if a project disappears.

To quote Patrick Cauldwell, "Sure, we are assuming the burden of maintenance when we use it, but we're doing that anyway as there's no assurance that someone in the OS community would care about a bug we found."

This is exemplified by Stuart's recent spitting into the wind with a catastrophic but ignored Subversion case-sensitivity bug.

Moral: What you care about, often ain't what the other guy cares about.

Conclusion: The Schematron .NET implementation is total abandonware and I'm going to use it anyway. Since when did 3 year old software become abandoned. I haven't been in my backyard in 3 years, but if I catch you camping there I'll ask you to leave.


(If you'd like to receive ComputerZen.com via email, you can subscribe to this blog as a newsletter for free. Subscribe to Scott Hanselman - ComputerZen.com by Email)

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

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