How to become a pragmatic programmer By Rick Mason, BusinessGrade.com.

Slides:



Advertisements
Similar presentations
Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Advertisements

Platinum Sponsor LARGE SCALE REFACTORING Volodymyr Fedak.
Approaches to Systems Development
I Can Slack Off, My Code’s Compiling Comic and title care of XKCD.com.
A P RAGMATIC A PPROACH Brent Bradbury Joshua Bruning.
Becoming a Pragmatic Programmer Terry Cheng Nov 18, 2004.
1 Design by Contract Building Reliable Software. 2 Software Correctness Correctness is a relative notion  A program is correct with respect to its specification.
Software Engineering and Design Principles Chapter 1.
Improving Process for Better Software. Who We Are An experiential learning program that provides technology solutions for our partners, and real- world.
CBSD – Component Based Software Development - Introduction -
Dynamic Object-Oriented Programming with Smalltalk 1. Introduction Prof. O. Nierstrasz Summer Semester 2006.
Individuals and interactions
1 Introduction to Computers and Programming Quick Review What is a Function? A module of code that performs a specific job.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
High Level: Generic Test Process (from chapter 6 of your text and earlier lesson) Test Planning & Preparation Test Execution Goals met? Analysis & Follow-up.
CODING Research Data Management. Research Data Management Coding When writing software or analytical code it is important that others and your future.
Computer Science 340 Software Design & Testing Design By Contract.
Test Driven Development TDD. Testing ”Testing can never demonstrate the absence of errors in software, only their presence” Edsger W. Dijkstra (but it.
PRAGMATIC PARANOIA Steven Hadfield & Anthony Rice.
Pragmatic Projects Prepared by Doug Glidden. Pragmatic Projects Pragmatic Teams Ubiquitous Automation Ruthless Testing It’s All Writing Great Expectations.
1 Chapter 5 Practice: A Generic View Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Chapter 2 소프트웨어공학 Software Engineering 임현승 강원대학교
1 Welcome to CS 362 Applied Software Engineering What happens after (and during) design? Testing, debugging, maintaining programs Lessons for software.
SOFTWARE REUSE 28 March 2013 William W. McMillan.
Version 02U-1 Computer Security: Art and Science1 Penetration Testing by Brad Arkin Scott Stender and Gary McGraw.
Designing with Procedures 1. Designing a Program with Procedures If the code for your program is going to be less than one page, normally don’t bother;
CAD CAM CADMAT A2 Graphics. CADMAT We will look at … We will look at … CADMAT CADMAT –Computer aided design, manufacture and Testing PDM PDM –Project.
Chapter 7: High Quality Routines By Raj Ramsaroop.
(A radical interpretation) Tomo Lennox Bow Tie computer services Why Agile Works.
Agile Concepts - II “Agile” Estimating & Planning Nupul Kukreja 5 th November, 2014.
Balancing Agility and Discipline Chapter 4 Sharon Beall EECS 811 April 22, 2004.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
Refactoring1 Improving the structure of existing code.
Incremental Design Why incremental design? Goal of incremental design Tools for incremental design  UML diagrams  Design principles  Design patterns.
Software Engineering Jon Walker. What is Software Engineering? Why do we call it Software Engineering? Why not just call it programming or software development?
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
AGILE XP AND SCRUM © University of LiverpoolCOMP 319slide 1.
Chapter 5 Bend or Break. Life does not stand still We need to make every effort to write code that is as loose – as flexible – as possible Reversability:
SWE 4743 Abstract Data Types Richard Gesick. SWE Abstract Data Types Object-oriented design is based on the theory of abstract data types Domain.
Refactoring1 Improving the structure of existing code.
Refactoring Agile Development Project. Lecture roadmap Refactoring Some issues to address when coding.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
Agenda: Overview of Agile testing Difference between Agile and traditional Methodology Agile Development Methodologies Extreme Programming Test Driven.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
Interactions. The prey, the pack, and the hunt Your goal is to meet your customer’s needs That goal, and nothing else, is the prey Not throwaway prototypes.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Testing Frameworks John Paul Ashenfelter CTO/Transitionpoint.
Software Design and Development Development Methodoligies Computing Science.
Benjamin Unit Testing & Test-Driven Development for Mere Mortals.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Code Simplicity: Software Design In Open Source Projects Max Kanat-Alexander
Implementation Topics Describe –Characteristics of good implementations –Best practices to achieve them Understand role of comments Learn debugging techniques.
Mantas Radzevičius ifm-2/2
Unit Testing.
Reviewing Code A guide to smelling another developer’s source code.
Software Testing.
eXtremely Distributed Software Development
Unit Testing & Test-Driven Development for Mere Mortals
Unit Testing & Test-Driven Development for Mere Mortals
Improving the structure of existing code
Unit Testing & Test-Driven Development for Mere Mortals
What is Software Testing?
CSE 403, Winter 2003 Software Engineering
Refactoring.
Debugging Taken from notes by Dr. Neil Moore
Computer Science 340 Software Design & Testing
Welcome to Architect Insight 2010
Refactoring.
Chapter 9: Implementation
Presentation transcript:

How to become a pragmatic programmer By Rick Mason, BusinessGrade.com

The book

The Book and it’s lessons Set of principles Goal building better software While Improving productivity, accuracy and job satisfaction Write flexible, dynamic and adaptable code

Agile is a set of principles not tools But there are specific tools that help Source control Frameworks and ORM Testing and automation tools Communication tools Bug tracking and project management

The cat ate my source code Take responsibility for your code Don’t live with broken windows Put out fires

Stone soup and boiled frogs The story of stone soup Don’t take support for granted Lead by example

The D.R.Y. principle Don’t repeat yourself Write less code Have fewer problems

Reasons for duplication Imposed – It’s the environment Inadvertent – Developers didn’t realize Impatient – Lazy developers Inter-developer duplication

The orthogonality principle Geometry – Lines meet at right angles Agile - Write decoupled modules

Is your program like a house of cards?

Goal : Design components that are self contained Benefit: Small components easier to write Benefit: Code reuse

Reduced risk from self contained components Diseased code is isolated Code is less fragile

Tips for writing orthogonic code Write shy code – Don’t reveal anything unnecessary Avoid global data Avoid similar functions – one function called with parameter

Principle of Reversibility Change happens so plan for it What if the database changes? Or a 3 rd party library gets changed? Build a flexible architecture

Use tracer bullets What’s a tracer bullet? If the project has unknowns Client isn’t sure what he wants Build a quick less than fully functional concept

Use code generators Producing same code over and over again? Consider using a code generator For example CRUD model

Design by contract Architect by contract Preconditions: What must be true to call the routine? Post conditions – What state has the routine returned? Class invariants – What is true from perspective of caller Share your assumptions with the client

Use an information radiator Whiteboards Dashboards Wiki can function as a dashboard

Decoupling and the law of Demeter The example of the terrorist cell Build modules that limit interaction If your module depends on three others And they each depend upon three more Any of them can blow up your module

Rules for refactoring code Duplication – Violate DRY principle Non-orthogonal code – Reduce module dependence Outdated knowledge – Problem changes Performance

The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. - Seymour Cray, Cray Computer

Testing Use your contract to test your assertions using code CFUnit and CFCUnit Justifying the time? Write the test, then fix the bug

Rules for commenting code Why something is done, it’s purpose and goal Author and date Use descriptive variables SalesOrderDelete not SOD

Questions? Rick Mason –