Archive for November, 2009

Bug tracking via Twitter?

An interesting thought just occurred to me… It seems quite reasonable to implement the Twitter API as a bug-tracking tool.

A software team could implement a Twitter account for bug tracking, and include the API into their projects within various try-catch blocks around potential points of failure. Then, all the members of that team would just follow that twitter account. For more critical applications, they could turn on device updates. It seems like a more available version of the old developer’s standby of programmatically emailing bug reports.

For sensitive applications, the tweets could be “protected”… but for less critical uses, the visibility of the public timeline would seem to be an added incentive for developers to fix bugs quickly.

It’s an interesting thought.

Tags:

TweetPost WordPress Plugin

TweetPost is a multi-user plugin that automatically tweets bit.ly or su.pr links to new posts.

Description

TweetPost is a multiuser plugin which allows wordpress publishers to automatically tweet their new posts to their Twitter account. Tweets consist of a message (“New post from @user”) including a reference to the author’s Twitter name, the title of the post, and a bit.ly shortened link to the post.

Currently, the Twitter Poster consists of the following features.

  • Authorize a global Twitter account with the site
  • Specify a Bit.ly login and API key to associate with the site
  • Adds a “Twitter” property to user details, so users can manage their own Twitter name
  • Automatically submits the permalink to bit.ly and adds that to the tweet
  • Adds a reference to the author’s Twitter account in the tweet
  • Fits the tweet into Twitter’s 140-character limit.

License

This Twitter Poster plugin and WordPress Plugin Framework are being developed under the GNU General Public License, version 2.

[GNU General Public License, version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html “GNU General Public License, version 2″)

Download

The current version can be downloaded here: tweetpost

Installation

  1. Unzip the archive file.
  2. Verify the name of the unzipped folder to be “tweetpost”
  3. Upload the “tweetpost” folder to the root of your WordPress “plugins” folder.
  4. Activate the “tweetpost” plugin in your website’s plugin administration page.
  5. Navigate to the “Settings” ~ “TweetPost” administration page, to add account info.

Frequently Asked Questions

Do I have to register my blog with Twitter?
Yes. Due to details of Twitter’s implementation of the OAuth protocol, it is
necessary to register your blog as a Twitter API consumer application. It’s silly, but fortunately it’s not difficult to do.

Change Log

  • 1.0
    • Added support for Twitter OAuth protocol
    • Removed support for Twitter’s (now defunct) Basic authentication
    • Added messaging missing configuration
  • 0.1
    • Initial version

Tags: ,

String formatting for Javascript

Today, I was asked by a C# developer if Javascript has any string formatting functions comparable to the String.Format() method in C#.

I thought about it for a few minutes, going over the possibilities of regular expressions in my head, but finally settled on giving him a simple extension to Javascript’s String object.

String.prototype.format = function () {
	var str = this.toString();
	if (arguments.length == 0) return str;
	for (var i=0; i<arguments.length; i++) {
		str = str.replace('{'+i+'}', arguments[i]);
	}
	return str;
}

This simple function gives your Javascript strings the exact same formatting ability they would have in C#.

Test it out for yourself:

var s = 'Hello, {0}, I am {1}, and I am {2} to meet you.';
alert (s.format('foo','bar','baz'));

Tags: