How to Write 3v1L, Untestable Code

Slides:



Advertisements
Similar presentations
A practical guide John E. Boal TestDrivenDeveloper.com.
Advertisements

Refactoring to Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
E-commerce Project Erik Zeitler Erik Zeitler2 Lab 2  Will be anounced and scheduled later  We will deploy Java Server Pages on a Tomcat server.
Singleton Christopher Chiaverini Software Design & Documentation September 18, 2003.
Optimization and tooling FCNY July  AS3 is only a tool  Apparat and TDSI  Wireworld code remap example  Adding your Tools to a Build Process.
Performance Optimizing of Android Application Yu KANG 1.
!!! Global Variables!!! are EVIL SSimply because you just write a school boy/gal?
Abstract Factory Design Pattern making abstract things.
DEPENDENCY INJECTION & INVERSION OF CONTROL. WHAT’S GOING TO BE COVERED Quick intro to C# for Java developers Dependency Injection Inversion of Control.
Cerberus. Introduction Cerberus is test case generator tool. Used for automation of unit testing.
Variable Scope Storage Class Recursion
MONDAY TO FRIDAY 9AM TO 5 PM 123 WEST MAIN STREET NEW YORK, NY MONDAY TO FRIDAY 9AM TO 5 PM 123 WEST MAIN STREET NEW YORK, NY.
Best Practices. Contents Bad Practices Good Practices.
Computer Science 313 – Advanced Programming Topics.
Design Patterns Façade, Singleton, and Factory Methods Team Good Vibrations (1)
November Ron McFadyen1 Composite Pattern A composite is a group of objects in which some objects contain others; one object may represent groups,
Refactoring & Testability. Testing in OOP programming No life in flexible methodologies and for refactoring- infected developers without SOME kind of.
Java EE - Dependency Injection -
CS212: Object Oriented Analysis and Design Lecture 38: Design Pattern-II.
Threads and Singleton. Threads  The JVM allows multiple “threads of execution”  Essentially separate programs running concurrently in one memory space.
Programming Fundamentals. Topics to be covered Today Recursion Inline Functions Scope and Storage Class A simple class Constructor Destructor.
YG - CS Concept of Encapsulation What is encapsulation? - data and functions/methods are packaged together in the class normally.
Arc: Communications between Addins Dr Andy Evans.
Public, Static and Arrays CS61BL Summer Access Levels (HFJ pg 667) public – any code anywhere can access the public thing protected – same as default.
Factory Method. Intent/Purpose Factory Method is used to deal with a problem of creating objects without specifying the EXACT class of object that we.
CompSci 108 Midterm Review. Some exams are about challenging the way you think… But not this one.
Find us at Have you ever wanted to start your own website or blog?
Verifying Trigonometric Identities Dr. Shildneck Spring, 2015.
Start Crowdfunding website |Fundraising Script | Kickstarter clone script
Generator Design Patterns: Singleton and Prototype
Internet Marketing Considerations
Copyright © Jim Fawcett Spring 2017
Unit II-Chapter No. : 5- design Patterns
GoF Patterns (GoF) popo.
MPCS – Advanced java Programming
Week 2, Day 1: The Factory Method Pattern
How Does the Moon Move and Change?
BIT115: Introduction to Programming
Team 1: 32 responses Team 2: 55 responses Team 3: 29 responses
Business Should Adopt Agile Testing. Test Driven Development is an essential software development way that is made by an automated test program which.
How Dynamic Website Designs are Ruling the Digital World?
There, their and they’re,
PH page GoF Singleton p Emanuel Ekstrom.
(Test Driven) Software Development
Hw 5 Hints.
TEACHER NOTES below Materials per student: 1 sheet of copy paper, scissors, colored pencils Simple teacher notes: have students copy down and follow what.
Tuesday, 27 November 2018Tuesday, 27 November 2018
The Atoms Family.
DEV411 Testing Un-Testable Code with Visual Studio 2012 Fakes
What is Singleton Category: Creational pattern
Singleton Pattern Pattern Name: Singleton Pattern Context
Singleton design pattern
Lecture 7: Introduction to Processing
Tonga Institute of Higher Education
CS 350 – Software Design Singleton – Chapter 21
Tonga Institute of Higher Education
If there is only a runner on second and one out, does the runner have to go if the batter hits a ground ball to the short stop? 1.
14. Factory Pattern SE2811 Software Component Design
Java Coding 4 (part2) David Davenport Computer Eng. Dept.,
Welcome to PowerPoint for Mac

OOP Aga private institute for computer science 5th grade
DEV322 Visual Studio 2005 C# IDE Enhancements
European conference.
Do Now Heading: Back to the Basics
Team Work Editable Name Here Infographic Name Here Name Here
Маңғыстау облысы, Маңғыстау ауданы, Өтес селосы
TEACHER NOTES below Materials per student: 1 sheet of copy paper, scissors, colored pencils Simple teacher notes: have students copy down and follow what.
S. Single Responsibility Principle O. L. I. D.
Presentation transcript:

How to Write 3v1L, Untestable Code Google Testing Blog Tuesday, November 10, 2009 Valtech © 1

Debugging Sucks – Testing Rocks I can’t cover everything Hang this up for your team to review Valtech © 2

Debugging Sucks – Testing Rocks Make Your Own Dependencies Valtech © 3

Debugging Sucks – Testing Rocks Heavy Duty Constructors Valtech © 4

Debugging Sucks – Testing Rocks Depend on Concrete Classes Valtech © 5

Debugging Sucks – Testing Rocks Conditional Slalom Valtech © 6

Debugging Sucks – Testing Rocks Use Statics Use More Statics Valtech © 7

Debugging Sucks – Testing Rocks Use Global Flags Valtech © 8

Debugging Sucks – Testing Rocks Use Singletons Everywhere Valtech © 9

Debugging Sucks – Testing Rocks Be Defensive - They're out to Get Your Code! Valtech © 10

Debugging Sucks – Testing Rocks Use Primitives Wherever Possible Valtech © 11

Debugging Sucks – Testing Rocks Look for Everything You Need Valtech © 12

Debugging Sucks – Testing Rocks Use static initializes Valtech © 13

Debugging Sucks – Testing Rocks Couple functional code directly to the external systems it depends on Valtech © 14

Debugging Sucks – Testing Rocks Side Effects are the Way to Go Valtech © 15

Debugging Sucks – Testing Rocks Create Utility Classes and Functions/Methods Valtech © 16

Debugging Sucks – Testing Rocks Create Managers and Controllers Valtech © 17

Debugging Sucks – Testing Rocks Do Complicated Creation Work in Objects Valtech © 18

Debugging Sucks – Testing Rocks Utils, Utils, Utils! Valtech © 19

Debugging Sucks – Testing Rocks Use "Refactoring" whenever you need to get away with something Valtech © 20