The Web Gambit

Thoughts on Web Development

Wheel of Time gets a new author

This post is definitely a departure from my usual style, but since many of us software geeks also happen to be fantasy geeks I thought I would share the recent news that Tor books has announced a new author for the Wheel of Time series of fantasy books.

Ever since Robert Jordan’s passing last September, the fantasy world has been mourning the loss of one of its greatest authors.  I myself felt the loss pretty hard since I have been reading RJ’s books for over 10 years and it was the first major fantasy series that I started reading.  I’ve always been an avid reader of fiction but WoT really introduced me to a different type of genre.  I even converted two college roommates into RJ fans back in my third year of college.  These were guys who had never read a book over 300 pages unless they were required to.  To see them voluntarily put down multiple 1,000 page fantasy books definitely speaks volumes of Jordan’s amazing storytelling ability. 

The greatest tragedy for Robert Jordan was never completing his epic series.  While working on his 10th and final book, he passed away due to complications with amyloidosis.

The new author, Brandon Sanderson, is a younger author and longtime fan of Robert Jordan.  He’s also an avid blogger and he posted a great personal eulogy to Robert Jordan recently.  Sanderson also recently gave an interview to the DragonMount fan website upon receiving the news that he was chosen to be the successor to Robert Jordan.  Here are a couple of my favorite parts of this interview.

In what ways do you think you’ll have to shift your writing style to match Robert Jordan’s? Will you be trying to write in his "voice", or will you approach the novel with your own?

To attempt an exact copy of his style would, I think, be the wrong move. If I did it poorly, it would feel like an awkward parody. Yet, at the same time, there are some very important reasons people love these books. Depth of setting, detailed descriptions, and complex and lengthy characterizations are all hallmarks of Mr. Jordan’s style.

So, I think it will need to be a balance. I intend to be more detailed in my descriptions and linger a little bit longer on side characters than I do in my own work. However, I am not Robert Jordan, and the fans know that. Every author is different, and I think that my style will indeed influence how the text and ideas are presented.

Are there any particular aspects of the book that you think will be especially challenging for you?

The first is the depth of the setting. Though I’ve read these books several times, there is just SO MUCH to wrap your head around…I’m certainly glad for the Internet and the resources fans have created. I suspect you’ll find me on Dragonmount occasionally asking for someone to look up an obscure fact or name for me!

The other item of particular challenge is the worry that I’ll disappoint the fans. I am confident in my writing, but. . .wow. This is like being the final man at bat in the last inning of the World Series–I’m the guy who has to step up and either strike out get a hit to win. All of my training, practice, and studies are coming to a head.

I don’t want to be the guy who ruined The Wheel of Time. I’ll work very hard to make sure that doesn’t happen.

Read the rest of the interview here

I’m very excited at this news and I’m eagerly awaiting the final book, entitled A Memory of Light, which will be hitting store shelves in Fall 2009.

Converting a WordPress theme to Grafffiti

Themes in Graffiti are very easy to write or convert from existing themes or templates.  The theme on this site is derived from based on the WuCoco theme for WordPress.  I chose this theme because I liked the look of it and it was also very well organized into sections for the layout of the blog.  These sections were very easy to convert into Graffiti views.

Here is a list of the .php files included in the 2-column version of the WuCoco theme.

WucocoFiles 

Once this theme was converted for Graffiti, it had the following listing of Graffiti view files.  The difference in number of files is based on the number of required views in Graffiti to accomplish the look of the theme in addition to some customizations.  You could use more or less views to convert more of the original theme if you like.

altair-files 

Graffiti uses .view files to denote sections or views of the markup for the site.  In addition to some standard views that Graffiti recognizes, one can define custom views and then open them from other views using this chalk method.

$macros.LoadThemeView(filename)

The benefit of this method of theme layout becomes clear as you begin the process of building the theme.  It becomes obvious where your markup is coming from and you have immediate and seamless control over your each page’s HTML output.

So lets begin.  First we’ll start by examining the Wucoco theme’s index.php file to see how we can separate it into Graffiti views.

<?php get_header(); ?>

<div id="page_container">

<?php get_sidebar(); ?>
 
