Scrum, XP, Management and the Ethics of Agile Software Development

development

Technology IP Patents

Facebook patents news feeds in a social network context

The method covered in the patent includes “generating news items regarding activities associated with a user of a social network environment and attaching an informational link associated with at least one of the activities, to at least one of the news items, as well as limiting access to the news items to a predetermined set of viewers and assigning an order to the news items.” — PC World

Apple sues HTC for violations on 20 patents

Here’s the actual filing that includes the titles of each of the patents including:

  • Object oriented graphic system – granted 1995
  • List scrolling and document translation, scaling, and rotation on a touch-screen display – granted 2008
  • Object oriented event notification system with listener registration of both interests and methods – granted 2002

What kinds of Inventions can be Protected?

An invention must, in general, fulfill the following conditions to be protected by a patent. It must be of practical use; it must show an element of novelty, that is, some new characteristic which is not known in the body of existing knowledge in its technical field. This body of existing knowledge is called ” prior art“. The invention must show an inventive step which could not be deduced by a person with average knowledge of the technical field. Finally, its subject matter must be accepted as “patentable” under law. In many countries, scientific theories, mathematical methods, plant or animal varieties, discoveries of natural substances, commercial methods, or methods for medical treatment (as opposed to medical products) are generally not patentable. — World Intellectual Property Organization

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

Consume a feed from a site that doesn’t syndicate using Yahoo Pipes

clownmommy screenshotIt’s surprising how hard it is to subscribe to sites intent on driving traffic to their main page, particularly if you want a subset of content by author or topic.

My wife writes for the nycmoms blog. She wanted to show a list of her recent blogs on her personal blog.

Nycmoms exposes a single feed aggregating recent posts across all authors.

Create a feed

My first iteration was to filter this feed through Yahoo Pipes. Pipes provides a graphical interface for chaining rules for manipulating web content and exposing it in a feed.

I used the “fetch feed” module pointed to the recent posts feed, connected it to the filter module set to only permit items where the author.name contained my wife’s handle.

This produced a correct result. However, only one or two of my wife’s posts are in the “recent posts” feed at any given time.

For the next iteration I found an alternative source outside the blog itself. Being a Yahoo tool, pipes provides a Yahoo search module. So, I searched for the phrase “Posted by KathieH” restricted to the site, nycmomsblog.com.

This produced more but less precise results. It includes additional pages such as my wife’s bio and sorted by relevance not post date.

I used the sort module on the item.updatedon field in the rss feed.

Next I used the filter module to exclude anything that was not an actual post identified by the term: “NYC Moms: KathieH” and piped out to rss.

Then I used the RSS widget in wordpress to expose this feed on my wife’s blog. Done!

Yahoo Pipes Screen Shot

Consume the feed

Except, my wife’s blog began suffering from the dreaded “Fatal Error: Allowed Memory Size” error in the simplepie library used by the RSS widget.

Well documented on the web, this is caused by my service provider’s decision to restrict accounts to 32MB of memory for PHP script execution. This and the 50MB-200MB storage limits were reasonable when I first signed up with my ISP ten years ago but is about as appropriate as using a 80286 processor now.

I decided to switch from server side processing to client side.

Luckily, Yahoo Pipes exposes feeds in the JSONP format. JSON is easily parsed by Javascript in the browser. JSONP is an established workaround (i.e. hack) that allows the client to make requests to third party URL’s without triggering the cross site security restrictions built into current browsers. It simply wraps the data response in a prefix that the browser parses as a function (allowed) as opposed to pure data (not allowed).

Wordpress already uses the jQuery library which is well documented by examples on how to request, parse and render a feed.

I used the getJSON function to retrieve and parse the feed. It is exposed as a nested array containing at the top level, key/value pairs associated with the entire feed and an array of items containing the actual posts.

I loop through the value.items format them into HTML and append them into a div with the id nycmoms_posts. Probably overkill given how fast this all works but I display a loading indicator which I fade out when the loop is complete (from Kyle Meyer).

<div id=”nycmoms”>
<h2>Kathie on <a href=”http://www.nycmomsblog.com/kathieh/”>nycmomsblog.com</a></h2>
<div id=”nycmoms_loading” >…</div>
<ul id=”nycmoms_posts” />
</div>

<style>
#nycmoms { width:250px;min-height:125px;}
#nycmoms_loading { position:absolute;top:0;left:0;width:100%;height:100px;padding:100px 0 0 125px;}
#nycmoms .description, #nycmoms .postdate { font-size:small;}
</style>
<script src=”wp-includes/js/jquery/jquery.js?ver=1.3.2″></script>
<script>

