Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Coding.

Slides:



Advertisements
Similar presentations
Clean code. Motivation Total cost = the cost of developing + maintenance cost Maintenance cost = cost of understanding + cost of changes + cost of testing.
Advertisements

You want me to do what??? Refactoring legacy applications aka : fixing someone else’s “bad” code Niel Zeeman Team Foundation Consulting
Alternate Software Development Methodologies
Refactoring Overview  What is refactoring?  What are four good reasons to refactor?  When should you refactor?  What is a bad smell (relative to refactoring.
Introduction to Refactoring Excerpted from ‘What is Refactoring?’ by William C. Wake and Refactoring: Improving the Design of Existing Code by Martin Fowler.
Xtreme Programming. Software Life Cycle The activities that take place between the time software program is first conceived and the time it is finally.
13-Jul-15 Refactoring II. Books Design Patterns is the classic book by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides Basically a catalog.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Continuous Integration for Databases Learn how to automate your build and test Steve Jones Red Gate Software Part II of the Continuous Delivery for Databases.
 Definitions  Background/History  Continuous Delivery › How to practice Continuous Delivery  Continuous Integration  Continuous Integration Tools.
By John Boal  Continuous Integration [CI] ◦ Automating the build process ◦ Build the entire system each time any new.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Test-Driven Development With Visual Studio 2005 Erno de Weerd Info Support.
Maintenance Refactoring and Code Smells. Where are we? Over the semester we have talked about Software Engineering. The overall goal of software engineering.
Refactoring Lecture 5 CIS 6101 Software Processes and Metrics.
Craig Berntson
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Project Management.
Advanced Programing practices
Refactoring Cristescu Marilena. Definitions Loose Usage: Reorganize a program(or something) As a noun: a change made to the internal structure of some.
Refactoring MSO 08/09, WP. What is refactoring ?  Refactoring is the act of transforming the internal structure of a program while preserving its observable.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 6 Introduction to Distributed Computing Concepts.
Software Refactoring Part I: Introduction Bartosz Walter Advanced Object-Oriented Design Lecture 5.
Sadegh Aliakbary Sharif University of Technology Spring 2012.
Source Code Control CSE 3902 Matt Boggus. Source code control options for CSE 3902 Must use source code control that is integrated with Visual Studio.
Version control Using Git Version control, using Git1.
1 SEG4912 University of Ottawa by Jason Kealey Software Engineering Capstone Project Tools and Technologies.
© ALEXANDRE CUVA  VERSION 2.00 Test Driven Design.
Software Engineering 1 Object-oriented Analysis and Design Chap 21 Test-Driven Development and Refactoring.
Version Control.
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture.
Refactoring1 Refactoring DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING CONCORDIA UNIVERSITY February 6, 2009.
Refactoring An Automated Tool for the Tiger Language Leslie A Hensley
TFS 2010 What’s new and interesting. Key Items Agile Planning Tools – Slides #3-#6 Improved parallel development - Slides #7-#8 Continuous Integration.
Sofia Bulgaria Summer School IST eXPERT: Best Practice on e-Project Development 30 June - 2 July 2003 eXtreme programming.
Refactoring1 Improving the structure of existing code.
Software Engineering. Introduction Objective To familiarize students to the fundamental concepts, techniques, processes, methods and tools of Software.
A Practical Guide To Unit Testing John E. Boal TestDrivenDeveloper.com.
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
Refactoring. Refactoring Overview  What is refactoring?  What are four good reasons to refactor?  When should you refactor?  What is a bad smell (relative.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
1 ECE 750 Topic 8 Meta-programming languages, systems, and applications Evolving Object-Oriented Designs with Refactorings – Lance Tokuda and Don Batory.
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Genesis.
Refactoring Mehdi Einali Advanced Programming in Java 1.
Refactoring Advanced Software Engineering Dr Nuha El-Khalili.
Refactoring1 Improving the structure of existing code.
Pertemuan 12 Refactoring Mata kuliah: T0144 – Advanced Topics in Software Engineering Tahun: 2010.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
Refactoring. DCS – SWC 2 Refactoring ”A change made to the internal structure of software to make it easier to understand and cheaper to modify without.
Continuous Improvement. Start Simple and Continually Improve E.g., Gmail Labels 1.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Windows App Studio Windows App Studio is the tool that makes it fast and easy to build Windows 10 apps. It’s accessible from any device with a browser.
Principles and examples
Module Road Map Refactoring Why Refactoring? Examples
A Very Common Series of Techniques
Advanced Programming in Java
Dilbert Scott Adams Manage It! Your Guide to Modern, Pragmatic Project Management. Johanna Rothman.
X in [Integration, Delivery, Deployment]
Overview of Eclipse Lectures
Improving the structure of existing code
Refactoring and Code Smells
Advanced Programming Behnam Hatami Fall 2017.
Refactoring Types Blake Duncan.
UNIT 5 EMBEDDED SYSTEM DEVELOPMENT
Refactoring.
UNIT 5 EMBEDDED SYSTEM DEVELOPMENT
Refactoring and Code Smells
Advanced Programing practices
Refactoring.
Refactoring and Code Smells
Presentation transcript:

Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Coding

Metrics & Kpi’s

Quantify your processes  Build information  Versioning information  Code analysis  Genesis information  Operational metadata

Benefits of quantification  (Implicit) measurement of development quality   leads to optimization  Individual developers  Group processes   control your development process  Establish SLA’s with third parties!

Visualize your metrics  Use simple and easily accesible representations  Genesis, Glance, charts

Use metrics wisely  As always... Just the numbers are not enough  Build kpi’s based on combined metrics  Keep the ‘common sense’

What  Data analysis architecture  Enables visualization of development process data  Cube explorer  KPI browser  Reporting engine

Benefits  Fast feedback  Metrics over time   measure evolution   enables optimization  Central repository  Combine project metadata and operational data   leads to very detailed view on development process

Architecture

Glance

Short & Long Term Benefits

 Short term  Optimize quality per project  Long term  Install a true software factory  Uniform processes, metrics, delivery  Overall : SAVE MONEY

Getting Started In Your Own Environment

Source Control  Centralized code repository  Easy accessible code through check-out / check-in  Subversion, CVS, Team Foundation or any other alternative

Tools  Testing Framework (Nunit)  Mocking Framework (Rhino Mocks)  IoC Container (Castle Windsor)  Build Server (Team City)  Genesis

Continuous Integration

 Triggered by changes in the code repository  Builds almost every check-in  Steps  Get latest code  Builds a new version  Runs tests  Runs genesis  Packages a new version  Generates reports

Project Dashboard: EMS

Project Dashboard: Reports

Refactoring

One step beyond…: Refactoring  Now that we have a good set of test and a good way to follow up on things, let’s go one step further: improve the quality of our code.

Refactoring  Let’s explain WHY we should refactor  Let’s explain WHAT refactoring is

Why refactor  A machine is NOT the only one that needs to understand your code… … your colleague and even yourself in a few months time should too!  That’s why YOU should write high quality code, that is readable, understandable and maintainable… …by using refactoring techniques…

Why refactor  Improves the design of software  Makes software easier to understand  Helps in finding bugs  Helps in programming faster

What is refactoring?  Martin Fowler:  “Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.”

What is refactoring?  Its heart is a series of small behavior preserving transformations. Each transformation (called a “refactoring”) does little, but a sequence of transformations can produce a significant restructuring.

What is refactoring?  Since each refactoring is small, it's less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring.

How to refactor  Find a code smell  Code that stinks  Bad code  Refactor it using refactoring methods Code smell Refactor

How to refactor  Refactoring is a continuous process  “Add function” OR “Refactor”. Change hats!! Add Function Refactor

Code smells  Parts of the code that “stink”  Parts of the code that need refactoring  Most important code smells  Duplicate code  Long methods  Large classes

The tight link with unit testing  How are unit tests involved in refactoring?  It’s easy: How can you change your code without knowing you break something???  Thus: refactoring is only possible when you have a good set of unit tests, ensuring you that you do not break anything while improving it.

Refactoring  The Holy Bible   Golden advice:  Buy the book and read it!  It will change your life as a developer!!

Duplicate code: problem  Some code is needed in more than 1 place  The easiest way, at first sight, is to copy-paste the code  This results in bad maintainability: if this code has to change, it has to be changed in multiple places  It’s likely to forget to change some parts so bugs are introduced easily

Duplicate code: solution  Same code in multiple methods in same class: Extract method  Same code in multiple methods in subclasses: Extract method in both classes and Pull up method  Same code in unrelated classes: Extract class and use this class in both methods

Long method: problem  Long methods are hard to understand  Long methods are hard to maintain  Long methods are susceptible to bugs

Long method: solution  Replace long method by calls to other “private” methods  Use Extract method to create delegation to smaller methods

Large class: problem  Classes that try to do too much  Each class must have its own responsibility

Large class: solution  Use Extract class  Use Extract subclass

Refactoring: practical  Visual Studio Solution: ItemSolutions.Refactoring

Questions  Any questions about the “Refactoring”?

Contact Item Solutions Plantin en Moretuslei Borgerhout   Speaker Kristof Rennen 