Other than the page_container div, there appears to be very limited markup in these first few lines.  Where are the <head>, <!DOCTYPE>, and <title> tags?  Let’s dig a little deeper.
The first line in this snippet makes a call to another PHP file to obtain the header markup by calling get_header().  So lets go to the header file and see what this file exposes.

Here are the first few lines of the header.php file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
<style type="text/css" media="screen">

@import url(<?php bloginfo('stylesheet_directory'); ?>/style-core.css);
@import url(<?php bloginfo('stylesheet_directory'); ?>/style.css);
<?php if (eregi("MSIE",getenv("HTTP_USER_AGENT")) || eregi("Internet Explorer",getenv("HTTP_USER_AGENT"))) { ?>
@import url(<?php bloginfo('stylesheet_directory'); ?>/style-ie.css);
<?php } ?>
</style>
<?php wp_head(); ?>
</head>

Now we’re getting somewhere.  The index.php file calls the header.php which eventually returns the initial HTML markup needed to build the page.  Sounds easy enough.  So let’s try converting that code over to Graffiti Chalk.

I’ve decided that I don’t like hiding the important tags for defining an XHTML document in an obscure header file and I would rather expose them up front in my initial view.  Here’s how I would define the first few lines of my Graffiti theme’s layout.view.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
$macros.Head()
$macros.LoadThemeView("header.view")
</head>

So far I’ve got my initial HTML tags defined with a few Chalk methods to build the inside of the <head> tag. 
The first macro call to Head() is used to render some of the custom fields that you can set in Graffiti for any custom Javascript, RSD, RSSAutodiscovery, GraffitiJavaScript, and MetaTags.  This is absolutely necessary to ensure that your page will get all the necessary Graffiti markup and script in addition to some of custom fields you can set in Graffiti’s control panel.

The second macro call to LoadThemeView() actually loads my custom header view that I defined in another file, header.view.  Here are the first few lines of that file.

<title>$title - $data.Site.TagLine</title>
$macros.Style("style.css","screen")
$macros.Style("style-core.css","screen")
<!--[if lte IE 7]>
$macros.Style("style-ie.css","screen")
<![endif]-->

The above code allows me to pull in the CSS stylesheets defined by the original theme as well as the site’s title and tagline.  The theme also requires some custom javascript that can below this code in a <script> tag.  For the purposes of this tutorial, I have omitted that code.

At this point, we have defined enough views to load the markup for the <head> tag portion of our Graffiti theme. 

So let’s move on to defining the views necessary for the <body> portion of the theme. Let’s go back to Wucoco’s index.php file. 

<?php get_header(); ?>

<div id="page_container">

<?php get_sidebar(); ?>

We took care of the header, but its not clear where the <body> tag is defined yet.  So let’s look a little further down the header.php file.

<body>
<div id="header">
<div class="nav">
<?php /* CUSTOMIZE HEADER LINKS HERE */ ?>
|&nbsp;&nbsp;<a href="<?php echo get_settings('home'); ?>">home</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="">link 1</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="">link 2</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="">link 3</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="">link 4</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="">link 5</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<?php /* END HEADER LINKS */ ?>
</div>
<?php /* UNCOMMENT THE LINE BELOW IF YOU WISH TO SEE YOUR BLOG'S TITLE IN THE HEADER */ ?>
<!-- <div id="blogtitle"><h1><?php echo get_bloginfo ( 'name' ); ?></h1></div> -->
<div class="searchform"><?php include (TEMPLATEPATH . '/searchform.php'); ?></div>
</div>

Now it is clear that the opening tag of <body> actually exists in the header view.  Why do this?  Well this theme utilizes a "header" div at the top of the site for an image, navigation links, and search. In order to ensure that all this markup is rendered first, the theme author decided to put all this markup inside his header view. 

I chose to re-organize things a bit for better readability, so I went ahead and moved the <body> tag into my layout.view and the rest of the markup into a separate view for Graffiti which I called page_header.view.

<div id="header">
<div class="nav">
<ul id="nav">
$macros.NavBar()
<li class="rss"><a href="$urls.Rss">RSS</a></li>
</ul>
</div>
<div id="blogtitle">
<h1><a href="$urls.Home" title="$data.Site.Title">$data.Site.Title</a></h1>
<h3>$data.Site.TagLine</h3>
</div>
<div class="searchform">
<form action="$urls.Search" name="searchform" id="searchform" method="get">
<div>
<input alt="search this site" class="search-box" type="text" value="Search..." name="q" id="q" onblur="if (this.value == '') {this.value = 'Search...';}" onfocus="if (this.value == 'Search...') {this.value = '';}" />
<input type="hidden" id="searchsubmit" value="Search" />
</div>
</form>
</div>
</div>