var descriptionPattern = /^(.*) … Posted by Kathie H. on (\w+) (\d+), (\d+) .*$/g

window.onload = function() {

jQuery.getJSON(“http://pipes.yahoo.com/pipes/pipe.run?_id=8a8edd5b1e5181a001892cee910c11fc&_render=json&_callback=?”,
function(data) {
jQuery.each(data.value.items, function(i, post) {
jQuery(“#nycmoms_posts”).append(
‘<li><a href=”‘ + post.link +’”>’ + formatTitle(post.title) + “</a>”
+ “<!– “+formatDescription(post.description)+”–>”
+ “</li>”
) , jQuery(‘#nycmoms_loading’).fadeOut(500);
});
});

}

function formatDescription(description)
{
return description.replace(descriptionPattern, ‘<span=”description>”$1 … </span><span id=”postdate”>posted $2 $3, $4</span>’);
}
function formatTitle(title)
{
return title.replace(/^NYC Moms: /, ”);
}

</script>

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

Nine software development aphorisms (that are sometimes true)

  • Beneficial change results from cycles of learning, doing and self-reflection.
  • Success derives from delivering small things of value regularly and often.
  • A discreet piece of work is either done or it is not done.
  • Better to risk a bad decision than make no decision at all.
  • The wisest decision is made just before it can be most efficiently acted upon and no earlier.
  • Most features will receive little or no use. 60% of what you want is better than 100%.
  • Plans document one scenario that will not happen and describe some other application than the one that was built.
  • On time and on budget are not synonyms for success.
  • In human endeavor, every enlightening truth contains a lie. The road to hell is paved with…
  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

How to make wordpress sidebars only appear on certain pages for search engine optimization

I was reading the recommendations in yoast.com’s post on wordpress seo.

Do you really need to link out to all your buddies in your blogroll site wide? Or is it perhaps wiser to just do that on your front page?

I want to link out on my homepage but I don’t need my sidebar to extend two screens below the content on my individual post pages.

So, it appears desirable to have elements of the sidebar (e.g. the blogroll and external social networking arcana) only appear on the homepage of my blog.

Thanks to some sample code from wpcandy.com, this was trivially easy to implement.

I modified the functions.php in my theme to register three sidebars. I called them Top Right Sidebar, Front Page Sidebar, and Bottom Right Sidebar.


if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Top Right Sidebar',
'before_widget' => '', // Removes <li>
'after_widget' => '', // Removes </li>
'before_title' => '<h2>',
'after_title' => '</h2>',
));

if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Front Page Sidebar',
'before_widget' => '', // Removes <li>
'after_widget' => '', // Removes </li>
'before_title' => '<h2>',
'after_title' => '</h2>',
));

if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Bottom Right Sidebar',
'before_widget' => '', // Removes <li>
'after_widget' => '', // Removes </li>
'before_title' => '<h2>',
'after_title' => '</h2>',
));

Then I modified my sidebar.php to render those three sidebars if the dynamic_sidebar function exists also making the Front Page Sidebar conditional on is_front_page().

<?php
if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Top Right Sidebar') ) : else :
?>
//default markup for the top sidebar goes here
<?php endif; ?>
//renders only if the current page is the front page, i.e. is_front_page()
<?php if ( function_exists('dynamic_sidebar') &&
is_front_page() && dynamic_sidebar('Front Page Sidebar') ) {} ?>
<?php
if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Bottom Right Sidebar') ) : else :
?>
//default markup for the bottom sidebar goes here
<?php endif; ?>

Wordpress Widget Admin PageIn my widgets admin I now have three sidebars listed:

  • They are defined in my theme’s functions.php.
  • They render stacked one on top of the other based on the markup in sidebar.php.
  • I can populate them in the widget admin.
  • The middle bar only appears on the homepage.
  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

How to add an options form to a wordpress theme using settings_fields

I spent some time today modifying a WordPress theme to take configuration properties.

I want one theme that I can quickly re-configure to create multiple blogs along different topics with different color/graphic schemes. I want easy maintenance so I’d love to share one instance of the theme across these different instances.

We’re using enough different plugins that WordPress Mu isn’t yet worth fighting. So database options and the Settings API seemed the best way.

The documentation on how to extend a theme this way is not so easy to find but there are plenty of examples. They tend to break the process into steps but don’t give as much sense of what you actually get and how to use it.

I based my code on this example: http://blog.starscapetheme.com/2008/05/31/create-settings-page-for-theme/

