As with many of the Agile techniques, pair programming may be counter-intuitive when you first hear about it. Having worked like this for about 6 months now, I think I can say that it can be very successful.
This particular experience has been productive, fun and a very effective way to transfer knowledge. I was, prior to this, a Java/JSP developer for a couple of years. I consider myself a professional programmer. My oppo, Derek, was a very experienced Flash designer/web programmer. Two totally different domains with practically no intersection.
Our mission was to pick up the pieces of the ASK Flash client apps (the previous incumbents having departed 3 and 12 months previously) and to develop the first of the oral reading training activities for students using the red5 media server for recording/playback.
These previous apps had been under development for about 5 years and in that time server-client traffic had become a bottleneck. The apps needed to hold the server's hand when they did anything. The Flash apps are pretty and intelligent and could do a lot more of the heavy lifting. So we also had to implement a new way for the apps to function in the system.
Working together, often at the same computer, I found that I learned a huge amount about Flash apps, and, of course the programming language AS2. I am now quite proficient. I am still a beginner at the design side of Flash, although I can follow what Derek does - this is truly an alien way of thinking for a text-based worker like me.
Derek for his part was not an object-oriented programmer before this, but is now a pretty fair coder.
Together we have made 3 major apps, now working on the 4th, each of them is better than the last in both design and code. It has been very effective for us to actually work at one desk for a lot of the time, especially when coding and building the logic of the apps. It's also been a lot of fun. This has been perhaps the only drawback - I've heard a manager grumble about "splitting us up", as if we were just being social - lol.
Interestingly, almost but not quite the same degree of collaboration can also be achieved remotely from our homes about 80 km apart, VPN'ing in to the company network. We use IM and Skype to talk and run local dev environments as well as Remote Desktop to our office machines.
One major consideration is code quality; we catch a lot more errors earlier than I would alone. Also I think that talking through the logic really makes it more robust.
Another advantage is that the two of us really understand the apps and code in considerable depth. I trust that Derek can make code changes, and I think he'd let me make mods to the Flash apps.
All considered, I'd definitely recommend pair programming in the case where two experienced developers can complement one another's skills.
This is not a blog. So sue me!
Crikey, things are looking up!
Showing posts with label code. Show all posts
Showing posts with label code. Show all posts
Thursday, February 14, 2008
Thursday, November 15, 2007
getDateString: ActionScript 2.0 function to make a readable numeric date string
The getDateString returns the present date/time in the form of a readable (just) string down to milliseconds e.g. 20061231135901999. It uses the leftFill function below:
//get the current date/time and make a string
//in the form yyyymmddHHMMSSmmm
private function getDateString():String
{
var today:Date = new Date();
var dateString:String = today.getFullYear().toString()
+ leftFill((today.getMonth()+1).toString(),"0",2)
+ leftFill(today.getDate().toString(),"0",2)
+ leftFill(today.getHours().toString(),"0",2)
+ leftFill(today.getMinutes().toString(),"0",2)
+ leftFill(today.getSeconds().toString(),"0",2)
+ leftFill(today.getMilliseconds().toString(),"0",3);
return dateString;
}//getDateString
// This function will take a string (1-3 characters)
// and right justify it with fill characters padded to the left for the width required.
// Designed for use with Date/time fields 1, 2 or 3 in length
// if it is called on the wrong size inString it will return the correct size field of fill chars
private function leftFill(inString:String, fillChar:String, fieldWidth:Number):String
{
//make sure the fill character is only one character long!
var fill = fillChar.substr(0,1);
if (inString.length == fieldWidth)
{
return inString;
}
else if (inString.length == fieldWidth-1)
{
return fill + inString;
}
else if (inString.length == fieldWidth-2)
{
return fill + fill + inString;
}
else
{
return ((fill + fill + fill).substr(0,fieldWidth));
}
}//leftFill
removeString: ActionScript 2.0 function to remove delimited strings
This function is quite useful.
It will remove strings that are delimited by known characters, any number of times from a target string. For example to remove all the markups in an XML node and just leave the text, call it with this snippet:
It will remove strings that are delimited by known characters, any number of times from a target string. For example to remove all the markups in an XML node and just leave the text, call it with this snippet:
tempString = pNode.toString();
while (tempString.indexOf("<") != -1) {
tempString = removeString(tempString,"<",">");
}
function removeString(input:String, sDelim:String,
eDelim:String):String {
var startIndex:Number = 0;
var sDelimIndex:Number = input.indexOf(sDelim);
var eDelimIndex:Number = input.indexOf(eDelim);
var endIndex:Number = input.length-1;
var output:String = "";
if (input == undefined ||
input == "" ||
sDelimIndex != -1) {
//get the substring before the delimiter, if any
if (startIndex < sDelimIndex) {
output += input.substring(startIndex,sDelimIndex);
}
if (eDelimIndex != -1) { // if any end delim
// get the substring after the delimiter, if any
if (eDelimIndex < endIndex) {
output += input.substring(eDelimIndex+1,endIndex+1);
}
}
}
else {
//nothing to be done
output = input;
}
return output;
}
Subscribe to:
Posts (Atom)
Labels
- Funny
- spam sucks
- rant
- stolen joke alert
- boaters
- reviews
- self-indulgence
- health
- links
- sailing
- actionscript 2
- movies
- music
- programming
- sex
- silly songs
- Windows command line
- Windows desktop
- cats
- code
- computers
- flash
- photos
- politics
- rowing
- writers'
- Flash CS3
- age
- books
- browsers
- cooking
- government
- management
- user interface
- webapps
- Eclipse
- IDEs
- Subversion
- amazing
- anchoring
- batch files
- blogging
- color
- cremation
- fonts
- html
- java
- jsp
- language
- olpc
- pets
- philosophy
- photography
- quotes
- safety
- sales
- santa
- sociology
- special characters
- tools
St Lawrence Rowing
Test content from SLRC