SlideShare a Scribd company logo
The Professional Programmer Dave Cross Magnum Solutions Ltd [email_address]
The Professional Programmer Looking beyond programming skills
What else do you need to be a successful programmer?
The Pragmatic Programmer The Pragmatic Programmer Andrew Hunt
David Thomas
What We Will Cover Unit testing
Source code control
Continuous integration
Coding Standards
Agile techniques
Unit Testing
Unit Testing Never program without a safety net
Does your code do what it is supposed to do?
Will your code continue to do what it is supposed to do?
Write unit tests
Run those tests all the time
What is Unit Testing? Code that exercises an individual element (unit) of your code
Provide known inputs
Look for expected outputs
“Bottom-up” testing
Typical Unit Tests Create an object
Call methods with known inputs
Look for expected outputs
Non-OO Unit Tests Possible to test non-OO code
Call functions rather than methods
Even call programs and examine their output Output files
Effect on databases
Etc
Unit Testing Advantages Confidence in the building blocks of your program
Modular code is easier to test
Well-tested code is good
Easy to test code is better
Unit Testing in Perl Perl has a culture of unit testing
All Perl modules ship with test suites
Lots of work in this area since 2001
Perl makes it easy to write test suites
Simple Test Program use Test::More tests => 4; BEGIN { use_ok('My::Object'); } ok(my $obj = My::Object->new); isa_ok($obj, 'My::Object'); $obj->set_foo('Foo'); is($obj->get_foo, 'Foo');
Simple Test Output $ prove -v test.t test.... 1..4 ok 1 - use My::Object; ok 2 ok 3 - The object isa My::Object ok 4 ok All tests successful. Files=1, Tests=4,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.05 cusr  0.00 csys =  0.07 CPU) Result: PASS
How Good Are Your Tests? How much of your code is exercised by your tests?
Devel::Cover can help you to find out
Deep internal magic
Draws pretty charts ./Build testcover
Devel::Cover Output
Devel::Cover Output
Devel::Cover Output
Other Advantages A test suite gives you confidence in your code
But it's also a  specification  of your code
Your code works if it passes the tests
Once the tests pass you can stop writing code
See Test-Driven Development later
Further Information Perl Testing – A Developer's Notebook Ian Langworth
chromatic
Source Code Control
Source Code Control Source code is a programmer's most valuable asset
If you lose your source code you are in trouble
Ensure your source code is always safe
Other Advantages Rewind to previous versions of code Encourages experimentation Mark particular versions as important Released versions Branching and merging
Brief History SCCS
RCS
CVS
Subversion
Git
Typical Workflow Network-available centralised repository of source code LAN or internet Developer checks out local copy of code
Makes changes Ensures unit tests still pass Uploads new versions
Locking Older systems locked code whilst a developer worked on it
Only one developer working on code at a time
No chance of conflicts
Development bottlenecks
Non-Locking “Optimistic concurrency”
Anyone can work on any file at any time
Conflicts detected at check-in
Most of the time people don't work on the same files Or, at least, on the same parts of the same file More effective use of time
Branching & Merging Multiple versions of code available simultaneously Released version
Development version
Experimental version Merge changes back into older branches
Merging easier with more modern systems
Distributed Version Control Network model allows many people to work on same codebase
Single master repository on the internet
Need internet access to check in
Distributed model has no master repository
Many equal peers
Check into local repository
Merge with peers when online

More Related Content

What's hot (20)

PDF
Test driven development_continuous_integration
haochenglee
 
PDF
Getting started with Test Driven Development
Ferdous Mahmud Shaon
 
PPT
Code Review
rantav
 
PDF
Test Driven Development
Mireia Sangalo
 
PDF
Code Review
Tu Hoang
 
PDF
Effective code reviews
Sebastian Marek
 
PDF
Illustrated Code (ASE 2021)
CISPA Helmholtz Center for Information Security
 
PPTX
Working Effectively With Legacy Code
Excella
 
PDF
TDD on android. Why and How? (Coding Serbia 2019)
Danny Preussler
 
PPTX
PHPUnit - Unit testing
Nguyễn Đào Thiên Thư
 
PPTX
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon
 
PPTX
Testing Superpowers: Using CLion to Add Tests Easily
Clare Macrae
 
PPTX
Quickly and Effectively Testing Legacy c++ Code with Approval Tests mu cpp
Clare Macrae
 
PPTX
TDD - Test Driven Development
Tung Nguyen Thanh
 
PPT
Test driven-development
David Paluy
 
PDF
Code Review: How and When
Paul Gower
 
PPTX
Test Driven Development on Android (Kotlin Kenya)
Danny Preussler
 
PDF
Peer Code Review: In a Nutshell
Atlassian
 
PPTX
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon
 
PDF
Do Bugs Reside in Complex Code?
CISPA Helmholtz Center for Information Security
 
Test driven development_continuous_integration
haochenglee
 
Getting started with Test Driven Development
Ferdous Mahmud Shaon
 
Code Review
rantav
 
Test Driven Development
Mireia Sangalo
 
Code Review
Tu Hoang
 
Effective code reviews
Sebastian Marek
 
Working Effectively With Legacy Code
Excella
 
TDD on android. Why and How? (Coding Serbia 2019)
Danny Preussler
 
PHPUnit - Unit testing
Nguyễn Đào Thiên Thư
 
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon
 
Testing Superpowers: Using CLion to Add Tests Easily
Clare Macrae
 
Quickly and Effectively Testing Legacy c++ Code with Approval Tests mu cpp
Clare Macrae
 
TDD - Test Driven Development
Tung Nguyen Thanh
 
Test driven-development
David Paluy
 