After the fact, I found this description which seems well written: http://www.pixelace.com/2009/theme-options-for-wordpress-27/

I created a menu item and a corresponding properties form:

Wordpress Theme Options FormWordpress Theme Menu Item
 

My form adds three properties which are stored in the WordPress wp_options table and easily exposed on template pages

<link rel="stylesheet" href="<?php $options = get_option('vertical'); echo $options['vertical_custom_css_url']; ?>" type="text/css" media="screen" />

Here’s the actual code I added to the functions.php page of the theme. If you don’t have a functions.php you can just create one in your theme folder. You need to make sure the code below is wrapped in “<?php” “?>” tags.

//encapsulate the logic into a class
$cpanel = new ControlPanel();

class ControlPanel {
/* static array to contain default values
the values set an additional css to override standard css in the theme
as well as an image and link that is rendered in the sidebar. These
three settings allow me to use the same theme with minor variations
on different blogs on different topics but with very similar looks and feels */

var $default_settings = Array(
‘vertical_custom_css_url’ => ,
‘topic_banner_img’ => ‘/images/banner.jpg’,
‘topic_url’ => ‘http://www.judykat.com/ken’

);
//constructor
function ControlPanel()
{
//hook to add a menu item in the Theme’s area of the admin sidebar
add_action(‘admin_menu’, array(&$this, ‘vertical_admin_menu’));
/* if options are not already created in the database, add them and set to default values
this creates a single database entry in wp_options with key vertical and
values a hash of key/value pairs */

if (!is_array(get_option(‘vertical’)))
add_option(‘vertical’, $this->default_settings);
//load the existing options into an array accessible as a property of this instance of ControlPanel
$this->options = get_option(‘vertical’);
}
//the function that ties an html form to the hook defined in the constructor.
function vertical_admin_menu() {
add_theme_page(‘Vertical Theme Control Panel’, ‘Customize Theme’, ‘edit_themes’, “vertical”, array(&$this, ‘vertical_theme_page’));
}
//function that defines the form for viewing and setting properties for the theme.
function vertical_theme_page() {
//if the form is being submitted, update the options in the database
if ( isset( $_POST['submit'] ) ) {
//if the “Save Changes” button was clicked, set the user entered values from the form
if (‘Save Changes’ == $_POST['submit']) {
$this->options["vertical_custom_css_url"] = $_POST['vertical_custom_css_url'];
$this->options["topic_banner_img"] = $_POST['topic_banner_img'];
$this->options["topic_url"] = $_POST['topic_url'];
$state=“saved”;
} //else if “Defaults” was clicked, reset values to default
else if (‘Defaults’ == $_POST['submit']) {
$this->options["vertical_custom_css_url"] = $this->default_settings['vertical_custom_css_url'];
$this->options["topic_banner_img"] = $this->default_settings['topic_banner_img'];
$this->options["topic_url"] = $this->default_settings['topic_url'];
$state=“reverted to defaults”;
} //commit the changes to the database
update_option(‘vertical’, $this->options);
//render a status message of the above actions in the standard Wordpress admin dialog box at the top of the form.
echo ‘<div class=“updated fade” id=“message” style=“background-color: rgb(255, 251, 204); width: 300px; margin-left: 20px”><p>Settings <strong>‘.$state.’</strong>.</p></div>‘;
}
//the actual html form in standard markup to appear standard in the Wordpress Admin
?>
<div class=‘wrap’>
<h2><?php _e(‘Customize Vertical Theme’); ?></h2>
<div id=“header”>
<div id=“headwrap”>
<div id=“header”>
<div id=“headerimg”>
<h1><?php bloginfo(‘name’); ?></h1>
<div class=“description”><?php bloginfo(‘description’); ?></div>
</div>
</div>
</div>
</div>
<br>
<form id=“vertical-settings-form” method=“post” action=“”>
<?php settings_fields( ‘vertical-settings’ ); ?>
<table class=“form-table”>
<tr valign=“top”>
<th scope=“row”>Path to Vertical CSS file:</th>
<td>
<input size=“70″ type=“text” name=“vertical_custom_css_url” id=“vertical_custom_css_url” value=<?php echo $this->options["vertical_custom_css_url"]; ?>” />
<br/><small>example: <?php echo(str_replace(get_bloginfo(‘url’),“”,get_bloginfo(‘template_url’).‘/’.str_replace(” “, “-”,strtolower(wptexturize(get_bloginfo( ‘name’ )))))); ?>/style.css</small>
</td>
</tr>
<tr valign=“top”>
<th scope=“row”>Path to Category Page:</th>
<td>
<input size=“70″ type=“text” name=“topic_url” id=“topic_url” value=<?php echo $this->options["topic_url"]; ?>” />
<br/><small>example: http://www.judykat.com/ken</small>
</td>
</tr>
<tr valign=“top”>
<th scope=“row”>Path to Category Banner:</th>
<td>
<input size=“70″ type=“text” name=“topic_banner_img” id=“topic_banner_img” value=<?php echo $this->options["topic_banner_img"]; ?>” />
<br/><small>example: <?php echo(str_replace(get_bloginfo(‘url’),“”,get_bloginfo(‘template_url’).‘/’.str_replace(” “, “-”,strtolower(wptexturize(get_bloginfo( ‘name’ )))))); ?>/images/banner.jpg</small>
</td>
</tr>
</table>
<p class=“submit”>
<input type=“submit” name=“submit” class=“button-primary” value=<?php _e(‘Save Changes’) ?> />
<input type=“submit” name=“submit” class=“button-primary” value=<?php _e(‘Defaults’) ?> />
</p>
<input type=“hidden” name=“saved” value=“true”>
</form>
</div>
<?php
}
}

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