As you can see, I adjusted my markup a little bit to play nicer with Graffiti.  I started by converting the static link list into an Unordered List that works with the NavBar() macro. I then added some markup to put in my site’s tagline in addition to its title into the top header div.

Finally, I customized the searchform to work with Graffiti.  There was an opportunity to convert this form into it’s own view, as the Wucoco theme did, but since I’m only keeping search in the page’s header I deemed another view unnecessary.

Now let’s go back to my Graffiti layout.view file to see how things look.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
$macros.Head()
$macros.LoadThemeView("header.view")
</head>
<body>
$macros.LoadThemeView("page_header.view")
</body>
</html>

Clean and simple.  Now we’ve got the <head> and the <body> tags as well as the beginning markup for the page.  Converting the rest of the theme is pretty straight forward from this point on by following the same steps as above for the sidebar and footer elements of the theme.

My completed altair theme is available here.  It is licensed under the GPL (as was the Wucoco theme) and you are free to modify it as you will as long as you reference both themes in the comments.  This theme is for development and personal usage only.  I can’t officially provide support for it, but if you have any issues that you can’t figure out feel free to leave a comment.

For further reading and information on how to write themes for Graffiti, go to http://docs.graffiticms.com.

Altair Theme for Graffiti

This is the download page for my Altair theme for Graffiti.  Please download the theme here.

It is licensed under the GPL (as was the Wucoco theme for WordPress from which it was derived) and you are free to modify it as you will as long as you reference both themes in the comments and footer.

Graffiti Beta 1 released

As Rob announced, Telligent’s Graffiti product is now in public beta!  Download the necessary bits here.

I’ve been running Graffiti both internally and externally for a while now and I can attest to its excellent usability as it really makes it very simple to get content out there.   Graffiti supports both Microsoft Access and SQL Server so you have some flexibility in terms of how you want to run it.  We are still investigating other databases as well, with a focus on databases that support an easy XCOPY deployment model.

This site is running on SQL Server 2005 and I used an in-development migration tool written by Jayme Davis to migrate my posts over from Community Server 2007.  Jayme has actually released this tool in an unsupported fashion.  Check the comments on his post for the download link. 

One of the great things about Graffiti is that it is really easy to create custom themes for it.  Anyone familiar with theming PHP-based blog packages like WordPress will feel right at home with Graffiti’s theming structure.  No existing .NET experience is necessary.

Look for an upcoming post with my release of this site’s theme shortly with some explanations of the how I leveraged Graffiti’s theme engine to do the layout.

And we’re back!

This post has been a long time coming, but I’ve joined the latest Telligenti Club and relaunched my blog on Telligent’s new Graffiti platform.  Graffiti is our new site application for Content Made Simple.  It is a very lightweight, easy to design and develop site application built from the ground up to address a different market segment than our flagship application, Community Server.

You can read more about Graffiti here.  If you are interested in participating in our private beta, fill out this form and you will receive a link to download the install.

Thanks to Jayme Davis, Rich Mercer, and Scott Watermasysk for helping me get everything up and running.  I’m really excited to use Graffiti and it’s definitely brought a lot of fun back to blogging that I haven’t felt since my WordPress days.

A lot has happened in the .NET space since my last blog post  and I have been getting more involved in the .NET community as of late. I will be posting a lot more often from here on out so expect to see a lot of new content in the next few weeks.  Stay tuned!

About me

I am a software developer and consultant working for MedAssets in Dallas, TX

My current specialization is focused on agile, domain driven design on the .NET platform.

My technology interests include developing for the ASP.NET Platform as well as other web technologies such as Ruby on Rails. I am a follower of the Agile methodology and enjoy keeping up with the latest trends in software development.

In my free time, I enjoy movies, PC and video games, going out with friends, cycling, and skiing (if I get the chance).

I currently live in Dallas, TX with my wife Swati and my daughter Suhani.

Building a Balanced Team

Fred George, noted Agile Developer and thought leader, had a great post where he described his ideal ratios of developer skill levels when building an Agile development team.

