Thursday, January 22, 2009

Agile Research

...is it possible?

I was looking at trying to manage tasks/projects in the field biology realm.

Strikes I'm considering thus far:
- hard and fast deadlines that you can't miss that are all or nothing.
- projects change frequently so estimation is tough to get down

Deadlines...



In my experience with agile thus far, it works fine when you know you want to launch a new software project by a certain time with whatever features you can develop by then. Or if you know you need a certain feature set but don't really care when it gets done. When you have both criterion that makes it much more difficult.

Just like you can't guarantee to a business owner that there site will be done with all their features in exactly one month and guarantee the developers a sustainable pace, neither can you do that in research. So is there a way to adapt to these criterion? The benefit is that the deadlines usually pop-up far enough ahead of time that you wouldn't be able to spend all the time between now and then on that project even if you wanted to.

Project Turnover...



For agile projects I've been a part of we generally do a pretty bad job of estimating stories at the beginning and a much better job towards the end. Takes a sprint or two to get the hang of it. If projects were turning over frequently, this could be a nightmare.

In the academic world, there are constantly many things pressing on your time. Teaching responsibilities, data gathering, data analysis, and synthesis/publication. For any particular research project, a researcher has to start in the data gathering stage often using new tools and new methods are these estimable? Then as they move on to the data analysis, they again are often using new tools, and new methods. The writing at last is fairly familiar. The number of graphs and the length of the article may change but writing is always familiar ground.

Thoughts?



So how does one estimate such things? Ideas for agile in the research world? Am I just trying to force it?

I appreciate your suggestions, comments, feedback!

Thursday, January 15, 2009

Cross Browser Consistency

http://dowebsitesneedtolookexactlythesameineverybrowser.com/

For those that don't want to parse this url.. Do websites need to look exactly the same in ever browser?

When I first saw this url I thought to myself, "Self, the simple answer is 'Yes'." I mean who wants to go to their banks website and see a different layout when they get on with Firefox and another when they are checking their account on the road from some hotel's computer. No one! You lose all confidence in the site authors if it looks different every time you visit.

Also being a web developer I feel the pains of cross browser support all the time so I wanted to go on and commiserate with the other developers. You know why do we have to have a specific stylesheet for IE7 that is full of hacks to make it work like the standards ask, and why does IE6 even exist still and so on.

When I hit the site all I was greated with was a fancy looking 'No!'. I chuckled a bit to myself and said, "yeah right". Then, being the nerd that I am, I immediately opened up every browser I have to see what the differences were for this site. Of course lucky me launching parallels brought the gray screen of death down upon my poor tired little MacBook. But after I recovered from that I took a look at all the browsers.

Turns out the 'No!' that looked so fancy in OSX's Firefox, even fancier looking on OSX's Safari, pretty plain on XP in Firefox, Chrome and IE7, and slightly PC's Safari was a little fancier (Check it out for yourself). So when this site poses the question exactly the same I guess I have to agree. No, there is no reason to go through the effort of making sure your fonts are rendered the same way on every browser by rendering them with vectors or making sure you restyle all buttons with your own custom styles.

As long as the layout is the same and I can click a button in the same place on each browser labeled the same way and no text is falling out of divs or something like that I am pretty satisfied. I realize I'm a developer and am probably pretty utilitarian that way, but then again how many users of the web are really using more than one browser anyway.

All this said, I gotta mention.. I like the 'No!' on OSX's Safari the best. ;)

Wednesday, January 14, 2009

So you've got 100% Test Coverage

I stumbled across a quote at some point today. It wasn't the first time I heard it but it resonated with me today for whatever reason.

"Testing can only prove the presence of bugs, not their absence." --Edsger Dijkstra

Yep. It's so true. Hopefully, all of you have 100% or close test coverage on any app you develop but don't forget. All that test coverage is just a good sign, not a 100% working guarantee.

A good developer will try to test any edge cases that come to mind, but there are always more out there. Very sneaky, those wild combinations that users come up with, are (Just watched Star Wars last night, Yoda on the brain..).

This isn't a reason to not cover everything with tests. Just a reminder, that there is still work to be done, and as you are adding on to the code you've got, you may still find a bug or two.. Keep your eyes peeled!

Tuesday, January 13, 2009

DirtyForm: Watching for form changes with jQuery

Last time I mentioned that I had just finished the first steps of a jQuery plugin that would watch your forms and notify you before you left the page so your users don't lose that input they just took the time to type out but forgot to save. Well now its a little more robust and flexible.

What's new?


Lots of stuff has been updated.

  • Dirty and Clean events are fired off when a form has unsaved changes, and again when the form is cleaned again.

  • It works with jQuery tabs now (they are tricky and don't work like normal links).

  • Not limited to forms. Any container of inputs will work just fine.


Dirty/Clean Events


Forms can observe the "dirty" event for customized behavior. So you could set up the dirty form and then bind a function to the dirty event like so:

$(function(){
$("form")
.dirty_form()
.dirty(function(event, data){
var label = $(event.target).parents("li").find("label");
$("body").append("

" + label.text() + "Changed from " + data.from + " to: " + data.to+ "

")
})
});

Dirty Forms + jQuery-UI tabs


You can use tabs with DirtyForm easily. Just be sure that you make the tabs into stopper links after they are set up as tabs so they can be recognized as such and set up properly. They need a lot of special casing.

$(function(){
$("#nav").tabs();
$("#nav a").dirty_stopper();
});

If you've already set up all the links for the app as stoppers don't worry this will still work as the other events will be unbound. No penalty for making any links into a stopper twice!

Not just for forms!


If you like throwing inputs in your table rows DirtyForm can handle it. Just tell it where you want it to look.

$(function(){
$('tr').dirty_form();
});

The plugin is available for download from github: DirtyForm

Thursday, January 8, 2009

DirtyForm

Let the fun begin!

Have you ever made changes and then clicked the wrong button or switched to another tab before you submitted the form and then realized that all your changes are gone. Wouldn't it be nice if you were given a notification before you left so you would know what was about to happen. I thought so. So I wrote a jQuery plugin that does just that.

It's very easy to integrate with your app as long as you're using jQuery (If you're not you should be).

Just specify whatever forms you want to be watched as follows.

$(document).ready(function($){
$('form').dirty_form();
...
});

And then specify the links that should stop progress when a form has unsaved changes.

$(document).ready(function($){
...
$('a').dirty_stopper();
});

And that's all there is to it. Then when you change an input on the form and try to click one of those links a pop-up will display asking if you would like to proceed or go back and save your changes. This can save your users a lot of frustration and wasted time.

If you have the livequery jQuery plugin installed DirtyForm will also work for form elements added at any point after the page loads.

In the near future I'm going to try to make this plugin work with the jQuery UI tabs function. It can be downloaded from github here : DirtyForm

Also posted on ELCTech's blog: DirtyForm post

Borrowing the Beginning

This is a quote I found recently and I thought it would be a fitting thing to start out the blog.

Maybe you're different, but for me anything 'original' I create is just combining things which already exist. Making something from nothing just can't be done. So in that spirit I thought I would start with stealing the presentation of this quote and throw it on my blog.

Hopefully, I'll be taking things from all over the place and offer them back in a new and useful way.