Power, dissent, and bullying in software developer communities

Grassroots developer communities form around shared values in dissent against institutions and norms that dehumanize their work and diminish their efforts. They attack these orthodoxies with humor, heretical thinking, and hard work.

This benefits society when developers defy those with greater power. It harms society when developers bully people with less power.

At the ThoughtWorks sponsored Agile East, Martin Fowler spoke to his post, SmutOnRails.

Part of the community was offended by a presentation at the GoGaRuCo (Golden Gate Ruby Conference). Others fought back saying that no offense was meant, the presenter apologized, and that the tone was in the spirit of the Rails community.

(T)he view of the rails leadership seems to be this: that the objections to the presentation are yet another attempt to foist empty corporate values on the thriving Rails ecosystem… (more)

This debate is not unique to the Rails community. It reminds me of concerns my friend, Luke Melia, raised over jokes and behavior at the first Austin Alt.NET. Martin Fowler links off to a similar controversy in the Flash community.

It is also not unique to developer communities but developers in particular need to be concerned about the outcome.

Women, African Americans and Hispanics are under-represented in IT and even more so in software development. In 2001-2002 74.4% of software developers were men. 78% of those men were white.

In 1986 the percentage of women in CS programs peaked at 37%. The percentage of women in computer science programs has gone down since then.

In 2001-2, only 28 percent of all undergraduate degrees in computer science went to women. By 2004-5, the number had declined to only 22 percent. — What Has Driven Women Out of Computer Science?, NY Times

There were 15,000 women in CS progreams in 1986. Riding natural cycles this number was not matched again until 2003. This latter number contains a higher percentage of non-resident aliens who will not necessarily contribute to the US workforce.

This despite higher percentages and numbers of women acquiring college educations than men. In 2007, 33% of women 25-29 held a four year degree or higher versus 26% of men. 55% of graduates with four year degrees or higher aged 25-29 were women.

Women are even receiving the majority of degrees in science and technology. They have shown steady progress in biology, chemistry, physics, mathematics and engineering.

Metrics can be misinterpreted but these quantitative measures support a stunningly obvious anecdotal observation. US software developers are a white male enclave.

This is a power imbalance and we developers are part of the problem.

Isolation is a key factor for a higher attrition rate among women and minorities, said Teresa Dahlberg, director of the Diversity in Information Technology Institute at UNC Charlotte. People tend to associate with “like communities,” where people have similar backgrounds and interests, she explained. — Computer science lacks women, minorities, SD Times

So when we behave in a way that marginalizes and intimidates talented women and minorities, we abuse power. We become bullies. We are oppressors.

“There is a good amount of research that shows that women are judged more harshly than men, for hiring, evaluations and promotions,” she added. “Virginia Valian [author of "Why So Slow? The Advancement of Women"] shows this for women in science, technology, engineering and math faculty jobs.” Virginia Valian is a professor at Hunter College. — SD Times

Part of the problem may be a perception that software development doesn’t contribute enough to society. To the degree this perception is true it is damning. To the degree it is just a perception we have work to do as advocates.

Our actions need to be judged not by our intentions but by the outcome.

Requisite variety within our teams remains an essential enabling condition for sustained innovation.

Access to technology is growing across all tiers of class, race and gender both in the US and overseas. Diverse teams can better address our market and build software better adapted to our end users.

A more diverse workforce provides the kind of social change that will help us create a more humane workplace for developers.

Finally, anything that limits the number of able US software developers hurts our ability to compete.

When developer communities marginalize women and minorities, we conspire to isolate ourselves from the larger society. We defeat our own attempts to change the power structures around us and improve our lot and our output.

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

Fixing markup in cross posts to wordpress using metaWeblog, xml-rpc, & xpost plugin

I’m experimenting with cross posting from one wordpress blog to another using the metaWeblog API and XML-RPC. This led me to the xpost plugin by Jan Gossman.

Easy enough to test. I set up two blogs, activated xpost on one of them and posted to the other.

The plugin works as promised. You can selectively post to multiple blogs and assign categories. Tags and standard properties are preserved. Most impressively, the relationship between source and target blogs is maintained. Changes in the source are updated in the targets.

However markup in the cross posts is broken because single and double quotes are escaped with a backslash. For example, link tags become <a href=\"....

From what I can find this is a known issue intentionally introduced within the WordPress’ XML-RPC implementation as brute force protection against a SQL injection vulnerability.

I don’t want to expose myself to this vulnerability. Nor do I want to hack a wordpress build.

It occurred to me one way to get past this issue is to strip those backslashes at the presentation level within the theme of the blog to which I want to crosspost. I don’t see any reason to render backslashes within posts.

So, with guidance from the WordPress codex, I modified the single and index templates…

Replacing:

<?php the_content(); ?>

With:

<?php
$content = get_the_content();
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = str_replace('\\','',$content); /* This strips escapes inserted through XML-RPC */
print $content ?>

I think this will work for me. I’m glad to be proven wrong. Am I missing something?

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

Our team is hiring an agile ruby on rails developer

Hi,

We’re looking for a developer to join our team at Simon & Schuster. We’re a small shop mainly working in Ruby on Rails. We practice Extreme Programming (XP) and Scrum. We value sustainable pace, work/life balance, and the sanity and happiness of our team members.

You can look at the full posting on Craig’s List or Simon & Schuster’s corporate jobs extranet.

Unfortunately, no recruiters.

Thanks.

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

On the Media – cruelty and vulnerability on the internet

Streams of two segments from the NPR show On the Media:

Smirch Engine

There’s a name for how cruel people can get given a little anonymity on the internet. It’s called “online disinhibition effect” and the resulting venom can ruin your day or worse, destroy your good name.

The Net’s Mid-Life Crisis

The basic architecture of the Internet hasn’t changed since it was conceived 40 years ago. But what was once the playground of wonks is now the main staging area for the global economy and open to an array of security vulnerabilities.

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter

An MBA Oath – another non-profession’s search for a standard of ethical conduct

There’s a movement among the students of the MBA program of Harvard Business School for an MBA Oath of ethical conduct. Read the oath here.

From a June 4th article in the Economist:

The student oath is part of a larger effort to turn management from a trade into a profession…

This is the exact debate going on in Software Development — emerging profession or craft?

One of the two main criticisms of the oath and of the whole idea of turning management into a profession, particularly in business-school faculties, is that it is either unnecessary or actively harmful… (by) promising to “safeguard the interests” of colleagues, customers, and society, are the future captains of industry simply short-changing their shareholders?

Defenders of the oath reply that the goal of maximising shareholder value has become a justification for short-termism and, in particular, rapid personal enrichment. They are concerned about managers doing things that drive up the share price quickly at the expense of a firm’s lasting health.

The second complaint is that the oath’s fine words are toothless.

Even these cheerleaders admit there are differences between practising management and, say, medicine. They concede that no self-regulating professional body for managers could possibly monopolise entry to the profession

DSC00689 by Ivana BrosnicWe can debate that a practice has ethical consequences, i.e. that it has a larger array of stakeholders who can be harmed or benefited by the daily decisions of practitioners – without calling for accreditation, lincensing, certification, standards bodies, and regulation.

Developers should consider end users, society and our common reputation even as managers consider long-term investors, employees, their industry and the larger economy.

Name a widespread activity that isn’t abetted/enabled by software systems. Even the debate over an MBA Oath:

As for punishing unprofessional behaviour, Mr Khurana (Rakesh Khurana, a professor at Harvard Business School) is inspired by the internet rather than by a closed council of grandees. From open-source software to eBay and Wikipedia, new systems of self-regulation are emerging based on openness, constant feedback and the wisdom of crowds. These could be adapted, he thinks, to provide effective scrutiny of managers.

If anything about this strikes you as not true, I’d love to hear why.

  • email
  • Print
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • LinkedIn
  • Facebook
  • Twitter