One of the foundations of his theory is that the number of Apprentice or Junior level developers should remain small on any given team.

bring on apprentices only at the rate they can be productive to the team; otherwise, be courageous and defer the staffing, ignoring what your spreadsheets are telling you.

I can certainly identify with Fred’s warnings here as I’ve had the unfortunate experience of working in a shop which built upside down teams with one skilled senior developer managing 5-7 fresh college graduates underneath them.  The net effect was a very buggy system, poor productivity, and continuous death marches between releases.

As many others have said before, programming is a skilled craft, and thus must be treated as one.  While it’s true that almost anyone can learn to hack together some working code, true mastery of the craft requires learning under existing masters.  And for a master, training even one apprentice requires a significant time investment that can often come at the cost of productivity.

In my current role at Telligent, I’ve had the good fortune of working with a very talented Junior Developer and I’ve enjoyed helping him go from being a good programmer to being a great developer.  However, it’s been quite clear to me that having more Juniors on my team would quickly overwhelm me and begin to adversely affect my team’s productivity. I would probably be spending more time on mentoring them and less time on knocking things out of my own task list.

Even the brightest Juniors will not be aware of all the tools, resources, and practices that are at their disposal as compared to a more experienced developer.  In summary, Fred George said it best:

…start your projects with few, if any, Apprentices, and stage them into the project at the rate you can productively absorb them.

I highly advise that you read the rest of Fred George’s posts in his series on Masters, Journeymen, and Apprentices.

Are you an Overpaid Payable?

I spoke with a friend the other day who came to the startling realization that they had become overpaid.  Most people would define being overpaid as receiving a salary above the current market standard for your responsibilities and skill set.  Taking a moniker from a company which shares an office in my building, I have decided to call such an individual an Overpaid Payable.

An Overpaid Payable is a resource whose cost to an organization exceeds the value that the resource provides back to the organization.  In the current market for software developers, the danger of becoming an Overpaid Payable has become greater than ever.

There are many signs that you are being overpaid.  Here are some:

  • You have been in the same company with no increased responsibility for 3 years or more despite receiving regular salary increases.
  • Your job very often requires long, inefficient and wasteful hours but you are paid handsomely to compensate for the poor planning that keeps you at work late nights and weekends.
  • You see high turnover in your company and often see across-the-board increases handed out soon after a few indispensable resources decide to leave the company.

So what’s wrong with being an Overpaid Payable?  Being overpaid leaves you vulnerable.  It can give you a false sense of security as you build up your lifestyle around your current salary.  If you can’t guarantee this same salary in another, very similar job, then you will have difficulty planning for the future.  Nothing is certain, and if your company is bought out or goes through cost cutting layoffs, it is the overpaid employees who are usually the first to go.  Additionally if you ever really dislike your job, your choices are more limited.

If you’re reading this and thinking that you are overpaid and are now stuck, all is not lost.  There are many ways to fix this situation.  The most obvious one is to just leave your current job to take whatever you can get on the open market.  However, this may not be realistic depending on your financial responsibilities, so I would advise finding a way to increase your value while staying in your current organization.  Here are a few ways that I have seen work.

Learn more about the industry you support to gain new responsibilities.  If you write financial software, take the existing financial knowledge you’ve acquired and improve upon it.  You may find yourself managing a team of new hires with lots of technical knowledge but no industry knowledge.

Build and market your expertise around a product or technology through peer groups.  Being recognized as an expert in your field bestows many benefits, including competitive and repeatable salaries.

Use your existing knowledge to add value to other functions of your business including sales, services, and support.  Your existing knowledge can provide a lot to these other areas in many surprising ways.

In summary, the best way to avoid becoming an Overpaid Payable is to constantly grow your responsibilities and skills to match your salary.  Always monitor your yearly salary increases to see if they come with increased responsibilities and skills.  Undoubtedly, you will have slower years and faster years, but if you monitor your career diligently, you’ll never need to worry about becoming overpaid.

How Agile is your Architecture?

One of the cornerstones of the Agile Manifesto is Responding to change over following a plan. 

Most of the time, we see this parable being applied to teams of software developers, but not always to the software itself.  After a certain point, the software’s architecture becomes rigid and inflexible, and only allows for minute changes to its supported feature set.

