CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Raymond Lewallen

Framework Design, Agile Coach, President Oklahoma City Developers Group, Microsoft MVP C#, TDD, Continuous Integration, Patterns and Practices, Domain Driven Design, Speaker, VB.Net, C# and Sql Server

A look into the a workday of an XP developer

A day in the life of an XP developer is pretty easy to understand.  There isn’t much involved.  Because developers are relieved from making any business decisions, this saves time.  Because a customer is readily available to ask questions when they arise, this saves time.  Because you have unit tests in place to test code when writing and refactoring, this saves time.  In XP, developers only work 8 hours a day, so the more time spent writing code, naturally, is time best spent by you and money best spent by the customer.

The day of a developer starts with coffee, Pepsi or Mountain Dew.  But seriously, the day of a developer begins with the other developers in a quick stand up meeting.  This meeting is meant to be quick and to discuss what you did yesterday and what you are going to do today.  This keeps everybody in the loop.

After the meeting, developers pair up.  Somedays you might be the driver and writing code, other days you might be the navigator keeping everything in check.  In the meeting you’ve already discussed the goals for the day.  Now its time to git er done!

Because developer tasks are small, the next part of the day may or may not repeat itself, depending on the number of tasks you wish to accomplish this day.

Start writing your unit tests.  Make sure your tests fail.  Now write your code.  Only write enough code to make the test pass.  Once the test passes, now refactor the code.  Keep refactoring and removing lines of code until any single line removed from that point on will make the test fail.  This is part of simple design.

Now, assuming you have completed the task during the same day you started it, integrate it into the project source control.  Now everybody else has access to it: the latest version of the code.

If you have more tasks you can complete in the same day, start it.  Maybe pair up with someone different this time.  Begin the cycle of test-code-refactor-integrate again.  If it gets to the end of the day, which is 8 working hours, and you have not completed a particular task, throw it away.  Don’t check it in, don’t integrate it.  Since your tasks are small and simple, you can start again on it in the morning.  The time you’ve spent working on it so far is time well spent.  You’ll come back tomorrow with good ideas and a better idea of the task and what is needed to accomplish the task.  If you keep working, you’ll start to get tired, frustrated and produce bad code.  Just throw it away and take away what you’ve learned from it.

Go home, spend some time with your family.  Play a game on the computer, watch a movie, play your guitar, read to your kids or do whatever it is you do to relax.



Comments

Raymond Lewallen said:

Spell check yes. Grammer, no. If grammatical errors bug you, I'm suprised you read any blogs at all. But, I fixed it for you.
# June 27, 2005 8:59 AM

Brett Veenstra said:

Two things amaze me:

"In XP, developers only work 8 hours a day, so the more time spent writing code, naturally, is time best spent by you and money best spent by the customer."

vs.

"If it gets to the end of the day, which is 8 working hours, and you have not completed a particular task, throw it away."



I'm not against XP, I'm just confused how the factor driving spending money right also allocates throw it away.

I also don't get the pair programming, but I have experienced developers that don't have any idea how to properly code or keep code in the context of the area or even class in which they are writing or both. Is Pair Programming just XP's answer to supply vs. demand?
# August 12, 2005 8:08 AM

Raymond Lewallen said:

Brett,

You are not merely just "throwing it away". Yes, you may chunk the code, but at the same time you've learned something from the time spent working on it. If you didn't finish it because you ran into issues, then the time spent was well worth it because you learned about and dealt with those issues. Tomorrow you can come in fresh, already aware of some issues you've had to deal with, and start new with the knowledge you already posses from your learning experience the day before.
# August 12, 2005 9:26 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Raymond Lewallen

Working primarily in the public sector during his career, Raymond has designed and built several high profile enterprise level applications for all levels of the government. Raymond now works as a solutions architect for EMC. Raymond is an agile coach, Microsoft MVP C# and also president of the Oklahoma City Developers Group and Oklahoma Agile Developers Group. Raymond spends a lot of his time learning and teaching such things as Test Driven Development, Domain Driven Design, Design Patterns and Extreme Programming practices and principles, to name a few. Raymond is also an advocate of Alt.Net. Raymond is primarily a framework guy, so don't ask him anything about UI :) Check out Devlicio.us!