cooperative-software-develo.../evolution.html

92 lines
10 KiB
HTML
Raw Normal View History

2017-04-16 20:59:49 +02:00
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css" />
<title>Evolution</title>
</head>
<body>
<p><a href="index.html">Back to table of contents</a></p>
<img src="images/atsign.png" class="img-responsive" />
<small>Credit: public domain</small>
<h1>Evolution</h1>
<div class="lead">Andrew J. Ko</div>
<p>Programs change. You find bugs, you fix them. You discover a new requirement, you add a feature. A requirement changes because the world changes, you revise a feature. The simple fact about programs are that they're rarely stable, but rather a constantly changing, living documents that shift as much as the world around them shift.</p>
<p>Nowhere is this constant evolution more apparent then in our daily encounters with software updates. The apps on our phones are constantly being updated to improve our experiences, while the web sites we visit potentially change every time we visit them, without us noticing. These different models have different notions of who controls changes to user experience: should software companies control when your experience changes or should you? And with systems with significant backend dependencies, is it even possible to give users control over when things change?</p>
<p>To manage change, developers use all kinds of tools and practices.</p>
<p>One of the most common ways of managing change is to <strong>refactor</strong> code. Refactoring helps developers modify the <em>architecture</em> of a program while keeping its behavior the same, enabling them to implement or modify functionality more easily. For example, one of the most common and simple refactorings is to rename a variable (renaming its definition and all of its uses). This doesn't change the architecture of a program at all, but does improve its readability. Other refactors can be more complex. For example, consider adding a new parameter to a function: all calls to that function need to pass that new parameter, which means you need to go through each call and decide on a value to send from that call site. Studies of refactoring in practice have found that refactorings can be big and small, that they don't always preserve the behavior of a program, and that developers perceive them as involving substantial costs and risks (<a href="#kim">Kim et al. 2012</a>).</p>
2017-04-27 05:36:15 +02:00
<p>Another fundamental way that developers manage change is <strong>version control</strong> systems. As you know, they help developers track changes to code, allowing them to revert, merge, fork, and clone projects in a way that is traceable and reliable. While today the most popular version control system is Git, there are actually many types. Some are <em>centralized</em>, representing one single ground truth of a project's code, usually stored on a server. Commits to centralized repositories become immediately available to everyone else on a project. Other version control systems are <em>distributed</em>, such as Git, allowing one copy of a repository on every local machine. Commits to these local copies don't automatically go to everyone else; rather, they are pushed to some central copy, from which others can pull updates.</p>
<p>Research comparing centralized and distributed revision control systems mostly reveal tradeoffs rather than a clear winner. Distributed version control, for example, appears to lead to commits that are smaller and more scoped to single changes, since developers can manage their own history of commits to their local repository (<a href="#brindescu">Brindescu et al. 2014</a>). Google uses one big centralized version control repository for all of its projects, however, because it offers one source of truth, simplified dependency management, large-scale refactoring, and flexible team boundaries (<a href="#potvin">Potvin & Levenberg 2016</a>).</p>
2017-04-16 20:59:49 +02:00
<p>When code changes, you need to test it, which often means you need to <strong>build</strong> it, compiling source, data, and other resources into an executable format suitable for testing (and possibly release). Build systems can be as simple as nothing (e.g., loading an HTML file in a web browser interprets the HTML and displays it, requiring no special preparation) and as complex is hundreds and thousands of lines of build script code, compiling, linking, and managing files in a manner that prepares a system for testing, such as those used to build operating systems like Windows or Linux. To write these complex build procedures, developers use build automation tools like <code>make</code>, <code>ant</code>, <code>gulp</code> and dozens of others, each helping to automate builds. In large companies, there are whole teams that maintain build automation scripts to ensure that developers can always quickly build and test. In these teams, most of the challenges are social and not technical: teams need to clarify role ambiguity, knowledge sharing, communication, trust, and conflict in order to be productive, just like other software engineering teams (<a href="#phillips">Phillips et al. 2014</a>).</p>
2017-04-27 05:40:53 +02:00
<p>Perhaps the most modern form of build practice is <strong>continuous integration</strong>. This is the idea of completely automating not only builds, but also the running of a collection of tests, every time a bundle of changes is pushed to a central version control repository. The claimed benefit of continuous integration is that every major change is quickly built, tested, and ready for deployment, shortening the time between a change and the discovery of failures. This only works if builds are fast. For example, some large projects like Windows can take a whole day to build, making continuous integration of the whole operating system infeasible. When builds and tests are fast, continuous integration can accelerate development, especially in projects with large numbers of contributors (<a href="#vasilescu">Vasilescu et al. 2015</a>). Some teams even go further than continuous integration, building continuous <em>delivery</em> systems that ensure that complete builds are readily available for release (potentially multiple times per day for software on the web). Having a repeatable, automated deployment process is key for such processes (<a href="#chen">Chen 2015</a>).</p>
2017-04-16 20:59:49 +02:00
<p>One last problem with changes in software is managing the <strong>releases</strong> of software. Good release management should archive new versions of software, automatically post the version online, make the version accessible to users, keep a history of who accesses the new version, and provide clear release notes describing changes from the previous version (<a href="#vanderhoek">van der Hoek et al. 1997</a>). By default, all of this is quite manual, but many of these steps can be automated, streamlining how teams release changes to the world. You've probably encountered these most in the form of software updates to applications and operating systems.</p>
<center class="lead"><a href="debugging.html">Next chapter: Debugging</a></center>
<h2>Further reading</h2>
<small>
<p id="brindescu">Caius Brindescu, Mihai Codoban, Sergii Shmarkatiuk, and Danny Dig. 2014. <a href="http://dx.doi.org/10.1145/2568225.2568322">How do centralized and distributed version control systems impact software changes?</a> In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). ACM, New York, NY, USA, 322-333.</p>
2017-04-27 05:40:53 +02:00
<p id="chen">Chen, L. (2015). <a href="https://doi.org/10.1109/MS.2015.27">Continuous delivery: Huge benefits, but challenges too</a>. IEEE Software, 32(2), 50-54.</p>
2017-04-16 20:59:49 +02:00
<p id="kim">Miryung Kim, Thomas Zimmermann, and Nachiappan Nagappan. 2012. <a href="http://dx.doi.org/10.1145/2393596.2393655">A field study of refactoring challenges and benefits</a>. In Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering (FSE '12).</p>
<p id="phillips">Shaun Phillips, Thomas Zimmermann, and Christian Bird. 2014. <a href="http://dx.doi.org/10.1145/2568225.2568274">Understanding and improving software build teams</a>. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). ACM, New York, NY, USA, 735-744.</p>
<p id="potvin">Potvin, R., & Levenberg, J. (2016). <a href="">Why Google stores billions of lines of code in a single repository</a>. Communications of the ACM, 59(7), 78-87.</p>
<p id="vasilescu">Bogdan Vasilescu, Yue Yu, Huaimin Wang, Premkumar Devanbu, and Vladimir Filkov. 2015. <a href="https://doi.org/10.1145/2786805.2786850">Quality and productivity outcomes relating to continuous integration in GitHub</a>. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2015). ACM, New York, NY, USA, 805-816.</p>
2017-04-27 05:36:15 +02:00
<p id="#vanderheok">Andr&eacute van der Hoek, Richard S. Hall, Dennis Heimbigner, and Alexander L. Wolf. 1997. <a href="https://doi.org/10.1145/267896.267909">Software release management</a>. ACM SIGSOFT International Symposium on Foundations of Software Engineering, 159-175.</p>
2017-04-16 20:59:49 +02:00
</small>
<h2>Podcasts</h2>
<small>
<p>Software Engineering Daily, <a href="https://softwareengineeringdaily.com/2016/10/10/continuous-delivery-with-david-rice/">Continuous Delivery with David Rice</a>.</p>
</small>
2018-03-15 16:14:19 +01:00
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-10917999-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
2017-04-16 20:59:49 +02:00
</body>
</html>