{"id":262,"date":"2012-07-22T21:18:34","date_gmt":"2012-07-22T21:18:34","guid":{"rendered":"http:\/\/agilestaffordshire.org\/?p=262"},"modified":"2013-02-19T23:06:54","modified_gmt":"2013-02-19T23:06:54","slug":"july-2012-refactoring-session","status":"publish","type":"post","link":"https:\/\/agilestaffordshire.org\/agile\/july-2012-refactoring-session\/","title":{"rendered":"July 2012 – Refactoring Session"},"content":{"rendered":"

\"\"<\/a>

Courtesy of the daily WTF<\/p><\/div>
\nDate: Thursday 26th July 2012<\/p>\n

Time: 7:30pm start<\/p>\n

Venue: The Stafford Ale House<\/a>
\nLocation:
Google Maps<\/a><\/p>\n

Refactoring Session<\/h2>\n

During July\u2019s meeting of Agile Staffs the plan is to have a refactoring session.\u00a0 The purpose of the session is to get everyone to take part in an exercise of refactoring some simple code as a means of encouraging discussion about the process and the many ways that we can go about it.<\/p>\n

Everyone participating in the exercise will be starting from the same basic code base and may refactor it in any way that they please to improve the code.\u00a0 There are some simple acceptance tests that verify the code is doing what it should.\u00a0 Aside from that everyone may work on the code however they see fit.\u00a0 The exception to this rule being the acceptance tests cannot be changed as they govern that everyone\u2019s source code will still solve the same basic problem.<\/p>\n

We have a couple of options for how the evening could be run, and I would welcome feedback as to what you think you would prefer.<\/p>\n

Initially, everyone pairs off with a programming partner and begins to refactor the sample code, refactoring goes on for approx. 40 minutes, after which we all break for a discussion, where each pair takes a turn to describe how they have refactored the code.<\/p>\n

From there we have a couple of options, assuming there is some time left.\u00a0 We could either; continue with the refactoring from where we left off or, reset the virtual machines back to their initial state, select new programming partners and start the exercise again (as per the code retreat<\/a> process).<\/p>\n

The Environment<\/h2>\n

To make sure that everyone is using the same environment and starting from the same point, an Ubuntu Virtual Box Instance is available that contains an install of IntelliJ, Git and the proposed exercise ready to go.\u00a0 Each participant will need a copy of Virtual Box and the Virtual Machine that is available via Dropbox.\u00a0 The download is almost 7Gigs in size, so I will also bring copies of both the Virtual Box installs and the VM on the night but the process would be sped up greatly if everyone was prepared beforehand.<\/p>\n

It is possible to download the image, spin it up in Virtual box to the login screen for Ubuntu to make sure it works and I would recommend that people do this so that on the night they can simply get the password and crack on.<\/p>\n

Links to downloads:<\/strong><\/p>\n

Virtual Box:<\/p>\n

https:\/\/www.virtualbox.org\/wiki\/Downloads<\/a><\/p>\n

The Ubuntu Image and Instructions:<\/p>\n

https:\/\/www.dropbox.com\/sh\/yn1d7l1z3uk366u\/JJBB0VRx_l<\/a><\/p>\n

The Exercise<\/h2>\n

I am going to keep the exercise itself as my little secret for now. \u00a0I was going to make something up, however a quick Google search turned up an exercise for which, the initial source, an ideal final source and acceptance tests are available so I have opted to go with this instead.\u00a0 Firstly, because it was there and saved me from having to worry too much about providing something that was too complicated or too simple for two 40 minute sessions and secondly because it has an ideal solution that I will hold back until much later in the session as a kind of yard stick to see how we all did.<\/p>\n

Anyway, the aim of the session is to have a little fun, have a lot of discussion and hopefully learn some stuff as we go.<\/p>\n

In the meantime, if anyone has any issues getting setup or queries about the session, please email me at Robert@stothard.me.uk<\/a> and I will try my best to help out.<\/p>\n

 <\/p>\n

In the meantime, below are some further links for information about in case anyone would like to brush up beforehand.<\/p>\n

http:\/\/www.infoq.com\/presentations\/Stop-Refactoring<\/a><\/p>\n

http:\/\/lostechies.com\/seanchambers\/2009\/10\/20\/31-days-of-refactoring-ebook\/<\/a><\/p>\n

http:\/\/books.google.co.uk\/books\/about\/Refactoring_Workbook.html<\/a><\/p>\n

 <\/p>\n

See you there<\/p>\n

 <\/p>\n

Bob<\/p>\n","protected":false},"excerpt":{"rendered":"

Date: Thursday 26th July 2012 Time: 7:30pm start Venue: The Stafford Ale House Location: Google Maps Refactoring Session During July\u2019s meeting of Agile Staffs the plan is to have a refactoring session.\u00a0 The purpose of the session is to get everyone to take part in an exercise of refactoring some simple code as a means […]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[3,5,6],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4r37M-4e","_links":{"self":[{"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/posts\/262"}],"collection":[{"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":1,"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":421,"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/posts\/262\/revisions\/421"}],"wp:attachment":[{"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agilestaffordshire.org\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}