<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>#AltDevBlogADay &#187; Lee Winder</title>
	<atom:link href="http://www.altdevblogaday.com/author/lee-winder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.altdevblogaday.com</link>
	<description>Each day a little more #gamedev love</description>
	<lastBuildDate>Thu, 17 May 2012 03:06:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Why Accreditation Matters</title>
		<link>http://www.altdevblogaday.com/2012/02/25/why-accreditation-matters/</link>
		<comments>http://www.altdevblogaday.com/2012/02/25/why-accreditation-matters/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 19:20:49 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Education]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=24565</guid>
		<description><![CDATA[<p><a href="http://altdevblogaday.com/wp-content/uploads/2012/02/Skillset_approved_half.gif"><img class="size-full wp-image-24567 alignright" style="margin: 5px" src="http://altdevblogaday.com/wp-content/uploads/2012/02/Skillset_approved_half.gif" alt="" width="227" height="122" /></a><br />
Choice is a wonderful thing. Blind choice isn&#8217;t and when it comes to degrees listing themselves as a great place to do a &#8216;Technical Games Degree&#8217; there&#8217;s a lot of choice and not a lot of information available to sort the good from the bad.</p>
<p><a href="http://www.altdevblogaday.com/2012/02/25/why-accreditation-matters/" class="more-link">Read more on Why Accreditation Matters&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://altdevblogaday.com/wp-content/uploads/2012/02/Skillset_approved_half.gif"><img class="size-full wp-image-24567 alignright" style="margin: 5px" src="http://altdevblogaday.com/wp-content/uploads/2012/02/Skillset_approved_half.gif" alt="" width="227" height="122" /></a><br />
Choice is a wonderful thing. Blind choice isn&#8217;t and when it comes to degrees listing themselves as a great place to do a &#8216;Technical Games Degree&#8217; there&#8217;s a lot of choice and not a lot of information available to sort the good from the bad.</p>
<p>It&#8217;s this abundance of choice and the issues resulting from making the wrong choice that drives my involvement with <a href="http://www.skillset.org/" target="_blank">SkillSet</a>. Good courses need as many opportunities as possible to stand out from the crowd especially when prospective students may have to narrow down the Universities they&#8217;ll investigate let alone apply too.<br />
&nbsp;<br />
&nbsp;</p>
<h3>What Is The Accreditation Process?</h3>
<p>I&#8217;ve been a lead evaluator for the SkillSet accreditation process for quite a few years now. The process (I&#8217;ll keep it short) involves an application by the University to SkillSet, a paper based investigation into the University covering the skills taught, the attainment and employability of students (amongst other things) followed by an on-site visit by an evaluation team. This visit involves interviews with staff and students, examination of the work done and the facilities available with a recommendation to accredit based on their findings.</p>
<p>This evaluation team is always made up of active game developers working in the discipline the course focuses on.</p>
<p>Courses have and will continue to be rejected at various stages of the process if they are not up to scratch and the criteria used is often very strict with a high barrier for entry. Courses have to be producing quality graduates with the skills suitable for the industry before they can even start to think about applying for accreditation. Cross skill courses (those teaching programming, art and design in a single degree) have never been accredited and never will.</p>
<p>The process and documentation is publicly available so you can have a more detailed look <a href="http://courses.skillset.org/pick_the_tick/accredited_computer_games_courses/apply_for_course_accreditation" target="_blank">here</a>.<br />
&nbsp;<br />
&nbsp;</p>
<h3>Student Choice</h3>
<p>There are a lot of Universities in the UK and a large number of them provide a some kind of game related technical course. Unfortunately a lot of them don&#8217;t provide a high enough level of education to warrant the time and money students spend on them. Accreditation awards allows students to quickly narrow down the kinds of Universities they should be looking at and to spend the time they have investigating the best rather than trying to simply find the ones worthy of their time.</p>
<p>Word of mouth and past experience all goes into this but it still takes time that could be better spent especially when students will be applying to Universities at the same time as working towards their A-Levels, a period of time which may well be the most stressful time they&#8217;ve had in their academic career so far.</p>
<p>An accredited University at least gives them the knowledge that they&#8217;ll get the right kind of education allowing them to focus on finding one that best suits them rather than anything else.<br />
&nbsp;<br />
&nbsp;</p>
<h3>Industry Involvement</h3>
<p>A lot of developers want to get involved with the education of future game makers and University partnerships such as guest lectures and industry panels are one of the best ways to do that. Universities like industry involvement and some developers can end up being overwhelmed with requests especially if they are already working with other courses and word starts to spread. And because a developers time is so valuable, it helps to be able to target the Universities that we know are already providing the kinds of skills students will need in the future.</p>
<p>Building on a quality foundation allows much more scope for growth than having to start from the bottom and working upwards.</p>
<p>But you might think this is a path to ruin. If the industry only helps accredited courses surely none can become accredited because no-ones willing to work with them to get there!</p>
<p>But that&#8217;s not the case. Bigger companies such as Sony, MS, Blitz, Codemasters and others work with those up and coming courses, allowing them to get the point where they can apply for or work towards accreditation. Once that happens, it becomes a positive feedback loop, as the course gets better and gets accredited it leads to more industry involvement which leads to a better course…<br />
&nbsp;<br />
&nbsp;</p>
<h3>It&#8217;s The Skills Stupid</h3>
<p>The argument between game focused and traditional Computer Science courses is always the same and is usually spot on. Take a CS course over a game course because in a few years you may not want to work in the industry and the skills you learn on a CS could will put you in a stronger position should you want to do something else.</p>
<p>Without a doubt this is a good argument to make but one that I hope accreditation can resolve. In every evaluation I&#8217;ve taken part in the skills we look for and the modules on display show that the course could quite easily be rebranded as &#8216;Computer Science with a games slant&#8217; rather than &#8216;Games Technology with a little bit of Computer Science thrown in&#8217;. As a result the skills taught will still put the student in a good position should they decided the industry is not for them and while a &#8216;Games Technology&#8217; degree won&#8217;t look as good as a &#8216;Computer Science&#8217; degree on a CV, accreditation should allow it to grow in stature depending on which University awarded the degree.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2012/02/25/why-accreditation-matters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computing in Schools &#8211; Lets Not Rush Things</title>
		<link>http://www.altdevblogaday.com/2012/02/10/computing-in-schools-lets-not-rush-things/</link>
		<comments>http://www.altdevblogaday.com/2012/02/10/computing-in-schools-lets-not-rush-things/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 13:30:05 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Education]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=24090</guid>
		<description><![CDATA[<p>There has been a significant amount of press in the UK about the quality of computer related education at Key Stage 3 and 4 (Secondary School level with pupils ages 11-16 years old) and to a much lesser extent Key Stage 5 (college or 6th form students aged 17-18 years old).</p>
<p><a href="http://www.altdevblogaday.com/2012/02/10/computing-in-schools-lets-not-rush-things/" class="more-link">Read more on Computing in Schools &#8211; Lets Not Rush Things&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>There has been a significant amount of press in the UK about the quality of computer related education at Key Stage 3 and 4 (Secondary School level with pupils ages 11-16 years old) and to a much lesser extent Key Stage 5 (college or 6th form students aged 17-18 years old).</p>
<p>As someone who used to teach ICT at these level I have first hand experience of the kind of topics, software and skills taught to children in classes across the UK, and agree 100% that, as a subject, ICT should be kicked to the kerb and approached from a completely different angle.</p>
<p>And we’re certainly heading in the right direction.</p>
<p>The <a href="http://www.nesta.org.uk/events/assets/features/next_gen" target="_blank">Next Gen.</a> report by Livingstone and Hope details how we can provide the skills our children require to take our industries to the next level and beyond and even the current Education Secretary Michael Gove is making <a href="http://www.bbc.co.uk/news/education-16493929" target="_blank">moves in the right direction</a>. Change is coming and it’s change for the better.</p>
<p>But we must be careful not to rush these changes and to make sure the structure and content is right, that suitable facilities are available and we have the right people in place before we start this process otherwise we’ll be back to square one within a couple of years.<br />
&nbsp;<br />
&nbsp;</p>
<h2>You Can’t Teach What You Don’t Know</h2>
<p>The largest problem facing the introduction of a new, highly scientific and difficult subject is getting the right people in place to teach. And the most important word in that sentence is ‘right’.</p>
<p>Sure we can use existing ICT teachers but it’s clear that the skills required to teach ICT are not the same skills required to teach a Computing GCSE. Also, don’t get me started on the number of ICT teachers who don’t actually know how to use a computer&#8230;</p>
<p>We can draft in science and maths teachers to teach elements of the course others are unable to but those teachers already have working place directives in place limiting how many hours they can teach and those hours will already be more than accounted for.</p>
<p>If we really want to create a next generation of developers is passionate and <em>knowledgeable</em> educators pushing that passion onto the open minds in front of them. Sure, anyone can learn enough to teach a subject, but it wont be exciting, it won’t be boundary defining and it won’t make those pupils crave more. Sure, some teachers will really take to this, will develop that passion along with their students, but the majority won&#8217;t and as a result the subject could easily be seen as stale, boring and dull.</p>
<p>So the ideal solution is to hire for the shortfall but with approximately 3,900 state run secondary schools in the UK and with many schools having the need for more than one or two teachers per subject that’s a big recruitment drive.<br />
&nbsp;<br />
&nbsp;</p>
<h2>Custom Content Is Risky But Rewarding</h2>
<p>One of the most interesting aspects of this push towards a more computing focused subject is the idea of having a more flexible curriculum. Now this could mean a myriad of things though I’m taking it to mean schools being given the ability to cherry pick the elements they want to teach and to ignore elements they don’t.</p>
<p>This is extremely useful especially with a lack of specialist teachers and it also tackles one of the main criticisms of the National Curriculum, that it creates boilerplate content and restricts creativity and freedom in the classroom.</p>
<p>So by allowing schools to be flexible with what they teach we allow our teachers to experiment and push the boundaries of our children&#8217;s imaginations, if they have the knowledge to do that.</p>
<p>But it also opens up the possibility of a (and I hate myself for using this awful and overused phrase) postcode lottery where some schools are teaching more valuable skills than others. It complicates the act of awarding consistent and meaningful grades across the country and it could lead to stagnation as some schools resist pressure to improve as technology moves on.</p>
<p>Though you could make that argument for the education system as a whole due to the varying levels of skills between teachers of all subjects in all schools.<br />
&nbsp;<br />
&nbsp;</p>
<h2>We’re A Fickle Bunch</h2>
<p>With the issues highlighted above there is every chance that if we rush headlong into these changes we risk the first years being less than stellar as people find their feet, new teachers are recruited and less talented teachers are let go.</p>
<p>And this one worries me the most.</p>
<p>With every change of Government, or in many cases with every change in Education Secretary, schools are given newer mandates, newer targets and newer goals. And it’s always in response to a perceived failure by the last Government/Secretary.</p>
<p>If the introduction of a Computer focused subject is seen as a failure in any way then the next Education Secretary will trip over themselves to ‘fix’ the situation. Not by removing the subject but by constantly tweaking and ‘refocusing’, leading to a course that drives schools (and good teachers) away from the subject and turns it into something resembling what we already have.<br />
&nbsp;<br />
&nbsp;</p>
<h2>ICT Isn’t All Bad</h2>
<p>ICT isn’t just Word and Excel. There’s some really interesting content in there that shouldn’t just be discarded out of hand.</p>
<p>I’ve taught lessons in web design and planning using both graphical editors (Dreamweaver at the time) and text editors. We used some rudimentary programming tools in the early years (getting frogs safely across the road by managing traffic light systems) and video editing tools in later years. All of these were exciting, interesting and (usually) generated some pretty interesting results!</p>
<p>I’m confident that these elements will not be lost no matter what comes next, but we must be careful not to discard what we have and what actually works for want of a ‘better’ system.<br />
&nbsp;<br />
&nbsp;</p>
<h2>Word Processing Skills Are Important</h2>
<p>Something we need to acknowledge is that (this might nark some people) word processing and spreadsheet skills, and the ability to use MS products, are important skills that pupils need to have. Whether we like it or not the majority of the world uses MS Office and while this might change in the future having the ability to use these tools improves a child’s employability, their work rate at school and their computer literacy in general.</p>
<p>But the removal of these ‘skills’ from a specific subject is nothing but good news. By teaching these skills as part of other subjects will lead them to be seen as more natural tools that can be used in a wide range of situations rather than just in their ICT lesson.</p>
<p>But we need to make sure that time is available in all subjects to do this and acknowledge that it’ll take a whole school approach to achieve, something that will vary greatly on a school by school basis.</p>
<p>&nbsp;<br />
&nbsp;<br />
I’m certainly excited about how these changes will alter how our children see and use computers on a daily basis and how that can only improve the industry in general. But there are significant challenges that must be faced before we can move forward, confidently, and create a true next generation of developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2012/02/10/computing-in-schools-lets-not-rush-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Communication is Key</title>
		<link>http://www.altdevblogaday.com/2011/11/27/communication-is-key/</link>
		<comments>http://www.altdevblogaday.com/2011/11/27/communication-is-key/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 17:20:12 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[General Interest]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=20637</guid>
		<description><![CDATA[<p><a title="COMICS + INFORMATION DESIGN by Austin Kleon, on Flickr" href="http://www.flickr.com/photos/deathtogutenberg/361664198/" target="_blank"><img class="alignright" src="http://farm1.staticflickr.com/136/361664198_f34ea6fc15_m.jpg" alt="COMICS + INFORMATION DESIGN" width="240" height="174" /></a>Successful communication is one of the most important aspects of a well functioning and productive team. Without good communication between peers, managers, publishers and anyone else involved in the game development process a team will not perform at it’s best.</p>
<p><a href="http://www.altdevblogaday.com/2011/11/27/communication-is-key/" class="more-link">Read more on Communication is Key&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="COMICS + INFORMATION DESIGN by Austin Kleon, on Flickr" href="http://www.flickr.com/photos/deathtogutenberg/361664198/" target="_blank"><img class="alignright" src="http://farm1.staticflickr.com/136/361664198_f34ea6fc15_m.jpg" alt="COMICS + INFORMATION DESIGN" width="240" height="174" /></a>Successful communication is one of the most important aspects of a well functioning and productive team. Without good communication between peers, managers, publishers and anyone else involved in the game development process a team will not perform at it’s best.</p>
<p>If developers do not feel confident in the reasons behind their work, if they don’t fully understand how their work will fit into the project as a whole or indeed when it will be required, the team will produce lower quality work with last minute changes and requirements fostering an atmosphere of distrust and crunch.</p>
<p>But communication is one of the most difficult things to get right but so costly when it’s done wrong.</p>
<p>The following are methods I’ve used over the years to try and improve communication within the team. I’d be very interested to hear other ways people have tried too!</p>
<p>&nbsp;<br />
<strong>Team Wiki</strong><br />
Having an open Wiki that people can contribute information and notes is a good idea for documentation and persistent information. It is not a good tool for perishable short term information. Documentation on team processes (getting the latest build, creating submissions, setting up PC’s etc.) is usually the kind of information that finds a home on a wiki and while it’s useful it’s not something that affects the team on a daily basis.</p>
<p>And as it requires people to physically search for the information in the long term people don’t bother looking for new information on a regular basis.</p>
<p>As a result, the Wiki is useful but doesn’t actually improve the day to day communication on a team.</p>
<p>&nbsp;<br />
<strong>Blogs</strong><br />
We have a team blog that people update about 2 or 3 times a week, usually discussing their recent work, posting up screen shots or letting people know the state of the project. It’s a nice simple way to push information to the team, though it does require everyone to contribute to the blog to get good cross team communication going.</p>
<p>Discussions can take on a life of their own which is actually a good way to gauge buy in into a project but can’t be used to judge the success of the process.</p>
<p>But you’d be amazed how many people don’t have any kind of RSS feed reader set up&#8230;</p>
<p>&nbsp;<br />
<strong>Micro-blogging</strong><br />
Internal mico-blogging tools like Yammer or Status.net allow people to quickly thrown up what they’re working on, problems encountered or general team information. The best thing about micro-blogging is it’s push communication style with peoples updates being automatically feed to clients which people can update as much as they want (I usually recommended at least twice a day).</p>
<p>But so far I’ve had very little success with micro-blogging tools in a team environment.</p>
<p>Not because the idea was bad (when it worked it worked well) but I’ve yet to find a service where the official client is anywhere near usable and able to filter out the information people don’t want to read. Without a good way to filter and push information where you want it (like all the best third party Twitter tools do) it either becomes an information overload or a sea of noise, neither of which improve communication.</p>
<p>&nbsp;<br />
<strong>Wall Displays</strong><br />
Walls are valuable real estate especially in an Open Plan office and I’ve rarely seen them used to their full potential. But highly visible walls in the middle of a team area are one of the best ways to communicate information across a team.</p>
<p>As an example on my current project we have the entire timeline of the project (it’s only a short one) with dates/deliverables clearly indicated, a ‘where we are right now’ marker and a description &#8211; feature by feature &#8211; of what is required for a given milestone.</p>
<p>Next to that we have our sprint wall which is our most ‘live’ wall display. But position is key and in our case the sprint wall’s impact on the team is reduced due to it’s rather awkward position between a big TV, a constantly spinning fan and quite a lot of server machines. But I did say wall space is valuable real estate and it’s always hard to find a compromise between distance from team and accessibility.</p>
<p>&nbsp;<br />
<strong>Morning Meetings</strong><br />
Morning meetings are one of the best ways to push information across a team but I’ve found that you need to follow a few rules to make them really valuable.</p>
<ul>
<li>Keep the groups small. I’ve lost count of the number of 20+ people stand up meetings I’ve seen where the majority of the ‘participants’ are looking bored or simply waiting for their turn. If you’re groups are not small, the information is less targeted and much less relevant, meaning more information is lost than actually passed around the team.</li>
<li>Keep them focused. There is nothing worse than 1 out of the 6 people speaking for 15 minutes about the most intimate implementation details, leaving everyone else itching to get back to their seats to carry on working.</li>
<li>Don’t make them reporting sessions. If everyone is talking at a single person (usually their manager) take the manager out for a while and get people used to talking to each other as it makes it much more likely for people to take in what is being said.</li>
</ul>
<p>&nbsp;<br />
<strong>Milestone Reviews</strong><br />
I love the concept of a milestone review. Everyone playing the game, lively discussions about what went right, what went wrong and what we can do better next time. But it’s easy for these to be less than stellar if not approached in the right way.</p>
<p>If these reviews are not focused, maybe even as structured as a schedule or points to cover, people may start to feel unsure as to what they can comment on or what exactly they should be doing. You’ve also got to make sure that people feel comfortable both giving and taking criticism and manage the situations when that goes pear shape (and sometimes it will).</p>
<p>I’ve found that when done right, when people contribute to discussions and when people can (importantly) see change as a result of these reviews, the quality of information coming out of them is invaluable. It also has the added bonus of making people feel like they are making a difference to the team and allowing their thoughts to be heard.</p>
<p>&nbsp;<br />
<strong>Sprint Planning</strong><br />
The days of managers sitting in a room building up a schedule and dishing it out to the developers is (almost) long gone. And there’s good reason for it.</p>
<p>Getting a group of developers (again with the morning meetings it needs to be small and focused) to discuss, schedule and plan the work ahead significantly improves the knowledge people have of what is happening across the team. Again, if people feel that have a say in how work will be implemented, how it will be assigned and when it’ll be done by is vital to spreading information about the project and the work being done.</p>
<p>&nbsp;<br />
So those are a couple of methods I’ve used to try and improve communication and information across the team. I’m sure there are plenty more (and I’ve tried a few which have been colossal failures) so what methods have you used and how well did they work out?</p>
<p>&nbsp;</p>
<p style="padding-left: 30px"><em>Title image by <a href="http://www.flickr.com/photos/deathtogutenberg/" target="_blank">deathtogutenberg</a>.  Used under <a href="http://creativecommons.org/licenses/by-nc-nd/2.0/">license</a>.</em></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/11/27/communication-is-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;ll just refactor that&#8230;</title>
		<link>http://www.altdevblogaday.com/2011/11/12/ill-just-refactor-that/</link>
		<comments>http://www.altdevblogaday.com/2011/11/12/ill-just-refactor-that/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 14:44:47 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=20143</guid>
		<description><![CDATA[<p><a title="That's Enough by Lee Winder, on Flickr" href="http://www.flickr.com/photos/leewinder/6279468600/"><img class="alignright" src="http://farm7.static.flickr.com/6059/6279468600_b5d3fcc028_m.jpg" alt="That's Enough" width="240" height="179" /></a></p>
<blockquote><p><strong>Refactor</strong>: <em>Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. </em></p></blockquote>
<p>&#160;</p>
<p>I pretty much wish that word had never been invented. The above definition (taken from Martin Fowler’s <a href="http://refactoring.com/" target="_blank">Refactoring Home Page</a>) seems to have lost nearly all meaning when used in day to day programming conversations.</p>
<p><a href="http://www.altdevblogaday.com/2011/11/12/ill-just-refactor-that/" class="more-link">Read more on I&#8217;ll just refactor that&#8230;&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="That's Enough by Lee Winder, on Flickr" href="http://www.flickr.com/photos/leewinder/6279468600/"><img class="alignright" src="http://farm7.static.flickr.com/6059/6279468600_b5d3fcc028_m.jpg" alt="That's Enough" width="240" height="179" /></a></p>
<blockquote><p><strong>Refactor</strong>: <em>Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. </em></p></blockquote>
<p>&nbsp;</p>
<p>I pretty much wish that word had never been invented. The above definition (taken from Martin Fowler’s <a href="http://refactoring.com/" target="_blank">Refactoring Home Page</a>) seems to have lost nearly all meaning when used in day to day programming conversations.</p>
<p>To further describe the original definition of refactoring:</p>
<blockquote><p><em>Its heart is a series of small behavior preserving transformations. Each transformation does little, but a sequence of transformations can produce a significant restructuring.</em></p></blockquote>
<p>&nbsp;</p>
<p>But when someone comes to me and says “I’ll just refactor that&#8230;” I can no longer assume to know what they’ll be doing. Based on how people now use this term it could be any one of a number of things including (in order of violence)</p>
<ul>
<li>Making small changes to make the system more understandable, simpler and easier to use without affecting it’s perceived behaviour</li>
<li>Optimising elements of the system which should hopefully(?) not effect the external behaviour</li>
<li>Making wide ranging changes to a system which will effect elements of its behaviour</li>
<li>Deleting the whole thing and starting again without even looking at what we have now</li>
</ul>
<p>It seems like there is a reluctance to use the words ‘re-write’, ‘modify’, ‘break’ or (in a some cases) ‘trash’ when discussing intentions towards an existing system. As a result what was a very descriptive and clear term has lost all meaning and resulted in something what can no longer be used to clearly describe a useful and often necessary development process.</p>
<p>Do I wish the word hadn’t been invented? Maybe I just wish it hasn’t taken on an image that ‘refactoring’ is somehow cooler or more elite than simply saying what you mean when describing what you’ll be doing.<br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/11/12/ill-just-refactor-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile &#8211; Specialisations Still Matter</title>
		<link>http://www.altdevblogaday.com/2011/10/28/agile-specialisations-still-matter/</link>
		<comments>http://www.altdevblogaday.com/2011/10/28/agile-specialisations-still-matter/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 13:00:56 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[General Interest]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=19294</guid>
		<description><![CDATA[<p><a title="Spooky by Lee Winder, on Flickr" href="http://www.flickr.com/photos/leewinder/5985145420/" target="_blank"><img class="alignright" src="http://farm7.static.flickr.com/6017/5985145420_5cf8f10b9d_m.jpg" alt="Spooky" width="240" height="160" /></a>I recently came across an interesting post over on <a href="http://blog.agilegamedevelopment.com/" target="_blank">Agile Game Development</a> titled ‘<a href="http://blog.agilegamedevelopment.com/2011/10/scrum-doesn.html" target="_blank">Scrum Prohibits all Specializations</a>’. The part that stuck me was the following:</p>
<p style="padding-left: 30px"><em>I understand that Scrum has been applied mainly to software products and that the elimination of &#8220;specialties&#8221; means that the database programmer, UI programmer and QA engineer should all be able to perform each other&#8217;s roles equally. This is valid.</em></p>
<p>&#160;</p>
<p><a href="http://www.altdevblogaday.com/2011/10/28/agile-specialisations-still-matter/" class="more-link">Read more on Agile &#8211; Specialisations Still Matter&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="Spooky by Lee Winder, on Flickr" href="http://www.flickr.com/photos/leewinder/5985145420/" target="_blank"><img class="alignright" src="http://farm7.static.flickr.com/6017/5985145420_5cf8f10b9d_m.jpg" alt="Spooky" width="240" height="160" /></a>I recently came across an interesting post over on <a href="http://blog.agilegamedevelopment.com/" target="_blank">Agile Game Development</a> titled ‘<a href="http://blog.agilegamedevelopment.com/2011/10/scrum-doesn.html" target="_blank">Scrum Prohibits all Specializations</a>’. The part that stuck me was the following:</p>
<p style="padding-left: 30px"><em>I understand that Scrum has been applied mainly to software products and that the elimination of &#8220;specialties&#8221; means that the database programmer, UI programmer and QA engineer should all be able to perform each other&#8217;s roles equally. This is valid.</em></p>
<p>&nbsp;</p>
<p>Now I&#8217;m concerning myself with only the technical side of an agile team but I’ve seen this raised in a number of different agile circles. In those cases there seems to be the impression that swapping a database, physics or audio developer with any other specialisation like UI, animation or graphics and an agile team should be able to roll up their sleeves and perform the different roles to the same level with the same level of outcome.</p>
<p>To me, this is emphasised in how the product backlog is often used, which is a priority and risk ordered document that doesn&#8217;t take into account the skill set of the team that’ll be working on the final product.</p>
<p>Processes such as pair programming, constant re-factoring and code reviews (to name but a few) seem to be seen as ways to not only communicate intent and project information but also skillset and ability across an entire discipline.</p>
<p>&nbsp;</p>
<p><strong>So What Do Specialists Bring?</strong></p>
<p>But we have specialist developers for a reason. They are great at what they do, they understand the area in which they work and they know how to get the best results in the shortest amount of time. They have a passion for the area they are focusing in which usually means they&#8217;ll go a step further to research their area and keep up with developments which other developers may not have the time or the understanding to do.</p>
<p>By spreading your talent thin and assuming that people can fill each others shoes leads to the following issues</p>
<ul>
<li>You are not respecting the knowledge, skill, experience and passion that a specialist can bring to their work and as a result not respecting the developer themselves</li>
<li>You’re reducing the impact these people can have on a team and it’s often the experienced specialists that inspire younger members of the team into an area they are interested in</li>
<li>The ability of those specialists to learn more about their area and pass that onto others is drastically reduced.</li>
<li>The ability for the team to push their development boundaries will be indirectly reduced as everyone on the team aims for the ‘generalist’ role to fit in</li>
</ul>
<p>&nbsp;</p>
<p><strong>What About Pair Programming?</strong></p>
<p>Now I’m a massive fan of the various agile techniques out there. Pair programming is an excellent mentoring, development and training tool but it won&#8217;t allow one developer to fit into the shoes of another. True, they will have a better understanding of the tools, pipeline and systems being developed which will allow them to fill in, but it won&#8217;t transfer the amount of background experience the specialist has.</p>
<p>The same goes for code reviews, constant refactoring and feature discussions. It spreads the knowledge which reduces the risk to the project should the specialist not be around when needed, but the core experience and drive that made the specialist who they are simply cannot be replaced by dropping in a new developer.</p>
<p>&nbsp;</p>
<p><strong>But Everyone Does A Bit Of Something Every Once In A While?</strong></p>
<p>Of course, sometimes people do need to jump into another developers shoes (illness, staff turn-over, hit by a bus etc.) but this is not the same as expecting a people to be able to fulfil each others roles equally. We can take steps to decrease the impact this will have on the team using the processes mentioned above but it will not allow those specialists to be inter-changed as the project continues development.</p>
<p>We need specialists in any development field because it&#8217;s these people that can push their respective fields in directions we might not even be able to imagine. By treating them as interchangeable we might be gaining flexibility to schedule our staff, but we&#8217;re losing something far more important and vital to a development team and the products they are creating.</p>
<p>As I said to some one (in 140 character or less of course) when pointed out that people have done this, and even the author of the original post has done it (see the comments)</p>
<p style="padding-left: 30px"><em>I&#8217;m sure he has done it, I&#8217;ve done similar, but it doesn&#8217;t mean we did both with the skill of an expert of either.</em></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/10/28/agile-specialisations-still-matter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How We Review Code</title>
		<link>http://www.altdevblogaday.com/2011/10/13/how-we-review-code/</link>
		<comments>http://www.altdevblogaday.com/2011/10/13/how-we-review-code/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 19:44:50 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=18741</guid>
		<description><![CDATA[<p><a title="Magic! between the trees by fatboyke (Luc), on Flickr" href="http://www.flickr.com/photos/fatboyke/2984569992/" target="_blank"><img class="alignright" src="http://farm4.static.flickr.com/3022/2984569992_ece4b286d4_m.jpg" alt="Magic! between the trees" width="240" height="161" /></a>In the last couple of posts I&#8217;ve covered <a title="The Benefits of Code Reviews" href="http://altdevblogaday.com/2011/09/13/the-benefits-of-code-review/" target="_blank">The Benefits of Code Reviews</a> and <a title="Why Code Reviews Can Fail" href="http://altdevblogaday.com/2011/09/28/why-code-reviews-can-fail/" target="_blank">Why Code Reviews Can Fail</a>. But code reviews can be carried out in a range of ways and how code reviews are done can produce a variety of results.</p>
<p><a href="http://www.altdevblogaday.com/2011/10/13/how-we-review-code/" class="more-link">Read more on How We Review Code&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="Magic! between the trees by fatboyke (Luc), on Flickr" href="http://www.flickr.com/photos/fatboyke/2984569992/" target="_blank"><img class="alignright" src="http://farm4.static.flickr.com/3022/2984569992_ece4b286d4_m.jpg" alt="Magic! between the trees" width="240" height="161" /></a>In the last couple of posts I&#8217;ve covered <a title="The Benefits of Code Reviews" href="http://altdevblogaday.com/2011/09/13/the-benefits-of-code-review/" target="_blank">The Benefits of Code Reviews</a> and <a title="Why Code Reviews Can Fail" href="http://altdevblogaday.com/2011/09/28/why-code-reviews-can-fail/" target="_blank">Why Code Reviews Can Fail</a>. But code reviews can be carried out in a range of ways and how code reviews are done can produce a variety of results.</p>
<p>So I wanted to follow those by covering the different review methods we&#8217;ve used in the past and the ways in which each one worked or in a number of cases didn&#8217;t.</p>
<p>Just to note that in the previous posts people have commented on ways they&#8217;ve carried out reviews. I&#8217;m not covering those here as I want to cover methods I have explicit experience of, so please comment on any methods you&#8217;ve used at the end of the post.</p>
<p>&nbsp;</p>
<p><strong>Paper Based Reviews</strong><br />
One of the simplest methods we used was to take the code you want to review, print it out in whatever format you want (we found an A5 booklet worked best) and pass them around. Usually people would be given a couple of days to review the code before everyone involved would sit around a table and discuss what they had found.</p>
<p>The advantage to this is that it gets people talking and it focuses the discussion within a specific time frame. You&#8217;re sat around a table together and it&#8217;s a great way to get people participating and interacting with each other.</p>
<p>It also makes it easier to review larger code blocks, especially interacting elements. Often people would pull up the code in an IDE based on what they&#8217;d seen in the printed out code, and allowed them to make personal notes before the review.</p>
<p>One of the negative elements we found was this it seemed to force people into thinking they <em>must</em> contribute rather than simply being happy with what is in front of them. Often this resulted in comments which I suspect would not have really been an issue if it was carried out in another way.</p>
<p>People also had a tendency to review the code 30 minutes before the review meeting, which sort of rendered the longer lead in time pointless.</p>
<p>It&#8217;s also a drain on resources and time. It’s surprising how long it takes to get code from an IDE into a suitable (and readable) format, especially if all you have is a word processor. And wasting all that paper is something I&#8217;d like to avoid.</p>
<p>Smaller, per-change reviews were never reviewed in this way. Getting people in a room to review smaller changes is simply not time efficient.</p>
<p>&nbsp;</p>
<p><strong>Forums</strong><br />
One of our most short lived methods was posting code onto an internal forum when the review didn&#8217;t justify a full sit-down session. This worked very well in making the code easily visible &#8211; even to people outside the review group though that might not be suitable in every case. It also reduced the time it takes to set up and cuts down on waste.</p>
<p>But discussing specific parts of the code simply didn&#8217;t work. Referencing line 316 of PlayerCamera.cpp in a post makes it very hard for people to link to the work, and while forums are good for limited threaded discussions, trying to quote and re-quote just becomes hard to track, read and find out what needs to actually change.</p>
<p>Like I mentioned at the start, this was a short lived idea for pretty good reasons.</p>
<p>&nbsp;</p>
<p><strong>Automated Code Reviews</strong><br />
By automated I mean using a tool that has been created specifically for code reviews, one which can display code correctly, generate or show diffs and allow people to reference files and lines of code easily.</p>
<p>Of course, when using automated tools you have more scope as to when to do you reviews (do you review individual diffs, whole files or something in-between?) and I&#8217;ll spend the rest of this article going over the different methods we&#8217;ve used so far.</p>
<p><strong>Blocking Code Reviews</strong>: Blocking code reviews are used when you want every piece of code reviewed before it is even committed to the repository. When a developer has made any changes to the code base they fire off a review and the developer cannot check in their work until everyone in the review group has flagged it as shippable. Any changes or requests need to be done before the code review can be submitted and checked into the repository.</p>
<p>This didn&#8217;t work. Developers need to get into a work-flow and having to constantly stop and wait for permission to continue or to review someone else’s code stops them in their tracks and is a serious drain on their productivity.</p>
<p>But it could be improved. The blocking edict only focused on work committed to the trunk. Working on an individual branch, where check-ins are free and quick, and then putting those up for review when merging to the trunk would mean developers could continue to work &#8216;in flow&#8217; before having the merge process include a review step.</p>
<p>Also using a source control system which allows shelving or pushing of changes to a local storage before committing to the trunk would avoid the stop/start nature of this method.</p>
<p><strong>Non-Blocking Code Reviews</strong>: The next obvious step. Every check-in needs to be reviewed so the review is generated, sent off to a selected group, but the developer is then free to commit the code with any changes or improvements being done in another commit.</p>
<p>This is beneficial on two counts. The original developer is able to continue working, either on the same area of code or another without it conflicting on any waiting commits, and the reviewer is able to continue their work, leaving any reviews the need to complete for when it&#8217;s suitable, maybe performing a group of them in one go.</p>
<p>While this worked well in regards to making sure that everything is reviewed, we found that you needed to monitor the size of the review groups and check that people are not being over-loaded. Filtering your reviews only to come to them at the end of the day with 10+ of them waiting for you can be quite challenging.</p>
<p><strong>Feature Based Reviews</strong>: This is generally where we sit now when it comes to diff based code reviews and it puts the responsibility back into the hands of the developer.</p>
<p>If the developer is working on a new feature then they are free to check in their changes with a view to putting the whole feature up for review when it is finished. This greatly reduces the number of reviews and for new code allows the developer to put the whole code into context. It&#8217;s very similar to paper based reviews but in a more suitable environment.</p>
<p>But there is one caveat.</p>
<p>It only works if there has been a decent design stage to the feature being written. Having people bring up basic design flaws when the thing it practically finished can be a killer blow but this is showing up the work flow process more than anything else.</p>
<p>This can obviously be extended to large scale changes that someone might be working on. The can check in their small changes, which a review done on the final product, maybe generating the diff based on a collection of commits rather than just one.</p>
<p>Bug fixes are another matter. Once the main implementation is done and people are into a bug fixing stage then these should be reviewed as and when they are being committed (usually in the same manner as the non-blocking reviews). This is especially important when it&#8217;s coming up to a milestone and is the way continually developed projects will eventually spend most of their time.</p>
<p>&nbsp;</p>
<p><strong>Other Methods</strong><br />
Obviously there are other methods we could try.  Review buddies, review masters (one person assigned responsibility for checking all commits &#8211; sometimes this will usually be the lead or programming manager), e-mail based discussions, &#8216;important changes only&#8217; reviews, and plenty of other variations on the same theme.</p>
<p>We haven&#8217;t tried these because the automated reviews have been working very well for us so far.</p>
<p>Review buddies would be the one I&#8217;d like to try (alongside, rather than replacing, the automated review process) but I would usually have this done between two developers working on similar parts of the code &#8211; though I would hope these developers would be talking to each other already!</p>
<p>&nbsp;</p>
<p><strong>Review Groups</strong><br />
One thing I&#8217;ve not covered is who does these reviews which can be just as important as what is being reviewed.</p>
<p>Initially we used review groups, which contained 2/3 developers and were mixed quite randomly. Every review would be assigned to a random group and fired off. While this worked well by spreading the work and the knowledge of the code base, it wasn&#8217;t producing the best results. Having one person involved in 2 out of 3 reviews for a particular feature, only for someone else to replace them on the last one would produce duplicated, or sometimes conflicting, results. And the new person isn&#8217;t as up-to-date with the feature as the original set of reviewers, which can limit the scope of the review and lead to it taking longer.</p>
<p>While this does spread the knowledge throughout the team, it isn&#8217;t necessary for everyone to know everything about the code base.</p>
<p>So now reviews are generally more focused, being sent directly to specific people who will have the best input on a particular feature. This does need monitoring to make sure people are not being over-loaded (or over-looked) but that&#8217;s a pretty simple management issues. People can also be asked whether they want to be involved in a certain review. Do they have a particular interest in that area, or does it use a new piece of technology that they would like experience with?</p>
<p>&nbsp;</p>
<p>So that&#8217;s a brief over-view of the code review systems we&#8217;ve used over the past few years. We&#8217;ve settled on our automated code reviews as they produce the best results in the shortest time and give you much more scope in regards to how and what is reviewed. Choosing the correct piece of software to run this system is an important decision and I&#8217;ll cover why we use particular tools to do our reviews in the future.</p>
<p>&nbsp;</p>
<p style="padding-left: 30px"><em>Title image by <a href="http://www.flickr.com/photos/fatboyke/" target="_blank">fatboyke</a>.  Used under <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en_GB">license</a>.</em></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/10/13/how-we-review-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Code Reviews Can Fail</title>
		<link>http://www.altdevblogaday.com/2011/09/28/why-code-reviews-can-fail/</link>
		<comments>http://www.altdevblogaday.com/2011/09/28/why-code-reviews-can-fail/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 15:52:44 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=16580</guid>
		<description><![CDATA[<p><a title="hay guys what's going on in this code rev-.. by mroth, on Flickr" href="http://www.flickr.com/photos/mroth/4027903042/"><img class="alignright" src="http://farm4.static.flickr.com/3505/4027903042_a4c73957f1_m.jpg" alt="hay guys what's going on in this code rev-.." width="240" height="180" /></a>In my last post I covered what I see to the <a title="The Benefits of Code Review" href="http://altdevblogaday.com/2011/09/13/the-benefits-of-code-review/" target="_blank">The Benefits of Code Reviews</a>. But with every process there are problems that if not tackled can cause teams to lose these benefits and remove it from their development process.</p>
<p><a href="http://www.altdevblogaday.com/2011/09/28/why-code-reviews-can-fail/" class="more-link">Read more on Why Code Reviews Can Fail&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="hay guys what's going on in this code rev-.. by mroth, on Flickr" href="http://www.flickr.com/photos/mroth/4027903042/"><img class="alignright" src="http://farm4.static.flickr.com/3505/4027903042_a4c73957f1_m.jpg" alt="hay guys what's going on in this code rev-.." width="240" height="180" /></a>In my last post I covered what I see to the <a title="The Benefits of Code Review" href="http://altdevblogaday.com/2011/09/13/the-benefits-of-code-review/" target="_blank">The Benefits of Code Reviews</a>. But with every process there are problems that if not tackled can cause teams to lose these benefits and remove it from their development process.</p>
<p>So what do I see as the biggest problems facing introducing and maintaining a code review process?</p>
<p>&nbsp;</p>
<p><strong>Aggressive reviewers &amp; victim syndrome </strong><br />
Code reviews are there to improve the code base for the benefit of the team. They are not there to &#8216;go on the attack&#8217;, to rip some-one&#8217;s code apart or to make someone feel like they are not good enough.</p>
<p>If people start to fear putting up their code for review then the number of reviews will suddenly start to drop or even worse only the most trivial of code will be submitted.</p>
<p>The opposite of this is the review owner who is too sensitive to any kind of code critique. Any non-positive comment is seen as an attack on them rather than the code and criticism is met with defensive comments rather than seeing it as an opportunity to learn.</p>
<p>Having an over-aggressive reviewer is not that difficult to tackle. Taking them to one side, reviewing their comments and how they approach the reviews will often resolve the issue quite quickly. Most of the time the reviewer won’t even be aware of how their comments are coming across and are not intending to be aggressive at all.</p>
<p>The later is much harder to solve.</p>
<p>Quite often the developer is highly protective of the code and may be more defensive when reviewed by certain developers. It might be possible to start off by restricting who reviews their code or what is reviewed, starting smaller and slowly introducing more of their code to more people over time.</p>
<p>&nbsp;</p>
<p><strong>A Lack of Positivity</strong><br />
Remember that there is nothing wrong with the only comment on a review being “That looks great!”.</p>
<p>&nbsp;</p>
<p><strong>Lack of Outcomes</strong><br />
People will argue, and people will disagree, especially when it comes to code. &#8220;You should do it like this&#8221;, &#8220;I don&#8217;t want to change that because&#8230;&#8221;. Discussions are great and should always be encouraged, but at some point there needs to be a decision.</p>
<p>You have to know who has the final say &#8211; whether this is a manager who is on every review, or a senior responsible for the quality of the code. A simple comment along the lines of &#8220;That&#8217;s a great suggestion for the future” can put an end to most arguments with most people being happy with the outcome.</p>
<p>Sometimes a short face to face discussion will bring these discussions to a suitable close for everyone involved if the discussion starts to turn into a tit-for-tat point discussion.</p>
<p>&nbsp;</p>
<p><strong>Lack of Follow Through</strong><br />
The worry here is that nothing changes as a result of the code review. Obviously not every suggestion or comment needs to be acted on but if developers are seeing review after review being posted and time and again every comment being ignored or not even acknowledged, it can have a devastating effect on buy-in.</p>
<p>This kind of behaviour is both demoralising and infectious.</p>
<p>If developers see their comments being ignored time and time again they will start to do two things. Comment less and react less.</p>
<p>If their comments are being ignored then why should they continue to post more comments? And if people can ignore their comments why should they respond to comments on their reviews?</p>
<p>Sometimes it takes time to respond to a review comment. To avoid situations of reviews just ‘sitting there’ I like to make sure there is a closure plan for all reviews. That way people know that if a review is still open but not responded too, they are still processing the information.</p>
<p>But if reviews are constantly being closed and the suggestions ignored, then this needs to be resolved quickly. Maybe a manager or senior developer re-opening the review to ‘bump’ the comments to make sure they are referenced might solve the problem quickly enough.</p>
<p>&nbsp;</p>
<p><strong>Unfocused Reviews</strong><br />
Sometimes people don’t know what to review so every review dawdles around the code and nothing of note ever comes to the surface. In a lot of these cases review after review will seem to focus on coding standards and nothing else.</p>
<p>In situations like these I like to ask people to suggest where people focus their time on the review. This won’t be on every review and it’ll only be certain developers who do this (usually those who know where their weaknesses are).</p>
<p>By suggesting areas for people to focus on it will start to open up both those reviews and ones that don’t have specific suggestions as people start to get more ideas as to what to look for and what might be important.</p>
<p>&nbsp;</p>
<p><strong>Unrealistic Expectations</strong><br />
There are no silver bullets for a development team. No process will take you to a communication nirvana, there is no way of working that will stop code rot and nothing you can do to stop some bugs getting through to a possible submission build.</p>
<p>If you start to expect that a code review process will cause every bug to be spotted before the code is submitted or that suddenly every ones skill level will rise to that of the best developer on the team then you’re setting yourself up for disappointment.</p>
<p>But by accepting that the review process won’t solve all your problems but that it will have a generally positive and cumulative effect on the quality of the work being produced those expectations will start to lower but your team will be better off for it.</p>
<p>&nbsp;</p>
<p><strong>Any More?</strong><br />
There are not the only reasons why a code review process can falter but from my experience they are some of the main ones. What things have happened to your review processes in the past and, most important of all, what could have avoided it?</p>
<p>In the next post I&#8217;m going to describe some of the different ways we&#8217;ve reviewed code and the various benefits and pitfalls they had.</p>
<p><em>Apologies if I take some time to respond to comments to this post.  I&#8217;ve scheduled this to be posted while I&#8217;m out of the country and I won&#8217;t have the time or opportunity to respond until I get back.  But don&#8217;t let that stop you posting! :)</em></p>
<p>&nbsp;</p>
<p style="padding-left: 30px"><em>Title image by <a href="http://www.flickr.com/photos/mroth/" target="_blank">mroth</a>.  Used with permission.</em></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/09/28/why-code-reviews-can-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Benefits of Code Review</title>
		<link>http://www.altdevblogaday.com/2011/09/13/the-benefits-of-code-review/</link>
		<comments>http://www.altdevblogaday.com/2011/09/13/the-benefits-of-code-review/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 16:00:05 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=16284</guid>
		<description><![CDATA[<p><a title="Code Review Workshop by Sebastian Bergmann, on Flickr" href="http://www.flickr.com/photos/sebastian_bergmann/3991540987/"><img class="alignright" src="http://farm3.static.flickr.com/2469/3991540987_083dbc2708_m.jpg" alt="Code Review Workshop" width="240" height="160" /></a>I am a big fan of code reviews but they have a bad reputation. Worries about wasting time or getting bogged down in pointless and irrelevant discussions can cause the process to be dropped before it’s even started.</p>
<p><a href="http://www.altdevblogaday.com/2011/09/13/the-benefits-of-code-review/" class="more-link">Read more on The Benefits of Code Review&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="Code Review Workshop by Sebastian Bergmann, on Flickr" href="http://www.flickr.com/photos/sebastian_bergmann/3991540987/"><img class="alignright" src="http://farm3.static.flickr.com/2469/3991540987_083dbc2708_m.jpg" alt="Code Review Workshop" width="240" height="160" /></a>I am a big fan of code reviews but they have a bad reputation. Worries about wasting time or getting bogged down in pointless and irrelevant discussions can cause the process to be dropped before it’s even started.</p>
<p>So why am I such a fan?</p>
<p>&nbsp;</p>
<p><strong>Sharing Experience and Knowledge</strong></p>
<p>It might surprise you but this is one of the main reason I love code reviews. People learn best when they are surrounded by people they can learn from and allowing those people to cast an eye over the code you are writing and talking about how something can be improved are invaluable.</p>
<p>Having people suggest different ways to structure, optimise and write code might seem a little late when it&#8217;s already written, but it&#8217;s something people can take with them into their next task as the grow as developers.</p>
<p>And it works both ways too. Less experienced programmers might have their work discussed and improved but it also allows them to question and push code from more experienced programmers who might be a bit more stuck in their ways than they should be.</p>
<p>&nbsp;</p>
<p><strong>Improving Code Quality</strong></p>
<p>This sort of follows on from the above point but as people are learning from each other they are becoming better programmers. They are learning to avoid common mistakes and as a result writing more stable and easier to read code.</p>
<p>Programmers will also start to spend a little bit more time checking over the code they write. No one wants to put up a review only for someone to find a rookie mistake in the first 5 seconds, so small errors that in the past would have been checked in only to cause havoc later get found before the code is even commited.</p>
<p>&nbsp;</p>
<p><strong>Finding Bugs</strong></p>
<p>It might just be me, but nearly every time I&#8217;ve asked someone to put up something for the first time, at least one bug is always found. It might be a misplaced define, a + instead of an &#8211; or any number of things but there&#8217;s always one. And the time it took to post and complete that review will be much less than the time it takes for that bug to be found, a bug report written, the author to read the bug, find the code in question, do some tests and then finally fix it.</p>
<p>But I generally find that the number of bugs found during code reviews starts to drop off over time. This isn’t because people are getting lazy and not casting such a critical eye over the code but because the quality of the code is getting higher and higher.  </p>
<p>As a result all those bugs that might have otherwise found their way into the code base aren&#8217;t even being added, let alone fixed early.</p>
<p>&nbsp;</p>
<p><strong>Sharing Domain Knowledge</strong></p>
<p>The more people know about a particular system the better. Illness, team moves and resignations will always be part of the working environment and it means that the key team member you are relying on could end up not being available when they are needed the most. And if you need someone else to dive in there and fix a couple of issues that have been found by QA, how long do you think that will take?</p>
<p>If a system has been constantly reviewed as it was developed there will be a larger number of people who will feel comfortable getting stuck into that part of the code base.</p>
<p>&nbsp;</p>
<p><strong>Coding Standards</strong></p>
<p>This is probably one of the main reasons people hate code reviews as they don’t want every conversation to turn into a discussion about where the bracket should go or what pre-fix that variable should have on it.</p>
<p>How much of a problem this is depends on how strict your coding standards are and how by the book your code needs to be.</p>
<p>So it certainly has it’s place in a code review.</p>
<p>Developers new to the team can be given documentation about coding standards, but it is one of those things that tend to easily slip, and there is no reason why this shouldn&#8217;t be picked up in a review. Of course you need to be careful that your reviews don’t start to get swallowed up in standards talk and the important elements like code quality start to suffer.</p>
<p>&nbsp;</p>
<p><strong>And There Will Be More</strong></p>
<p>These are not the only benefits of code reviews but to me they are the stand outs that make code reviews a vital part of the development process. Let me know if you have any more!</p>
<p>&nbsp;</p>
<p>In the next post I’ll look at some of the main reasons why code reviews can fail and why some teams will not get the benefits that they should be doing.</p>
<p style="padding-left: 30px"><em>Title image by <a href="http://www.flickr.com/photos/sebastian_bergmann/" target="_blank">Sebastian Bergmann</a>.  Used under <a href="http://creativecommons.org/licenses/by-sa/2.0/deed.en_GB">license</a>.</em></p>
<p style="padding-left: 30px">
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/09/13/the-benefits-of-code-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Evils of Unity Builds</title>
		<link>http://www.altdevblogaday.com/2011/08/14/the-evils-of-unity-builds/</link>
		<comments>http://www.altdevblogaday.com/2011/08/14/the-evils-of-unity-builds/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 11:05:25 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=14142</guid>
		<description><![CDATA[<p><a title="65/365 by DiggPirate, on Flickr" href="http://www.flickr.com/photos/guardianv/2313972848/" target="_blank"><img class="alignright" src="http://farm3.static.flickr.com/2017/2313972848_cfd6e8d85d_m.jpg" alt="65/365" width="240" height="160" /></a>Unity builds. I don&#8217;t like them.</p>
<p>Of all the tools at your disposal to make a build faster, this is the worst. And it&#8217;s not just the &#8220;hey let&#8217;s #include .cpp files&#8221; weirdness, but the way that it can make a well structure, modular code base become worse than spaghetti junction at rush hour.</p>
<p><a href="http://www.altdevblogaday.com/2011/08/14/the-evils-of-unity-builds/" class="more-link">Read more on The Evils of Unity Builds&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="65/365 by DiggPirate, on Flickr" href="http://www.flickr.com/photos/guardianv/2313972848/" target="_blank"><img class="alignright" src="http://farm3.static.flickr.com/2017/2313972848_cfd6e8d85d_m.jpg" alt="65/365" width="240" height="160" /></a>Unity builds. I don&#8217;t like them.</p>
<p>Of all the tools at your disposal to make a build faster, this is the worst. And it&#8217;s not just the &#8220;hey let&#8217;s #include .cpp files&#8221; weirdness, but the way that it can make a well structure, modular code base become worse than spaghetti junction at rush hour.</p>
<p>And the worse thing is that it&#8217;s not the fault of the programmer, especially when something as exceptional as <a href="http://www.wholetomato.com/" target="_blank">Visual Assist</a> can start helping you create non-modular code because of the way Unity Builds collect the code you write.</p>
<p>&nbsp;</p>
<p><strong>What Is a Unity Build?</strong><br />
Unity Builds have nothing to do with the excellent <a href="http://unity3d.com/" target="_blank">Unity Tool Set</a>. I&#8217;ll just clear that up right off the bat.</p>
<p>These Unity Builds are a way of reducing build over-head (specifically opening and closing files and reducing link times by reducing the number of object files generated) and as such are used to drastically speed up build times. I say drastically because they are usually used after a code base has starting generating build times that drastically cut down on a programmer&#8217;s productivity. This might be 10 minutes, 30 minutes or even hours.</p>
<p>Because Unity Builds give you a quick gain, it&#8217;s seen as a pretty magical solution, and when a full build is reduced from 30 to 10 minutes you can see why. But the caveat in that statement? <em>Full builds</em>.</p>
<p>I won&#8217;t go through how to generate Unity Builds here as the blog post <a href="http://buffered.io/2007/12/10/the-magic-of-unity-builds/" target="_blank">The Magic of Unity Builds</a> does a great job so have a look there. It&#8217;s interesting that I&#8217;m linking to a blog post that is in the total opposite direction that I&#8217;m coming from, but unless you know both sides of a tale, you don&#8217;t know the tale.</p>
<p>So without any more delay, why don&#8217;t I like them?</p>
<p>&nbsp;</p>
<p><strong>Say Goodbye to Local Properties</strong><br />
Well written code is modular, and modular code relies on a few assumptions. One of those being that a single translation unit (a cpp file and any associated include files) is isolated from other translation units, so (unless you extern the contents) anything defined within a cpp file is not available outside, and as a consequence you can have local objects being called the same things without conflict.</p>
<p>Take for example the following simple code (easily expanded to a real world example I&#8217;m sure)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// In VectorTest.cpp</span>
<span style="color: #0000ff;">namespace</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0000ff;">const</span> uint StandardTestCount <span style="color: #000080;">=</span> <span style="color: #0000dd;">10</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// In ListTest.cpp</span>
<span style="color: #0000ff;">namespace</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0000ff;">const</span> uint StandardTestCount <span style="color: #000080;">=</span> <span style="color: #0000dd;">3</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>In a normal compilation environment these variables are local to the file they are working in, and this is a good thing. Why should the vector tests file care what is defined within another test file?</p>
<p>But if you have a Unity Build with the following then you&#8217;re going to have issues&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #339900;">#include &quot;VectorTest.cpp&quot;</span>
<span style="color: #339900;">#include &quot;ListTest.cpp&quot;</span>
<span style="color: #339900;">#include &quot;ArrayTest.cpp&quot;</span>
<span style="color: #339900;">#include &quot;QueueTest.cpp&quot;</span></pre></td></tr></table></div>

<p>Specifically errors relating to the variable ::StandardTestCount already being defined. So we now have to be aware of what is defined throughout the entire project and resolve any issues, and inevitable this will end up with all variables being pre-appended with (in this example) VectorTest_ and ListTest_ etc.</p>
<p>Or worse still, because Intellisense (or whatever tool you might be using) informs you that StandardTestCount is defined, you start using that in your local .cpp file when it&#8217;s actually defined in a completely independent file somewhere else.</p>
<p>I don&#8217;t want to refer to the &#8216;Magic&#8217; post to much, as it&#8217;s a good article, but there is a statement in there referring directly to this. Specifically the following</p>
<blockquote><p>&#8220;Technically you shouldn’t have this problem if you’re writing “proper” code&#8221;</p></blockquote>
<p>This is wrong. &#8220;Proper&#8221; code is well structured and well maintained, meaning it&#8217;s modular and only refers to what it needs to refer to. In a lot of cases you will have variables with the same name, functions with the same name and other elements that you naturally write as you go along. That&#8217;s why the anonymous namespace (or the C style &#8216;static&#8217;) is so useful, and so useless if you switch to Unity Builds.</p>
<p>&nbsp;</p>
<p><strong>Using Is (even more) Lethal</strong><br />
Never use the &#8216;using&#8217;  keyword in a header file. It&#8217;s a standard statement and one that stands up easily. The reasons behind this are pretty clear (declaring &#8216;using&#8217; in a header file forces all code including the header file to use that statement &#8211; in effect wiping out a namespace).</p>
<p>But using it in a .cpp file isn&#8217;t a crime. In fact it&#8217;s remarkably useful, even within the whole files scope. As a developer, I should know what I&#8217;m using in a local file, what elements I&#8217;m bringing into the file and what would/could conflict. Some people might not agree that &#8216;using&#8217; at the top of a cpp file is a good idea at all, and I see their point, but on a whole file scope, it can be massively useful and as it&#8217;s localised it&#8217;s not going to pollute anything other than the file it&#8217;s in.</p>
<p>But in Unity Builds, using (that is not scoped within a function or type etc.) is lethal. Declaring &#8216;using &#8216; in a cpp file makes it available throughout the code base (or more confusingly only in those files that are included after the one declaring it). Suddenly, using is everywhere. And your namespaces are now useless.</p>
<p>&nbsp;</p>
<p><strong>Every Change is a Rebuild</strong><br />
This is one of my biggest problems with Unity Builds. In well structured projects (more on that below) changing the content of a cpp file (or even a local header file) shouldn&#8217;t require everything to be rebuilt. Every. Single. Time. Yes, the unity build rebuilds are faster than doing a full build without a unity file, but doing even a fast rebuild every time will build up. Quickly.</p>
<p>When-ever I change a .cpp file, all I need to build is that .cpp file. Granted, link times are a tad long because it still has to re-link the other object files, but it takes a second to compile that one file. On average (I took count today) when I changed a header file it compiled on average 5 .cpp files. And it (again on average) took about 5 seconds to build.</p>
<p>Very rarely should I be required to re-build the entire project, and most of the time I&#8217;m don&#8217;t. And that saves me a lot of time. Every single day.</p>
<p>&nbsp;</p>
<p><strong>Multiple Configurations</strong><br />
This is mainly a bugbear of mine rather than a direct issue with Unity Builds, but I see it in nearly every Unity Build project I use. The main project is the Unity Build project, but there is another project that is built and maintained that doesn&#8217;t use Unity Builds. Now there is a point here &#8211; by having an additional &#8216;normal&#8217; project you are forcing the modularity that can collapse with Unity Builds to be checked (usually a Continuous Build server will be building this as well as the Unity Build every time).</p>
<p>But we have problems with this.</p>
<p>Firstly, the non-unity build is only ever being built on the CB server. So any problems are going to break the build, and it will break if people are not using it day-to-day. Secondly you now have multiple projects to maintain. Not too much of a problem if you have an automated project generation step (see below) but it is still another project to maintain.</p>
<p>People may occasionally have to use the non-unity configurations, especially if they are getting an unknown error on the CB server. So now they are left working on a configuration that is uncared for and probably builds so slowly and erratically that they are probably losing all the time they saved from those quick unity builds they have been doing all day.</p>
<p>&nbsp;</p>
<p><strong>But What About My Build Times Then?</strong><br />
Well structured software builds quickly (or as quickly as they can). But what is a well structured project when it comes to build times?</p>
<ul>
<li><strong>Sensible file inclusion</strong> &#8211; Only include the files you need and try as best you can to limit them to .cpp files. This means the compiler only needs to bring in what&#8217;s necessary and when you change one of these header files only those things that directly rely on it will change. If you find yourself having to include files that constantly change into a large number of cpp files, then I&#8217;d wager that a refactoring of the large header file would be in order. You should be building only a small number of cpp files when you change the content of a header file.</li>
<li><strong>Forward Declarations</strong> &#8211; Where possible use forward declarations rather than including the header file in your class or function declaration. Annoyingly you cannot forward declare enums (on standard compliant compliers anyway) which sometimes throws this out of the window. But by not including the files until use, you&#8217;re cutting down on the amount of code being included and the number of files being opened.</li>
<li><strong>Pre-compiled Headers</strong> &#8211; Use Pre-compiled Headers (PCH). Using PCH&#8217;s is the one (built into the IDE) feature that will cause your build times to plummet, especially if you are being sensible with them (such as including files that don&#8217;t change &#8211; SDK&#8217;s and common, fixed headers for example). Using pre-compiled headers across multiple platforms can be a pain, but it is possible to unify them and get a massive boost. I&#8217;ll cover these a little bit more below.</li>
<li><strong>Library Files</strong> &#8211; Modular code usually leads towards easily extracting common code into a collection of libs. Reducing the amount of code in a project (and as a result how much you need to build) can speed up your productivity quickly.</li>
<li><strong>Parallel Building</strong> &#8211; If you&#8217;re IDE supports it (and it might do and you just don&#8217;t know) and you have a multi-core machine, turn on parallel building of files. Building individual files at the same time is obviously going to cut down on your compile times no matter how quick they are at the moment.</li>
<li><strong>Get a Better PC</strong> &#8211; It goes without saying (but I will anyway) doing this will speed everything up.</li>
</ul>
<p><strong>Pre-Compiled Headers</strong><br />
Pre-compiled headers are one of the best ways to get a massive boost to your compile times. So how fast are my build times compared to that of a Unity Build version when using PCH&#8217;s and taking into account the other build improvements suggestions?</p>
<p>As stated above the &#8216;average&#8217; build time of a minimal build throughout the day was around 5 seconds. On a Unity Build it was a full build every time and was around 2 minutes on the slowest platform.</p>
<p>Changes to &#8216;core&#8217; files, which are included by a higher than average number of files, resulted in builds of around 30 seconds on around 20 files. Again on a Unity Build this would have been around 2 minutes regardless.</p>
<p>Full rebuild (which I did twice today) was around 3 minutes. Granted a whole minute slower than a Unity Build but I did it twice rather than every single time.</p>
<p>Pre-compiled headers are not a silver bullet solution. Nothing is. And because of this here are issues that you do need to be aware of</p>
<ul>
<li><strong>Compiler Support</strong> &#8211; Some compilers out there simply do not support PCH&#8217;s. On a daily basis I use between 4 or 5 different compilers and while I&#8217;ve never encountered one that doesn&#8217;t, they are out there. This can shoot my argument in the foot, but it is a rare problem and one most people won&#8217;t encounter.</li>
<li><strong>PCH Quirks</strong> &#8211; While I use a number of compilers that do support PCH&#8217;s, every single one of them has a slightly different way of building them and slightly different requirements before they can be used. This doesn&#8217;t affect the code that is written but does affect the content of your project, especially if you want to make them seem as consistent as possible.</li>
<li><strong>Over-Inclusion</strong> &#8211; Because your PCH usually includes common files and files that rarely change, it does mean that some files are being brought into the project in a compilation unit that wouldn&#8217;t otherwise be required</li>
</ul>
<p>Unity builds are a solution for the wrong problem. Long compile times are not caused by not using Unity Builds, they are the result of having badly structured and badly referenced code. Fix that (and have better code to boot) and you&#8217;ll be able to use &#8216;proper&#8217; build tools without resorting to a quick fix.</p>
<p>&nbsp;</p>
<p><strong>Making Unity Builds Better</strong><br />
I don&#8217;t want to just leave it at that, because no matter how much I argue, Unity Builds will always exist and people will always use them (after all it&#8217;s quicker to rescue a broken down build by making it a Unity Build than doing it the hard way). So what can people do to actually make Unity Builds a bit more desirable and less of a problematic fix?</p>
<ul>
<li><strong>Automate Adding Files</strong> &#8211; A lot of teams have auto project generation code already (XML files, template projects etc.) so it&#8217;s important that you automate adding files to the project, otherwise people will forget to remove the file from the build step and they will forget to add it to the unity build file.</li>
<li><strong>Multiple Unity Files</strong> &#8211; Running a Unity Build doesn&#8217;t require you to have one unity file with every cpp file inside it. You can have multiple build files (usually per module or per component) which means at least some of the translation unit leaking is limited to each module rather than the whole program.</li>
<li><strong>Additional Project</strong> &#8211; No, this isn&#8217;t a contradiction from the above &#8220;Multiple Configurations&#8221; comment above. In this situation you will have a project that contains the cpp and header files so you can reference them but this project isn&#8217;t built. Instead, you have the &#8216;proper&#8217; project simply contain the unity file(s). This isn&#8217;t something I&#8217;ve personally tried, but it does get around the issues of adding files if you don&#8217;t have an automated step.</li>
<li><strong>Use PCH Headers</strong> &#8211; Again?  Well that&#8217;s because they are so powerful.  I&#8217;ve worked on a couple of projects where the unity files have been split up into sub-unity files as suggested above.  But they just starts to bring in slower build because of the multiple includes that are happening in every single Unity file group.  Adding PCH&#8217;s to the mix will speed that up even more.</li>
</ul>
<p style="padding-left: 30px"><em>I originally wrote this article on <a href="http://leewinder.co.uk/blog/" target="_blank">my blog</a> way back in 2009. Since then, my opinions really haven&#8217;t changed and I&#8217;ve seen some rather poor uses of Unity Builds that I&#8217;ll unfortunately never forget.</em></p>
<p style="padding-left: 30px"><em>Title image by <a href="http://www.flickr.com/photos/guardianv/" target="_blank">DiggPirate</a>.  Used with permission.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/08/14/the-evils-of-unity-builds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Different Allocator Model</title>
		<link>http://www.altdevblogaday.com/2011/07/30/a-different-allocator-model/</link>
		<comments>http://www.altdevblogaday.com/2011/07/30/a-different-allocator-model/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 11:30:44 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=12838</guid>
		<description><![CDATA[<p><a title="Different... by &#34;Squeezy&#34;, on Flickr" href="http://www.flickr.com/photos/29008702@N06/5137285917/"><img class="alignright" style="margin: 5px" src="http://farm2.static.flickr.com/1145/5137285917_e784fe0747_m.jpg" alt="Different..." width="240" height="180" /></a> Quite a few years back I started developing a custom STL implementation which has eventually be adopted and used throughout our company. One of the most important things to get right when developing any kind of generic container library is the way memory is allocated. It needs to be lightweight, highly flexible and above all easy to understand so people are willing to experiment it.</p>
<p><a href="http://www.altdevblogaday.com/2011/07/30/a-different-allocator-model/" class="more-link">Read more on A Different Allocator Model&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="Different... by &quot;Squeezy&quot;, on Flickr" href="http://www.flickr.com/photos/29008702@N06/5137285917/"><img class="alignright" style="margin: 5px" src="http://farm2.static.flickr.com/1145/5137285917_e784fe0747_m.jpg" alt="Different..." width="240" height="180" /></a> Quite a few years back I started developing a custom STL implementation which has eventually be adopted and used throughout our company. One of the most important things to get right when developing any kind of generic container library is the way memory is allocated. It needs to be lightweight, highly flexible and above all easy to understand so people are willing to experiment it.</p>
<p>But STL Allocators have a bad reputation and it’s for a good reason. They are complex, hard to understand and have some interesting behaviour that seems designed to confuse. As a result, I needed to look at how we were going to provide a custom allocation system that was both easy to use and simple to understand without restricting what people could do with them.</p>
<p>&nbsp;</p>
<p><strong>A Bit of History</strong><br />
A while back Bitsquid published a post entitled <a href="http://bitsquid.blogspot.com/2010/09/custom-memory-allocation-in-c.html" target="_blank">Custom Memory Allocation in C++</a>. This excellent post covered how the BitSquid engine used an allocator model to perform memory allocation throughout their entire engine.</p>
<p>But the FTL requires a slightly different approach so I won’t be treading over already covered ground here.</p>
<p>FTL allocators are well hidden inside containers, the only control you have is specifying the allocator type which means it’s use, and how and when objects are allocated and created is completely fixed with only the allocator itself being able to effect the outcome. Because of this the allocator behaviour needs to be as customisable as possible without requiring any changes the container itself.</p>
<p>When the FTL was original started, it was quite small scale and only used by a couple of developers, so allocators were not a priority. The flexibility wasn’t needed so in-container malloc and free allowed us to concentrate on container creation but obviously this wasn’t going to last.</p>
<p>The follow just describes the various approaches we took, why we dismissed them and what we eventually ended up with.</p>
<p>&nbsp;</p>
<p><strong>The Initial Approach</strong><br />
Allocators should have a minimal over-head. What we didn’t want to do was increase the size of every container dramatically when we rolled out customisable allocators. As a result, we initially used an approach used by a couple of vendors and defined the allocator specification using only static members &#8211; removing the need for an internal allocator object.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// Completely made up code showing the use of a static based allocator</span>
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> T, <span style="color: #0000ff;">typename</span> Alloc<span style="color: #000080;">&gt;</span>
<span style="color: #0000ff;">class</span> vector
<span style="color: #008000;">&#123;</span>
  <span style="color: #0000ff;">void</span> push_back<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span><span style="color: #008000;">&#41;</span>
  <span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">void</span><span style="color: #000040;">*</span> new_memory <span style="color: #000080;">=</span> Alloc<span style="color: #008080;">::</span><span style="color: #007788;">allocate</span><span style="color: #008000;">&#40;</span> <span style="color: #0000dd;">sizeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    T<span style="color: #000040;">*</span> new_object <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span><span style="color: #008000;">&#40;</span>new_memory<span style="color: #008000;">&#41;</span> T<span style="color: #008080;">;</span>
  <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>I knew this would limit the flexibility of the allocators, but it had minimal over-head (especially using default template parameters) and wouldn’t effect those containers already being used. And besides, programmers are a creative bunch and I wanted to see what people did with this before resigning it to the scrap heap.</p>
<p>But while programmers were able to work around the main limitation of not having allocator state per container, they were having to jump through hoops to get the behaviour they wanted. Which made it less likely that other programmers would feel confident enough writing their own allocators and their ability to really customise their behaviour was too limited.</p>
<p>So we ended up adding allocator state on a per container basis, making it much easier for developers to do what they wanted though it did add at least 4 bytes per container. But I felt that flexibility and simplicity were much more important.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// Completely made up code showing the use of an instanced allocator</span>
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> T, <span style="color: #0000ff;">typename</span> Alloc<span style="color: #000080;">&gt;</span>
<span style="color: #0000ff;">class</span> vector
<span style="color: #008000;">&#123;</span>
  Alloc m_allocator<span style="color: #008080;">;</span>
&nbsp;
  <span style="color: #0000ff;">void</span> push_back<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span><span style="color: #008000;">&#41;</span>
  <span style="color: #008000;">&#123;</span>
    <span style="color: #0000ff;">void</span><span style="color: #000040;">*</span> new_memory <span style="color: #000080;">=</span> m_allocator.<span style="color: #007788;">allocate</span><span style="color: #008000;">&#40;</span> <span style="color: #0000dd;">sizeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    T<span style="color: #000040;">*</span> new_object <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span><span style="color: #008000;">&#40;</span>new_memory<span style="color: #008000;">&#41;</span> T<span style="color: #008080;">;</span>
  <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
<p><strong>Allocator Specification</strong><br />
The allocator specification <a href="http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079" target="_blank">is complicated</a>. While I’m sure there are good reasons for some of the decisions I wanted ours it to be much simpler. So removing the type information (since our allocators work on raw memory and nothing else), removing the rebind(!) and exception handling (which we don’t use) we ended up with the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">typedef</span> ftl<span style="color: #008080;">::</span><span style="color: #007788;">pair</span><span style="color: #000080;">&lt;</span><span style="color: #0000ff;">void</span><span style="color: #000040;">*</span>, <span style="color: #0000ff;">size_t</span><span style="color: #000080;">&gt;</span> allocated_memory<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">class</span> Alloc
<span style="color: #008000;">&#123;</span>
<span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
  allocated_memory allocate<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">const</span> <span style="color: #0000ff;">size_t</span> alloc_size<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
  <span style="color: #0000ff;">void</span> deallocate<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span><span style="color: #000040;">*</span> ptr<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>And for the basic allocator, that’s it, it doesn’t require anything else to work, but it does have one interesting aspect.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">typedef</span> ftl<span style="color: #008080;">::</span><span style="color: #007788;">pair</span><span style="color: #000080;">&lt;</span><span style="color: #0000ff;">void</span><span style="color: #000040;">*</span>, <span style="color: #0000ff;">size_t</span><span style="color: #000080;">&gt;</span>  allocated_memory<span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>As we can have all sorts of allocator types, what it allocates might not be exactly what you asked for. If it can’t allocate all the memory you requested, that’s fine, it simply returns allocated_memory(nullptr, 0) but it can also return more than was requested (for example, fixed sized block allocators will do this). This return type simply allows the allocator to return not only the allocated memory, but also how much was allocated, which allows calling objects to take advantage of this additional memory if possible.</p>
<p>Most of the time this isn’t queried and only what was asked for is given, but it offers an additional level of information which might allow better memory usage in some containers.</p>
<p>So a container will most likely end up with something like the following when adding and removing elements.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// Creating a new object in a container</span>
allocated_memory new_memory <span style="color: #000080;">=</span> m_allocator.<span style="color: #007788;">allocate</span><span style="color: #008000;">&#40;</span> <span style="color: #0000dd;">sizeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>new_memory.<span style="color: #007788;">first</span><span style="color: #008000;">&#41;</span>
  T<span style="color: #000040;">*</span> new_object <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span><span style="color: #008000;">&#40;</span>new_memory.<span style="color: #007788;">first</span><span style="color: #008000;">&#41;</span> T<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// Losing the object now we’re done with it</span>
old_object<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>~T<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
m_allocator.<span style="color: #007788;">deallocate</span><span style="color: #008000;">&#40;</span>old_object<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>This is fine and gives us a very simple entry point for allocators. But by forcing the use of placement new and the destructor call in the container itself, we are limiting what an allocator can do. While the allocators are required to return raw memory, that doesn’t mean that it has to internally. Some allocators might pre-create the objects before returning them so creation is front loaded but the forced placement new could mean we’re over-riding an object that has already been created.</p>
<p>&nbsp;</p>
<p><strong>Construction Functions</strong><br />
As a result, we want developers to be able to not only over-ride the memory allocation, but also the object creation. 99% of allocators won’t need to do this so we don’t want to add additional requirements to the allocator so instead we can create non-member, non-friend functions, specialised on the allocator, which will do the creation for us.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> TConstruct, <span style="color: #0000ff;">typename</span> TAlloc<span style="color: #000080;">&gt;</span>
TConstruct<span style="color: #000040;">*</span> construct<span style="color: #008000;">&#40;</span>TAlloc<span style="color: #000040;">&amp;</span> allocator<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> TConstruct, <span style="color: #0000ff;">typename</span> TAlloc<span style="color: #000080;">&gt;</span>
TConstruct<span style="color: #000040;">*</span> construct<span style="color: #008000;">&#40;</span>TAlloc<span style="color: #000040;">&amp;</span> allocator, <span style="color: #0000ff;">const</span> TConstruct<span style="color: #000040;">&amp;</span> obj<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> TConstruct, <span style="color: #0000ff;">typename</span> TAlloc<span style="color: #000080;">&gt;</span>
TConstruct<span style="color: #000040;">*</span> construct<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span><span style="color: #000040;">*</span> allocated_mem<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> TConstruct, <span style="color: #0000ff;">typename</span> TAlloc<span style="color: #000080;">&gt;</span>
TConstruct<span style="color: #000040;">*</span> construct<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span><span style="color: #000040;">*</span> allocated_mem, <span style="color: #0000ff;">const</span> TConstruct<span style="color: #000040;">&amp;</span> obj<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> TConstruct, <span style="color: #0000ff;">typename</span> TAlloc<span style="color: #000080;">&gt;</span>
<span style="color: #0000ff;">void</span> destroy<span style="color: #008000;">&#40;</span>TConstruct<span style="color: #000040;">*</span> ptr<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> TConstruct, <span style="color: #0000ff;">typename</span> TAlloc<span style="color: #000080;">&gt;</span>
<span style="color: #0000ff;">void</span> destroy<span style="color: #008000;">&#40;</span>TConstruct<span style="color: #000040;">*</span> ptr, TAlloc<span style="color: #000040;">&amp;</span> allocator<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>So our point of allocation/creation now becomes something much simpler and much more powerful.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// Creating a new object in a container</span>
T<span style="color: #000040;">*</span> new_object <span style="color: #000080;">=</span> alloc<span style="color: #008080;">::</span><span style="color: #007788;">construct</span><span style="color: #000080;">&lt;</span>T<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>m_alloc<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// Lose our existing object and return it back to the allocator</span>
alloc<span style="color: #008080;">::</span><span style="color: #007788;">destroy</span><span style="color: #008000;">&#40;</span>old_object, m_alloc<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>The default version of construct performs the allocation and placement new within the construct function, but should the allocator need something more (or less), simply over-loading the function on the allocator type allows complete control over both memory allocation and object creation. The same goes for the destroy function and the automatic call of the objects destructor.</p>
<p>&nbsp;</p>
<p><strong>No Base Allocator</strong><br />
One thing I didn’t add to the allocators was a base allocator interface. The allocators are created within the container, with their type defined at the point of the containers declaration. The addition of a base interface (and the associated virtual functions) would have increase the size over-head of the allocator which is something I wanted to avoid and something I thought didn’t add enough to warrant the overhead. I was less worried about the overhead of calling a virtual function as that would be insignificant compared to the overhead of everything else what was going on.</p>
<p>&nbsp;</p>
<p><strong>Conclusion</strong><br />
So by introducing an allocator model that is much simpler (only 2 required functions) with more extensible customisation should an allocator should need it, developers have complete control over all the memory allocation and importantly the object creation itself. Due to it’s initial simplicity, developers have no problem creating new allocators that improve both memory and container use in a project and can start to experiment with better and more efficient allocators quickly.</p>
<p>&nbsp;</p>
<p style="padding-left: 30px"><em>Title image by <a href="http://www.flickr.com/photos/29008702@N06/" target="_blank">Squeezy</a>.  Used with permission.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/07/30/a-different-allocator-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is It Green Yet?  Improving Our CI Process</title>
		<link>http://www.altdevblogaday.com/2011/07/15/is-it-green-yet-improving-our-ci-process/</link>
		<comments>http://www.altdevblogaday.com/2011/07/15/is-it-green-yet-improving-our-ci-process/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 12:23:47 +0000</pubDate>
		<dc:creator>Lee Winder</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=11447</guid>
		<description><![CDATA[<p><a href="http://www.flickr.com/photos/highgroove/5086613451/" target="_blank"><img class="alignleft" src="http://farm5.static.flickr.com/4104/5086613451_3e88a2486d_m.jpg" alt="" width="240" height="179" /></a>Having a Continuous Integration server running is one of the most useful and powerful tools a development team can use. Constantly checking the state of the code, building assets which might otherwise take hours and generating stats on build quality are all really useful things to have running in the background hour after hour and day after day.</p>
<p><a href="http://www.altdevblogaday.com/2011/07/15/is-it-green-yet-improving-our-ci-process/" class="more-link">Read more on Is It Green Yet?  Improving Our CI Process&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/highgroove/5086613451/" target="_blank"><img class="alignleft" src="http://farm5.static.flickr.com/4104/5086613451_3e88a2486d_m.jpg" alt="" width="240" height="179" /></a>Having a Continuous Integration server running is one of the most useful and powerful tools a development team can use. Constantly checking the state of the code, building assets which might otherwise take hours and generating stats on build quality are all really useful things to have running in the background hour after hour and day after day.</p>
<p>But if it’s not done with care, a CI process, while still providing some useful information, will stop being an important part of a development teams tool set.</p>
<p>The main problems usually stem from a single CI step taking to long. For example, it might take hours to build all the game assets or it might take 40 minutes to build a single configuration. You might have additional build steps (like copying files to a network drive) which can take quite a while if you’re dealing with gigabytes of data.</p>
<p>As soon as a CI step takes to long, you lose the main benefit &#8211; the fast turn around of information.</p>
<p>For example, when we first start a project, our simple CI process will consist of the following steps</p>
<ul>
<li>Detect modification</li>
<li>Build code</li>
<li>Build game assets</li>
<li>Copy to network drive</li>
<li>E-mail developers (who’s mailed depends on success or failure)</li>
</ul>
<p>This is fine as a new project is tiny and the whole process doesn’t even take 5 minutes. And we need to build the whole thing constantly as we’re adding so much content the artists and designers need to be on the bleeding edge of what the programmers are creating.</p>
<p>But after a month (or probably less) this stops being suitable. A whole build might start taking 20 minutes then 30, an hour and then two hours, and if we leave it as is, the programmers are not getting the benefit of continuous turnaround and the designers spend ages waiting for a new build.</p>
<p>So what can we do about it?</p>
<p>The first thing is to look at what the CI process is doing, and exactly what we want to get out of it.</p>
<ul>
<li>Continuous Build &#8211; We need the process to constantly compile the source, all configs, all platforms. This is so we can detect any compile errors quickly without having to build everything manually.</li>
<li>‘Designer’ Builds &#8211; Creating an executable the designers, artists, animators etc. can get with the latest code changes. Ideally one they can request as required and one that is built as quickly as possible.</li>
<li>Full builds &#8211; A complete build of the game including executable and all in-game assets along with anything else needed to run the game.</li>
<li>QA Builds &#8211; QA could use the full build if needed, but this is an additional step which packages the build as it would be submitted allowing a better QA pass (DVD emulation, submission content etc.).</li>
</ul>
<p>From my point of view, those are the four main things I want to get out of a CI process that having a single build step won’t give us. You might have other requirements and I’d certainly be interested in hearing what those are.</p>
<p>So what can we do to try and improve the initial process and still get what we want out of our CI machine?</p>
<p>&nbsp;</p>
<p><strong>Continuous Build</strong><br />
The first step is easy. We want a Continuous Build process with nothing to integrate, nothing to deploy and nothing to copy. This can be much quicker if we alter our repository modification checks to only monitor source code folders and not the entire repository.</p>
<p>For example if our repository contains scripts, configuration files or (shudder) game assets and executables we shouldn’t kick off a build if these changes as the CB results won’t be any different from last time.</p>
<p>We might also want to reduce the configs we’re interested in building (usually a debug and master build, the profiling builds might be skipped for speed reasons and due to them rarely being using). If we have a decent machine we might get the individual platforms (X360, PS3) to build in parallel as there will be no conflict between the temp files they generate &#8211; or even stick them on separate machines if we have the capacity.</p>
<p>The process only ever needs to notify on failure as no one is going to be using this build, it’s a sanity check pure and simple.</p>
<p>So already we have a much faster turn around time between check-in and ‘all clear’. In the past I’ve managed to reduce this from 60 minutes to 5.</p>
<p>&nbsp;</p>
<p><strong>‘Designer’ Builds</strong><br />
Initially it might be tempting to use the results of the ‘Continuous Build’ as the aim of this step is to provide the designers and artists with a new executable to take advatage of any new features (very) recently added.</p>
<p>This might be the right idea at the start, when the CB process is taking less than 5 minutes, but that doesn’t last, so we need a faster, more iterative, process to make sure our non-programmers are not hanging around waiting for the latest builds.</p>
<p>Most of the time, designers will use a ‘release’ build (‘release’ being a bit of a misnomer &#8211; it’s not releasable in any way, but it has just enough debug information to make it useful but still run at a ‘releaseable’ frame rate). So we only need to concentrate on a single configuration which means we can drastically cut down the length of time between when a modification is detected and a new usable build is generated.</p>
<p>As this is the fastest CI step we have and can often have the most people dependent on it, it’s the first one to run when a modification is detected.</p>
<p>In our case we don’t e-mail people when a new designer build is enabled. This is being built many times in an hour, and people will just end up sending the mails directly to the trash (I know I’ve done that on particularly spammy CI set ups). Simply allowing them to check the build status and update when it’s green works well enough.</p>
<p>&nbsp;</p>
<p><strong>Full builds</strong><br />
Developers generate a lot of content for games. Even small games can balloon in size depending on the scope and quality of the final product. As a result, we need a full integration build for a number of reasons</p>
<ul>
<li>It would take every member of the team far to long to rebuild all the assets themselves</li>
<li>When a build gets out of sync with the assets, developers need a quick way to get everything back on track</li>
<li>When testing the build it needs to have been built on an independent build machine</li>
</ul>
<p>&nbsp;</p>
<p>A full build could be brute force (just builds everything every time) or smart (it concurrently builds executables and assets on multiple machines). This really depends on how long a full build would take. Less than an hour and I personally stick with a brute force approach but any longer and a more intelligent build step would be needed.</p>
<p>Full builds always e-mail the entire team, since it’s rare they happen. This allows people to get latest as they become available (usually at the start of the day) without having to check the status of the build.</p>
<p>&nbsp;</p>
<p><strong>QA Builds</strong><br />
The QA build is a special build. It doesn’t rebuild any assets or executables and is automatically kicked off when the daily build has finished successfully. This step packages the build up as it would be presented as part of a final submission along with any submission assets that would be required.</p>
<p>But why not just use the full build as the QA build to save time?</p>
<p>Simply put when testing a build it’s vital that we test under the same situation that our final submission will be tested under. Making sure we run under DVD emulation and use the same assets the manufacturer will use is an important part of the process. Having our CI machine generate these builds for us makes sure we’re doing this from the very start.</p>
<p>&nbsp;</p>
<p><strong>Requesting Builds</strong><br />
In every case we give all members of the development team the ability to request any build. If the ‘Designer Build’ is to far out of sync, they might need a full build to get them back on their feet. An asset change might alter the executable but not trigger a ‘Designer Build’ so a designer might need to trigger one manually.</p>
<p><img class="alignnone" src="http://www.leewinder.co.uk/BlogImages/CCTray_CIImporvements_Projects.png" alt="" width="362" height="181" /></p>
<p>In our case using CCTray allows us to do this very easily, so a new build can be requested by anyone (including QA) at any point of the day without any input from a programmer, allowing them to concentrate on making the game rather than just enabling others.</p>
<p>Technically anyone in the company could request and get a new build (very useful for getting demo builds together without getting the team involved) but I’ve not seen that happen yet.</p>
<p>&nbsp;</p>
<p><strong>What I Haven’t Covered</strong><br />
One major thing I’ve not covered here: self testing builds. This can range from simple unit tests running after every build to a scripted run through of the game after every full integration. The scope of this will very much depend on the size of the game and the time you have available to add them. Since this is a big topic in it’s own right, I’ve left that for another time.</p>
<p>&nbsp;</p>
<p><strong>Conclusion</strong><br />
So by simply reviewing what we actually want to get out of the Continuous Integration process we’re able to streamline it down to be much faster and much more useful. Complete integrations still happen (and happen when needed) but the common information needed by the team is generated quickly and allows teams to get short turn-around from the CI machine throughout the day.</p>
<p>I’d be very interested to know what other uses people are getting from their CI processes and how they are still making sure the speed and quick turnaround is happening all the time.</p>
<p>&nbsp;</p>
<p style="padding-left: 30px"><em>Title image by <a href="http://www.flickr.com/photos/highgroove/" target="_blank">highgroove</a>.  Used with permission.</em></p>
<p style="padding-left: 30px">
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/07/15/is-it-green-yet-improving-our-ci-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.283 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-17 03:55:42 -->
<!-- Compression = gzip -->
