Pete Goodliffe

Total Page:16

File Type:pdf, Size:1020Kb

Pete Goodliffe by Pete Goodliffe ® San Francisco CODE CRAFT. Copyright © 2007 by Pete Goodliffe. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. Printed on recycled paper in the United States of America 10 09 08 07 06 1 2 3 4 5 6 7 8 9 ISBN-10: 1-59327-119-0 ISBN-13: 978-1-59327-119-0 Publisher: William Pollock Production Editor: Elizabeth Campbell Cover Design: Octopod Studios Text Illustrations: David Brookes Technical Reviewer: Jon Jagger Copyeditor: Megan Dunchak Compositors: Megan Dunchak, Riley Hoffman, and Christina Samuell Proofreader: Stephanie Provines For information on book distributors or translations, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 555 De Haro Street, Suite 250, San Francisco, CA 94107 phone: 415.863.9900; fax: 415.863.9950; [email protected]; www.nostarch.com Library of Congress Cataloging-in-Publication Data Goodliffe, Pete. Code craft: the practice of writing excellent code / Pete Goodliffe. p. cm. Includes bibliographical references and index. ISBN-13: 978-1-59327-119-0 ISBN-10: 1-59327-119-0 1. Computer programming. 2. Programming languages (Electronic computers) 3. Computer software-- Development. I. Title. QA76.6.G656 2006 005.1--dc22 2006015575 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. All text illustrations copyright © 2006 by David Brookes. To Bryony, my wonderful wife. To Alice, who drew balloons on this book. To Millie, who tasted this book. And to Jessica, who never got a chance to. Psalm 150 BRIEF CONTENTS Preface ..................................................................................................................... xxvii Acknowledgments ...................................................................................................... xxxv About the Author.......................................................................................................xxxvii PART I AT THE CODEFACE 1 Chapter 1: On the Defensive Defensive Programming Techniques for Robust Code ...........................................................3 Chapter 2: The Best Laid Plans The Layout and Presentation of Source Code ....................................................................23 Chapter 3: What’s in a Name? Giving Meaningful Things Meaningful Names..................................................................39 Chapter 4: The Write Stuff Techniques for Writing “Self-Documenting” Code..............................................................57 Chapter 5: A Passing Comment How to Write Code Comments .......................................................................................73 Chapter 6: To Err Is Human Dealing with the Inevitable—Error Conditions in Code.......................................................89 PART II THE SECRET LIFE OF CODE 109 Chapter 7: The Programmer’s Toolbox Using Tools to Construct Software .................................................................................111 Chapter 8: Testing Times The Black Art of Testing Code.......................................................................................129 Chapter 9: Finding Fault Debugging: What to Do When Things Go Wrong ..........................................................153 Chapter 10: The Code That Jack Built Mechanisms to Turn Source Code into Executable Code ..................................................175 Chapter 11: The Need for Speed Optimizing Programs and Writing Efficient Code............................................................199 Chapter 12: An Insecurity Complex Writing Secure Programs .............................................................................................223 PART III THE SHAPE OF CODE 239 Chapter 13: Grand Designs How to Produce Good Software Designs........................................................................241 Chapter 14: Software Architecture Laying the Foundations of Software Design.....................................................................261 Chapter 15: Software Evolution or Software Revolution? How Does Code Grow?...............................................................................................279 PART IV A HERD OF PROGRAMMERS? 293 Chapter 16: Code Monkeys Fostering the Correct Attitude and Approach to Programming...........................................295 Chapter 17: Together We Stand Teamwork and the Individual Programmer......................................................................315 Chapter 18: Practicing Safe Source Source Control and Self-Control ....................................................................................349 PART V PART OF THE PROCESS 365 Chapter 19: Being Specific Writing Software Specifications ....................................................................................367 Chapter 20: A Review to a Kill Performing Code Reviews.............................................................................................385 viii Brief Contents Chapter 21: How Long Is a Piece of String? The Black Art of Software Timescale Estimation ...............................................................401 PART VI VIEW FROM THE TOP 417 Chapter 22: Recipe for a Program Code Development Methodologies and Processes ...........................................................419 Chapter 23: The Outer Limits The Different Programming Disciplines ...........................................................................441 Chapter 24: Where Next? All’s Well That Ends Well.............................................................................................459 Answers and Discussion...............................................................................................463 Bibliography...............................................................................................................559 Index .........................................................................................................................565 Brief Contents ix CONTENTS IN DETAIL PREFACE xxvii What’s In It for Me? .............................................................................................. xxvii Getting Better ...................................................................................................... xxviii Who Should Read This Book?..................................................................................xxix What’s Covered? ....................................................................................................xxx How This Book Is Organized ....................................................................................xxx The Chapters—A Closer Look .................................................................................xxxii Part I: At The Codeface.............................................................................xxxii Part II: The Secret Life of Code ...................................................................xxxii Part III: The Shape of Code........................................................................xxxii Part IV: A Herd of Programmers .................................................................xxxii Part V: Part of the Process..........................................................................xxxii Part VI: From the Top ................................................................................xxxii How to Use This Book........................................................................................... xxxiii A Note to Mentors .................................................................................. xxxiii ACKNOWLEDGMENTS xxxv ABOUT THE AUTHOR xxxvii PART I AT THE CODEFACE 1 ON THE DEFENSIVE Defensive Programming Techniques for Robust Code 3 Toward Good Code .................................................................................................. 4 Assume the Worst ..................................................................................................... 4 What Is Defensive Programming?................................................................................ 6 The Big, Bad World .................................................................................................. 8 Techniques for Defensive Programming ........................................................................ 8 Employ a Good Coding Style and Sound Design ............................................. 9 Don’t Code in a Hurry .................................................................................. 9 Trust No One............................................................................................. 10 Write Code for
Recommended publications
  • Wdv-Notes Stand: 5.SEP.1995 (13.)336 Das Usenet: Vom FUB-Server Lieferbare News-Gruppen
    wdv-notes Stand: 5.SEP.1995 (13.)336 Das UseNET: Vom FUB-Server lieferbare News-Gruppen. Wiss.Datenverarbeitung © 1991–1995 Edited by Karl-Heinz Dittberner FREIE UNIVERSITÄT BERLIN Net An der Freien Universität Berlin (FUB) wurde von der Zur Orientierung wird in diesem Merkblatt eine alphabeti- ZEDAT am 24. Februar 1995 ein neuer, wesentlich leistungsfä- sche Übersicht der Bezeichnungen aller aktuell vom News- higer News-Server in Betrieb genommen. Dieser ist mit einer Server der FUB zu allen Wissensgebieten zum Lesen und Posten geeigneten UseNET-Software (News-Reader) im Internet unter abrufbaren News-Gruppen gegeben. der Alias-Bezeichnung News.FU-Berlin.de erreichbar. Dieses ist natürlich nur eine Momentaufnahme, da ständig Aus der großen Vielfalt der im Internet verfügbaren interna- neue Gruppen hinzukommen und einige auch wieder verschwin- tionalen und nationalen News-Gruppen des eigentlichen UseNETs den bzw. gesperrt werden. Festgehalten ist hier auf 16 Seiten der sowie weiteren Foren aus anderen Netzen stellt dieser Server zur Stand vom 5. September 1995. Zeit fast 6.000 Gruppen zur Verfügung. alt.books.sf.melanie-rawn alt.culture.alaska alt.emusic A alt.books.stephen-king alt.culture.argentina alt.energy.renewable alt.1d alt.books.technical alt.culture.beaches alt.english.usage alt.3d alt.books.tom-clancy alt.culture.hawaii alt.engr.explosives alt.abortion.inequity alt.boomerang alt.culture.indonesia alt.etext alt.abuse-recovery alt.brother-jed alt.culture.internet alt.evil alt.abuse.recovery alt.business.import-export alt.culture.karnataka
    [Show full text]
  • Chris Gombos
    Chris Gombos Gender: Male Service: 203-257-4988 Height: 6 ft. 2 in. Mobile: 203-257-4988 Weight: 215 pounds E-mail: [email protected] Eyes: Blue Web Site: http://www.atbstunts... Hair Length: Regular Waist: 36 Inseam: 33 Shoe Size: 9.5 Physique: Athletic Coat/Dress Size: 45 Ethnicity: Caucasian / White Unique Traits: TATTOOS (Got Them) Photos Film Credits we own the night stunt cop 2929/james gray/ manny siverio college road trip stunt goon disney/roger kumble/manny siverio life before her eyes cop/driver 29/29/vladim perelman/manhy siverio friends with benefits( 2007) angry bar customer/ falls what were we thinking/gorman bechard abuduction stunt cia agent/ utility stunts john singleton/ brad martin violet & daisey man #4 stunts Geoffery fletcher/pete bucossi solomon grundy stunt double/ stunt coordinator wacky chan productions/ mattson tomlin/chris gombos nor'easter hockey coach/ hockey action noreaster productions/andrew coordinator brotzman/chris gombos brass tea pot cowboy / stunts chris columbo/ manny siverio The wedding Stunts Lionsgate/ justin zackham/ roy farfel Devoured Stunt double Secret weapon films/ greg Oliver / Curtis Lyons Generated on 09/24/2021 08:39:14 pm Page 1 of 3 Television Bored to death season 3 ep8 Stunt double Danny hoch Hbo / /Pete buccossi Law & order svu " pursuit" Stunt double Jery hewitt / Ian McLaughlin ( stunt coordinators ) jersey city goon #2/ stunts fx/daniel minahan/pete buccosi person of interest season 1 ep 2 rough dude#2 / stunts cbs/ /jeff gibson "ghost" Boardwalk empire season 2 ep Mike Griswalt/ stunts Hbo/ Timothy van patten/ steve 12 pope Onion news network season 2 ep Stunt driver/ glen the producer Comedy central / / manny Siverio 4 Onion news network season 2 ep Stunt reporter Comedy central / / manny Siverio 6 gun hill founding patriot1 / stunts bet/reggie rock / jeff ward blue bloods ep "uniforms" s2 joey sava / stunts cbs/ / cort hessler ep11 Person of interest ep firewall Stunts/ hr cop CBS / Jonah Nolan / jeff gibson Person of interest ep bad code Brad / stunts CBS/.
    [Show full text]
  • Adam Tornhill — «Your Code As a Crime Scene
    Early praise for Your Code as a Crime Scene This book casts a surprising light on an unexpected place—my own code. I feel like I’ve found a secret treasure chest of completely unexpected methods. Useful for programmers, the book provides a powerful tool to smart testers, too. ➤ James Bach Author, Lessons Learned in Software Testing You think you know your code. After all, you and your fellow programmers have been sweating over it for years now. Adam Tornhill uses thinking in psychology together with hands-on tools to show you the bad parts. This book is a red pill. Are you ready? ➤ Björn Granvik Competence manager Adam Tornhill presents code as it exists in the real world—tightly coupled, un- wieldy, and full of danger zones even when past developers had the best of inten- tions. His forensic techniques for analyzing and improving both the technical and the social aspects of a code base are a godsend for developers working with legacy systems. I found this book extremely useful to my own work and highly recommend it! ➤ Nell Shamrell-Harrington Lead developer, PhishMe By enlisting simple heuristics and data from everyday tools, Adam shows you how to fight bad code and its cohorts—all interleaved with intriguing anecdotes from forensic psychology. Highly recommended! ➤ Jonas Lundberg Senior programmer and team leader, Netset AB After reading this book, you will never look at code in the same way again! ➤ Patrik Falk Agile developer and coach Do you have a large pile of code, and mysterious and unpleasant bugs seem to appear out of nothing? This book lets you profile and find out the weak areas in your code and how to fight them.
    [Show full text]
  • Le Jeu Vidéo Sur Youtube : Historique De La Captation Et De La Diffusion Du Jeu Vidéo
    Université de Montréal Le jeu vidéo sur YouTube : historique de la captation et de la diffusion du jeu vidéo par Francis Lavigne Département d’histoire de l’art et d’études cinématographiques Faculté des arts et des sciences Mémoire présenté en vue de l’obtention du grade de M.A. en études cinématographiques option études du jeu vidéo Août 2017 © Francis Lavigne, 2017 Résumé Ce mémoire s’intéresse à la captation audiovisuelle et aux pratiques de commentaires sur le jeu vidéo. Tout d’abord, nous remettons en contexte l’émergence de ce type de production à l’aide d’une analyse historique de divers formats de diffusion (à la télévision, à l’aide de vidéocassettes, dans les suppléments de magazines et sur Internet). Ensuite, nous détaillons les limites et affordances de la plateforme participative YouTube. Puis, nous rattachons les commentaires de jeux vidéo aux concepts de boniment, de performance et de double performance. Enfin, nous analysons quatre genres de vidéos présents sur YouTube : les machinimas, les speedruns, les longplays et les let’s plays. Mots-clés Jeu vidéo, machinima, longplay, let’s play, speedrun, YouTube, boniment, commentaire, double performance i Abstract This research is aimed to understand the audiovisual recording and commentary practices of video games. First of all, we do a contextualisation of these types of production through a historical analysis of the way theses videos were diffused (from televised shows, to VHS, magazines’ bonuses, and on the Internet). After, we detail the limits and affordances of the YouTube sharing platform. Then, we create links between the commentary of video game and the concepts of film lecturer, performance and double performance.
    [Show full text]
  • An Empirical Study of Function Pointers Using SPEC Benchmarks
    An Empirical Study of Function Pointers Using SPEC Benchmarks y Ben-Chung Cheng Wen-mei W. Hwu Department of Computer Science y Department of Electrical and Computer Engineering and The Co ordinated Science Lab oratory University of Illinois at Urbana-Champaign May 10, 1999 Abstract Since the C language imp oses little restriction on the use of function p ointers, the task of call graph construction for a C program is far more dicult than what the algorithms designed for Fortran can handle. From the exp erience of implementing a call graph extractor in the IMPACT compiler, we found the call graph construction problem has evolved into an interpro cedural p ointer analysis problem. A complete and precise call graph can be constructed from fully resolved function pointers. In this pap er, we rep ort an empirical study of function p ointers in the complete SPECint92 and SPECint95 b enchmarks. We evaluate the resolution of function p ointers and the p otential program transformations enabled by a complete call graph. We also examine several real examples of function pointer manipulation found in these b enchmarks. They can be considered as critical issues in the design of a complete interpro cedural p ointer analysis algorithm. 1 2 1 Intro duction With the rapid advancement in mo dern pro cessor designs, exploiting parallelism within the body of a single function cannot fully utilize the computation resources. Also, the presence of function calls in a stream of instructions not only invokes run-time overhead, but also hamp ers compile-time data- ow analysis, constraining co de optimizations like register allo cation and global variable migration [1].
    [Show full text]
  • Hgzine Issue 19
    |01 FREE! NAVIGATE Issue 19 | August 2008 FIRST NEWS! PES 2009 Konami aim for the top spot HGFree Magazine For Handheld Gamers. ZineRead it, Print it, Send it to your mates… 40+ GAMES FEATURED! WIN! COPIES OF PORTABLE PERFECTION! GUITAR HERO: ON TOUR AND The finest games coming to DS and PSP! NINJA GAIDEN! OH-OH-SEVEN REVIEW PREVIEW REVIEW PREVIEW Race Driver: GRID The best-looking DS racer yet? New Quantum LEGO Batman International of Solace The Dark Knight gets Bond is back! the LEGO treatment! Final Fantasy IV Track & Field The RPG classic is DS-bound CONTROL On your marks… WWW.GAMERZINES.COM NAVIGATE |02 QUICK FINDER DON’T Every game’s just a click away! MISS! SONY PSP LEGO Batman Final Fantasy This month’s PES 2009 Final Fantasy IV Tactics Advance Hellboy 2 The Mummy: Doodle Hex highlights International Tomb of the Arkanoid DS HGZine Athletics Dragon Emperor Wall•E Buzz! Master Quiz International News round-up LEGO Batman Space Invaders Athletics If you’re heading off on your holidays and Extreme Ninjatown MOBILE PHONE Holy building blocks, New International packing your DS or PSP (or, for the lucky few, Batman! The Caped Crusader News NINTENDO DS Track & Field Reviews both) then there’s plenty of top buying advice gets the LEGO treatment Race Driver: GRID here to get the perfect game to take with you. Quantum of Solace Solo gamers could do worse than plump for Race Driver: GRID, and for those of you looking MORE FREE MAGAZINES! LATEST ISSUES! for a family game for those rainy days in your DS AND PSP: caravan in Devon, then Buzz! Quiz Master is the perfect way to waste an hour or two.
    [Show full text]
  • The Product Book: How to Become a Great Product Manager Copyright ©2017 Product School All Rights Reserved
    1 THE PRODUCT BOOK JOSH ANON and CARLOS GONZÁLEZ DE VILLAUMBROSIA PUBLISHED BY The Product Book: How to Become a Great Product Manager Copyright ©2017 Product School All rights reserved. No part of this publication may be reproduced, stored, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, without written permission from the publisher. It is illegal to copy this book, post it to a website, or distribute it by any other means without permission. LEGAL NOTE All trademarks are property of their respective owners. Unless otherwise noted, all text and images are copyright Product School, and they may not be reproduced without permission. ISBNS 978-0-9989738-0-7 PRINT 978-0-9989738-3-8 MOBI BOOK DESIGN The Frontispiece PUBLISHED BY Product School TABLE OF CONTENTS INTRODUCTION 7 1 What Is Product Management 9 2 Strategically Understanding a Company 32 3 Creating an Opportunity Hypothesis 64 4 Validating Your Hypothesis 109 5 From Idea to Action 149 6 Working with Design 189 7 Working with Engineering 218 8 Bringing Your Product to Market 243 9 Finishing the Product-Development Life Cycle 279 Acknowledgments 300 About the Authors 302 INTRODUCTION Thank you for picking up this book! We know your time is valuable, and 7 we will do our best to make this book worth your while. One of the most important parts of being a product manager is knowing who your customers are and what they need. So, who do we believe you are, and what need will this book fill? Fundamentally, you are someone who’d like to know more about product management.
    [Show full text]
  • Refactoring-Javascript.Pdf
    Refactoring JavaScript Turning Bad Code into Good Code Evan Burchard Refactoring JavaScript by Evan Burchard Copyright © 2017 Evan Burchard. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotion- al use. Online editions are also available for most titles (http://oreilly.com/ safari). For more information, contact our corporate/institutional sales depart- ment: 800-998-9938 or [email protected]. • Editors: Nan Barber and Allyson MacDonald • Production Editor: Kristen Brown • Copyeditor: Rachel Monaghan • Proofreader: Rachel Head • Indexer: Ellen Troutman-Zaig • Interior Designer: David Futato • Cover Designer: Karen Montgomery • Illustrator: Rebecca Demarest • March 2017: First Edition Revision History for the First Edition • 2017-03-10: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781491964927 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Refactoring JavaScript, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the pub- lisher and the author disclaim all responsibility for errors or omissions, includ- ing without limitation responsibility for damages resulting from the use of or re- liance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work con- tains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof com- plies with such licenses and/or rights.
    [Show full text]
  • MAG Hands-On Preview NEWS from the FEED
    Search G4TV » The Feed » MAG Hands-On Preview » Feed Theme Preference Light| Dark ADVERTISEMENT NEWS FROM THE FEED Search The Feed MAG Hands-On Preview Start following now » Posted by Joe Rybicki- Thursday, June 04, 2009 5:02 PM RSS» PODCAST» MOBILE» VIDEOONDEMAND» DOWNLOADTOOWN» NEWSLETTER» Zipper Interactive knows how to think big. Maybe it's the fact that the company got its start designing Apache helicopter sims for the U.S. military -- it may be that any civilian game development feels like a cakewalk in comparison. But whatever the reason, the developer has Top 10 Tags View: List Cloud been pushing forward in the online arena since they launched the PS2 All Time | Last 30 Days | Last 7 Days network adapter with the original SOCOM: U.S. Navy SEALs way back Videogames 12518 in 2002. The series started out with 16-player online play, and graduated Xbox 360 4838 to 32-player matches with SOCOM 3. 2006's Combined Assault added PlayStation 3 4378 four-player co-op. These were sensible, predictable improvements. Videos 3331 Music 3180 Tech 2941 MAG, on the other hand, is almost ridiculously ambitious. Movies 2821 PC Gaming 2724 Wii 2254 TV 1975 For Zipper's latest trick (and their first PS3 game), they're filling vast maps with 256 simultaneous human players. And as if the sheer View All Tags technology behind such a feat weren't enough, they're also creating a complete chain of command to give players the ability to take command of squads of eight, and platoons of 32, with a single officer in charge of the whole company.
    [Show full text]
  • A Human-Centric Approach to Program Understanding
    A Human-Centric Approach to Program Understanding Ph.D. Dissertation Proposal Raymond P.L. Buse [email protected] April 6, 2010 1 Introduction Software development is a large global industry, but software products continue to ship with known and unknown defects [60]. In the US, such defects cost firms many billions of dollars annually by compromising security, privacy, and functionality [73]. To mitigate this expense, recent research has focused on finding specific errors in code (e.g., [13, 25, 29, 34, 35, 47, 48, 61, 66, 86]). These important analyses hold out the possibility of identifying many types of implementation issues, but they fail to address a problem underlying all of them: software is difficult to understand. Professional software developers spend over 75% of their time trying to understand code [45, 76]. Reading code is the most time consuming part [31, 39, 78, 85] of the most expensive activity [77, 87] in the software development process. Yet, software comprehension as an activity is poorly understood by both researchers and practitioners [74, 106]. Our research seeks to develop a general and practical approach for analyzing program understandability from the perspective of real humans. In addition, we propose to develop tools for mechanically generating documentation in order to make programs easier to understand. We will focus on three key dimensions of program understandability: readability, a local judgment of how easy code is to understand; runtime behavior, a characterization of what a program was designed to do; and documentation, non-code text that aids in program understanding. Our key technical insight lies in combining multiple surface features (e.g., identifier length or number of assignment statements) to characterize aspects of programs that lack precise semantics.
    [Show full text]
  • By Michael L. Black Dissertation
    TRANSPARENT CULTURES: IMAGINED USERS AND THE POLITICS OF SOFTWARE DESIGN (1975-2012) BY MICHAEL L. BLACK DISSERTATION Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in English in the Graduate College of the University of Illinois at Urbana-Champaign, 2014 Urbana, Illinois Doctoral Committee: Professor Robert Markley, Chair Associate Professor Ted Underwood Associate Professor Melissa Littlefield Associate Professor Spencer Schaffner Associate Professor John T. Newcomb ii Abstract The rapid pace of software’s development poses serious challenges for any cultural history of computing. While digital media studies often sidestep historicism, this project asserts that computing’s messy, and often hidden, history can be studied using digital tools built to adapt text-mining strategies to the textuality of source code. My project examines the emergence of personal computing, a platform underlying much of digital media studies but that itself has received little attention outside of corporate histories. Using an archive of technical papers, professional journals, popular magazines, and science fiction, I trace the origin of design strategies that led to a largely instrumentalist view of personal computing and elevated “transparent design” to a privileged status. I then apply text-mining tools that I built with this historical context in mind to study source code critically, including those features of applications hidden by transparent design strategies. This project’s first three chapters examine how and why strategies of information hiding shaped consumer software design from the 1980s on. In Chapter 1, I analyze technical literature from the 1970s and 80s to show how cognitive psychologists and computer engineers developed an ideal of transparency that discouraged users from accessing information structures underlying personal computers.
    [Show full text]
  • 1 Combinatorial Methods in Testing
    1 Combinatorial Methods in Testing Developers of large software systems often notice an interesting phenomenon: if usage of an application suddenly increases, components that have been working correctly develop previously undetected failures. For example, the application may have been installed with a different OS or DBMS system from what was used previously, or newly added customers may have account records with combinations of values that have not occurred before. Some of these rare combinations trigger failures that have escaped previous testing and extensive use. Such failures are known as interaction failures, because they are only exposed when two or more input values interact to cause the program to reach an incorrect result. 1.1 Software Failures and the Interaction Rule Interaction failures are one of the primary reasons why software testing is so difficult. If failures only depended on one variable value at a time, we could simply test each value once, or for continuous-valued variables, one value from each representative range. If our application had inputs with v values each, this would only require a total of v tests – one value from each input per test. Unfortunately, the situation is much more complicated than this. Combinatorial testing can help detect problems like those described above early in the testing life cycle. The key insight underlying t-way combinatorial testing is that not every parameter contributes to every failure and most failures are triggered by a single parameter value or interactions between a relatively small number of parameters (for more on the number of parameters interacting in failures, see Appendix B).
    [Show full text]