aspnet configuration comments edit

Are you tired of seeing your configuration settings as an endless list of key value pairs?

<add key="key0" value="value0" />
<add key="key1" value="value1" /> 
<add key="key2" value="value2" />
... 

Would you rather see something more like this?

<MySetting
  fileName="c:\temp"
  password="pencil"
  someOtherSetting="value" />

Join the club. Not only is the first approach prone to typos (AppSettings["tire"] or AppSettings["tier] anyone?), too many of these things all bunched together can cause your eyes to glaze over. It is a lot easier to manage when settings are grouped in logical bunches.

A while back Craig Andera solved this problem with the Last Configuration Section Handler he’d ever need. This basically made it easy to specify a custom strongly typed class to represent a logical group of settings using XML Serialization. It led to a much cleaner configuration file.

But that was then and this is now. With ASP.NET 2.0, there’s an even easier way which I didn’t know about until Jeff Atwood recently turned me on to it.

So here is a quick run through in three easy steps.

Step one - Define your Custom Configuration Class

In this case, we’ll define a class to hold settings for a blog engine. We just need to define our class, inherit from System.Configuration.ConfigurationSection, and add a property per setting we wish to store.

using System;
using System.Configuration;

public class BlogSettings : ConfigurationSection
{
  private static BlogSettings settings 
    = ConfigurationManager.GetSection("BlogSettings") as BlogSettings;
        
  public static BlogSettings Settings
  {
    get
    {
      return settings;
    }
  }

  [ConfigurationProperty("frontPagePostCount"
    , DefaultValue = 20
    , IsRequired = false)]
  [IntegerValidator(MinValue = 1
    , MaxValue = 100)]
  public int FrontPagePostCount
  {
      get { return (int)this["frontPagePostCount"]; }
        set { this["frontPagePostCount"] = value; }
  }


  [ConfigurationProperty("title"
    , IsRequired=true)]
  [StringValidator(InvalidCharacters = "  ~!@#$%^&*()[]{}/;’\"|\\"
    , MinLength=1
    , MaxLength=256)]
  public string Title
  {
    get { return (string)this["title"]; }
    set { this["title"] = value; }
  }
}

Notice that you use an indexed property to store and retrieve each property value.

I also added a static property named Settings for convenience.

Step 2 - Add your new configuration section to web.config (or app.config).

<configuration>
  <configSections>
      <section name="BlogSettings" type="Fully.Qualified.TypeName.BlogSettings,   
      AssemblyName" />
  </configSections>
  <BlogSettings
    frontPagePostCount="10"
    title="You’ve Been Haacked" />
</configuration>

Step 3 - Enjoy your new custom configuration section {.clear}

string title = BlogSettings.Settings.Title;
Response.Write(title); //it works!!!

What I covered is just a very brief overview to get you a taste of what is available in the Configuration API. I wrote more about configuration in the book I’m cowriting with Jeff Atwood, Jon Galloway, and K. Scott Allen.

If you want to get a more comprehensive overview and the nitty gritty, I recommend reading Unraveling the Mysteries of .NET 2.0 Configuration by Jon Rista.

comments edit

Curb your enthusiasm season 1
dvdJuan Catalan must be feeling “Pretty good. Pretty, pretty, pretty, pretty, good.” His poor luck seemed to exceed Larry Davidian proportions when he was accused of murder. But his luck took a turn for the better after over five months in Jail.

Catalan claimed to be at a Dodgers game with his daughter when the murder occurred. His defense attorney scoured TV footage of crowd shots from the game but could not find Juan. After learning that the show Curb Your Enthusiasm, starring Larry David who co-created Seinfeld, had taken footage at the ballpark that day (I think I remember this episode!), HBO allowed the attorney to search through their footage and he found a time-stamped shot of Catalan in the outtakes.

HBO allowed Melnik to look through the footage, and he found a shot of Catalan with his 6-year-old daughter and two friends. The footage was time coded, confirming that Catalan was at the ballpark shortly before the time of the slaying 20 miles away in the San Fernando Valley.

“There he was in the outtakes,” said Gary S. Casselman, the attorney handling Catalan’s lawsuit. “He’s glad it’s over. It’s terrible to be in jail, and he thought he would never see his daughters again.”

I read this in the Los Angeles Times yesterday morning and laughed at his good fortune to be saved by a television show.

Catalan was not a fan of “Curb Your Enthusiasm” before his time in jail. “He is now,” Casselman said.

I bet he is. The full Los Angeles Times article is here.

comments edit

UPDATE: As an aside, it would probably be more accurate to say the FizzBuzz question is a Requirement. So where you read the term Spec, you can replace it with Requirement. Either way, the same thing applies. The only thing not ambiguous is the code. As they say, the code is the spec.

One last point, then I’m done with this topic of FizzBuzz and spec writing. In a recent post, I mentioned tongue firmly in cheekthat the FizzBuzz “spec” has certain flaws. Now I admit I’m taking this out of context a bit to make a point. FizzBuzz is an simple interviewquestion, not a spec, possbily intended to elicit this type of analysis from the candidate. Even so, I think there’s a good lesson to learn here.

My point was that all specs are merely rough approximations of the actual requirement. Specs are ambiguous, but software is not. Software doesn’t generally deal well with ambiguity. Change a random bit in memory and all hell breaks loose.

However, some of that was lost due to the extremely nitpicky point I made about the spec. So here’s another, still nitpicky, but a bit less so.

Every so called “correct” program written in the comments of Jeff’s blog had the following output.

1
2
Fizz
4
Buzz
Fizz
7
Fizz
Buzz
11
Fizz
13
14
FizzBuzz

But, doesn’t the following output meet the letter of the spec (difference in bold)?

1
2
Fizz
4
5Buzz
Fizz
7
8
Fizz
10Buzz
11
Fizz
13
14
FizzBuzz

My point being, the spec is explicit about replacing numbers divisible by three with “Fizz”, but it doesn’t say to replace numbers divisible by five.

Yes, I agree. Developers should not act like total logicians and nitpick every detail. Human language is inexact, and we have to deal with that fact of life. Unfortunately, sofware doesn’t have the same resiliency towards ambiguity. If this output was meant to be fed into another software system, this ambiguity would cause bad data, software crashes, who knows what calamity!

You might say I’m splitting hairs here. Of course I am because the compiler is going to split hairs. The Web Service I’m trying to call is going to split hairs. The HTML browser is going to try and not split hairs, but is going to ultimately fail. Software is all about splitting hairs.

Instead, we need to move beyond the spec and ask questions before writing code, during writing code, and after writing code. Do not be afraid to talk to the customer or customer representative. That’s all I was trying to say.

Thanks to Rob Conery who was trying to make this point in my comments, but it was lost on everybody. ;)

comments edit

UPDATE: You can now subscribe to my feed via email. This is a service offering from Feedburner. Sweet!

Flame from
Feedburner.comI’ve decided to make the jump and switch to Feedburner after the glowing recommendation from Jeff Atwood. However, being the paranoid sort, I decided to go ahead and pay for the MyBrand PRO feature.

This allows me to keep control over my feed by serving it from my own domain http://feeds.haacked.com/haacked/. Not that I don’t trust FeedBurner, but if I ever want to take my feed back in-house, it’ll be a lot easier for me to change a DNS setting than to wait for them to perform a 301 redirect back to me.

If you’re reading this in your aggregator, my guess is that everything is working fine. If not, please do let me know if you encounter any problems. Flame on!

comments edit

I know, I know, you’d like to see the FizzBuzz discussion die a quick death, but trust me, this is an interesting point, or at least mildly amusing.

Sorry to revive the dead horse, but a comment in my blog brought up a very good point. In fact, I’m kicking myself for not noticing this myself, having been a math major and I love pointing out this type of minutiae.

In the original Fizz Buzz test, the functional spec asks the programmer to print the numbers from 1 to 100.

But as a commenter points out

Why can’t spec writers write? Unless you mean integers, there are an infinite number of real numbers ’from 1 to 100’

Exactly! There are an infinite range of numbers between 1 and 100. The specification is technically not clear enough. Writing a program to spec exactly would… well be impossible.

This is exactly why I said the following in a another comment

I still need to gather requirements! What platform must this FizzBuzz program support? Any performance requirements? Does the output need to be available over the web?…

Unfortunately, I missed the most important question I should have asked.

I assume you mean all intergers from 1 to 100 inclusive, is that correct?

I know what you’re thinking. In cases like this, developers should be able to intuit what the client means. If a developer asks Do you mean Integers or Real Numbers?, that developer is being a smart ass.

But my point is still valid. If a client says, I want a CRM system, you may know exactly what a CRM system is, but it may be totally different from what they think a CRM system is.

This really highlights the difficulty of writing good requirements and a good spec. You don’t know the background of the person you’re handing off the document to.

What makes perfect sense in your mind might mean something different to the reader.

Perhaps it’s situations like this that lead 37Signals to advocate getting rid of functional specs altogether.

Whether you go that extreme or not is not so important as keeping the lines of communication open with your client. Never accept a requirement and functional spec at face value. Specs are always a poor approximation of what the client really wants. All specs are broken to one degree or another (though that doesn’t mean they are all useless). Ask for clarification. Keep the dialog going.

This is also one reason why Big Design Up Front (BDUF) can really nail you in the butt. These subtle things are missed all the time. Having an iterative process where you’re not on the hook for requirements gathered months ago gathering dust helps mitigate the risk of incomplete and inaccurate requirements.

Even by thousands of software developers reading blogs.

comments edit

Update: I have an even better startlet for stopping and starting services in my comments.

If you’re running Vista, run, don’t walk, and go download and install Start++ (thanks to Omar Shahine for turning me on to this). Make it the first thing you do. Many thanks to Brandon Paddock who developed this nice little tool. He describes the tool in this post.

I have a message for Start++ from the Start menu. “You complete me!”.

Ok, terribly corny jokes aside, it’s the little things that save me lots of time in the long run. For example, starting and stopping SQL server is kind of annoying for me on Vista. Here’s my the typical workflow.

  1. Hit Windows Key, type in cmd
  2. type net stop mssql
  3. Doh! System error 1060 occurred. Right, I need to be an administrator.
  4. Grab the trackball
  5. Click on the Start menu
  6. Right click Command Prompt
  7. Click Run as administrator.
  8. Now type net stop mssql.

Is your hand hurting by now? Because mine is.

Of course, I’m an idiot. Or, I was an idiot. Now, I’ve mapped the Start++ keywords startsql and stopsql to automatically run the commands I need with elevated privileges.

Click for larger image.

Start++
Menu

Notice you can check the Run elevated checkbox for any command. Yes, I get the UAC prompt (Yes, I still have that sucker on), but that’s not such a big deal to me. Now my workflow is reduced to:

  1. Hit Windows Key, type in stopsql
  2. Hit the Left Arrow Key and Enter when the UAC prompt comes up.

Booya!

For your convenience, I’ve exported the startsql and stopsql “startlets” and put them on my company’s tools site here. I figure this one alone saves me a few seconds every half hour.

If you are using a named instance of SQL Server, you will need to change the argument in the Arguments column like so:

/C "net start mssql$NameOfInstance"

I have a few hundred or so startlets I can think of adding. Happy shortcutting!

Technorati Tags: Tips, Vista, Start++, Productivity

comments edit

Thought I should take advantage of my latest bout of insomnia and do a slight redesign of my website. My goal was to clean it up a bit so it looks less crowded and cluttered.

I also removed the Flickr images because the script was slow to load and caused my site to load slowly. I didn’t think it added a whole lot anyways. I may look into creating a server-side flickr control later.

Here’s a screenshot, in case you’re reading this in an aggregator.

Thumbnail of my
website

Let me know what you think of the design. My next step will be to focus more on usability. If there’s anything that annoys you about my site (here’s where Jeff will chime in) do let me know.

comments edit

Stack of
PaperIn Jeff Atwood’s infamous FizzBuzz post, he quotes Dan Kegel who mentions.

Less trivially, I’ve interviewed many candidates who can’t use recursion to solve a real problem.

A programmer who doesn’t know how to use recursion isn’t necessarily such a bad thing, assuming the programmer is handy with the Stack data structure. Any recursive algorithm can be replaced with a non-recursive algorithm by using a Stack.

As an aside, I would expect any developer who knew how to use a stack in this way would probably have no problem with recursion.

After all, what is a recursive method really doing under the hood but implicitely making use of the call stack?

I’ll demonstrate a method that removes recursion by explicitely using an instance of the Stack class, and I’ll do so using a common task that any ASP.NET developer might find familiar. I should point out that I’m not recommending that you should or shouldn’t do this with methods that use recursion. I’m merely pointing out that you can do this.

In ASP.NET, a Web Page is itself a control (i.e. the Page class inherits from Control), that contains other controls. And those controls can possibly contain yet other controls, thus creating a tree structure of controls.

So how do you find a control with a specific ID that could be nested at any level of the control hierarchy?

Well the recursive version is pretty straightforward and similar to other methods I’ve written before.

public Control FindControlRecursively(Control root, string id)
{
  Control current = root;

  if (current.ID == id)
    return current;

  foreach (Control control in current.Controls)
  {
    Control found = FindControlRecursively(control, id);
    if (found != null)
      return found;
  }
  return null;
}

The recursion occures when we call FindControlRecursively within this method. Essentially what is happening (and this is a simplification) when we call that method is that our current execution point is pushed onto the call stack and the runtime starts executing the code for the internal method call. When that method finally returns, we pop our place from the stack and continue executing.

Rather than try to explain, let me just show you the non-recursive version of this method using a Stack.

public Control FindControlSansRecursion(Control root
    , string id)
{
  //seed it.
  Stack<Control> stack = new Stack<Control>();
  stack.Push(root);
    
  while(stack.Count > 0)
  {
    Control current = stack.Pop();
    if (current.ID == id)
      return current;
        
    foreach (Control control in current.Controls)
    {
      stack.Push(control);
    }
  }
  
  //didn’t find it.
  return null;
}

One thing to keep in mind is that both of these implementations assume that we won’t run into a circular reference problem in which a child control contains an ancestor node.

For the System.Web.UI.Control class we safe in making this assumption. If you try and create a circular reference, a StackOverflowException is thrown. The following code demonstrates this point.

Control control = new Control();
control.Controls.Add(new Control());
// This line will throw a StackOverflowException.
control.Controls[0].Controls.Add(control); 

If the hierarchical structure you are using does allow circular references, you’ll have to keep track of which nodes you’ve already seen so that you don’t get caught in any infinitel loops.

comments edit

We’ve been having an internal debate within the Subtext mailing list over the merits of SourceForge vs Google Code Project Hosting vs Codeplex. Much of the discussion hinges around the benefits of Subversion for Open Source projects when compared to Team Foundation System (TFS).

Before I begin, I do not mean for this to devolve into a religious argument. This is merely my critique from the perspective of running an Open Source project. I personally think both are fine products and both probably work equally well in the corporate environment.

TFS Advantages

  • Easy of use. For developers with a background in using Visual Source Safe or Sourcegear Vault, the interface into TFS will be familiar. Subversion requires more of a learning curve for these developers, though this is mitigated by my suspicion that a large percentage of Open Source developers tend to use CVS and SVN already. 
  • Work Item integration is sweet. I’ve been contributing some code to the Subsonic project and I actually love the work item integration in VS.NET. It’s pretty nice to be able to review and close work items while working on the code.
  • Shelving is great. Certainly nothing stops you from doing something like this in Subversion by using conventions, but I like the syntactic workflow sugar this provides.

Subversion Advantages

  • Anonymous access. Users who want to look at the code, view the change history of the code, and update their local code to the latest version can do so form the convenience of their favorite Subversion client. This is much more cumbersome with TFS.
  • Patch Submission. This goes hand in hand with anonymous access. Users without commit access can have Subversion generate patch files consisting of their changes and submit these files. This makes it really easy for the casual contributor to quickly submit a patch as well as makes it easy for the Open Source development team to apply contributions to the source. This is a huge benefit to the project. Unfortunately with CodePlex, you either give commit access or you don’t. If you don’t, it’s a pain for users to submit patches and a pain for the project team to apply patches. Just ask Rob Conery what happens if you give commit access too freely.
  • Offline Support. Regardless of what Jeff says, offline mode does matter for many applications. For example, sometimes I have to connect to an obnoxious VPN that destroys my general internet connectivity. It’s nice to be able to connect, get latest, disconnect, work, connect, commit changes, disconnect. Try that with TFS.

Again, as source control systems, I believe they are both great systems. But for the needs of an open source project, I feel that Subversion has advantages. As far as I understand, TFS was designed as an enterprise source control system. However, the needs of the enterprise are often different from the needs of an Open Source team.

Subversion, itself open source, was used during its own development (when it became stable enough). So it is well suited to open source development.

If Codeplex supported Subversion, I would probably want to move Subtext over in a heartbeat. If you feel the same way I do, please vote for the work item entitled Subversion Support (SVN).

It looks like a lot of people would like to see this as well as it is the top vote getter on the Codeplex work item site.

And before you rail on me asking, Why Microsoft would ever consider such a move? Isn’t Codeplex a showcase for TFS and Microsoft Technology Open Source projects?

A member of the Codeplex team informed me that Codeplex is the home for any Open Source project - on any and all platforms. In fact, they do now host a few non-Microsoft projects. Of course their dependency on TFS does naturally limit the types of projects that would host there.

comments edit

Micah Dylan (CEO of VelocIT) writes about a tech support call he had with Comcast, the local cable company.

To sum (though you should go read it) Micah can’t login to the Comcast website and the tech support guy tells him to call Microsoft claiming it’s a problem with the browser!

Comcast Really?! You expect your customer to call Microsoft and singlehandedly convince them to update their browser so it works with your website, rather than following the lead of millions of other websites and making the website work with the browser? Really?

comments edit

UPDATE: This post was meant to be mostly tongue in cheek. I love programmers. Some of my best friends are programmers. Also, to be fair to the FizzBuzzers, the spec for this question is flawed, as are all specs as I point out in Why Can’t Spec Writers Write Specs.

You gotta love CodingHorror.com. Once again, Jeff Atwood writes a great post entitled Why Can’t Programmers.. Program?But in this case, **the best part is in the comments. Let me explain.

Jeff writes about a simple “Fizz Buzz” test given by Reginald Braithwaite. Here’s the functional spec.

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

Mind you, this is not a trick question. It is as easy as it sounds. Or it should be. According to Reginald Braithwaite, the majority of comp sci graduates can’t do it.

Naturally, the very first comment to Jeff’s post solves this simple problem. But read further and be amazed at how many developers get it wrong in such a public forum!

The problem may not be that these programmers can’t program. It’s that they can’t read!

I think reading comprehension must be at an all-time low among graduating programmers. Perhaps it’s time to bring back more word problems in our curriculum. Of course we’ve all seen this lack of reading comprehension in comments to our blog posts, haven’t we? As in when someone completely argues against a misinterpretation of your post.

It never fails to amaze me at how some companies I’ve worked with (or at) praise developers who are fast, even if they do the wrong thing because they failed to understand the spec or include so many bugs as to have made the spec irrelevant.

At least he’s fast!

Indeed!

So what’s worse? A programmer who can’t write code, or a programmer who can, but can’t follow a spec?

code, tech comments edit

Forget flame wars. They’re so USENET. The new way of geek fighting is much more subtle.

Subtlety of a blow
torch

Recently Scott Hanselman wrote a post on the SEO implications of URL standardization which Jeff Atwood followed up with his post on URL Rewriting to prevent Duplicate URLs.

Jeff makes it known that he prefers that his blog be referenced with the “www.” in the front. I think that’s an unnecessary three characters that is quite dated. Yes, we know your blog is on the World Wide Web. The World Wide Web is no longer a nice new shiny bauble. You can feel free to drop the www.

Besides, your domain name will sort better without it.

And for those who say: But if you hit CTRL+ENTER in the address bar, it’ll surround what you type with “www.” and “.com” I saw bah! If I want to go to Jeff’s blog, I can type c-o-d and hit tab and I’m there. A modern browser is pretty handy for that with that newfangled auto complete.

Anyways, in this recent post on the reading habits of programmers, I linked to a post of Jeff’s without the “www.”, which did not go unnoticed by Jeff nor LazyCoder Scott (thanks for pointing out the jab Scott, it might’ve gone under his radar damnit! A nice subversive jab at the man.)

Responding with a geek equivalent of “Oh no you di’int”, Jeff’s very next post, he returns the favor. Touché my friend! Touché. Well I’ve hidden a little something for you in this post. Oh yeah. Bring it on.

Aren’t we just so pathetic?

P.S. Jeff now flinches if you threaten to Digg his blog.

comments edit

I finally got around to uploading pics of our short Seattle vacation to Flickr. Our first full day there, Saturday, benefitted from beautiful weather. We took a nice boat ride on Lake Washington and skipped by BillG᾿s immense house.

Bill Gate᾿s
House

The pic does not do it justice. There are a few more here. We must᾿ve gotten too close for comfort because a security guard came to the water᾿s edge and mad dogged us.

We also had the opportunity to check out the new sculpture park. I thought it was quite interesting. One of my favorite sculptures was this chrome tree, seen here behind a real tree.

Chrome
Tree

I also had the opportunity to visit some friends at Microsoft. Apparently Microsoft is experiencing explosive growth. My friend Julie who worked on campus a couple years ago is now at an office complex one freeway exit away off campus.

Our friends worked hard to convince us that we should move to Seattle. But I think it may take more convincing, as we᾿ve both contracted a cold and blame the damn Seattle weather. Wink

asp.net comments edit

Scott Watermasysk has a great set of Quick Tips for ASP.NET on his blog. And this is only part one! I’m Looking forward to seeing the subsequent posts of this series.

However, I disagree slightly with his tip to Never use the ASP.NET Label control. I would rephrase it to:

Never use the ASP.NET Label control when a Literal would do.

The problem is not the Label control. The problem is treating the Label control as if it was merely a Literal control.

The Label control has a specific usage, to be a label for a form input. For example, check out this screenshot of a text label and textbox.

Textbox control and
label

Let’s look at one way to create this simple form using a Literal control (Notice I’m getting the value from a Resource file because we all want to be internationally friendly, right? But it also points out why I use an actual control rather than just typing the label directly).

<asp:Literal id="label" Text="<%$ Resources:UserName %>"   runat="server" /> <asp:TextBox id="textbox" runat="server"/>

When you click on the word Username what happens? Nothing. Wouldn’t it be nice if the Textbox next to the literal was given focus? Here’s how:

<asp:Label id="label" AssociatedControlId="textbox"     Text="Username" runat="server" /> <asp:TextBox id="textbox" runat="server" />

Now, we’ve associated the label to the control. The underlying HTML looks something like (simplified for the sake of discussion):

<label for="textbox">Username</label> <input type="textbox" name="textbox" value="" />

This associates the label Username with the textbox control, so when you click on label, the textbox gets focus.

So why use the Label server control here? Why not just use the <label /> html tag directly?

Because you might not know at compile time what the client id of the TextBox will actually end up as. What if these two controls were inside a UserControl inside a page? The ID might get a bit funky as its nested in a control within a control.

Technorati Tags: Tips, ASP.NET,

comments edit

Univision
Logo In Decemember I wrote about a great soccer camp I attended. Well one of the other attendees is a Sports Anchor at Univision and had a camera man in tow taking footage during the camp.

Soccer BallStarting on Saturday, February 17^th^, Univision will be airing a four part series about the Galaxy Camp. The second part will air on Sunday and the third and fourth parts the following weekend.

Of course, this is subject to change without prior notice, but if you tune in, you just might catch a glimpse of me on the tube. Unfortunately, I didn’t feel comfortable enough with my spanish to give an interview like several of the other campers.

In Los Angeles, this would would be on KMEX channel 34.

Disclaimer: I was once a Univision employee.

comments edit

I’m posting this more as a reminder for myself. Where exactly are you supposed to place XSD files to give you intellisense for XML files in Visual Studio.NET?

Visual Studio.NET 2003

C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml

Visual Studio.NET 2005

C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\schemas\xml

This is useful for such things as Nant.xsd and UrlRewriting.xsd.

To get intellisense for NAnt, you have a couple of other steps to do.

comments edit

SeattleThe wife and I are headed up to Seattle for President’s day weekend to visit some friends.

Yeah, I know. Why Seattle At This Time Of Year!?

Well with her being all preggers and all we didn’t want to go somewhere too distant (like Tahiti). Not only that, a little cold weather might be a nice change of pace. I mean you can only take so many consecutive days of blue skies and sunshine.

I’ll also be swinging by the Microsoft Campuson Tuesday to have lunch with my compadres Adam Kinney and Erik Porter. My hope is to grovel and beg for them to sneak me through the back door of Mix

  1. It probably won’t work, but I gotta give it a try, no?

I plan to show up a little earlier to see another old friend from college who works at Microsoft and, believe it or not, is not a developer! She’s in Finance doing something or other.

Hopefully I’ll run into some other Microsoftie characters I know!

comments edit

Steve Harman just announced the release of Subtext version 1.9.4 Windward Edition. This one comes with a lot of bug fixes, so be sure to upgrade.

Just so you know things work, I add bugs to Subtext, and Steve and the other developers fix the bugs. It’s a rather efficient ecosystem and is working quite well for us. It keeps everyone on their toes.

Steve’s post has the full list of bug fixes and such. The most interesting addition is that we’ve implemented a Google Sitemap, which was submitted as a patch, if I remember correctly.

This release is notable because of the increased number of patch submissions. I greatly appreciate the contributions by all the new contributors along with the stalwarts. Working on Subtext is a joy because of these people.

As for Subtext 2.0, Progress has been slow, but steady. One challenge we’re dealing with is how to cleanly handle the following two multi blog scenarios as summarized by Simo in our mailing list.

​1. The multi blog site is a communiy site: so user registered to a blog, are already registered for all blogs.

​2. The multi blog site is just a host for many different non related blogs: here all users are different, and even if 2 blogs are on the same system, the user shouldn’t know about that.

We pretty much can already handle case 1 which is nice because it means the same user can be the owner of more than one blog, rather than requiring a user account per blog. This is useful for me personally as I host three blogs on a single installation, and right now, the admin is technically three different accounts.

Strictly speaking, this implementation makes implementing the isolation requested in case 2 difficult, because usernames must be unique. So if there’s ever a name conflict between two users attempting to register with the same username, the two blogs will affect each other and not be completely isolated.

However, if we make the user’s email address their login, we can implement case 2 in spirit. First of all, there won’t be two different users using the same email address, so the naming conflict issue is resolved.

Secondly, if you wish to register for blog 2, why should we make you fill in your information again if we already know who you are? We should simply present a message that says, Hey, we know who you are, if you want to register for this site, click here and we’ll auto register you.

That way, the user is in control over who which blogs get to see their registration information, yet they only have one user account in the system. Certainly there are some improvements we can make later, for example, some blogs may want more information than others to register.

But for now, we only ask for the minimal amount of information and will keep things simple and consistent across the board.

In any case, enough blabbing. If you want to download the latest release, you can find it on our SourceForge site or just use this [DOWNLOAD] link.

comments edit

UPDATE: How could I have overlooked the Plugin Keyvan Nayyeri wrote two months ago. Sorry buddy!

You know what would go well with my XFN Highlighter Script like Kimchi goes with Bulkogi? How about a plugin for inserting proper XFN hyperlinks?

XFN
Screenshot Scott Dornan (and Keyvan) delivers exactly that with his Insert XFN Hyperlink plugin for Windows Live Writer.

Apparently he was introduced to the concept of XFN after reading a post on my blog.

Yes, you have me to thank for this fine plugin (not to mention Scott who actually did all the work, while dealing with a-holes like me trying to take the credit).

It’s not yet available in the Windows Live Gallery, but will hopefully be there soon.

In the meanwhile, we’ll have to beg for a direct download. Wink

comments edit

My feed looks like several items were reposted. This is due to a bug in Subtext when editing an existing post using Windows Live Writer. In any case, we’ll have a fix available in the next release of Subtext soon.