This becomes especially true later in the software’s lifecycle as its code base matures.  As time passes, most software packages need to be substantially rewritten to support new technology changes.  Such changes can include:

  • Newly supported database platforms (e.g. SQL Server to Oracle and MySQL)
  • Changing the presentation layer to support a different platform or go native (e.g. Web to WPF and Silverlight)
  • Changing the application service layer platform (e.g. J2EE to .NET and RoR)

When designing your product architecture, it is easy to remain platform agnostic in some areas, while exceedingly difficult to do so in other areas.  Additionally, most organizations are limited by time, money, and the expertise of the developers writing the software and thus make quick decisions with limited resources.

Database support is usually the most flexible part of most application architectures as it is considered a best practice to support the big three database platforms.  While this may result in losing some performance benefits specific to a database, most developers are willing to sacrifice these benefits to avoid the excruciating pain later on when support for more databases is injected after the software has been released.

Presentation layers, on the other hand, can be notoriously inflexible as most platform evangelists tend to emphasize Rapid Application Development through the use of platform specific tools.  While these tools can help build a demonstrable application quickly, they sacrifice a great deal of flexibility to do so.  By emphasizing the use of less visible code, these tools tend to hide the inner workings of large sections in the application’s architecture.  Thus it is difficult for any developer to successfully emulate the patterns implemented by these tools when the time comes to change platforms.

Service layers are generally the most difficult to flexibly design as this layer is generally composed entirely of platform specific code.   The good news is that of all the pieces of technology that compose your architecture, the Service Layer is the one which tends to have the longest shelf life.  The degree of difficulty involved in changing Service Layers leads most organizations to only change this layer once per decade.  I believe that a degree of inflexibility in this layer is probably unavoidable in most situations.

Expecting to develop a code base that is flexible to every one of these changes is an ideal situation that is nearly impossible for most organizations. 

In turn, most developers are likely to be more successful if they can limit their scope to one platform and leverage the platform specific capabilities to build more efficient, solid code.  Introducing an unfamiliar platform to inexperienced developers can result in enormous costs and heavily impact productivity.

However, there are significant advantages to making your architecture agile as it can make you better prepared for unforeseen changes down the road.  These changes may include:

  • Requests for new platform choices from customers
  • Emergence of a competitor with greater platform support and thus a wider audience
  • Staff changes resulting in gained or lost technical expertise

Building a more Agile architecture is indeed a daunting task, but I firmly believe that the benefits outweigh the risks.  If it may not be possible to make your first product architecture an Agile one, the lessons learned from building it should certainly be utilized when building a second, more Agile architecture.

Further reading:

Jeff Palermo’s blog post – Focus on the Core

Refactoring Databases: Evolutionary Database Design

Developers who become Managers

Rob Walling had an amazing post where he described his experiences and frustrations during his career when moving  from senior software development roles into management roles.

Much of Rob’s frustrations stemmed from losing the creative satisfaction one gets from writing code despite gaining the money, power, and respect generally associated with higher level management roles.

This post struck a chord with me because I had many of the same thoughts while I was a management consultant.  I saw many colleagues that were great developers become terrible managers.  Many of these former developers were so accustomed to the fine degree of control one wields with code that they had forgotten that people are not as easily manipulated.  Out of frustration with this loss of control, many of these former developers resorted to becoming Taskmasters and were very disrespectful to their subordinates.  Much of the reason I left big consulting was because of not wanting to go down the same path.

However, things are not all bad for those who aspire to get to management but have some anxiety about not coding.  I have recently met a few rare individuals who are very successful at both the management side of things while still feeding their creative side by doing some programming work on the side outside of their management-based day job.  The work they do on the side may be in the form of User Group Contributions, Open Source Contributions, or just general on-the-side consulting work for friends and former colleagues.

It’s been my experience that these types of managers are generally even better at their day jobs because they stay connected to the technology they are managing and are often very involved in the communities revolving around the same technology.  Additionally, they often have less trouble finding and hiring good developers due to their large people networks.

As one would expect, such outside activities usually require sacrificing some personal time.  But they give an individual the creative fix of coding while providing the prestige gained by going into management.  So for those who are willing, it’s a very good option if you can survive with a little less sleep :)

Follow

Get every new post delivered to your Inbox.