Adam Tornhill — «Your Code As a Crime Scene

Total Page:16

File Type:pdf, Size:1020Kb

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. This is the essence of combining business with pleasure! ➤ Jimmy Rosenskog Senior consultant, software developer Adam manages to marry source code analysis with forensic psychology in a unique and structured way. The book presents tools and techniques to apply this concept to your own projects to predict the future of your codebase. Brilliant! ➤ Mattias Larsson Senior software consultant, Webstep Your Code as a Crime Scene Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs Adam Tornhill The Pragmatic Bookshelf Dallas, Texas • Raleigh, North Carolina Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trade- marks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at https://pragprog.com. The team that produced this book includes: Fahmida Y. Rashid (editor) Potomac Indexing, LLC (indexer) Cathleen Small (copyeditor) Dave Thomas (typesetter) Janet Furlow (producer) Ellie Callahan (support) For international rights, please contact [email protected]. Copyright © 2015 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-13: 978-1-68050-038-7 Encoded using the finest acid-free high-entropy binary digits. Book version: P1.0—March 2015 Contents Foreword by Michael Feathers . ix Acknowledgments . xi 1. Welcome! ..............1 About This Book 1 Optimize for Understanding 2 How to Read This Book 4 Toward a New Approach 6 Get Your Investigative Tools 7 Part I — Evolving Software 2. Code as a Crime Scene . 13 Meet the Problems of Scale 13 Get a Crash Course in Offender Profiling 15 Profiling the Ripper 16 Apply Geographical Offender Profiling to Code 17 Learn from the Spatial Movement of Programmers 18 Find Your Own Hotspots 22 3. Creating an Offender Profile . 23 Mining Evolutionary Data 23 Automated Mining with Code Maat 26 Add the Complexity Dimension 28 Merge Complexity and Effort 30 Limitations of the Hotspot Criteria 30 Use Hotspots as a Guide 31 Dig Deeper 33 Contents • vi 4. Analyze Hotspots in Large-Scale Systems . 35 Analyze a Large Codebase 35 Visualize Hotspots 38 Explore the Visualization 40 Study the Distribution of Hotspots 41 Differentiate Between True Problems and False Positives 45 5. Judge Hotspots with the Power of Names . 47 Know the Cognitive Advantages of Good Names 47 Investigate a Hotspot by Its Name 50 Understand the Limitations of Heuristics 52 6. Calculate Complexity Trends from Your Code’s Shape . 55 Complexity by the Visual Shape of Programs 55 Learn About the Negative Space in Code 57 Analyze Complexity Trends in Hotspots 59 Evaluate the Growth Patterns 63 From Individual Hotspots to Architectures 64 Part II — Dissect Your Architecture 7. Treat Your Code As a Cooperative Witness . 67 Know How Your Brain Deceives You 68 Learn the Modus Operandi of a Code Change 71 Use Temporal Coupling to Reduce Bias 72 Prepare to Analyze Temporal Coupling 76 8. Detect Architectural Decay . 77 Support Your Redesigns with Data 77 Analyze Temporal Coupling 78 Catch Architectural Decay 83 React to Structural Trends 87 Scale to System Architectures 89 9. Build a Safety Net for Your Architecture . 91 Know What’s in an Architecture 91 Analyze the Evolution on a System Level 93 Differentiate Between the Level of Tests 94 Create a Safety Net for Your Automated Tests 99 Know the Costs of Automation Gone Wrong 103 Contents • vii 10. Use Beauty as a Guiding Principle . 105 Learn Why Attractiveness Matters 105 Write Beautiful Code 107 Avoid Surprises in Your Architecture 108 Analyze Layered Architectures 111 Find Surprising Change Patterns 113 Expand Your Analyses 116 Part III — Master the Social Aspects of Code 11. Norms, Groups, and False Serial Killers . 121 Learn Why the Right People Don’t Speak Up 122 Understand Pluralistic Ignorance 124 Witness Groupthink in Action 127 Discover Your Team’s Modus Operandi 128 Mine Organizational Metrics from Code 132 12. Discover Organizational Metrics in Your Codebase . 133 Let’s Work in the Communication Business 133 Find the Social Problems of Scale 135 Measure Temporal Coupling over Organizational Boundaries 138 Evaluate Communication Costs 141 Take It Step by Step 145 13. Build a Knowledge Map of Your System . 147 Know Your Knowledge Distribution 147 Grow Your Mental Maps 152 Investigate Knowledge in the Scala Repository 155 Visualize Knowledge Loss 158 Get More Details with Code Churn 161 14. Dive Deeper with Code Churn . 163 Cure the Disease, Not the Symptoms 163 Discover Your Process Loss from Code 164 Investigate the Disposal Sites of Killers and Code 168 Predict Defects 171 Time to Move On 174 15. Toward the Future . 175 Let Your Questions Guide Your Analysis 175 Take Other Approaches 177 Contents • viii Let’s Look into the Future 181 Write to Evolve 182 A1. Refactoring Hotspots . 183 Refactor Guided by Names 183 Bibliography . 187 Index . 191 Foreword by Michael Feathers It’s easy to look at code and think that there is nothing more than what we see. When we look at it, we see operators, identifiers, and other language structure, but that is all surface. We forget the depth. We spend so much time looking at the current state of the code that we forget its history and all of the forces that influenced it along its path toward the present. We pay for this myopia. Many code changes are incredibly shortsighted, both in terms of our vision of what the code will be in the future, and the way that it got to be the way that it is. Years ago, I was struck by the fact that we use version-control systems to keep track of our projects’ histories, but we hardly ever revert to previous versions. Those versions exist as an insurance policy, and we’re lucky when we never have to file a claim. It’s easy, then, to look at that record of changes and see it as waste. Do we really need more than the last few versions? The naive answer is no, but we have a real opportunity when we enthusiastically say yes—we can mine our source code history to learn more about us, our environment, and how we work. That information is real power. I think that we are at the beginning of a new era of awareness about how software changes. We’re abandoning the static view of code and seeing it as a verb—a constantly changing medium that reacts to its immediate and extended environment. Your Code as a Crime Scene is the first book I’ve encountered that takes that view and runs with it. Adam presents tools, techniques, and insight that will change the way you develop software. You can’t unread this information, and you will see software differently. Dig in. Michael Feathers report erratum • discuss Acknowledgments My writing experience has been fun, challenging, and rewarding. I owe that to all the amazing people who helped me out. First of all, I’d like to thank the Pragmatic Bookshelf for this opportunity. In particular, I’d like to thank my editor, Fahmida Y. Rashid, who made this a much better book than what I could’ve done on my own.
Recommended publications
  • DIR-ESS-TGOV-SVCS-254 Exhibit 4.5 Third Party Contracts
    State of Texas Department of Information Resources Texas.gov Services Exhibit 4.5 Third Party Contracts DIR-ESS-TGOV-SVCS-254 Page 1 of 10 Texas Department of Information Resources Third-Party Contracts - Software Entry Number of Respondent License Reference Vendor Software Product Name Description Licenses (if Assume (A) or Comment Transferable? Number applicable) Displace (D) SW001 MongoDB mongoDB A free and open-source cross-platform document-oriented database program. Yes A Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. SW002 activiti Activiti is an open-source workflow engine written in Java that can execute Yes A business processes described in BPMN 2.0 SW003 Red Hat Red Hat Linux Server Red Hat Enterprise Linux (RHEL) is a Linux distribution developed by Red Hat 20 Yes A and targeted toward the commercial market SW004 Melissa Data Corp Melissa Data Lookups for ZIP Codes, maps, ZIP+4, Carrier Routes, addresses, reverse 1 Yes A phone, IP location, SIC codes, street names, property info and much more SW005 Oracle Oracle WebLogic Suite Oracle WebLogic Suite is an integrated solution for building on-premise cloud 4 Processors. 60 Yes A application infrastructures that span web server, application server and data Users. grid technology tiers. SW006 Oracle Oracle SOA Suite for Oracle Middleware Oracle SOA Suite is a comprehensive, standards-based Middleware Users Yes A software suite to build, deploy and manage integration following the concepts 30. WebLogic Suite of service-oriented architecture (SOA). Users 30. SW007 Symantec Symantec EndPoint Symantec Endpoint Protection, developed by Symantec, is a security software 243 Yes A suite, which consists of anti-malware, intrusion prevention and firewall features for servers and desktops.
    [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]
  • Comparative Studies of 10 Programming Languages Within 10 Diverse Criteria
    Department of Computer Science and Software Engineering Comparative Studies of 10 Programming Languages within 10 Diverse Criteria Jiang Li Sleiman Rabah Concordia University Concordia University Montreal, Quebec, Concordia Montreal, Quebec, Concordia [email protected] [email protected] Mingzhi Liu Yuanwei Lai Concordia University Concordia University Montreal, Quebec, Concordia Montreal, Quebec, Concordia [email protected] [email protected] COMP 6411 - A Comparative studies of programming languages 1/139 Sleiman Rabah, Jiang Li, Mingzhi Liu, Yuanwei Lai This page was intentionally left blank COMP 6411 - A Comparative studies of programming languages 2/139 Sleiman Rabah, Jiang Li, Mingzhi Liu, Yuanwei Lai Abstract There are many programming languages in the world today.Each language has their advantage and disavantage. In this paper, we will discuss ten programming languages: C++, C#, Java, Groovy, JavaScript, PHP, Schalar, Scheme, Haskell and AspectJ. We summarize and compare these ten languages on ten different criterion. For example, Default more secure programming practices, Web applications development, OO-based abstraction and etc. At the end, we will give our conclusion that which languages are suitable and which are not for using in some cases. We will also provide evidence and our analysis on why some language are better than other or have advantages over the other on some criterion. 1 Introduction Since there are hundreds of programming languages existing nowadays, it is impossible and inefficient
    [Show full text]
  • MAGENTO E-Commerce Services
    MAGENTO E-Commerce Services Do you want to take your business to the next level by getting exposed to the powerful Web? Want to launch a professional e-commerce website with extensive functionalities? Magento is the answer to your question. An open source Ecommerce application platform with robust features, scalability and flexibility that guarantees enhanced reach on products and quick return on investment for your business. AES Magento Ecommerce development services help your business grow better. Our Magento Application Development team provides solutions based on strategic business objectives to add more value to your business. Our Magento Customization Services not just make your site simple to manage but also ensures that your retail site is uniquely designed to meet the needs of client and to make it every shoppers dream. Give us your credence and we will be the backbone to your online business! The Magento Services we offer Magento Online retail Store Development Magento Customization Magento Template Design and Integration Magento based Themes creation and Integration Custom Model Development in Magento PSD to Magento conversions Magento Developer/Team for Hiring Value added Services Site management & maintenance SEO Implementation Site Optimization and reporting Google Analytics Hosting Solutions Social Media Integration Magento Development Services Magento Installation & Configuration Magento Integration Magento Customization Magento Online Store Development Magento Shopping cart Development Magento SEO Implementation Magento Module Development Magento Theme Development Magento Template Designing Magento Plug-in Development Magento Extensions Development Magento Store Migration Magento Website Maintenance Magento Consulting Magento Tutoring Technical assistance for integrating Magento Templates Debugging existing Magento Extensions, plugins & modules Enhancement of existing Magento online shops Magento Upgrading Services Get in touch with us and know more about our Magento open source development services.
    [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]
  • 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]
  • When and Why Your Code Starts to Smell Bad (And Whether the Smells Go Away)
    This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSE.2017.2653105, IEEE Transactions on Software Engineering When and Why Your Code Starts to Smell Bad (and Whether the Smells Go Away) Michele Tufano1, Fabio Palomba2, Gabriele Bavota3 Rocco Oliveto4, Massimiliano Di Penta5, Andrea De Lucia2, Denys Poshyvanyk1 1The College of William and Mary, Williamsburg, VA, USA 2University of Salerno, Fisciano (SA), Italy, 3Universita` della Svizzera italiana (USI), Switzerland, 4University of Molise, Pesche (IS), Italy, 5University of Sannio, Benevento (BN), Italy [email protected], [email protected], [email protected] [email protected], [email protected], [email protected], [email protected] Abstract—Technical debt is a metaphor introduced by Cunningham to indicate “not quite right code which we postpone making it right”. One noticeable symptom of technical debt is represented by code smells, defined as symptoms of poor design and implementation choices. Previous studies showed the negative impact of code smells on the comprehensibility and maintainability of code. While the repercussions of smells on code quality have been empirically assessed, there is still only anecdotal evidence on when and why bad smells are introduced, what is their survivability, and how they are removed by developers. To empirically corroborate such anecdotal evidence, we conducted a large empirical study over the change history of 200 open source projects. This study required the development of a strategy to identify smell-introducing commits, the mining of over half a million of commits, and the manual analysis and classification of over 10K of them.
    [Show full text]
  • The-Art-Of-Readable-Code.Pdf
    The Art of Readable Code Dustin Boswell and Trevor Foucher Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo The Art of Readable Code by Dustin Boswell and Trevor Foucher Copyright © 2012 Dustin Boswell and Trevor Foucher. 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 promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Mary Treseler Indexer: Potomac Indexing, LLC Production Editor: Teresa Elsey Cover Designer: Susan Thompson Copyeditor: Nancy Wolfe Kotary Interior Designer: David Futato Proofreader: Teresa Elsey Illustrators: Dave Allred and Robert Romano November 2011: First Edition. Revision History for the First Edition: 2011-11-01 First release See http://oreilly.com/catalog/errata.csp?isbn=9780596802295 for release details. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Art of Readable Code, the image of sheet music, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
    [Show full text]
  • The Great Methodologies Debate: Part 2
    ACCESS TO THE EXPERTS The Journal of Information Technology Management January 2002 Vol. 15, No. 1 The Great Methodologies Debate: Part 2 Resolved “Today, a new debate rages: agile software Traditional methodologists development versus rigorous software are a bunch of process- development.” dependent stick-in-the-muds who’d rather produce flawless Jim Highsmith, Guest Editor documentation than a working system that meets business needs. Opening Statement Rebuttal Jim Highsmith 2 Lightweight, er, “agile” methodologists are a bunch of glorified hackers who are going to be in for a heck of a surprise Agile Software Development Joins the when they try to scale up their “Would-Be” Crowd “toys” into enterprise-level Alistair Cockburn 6 software. The Bogus War Stephen J. Mellor 13 A Resounding “Yes” to Agile Processes — But Also to More Ivar Jacobson 18 Agile or Rigorous OO Methodologies: Getting the Best of Both Worlds Brian Henderson-Sellers 25 Big and Agile? Matt Simons 34 Opening Statement by Jim Highsmith Who wants to fly a wet beer mat? rigorous (or whatever label one expect significant variations in the What is the opposite of a Bengal chooses) methodologies a others. High-level CMM organiza- tiger? For answers to these and chaordic perspective, collab- tions tout their ability to achieve other intriguing questions, read on! orative values and principles, and their planned goals most of the barely sufficient methodology. A time (99.5% was reported in one As Ive read through the articles chaordic perspective arises from article on a new Level 5 organiza- for the two methodology debate the recognition and acceptance of tion [1]).
    [Show full text]
  • Introduction to Software Development
    Warwick Research Software Engineering Introduction to Software Development H. Ratcliffe and C.S. Brady Senior Research Software Engineers \The Angry Penguin", used under creative commons licence from Swantje Hess and Jannis Pohlmann. December 10, 2017 Contents Preface i 0.1 About these Notes.............................i 0.2 Disclaimer..................................i 0.3 Example Programs............................. ii 0.4 Code Snippets................................ ii 0.5 Glossaries and Links............................ iii 1 Introduction to Software Development1 1.1 Basic Software Design...........................1 1.2 Aside - Programming Paradigms......................8 1.3 How to Create a Program From a Blank Editor.............9 1.4 Patterns and Red Flags........................... 11 1.5 Practical Design............................... 13 1.6 Documentation Strategies......................... 14 1.7 Getting Data in and out of your Code.................. 19 1.8 Sharing Code................................ 23 Glossary - Software Development........................ 24 2 Principles of Testing and Debugging 27 2.1 What is a bug?............................... 27 2.2 Bug Catalogue............................... 27 2.3 Non Bugs or \Why doesn't it just..."................... 36 2.4 Aside - History of the Bug and Debugging................ 37 2.5 Your Compiler (or Interpreter) Wants to Help You........... 38 2.6 Basic Debugging.............................. 39 2.7 Assertions and Preconditions........................ 41 2.8 Testing Principles.............................
    [Show full text]
  • Kahai Using Electronic Commerce Software in an Electronic Commerce Course 1 DECISION SCIENCES INSTITUTE Using Electronic Commerc
    Kahai Using Electronic Commerce Software in an Electronic Commerce Course DECISION SCIENCES INSTITUTE Using Electronic Commerce Software in an Electronic Commerce Course ABSTRACT In this paper, I describe the process of using Electronic Commerce software in the namesake course. I outline three options, point out the pros and cons of each option, then make a recommendation about the best option. KEYWORDS: Electronic Commerce, E-Commerce, Software INTRODUCTION In teaching an Electronic Commerce (E-Commerce) class as part of an Information Systems curriculum, it has become important to provide hands-on experience to E-Commerce software. At one time, having students use such software would have been nearly impossible as it was prohibitively expensive to purchase for in-class use and/or required extensive programming experience to design. In the past few years, though, many open-source and free versions of E- Commerce software that can be run on nearly every computer have become available. Examples include OpenCart, WP eCommerce, and WooCommerce among others. Some, like the latter two, have to be installed on an existing Content Management System (CMS) package like WordPress. OpenCart, on the other hand, is designed to be a standalone installation and, therefore, doesn’t require users to learn two different systems. As an academician-turned-entrepreneur, I have helped small- to mid-sized firms deploy E- Commerce software using the aforementioned and other E-Commerce packages. Increasingly, now, vendors such as GoDaddy, Shopify, eBay, and several others provide pre-configured E- Commerce packages that require few technical skills to get a fully-configured online store up and running.
    [Show full text]
  • Writing Secure Code Code
    spine = 1.82” ”During the past two Proven techniques from the security experts to decades, computers have revolutionized the way we live. help keep hackers at bay—now updated with BEST PRACTICES They are now part of every lessons from the Microsoft security pushes BEST PRACTICES critical infrastructure, from Hackers cost countless dollars and cause endless worry every year as they attack secure software telecommunications to banking DEVELOPMENT SERIES to transportation, and they networked applications, steal credit-card numbers, deface Web sites, and slow network SECURE CODE WRITING contain vast amounts of sensitive traffi c to a crawl. Learn techniques that can help keep the bad guys at bay with this SECURE CODE WRITING data, such as personal health and entertaining, eye-opening book—now updated with the latest security threats plus WRITING fi nancial records. Building secure lessons learned from the recent security pushes at Microsoft. You’ll see how to padlock software is now more critical than your applications throughout development—from designing secure applications ever to protecting our future, and to writing robust code that can withstand repeated attacks to testing applications every software developer must for security fl aws. Easily digested chapters explain security principles, strategies, learn how to integrate security and coding techniques that can help make your code more resistant to attack. The into all their projects. Writing authors—two battle-scarred veterans who have solved some of the industry’s toughest SECURE Secure Code, which is required security problems—provide sample code to demonstrate specifi c development Second Edition reading at Microsoft and which techniques.
    [Show full text]