Code Review: How and When
Paul Gower
 
Test Driven Development on Android (Kotlin Kenya)
Danny Preussler
 
Peer Code Review: In a Nutshell
Atlassian
 
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon
 
Do Bugs Reside in Complex Code?
CISPA Helmholtz Center for Information Security
 

Similar to The Professional Programmer (20)

PDF
Working Effectively With Legacy Perl Code
erikmsp
 
PDF
Systems se
Franco Bressan
 
PPTX
Continuous Integration and development environment approach
Aleksandr Tsertkov
 
PDF
Old Is the New New
Kevlin Henney
 
PPTX
No Programmer Is an Island
Jimmy Sieben
 
PDF
97 thingseveryprogrammershouldknow
REHAN KHAN
 
PDF
Selective 97 things every programmer should know
Muhammad Ahsan
 
PPTX
Integreation
Sean Killeen
 
PDF
Python - code quality and production monitoring
David Melamed
 
DOCX
Unix commands
saywhatyousee
 
KEY
Better Perl Practices
Jay Shirley
 
PDF
Care and feeding notes
Perrin Harkins
 
PDF
Worse Is Better, for Better or for Worse
Kevlin Henney
 
PDF
From dev to ops and beyond - getting it done
Edorian
 
PDF
MiniTool Partition Wizard Crack Latest Version? | PPT
banooshabana70
 
PDF
CorelDraw X7 Crack Latest Version 2025 ?
kakol4174
 
PDF
AOMEI Backupper Crack Latest Version 2025
amaralhasv86
 
PDF
Download- Enscape Crack + Activvation key
aroojkhanssc
 
PDF
The Open-Closed Principle - Part 1 - The Original Version
Philip Schwarz
 
PDF
Continuous Integration In Php
Wilco Jansen
 
Working Effectively With Legacy Perl Code
erikmsp
 
Systems se
Franco Bressan
 
Continuous Integration and development environment approach
Aleksandr Tsertkov
 
Old Is the New New
Kevlin Henney
 
No Programmer Is an Island
Jimmy Sieben
 
97 thingseveryprogrammershouldknow
REHAN KHAN
 
Selective 97 things every programmer should know
Muhammad Ahsan
 
Integreation
Sean Killeen
 
Python - code quality and production monitoring
David Melamed
 
Unix commands
saywhatyousee
 
Better Perl Practices
Jay Shirley
 
Care and feeding notes
Perrin Harkins
 
Worse Is Better, for Better or for Worse
Kevlin Henney
 
From dev to ops and beyond - getting it done
Edorian
 
MiniTool Partition Wizard Crack Latest Version? | PPT
banooshabana70
 
CorelDraw X7 Crack Latest Version 2025 ?
kakol4174
 
AOMEI Backupper Crack Latest Version 2025
amaralhasv86
 
Download- Enscape Crack + Activvation key
aroojkhanssc
 
The Open-Closed Principle - Part 1 - The Original Version
Philip Schwarz
 
Continuous Integration In Php
Wilco Jansen
 
Ad

More from Dave Cross (20)

PDF
Measuring the Quality of Your Perl Code
Dave Cross
 
PDF
Apollo 11 at 50 - A Simple Twitter Bot
Dave Cross
 
PDF
Monoliths, Balls of Mud and Silver Bullets
Dave Cross
 
PPTX
The Professional Programmer
Dave Cross
 
PDF
I'm A Republic (Honest!)
Dave Cross
 
PDF
Web Site Tune-Up - Improve Your Googlejuice
Dave Cross
 
PDF
Modern Perl Web Development with Dancer
Dave Cross
 
PDF
Freeing Tower Bridge
Dave Cross
 
PDF
Modern Perl Catch-Up
Dave Cross
 
PDF
Error(s) Free Programming
Dave Cross
 
PDF
Medium Perl
Dave Cross
 
PDF
Modern Web Development with Perl
Dave Cross
 
PDF
Improving Dev Assistant
Dave Cross
 
PDF
Conference Driven Publishing
Dave Cross
 
PDF
Conference Driven Publishing
Dave Cross
 
PDF
TwittElection
Dave Cross
 
PDF
Perl in the Internet of Things
Dave Cross
 
PDF
Return to the Kingdom of the Blind
Dave Cross
 
PDF
Github, Travis-CI and Perl
Dave Cross
 
ODP
Object-Oriented Programming with Perl and Moose
Dave Cross
 
Measuring the Quality of Your Perl Code
Dave Cross
 
Apollo 11 at 50 - A Simple Twitter Bot
Dave Cross
 
Monoliths, Balls of Mud and Silver Bullets
Dave Cross
 
The Professional Programmer
Dave Cross
 
I'm A Republic (Honest!)
Dave Cross
 
Web Site Tune-Up - Improve Your Googlejuice
Dave Cross
 
Modern Perl Web Development with Dancer
Dave Cross
 
Freeing Tower Bridge
Dave Cross
 
Modern Perl Catch-Up
Dave Cross
 
Error(s) Free Programming
Dave Cross
 
Medium Perl
Dave Cross
 
Modern Web Development with Perl
Dave Cross
 
Improving Dev Assistant
Dave Cross
 
Conference Driven Publishing
Dave Cross
 
Conference Driven Publishing
Dave Cross
 
TwittElection
Dave Cross
 
Perl in the Internet of Things
Dave Cross
 
Return to the Kingdom of the Blind
Dave Cross
 
Github, Travis-CI and Perl
Dave Cross
 
Object-Oriented Programming with Perl and Moose
Dave Cross
 
Ad

Recently uploaded (20)

PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 

The Professional Programmer