SlideShare a Scribd company logo
1 of 27
THE PRAGMATIC
PROGRAMMER
CHAPTER 3
THE BASIC TOOLS
HEADLINES
The Power Of Plain Text
Shell Games
Power Editing
Source Code Control
Debugging
Text Manipulation
Code Generators
PLAIN TEXT
As programmers our base material = KNOWLEDGE
We gather requirements as knowledge and then express in our
designs.
We believe the best format for storing it is PLAIN TEXT
HUMAN-READABLE AND SELF-DESCRIBING !!
Fieldl9=467abe DrawingType=UMLActivityDrawing
myprop.uses_menus=FALSE Contrast this with 0010010101110101
DRAWBACKS
2 major drawbacks to using plain text:
1.It may take more space to store than a compressed binary format.
2.It may be more expensive to interpret and process a plain text file.
SOLUTION IS
METADATA !
THE POWER OF
PLAIN TEXT
Insurance Against Obsolescence
As long as the data survives, you will have a chance to be able to use it.
<FIELD10>123-45-6789</FIELD10> AC27123456789B11P
<FIELD10>567-89-0123</FIELD10> XY43567890123QTYL
<FIELD10>901-23-4567</FIELD10> 6T2190123456788AM
Leverage
Virtually every tool in the computing universe can operate on plain
text.
Easier Testing
It is a simple matter to add, update, or modify the test data without
having to create any special tools.
THE UNIX
PHILOSOPHY
The philosophy is enabled by using a common underlying format-line
oriented, plain text file.
Databases used for system administration
-users
-passwords
-network config, all kept in a plain text files.
SUMMARY
YOU NEED TO ENSURE THAT ALL PARTIES CAN COMMUNICATE USING A COMMON STANDART.
PLAIN TEXT IS THAT STANDART.
SHELL GAMES For a programmer manipulating files of text, workbench is
the command shell.
You can launch applications, debuggers, browsers, editors, and
utilities. You can search for files, query the status of the system.
If you do all your work using GUIs, you are missing out on the full
capabilities of your environment.
A benefit of GUIs is WYSIWYG—WHAT YOU SEE IS
WHAT YOU GET.
The disadvantage is WYSIAYG—WHAT YOU SEE IS ALL
YOU GET.
SHELL VS GUI
POWER
EDITING
One Editor
We think it is better to know one editor very well, and use it for all
editing tasks: code, documentation, system administration, and so
on…
If you use a single editor (or set of key bindings) across all text editing
activities, you don't have to stop and think to accomplish text
manipulation
Editor Feautures
CONFIGURABLE
EXTENSIABLE
PROGRAMMABLE
Also have:
Syntax highlighting
Auto-completion
Auto-indentation
Initial code or document boilerplate
Tie-in to help systems
IDE-like features (compile, debug, and so on)
SOURCE CODE
CONTROL
One of the important things we look for in a
user interface is the key—a single button
that forgives us our mistakes !!!!!
Source code control systems, or the more widely
scoped configuration management
systems, keep track of every change you make
in your source code and documentation.
Who made changes in this line of code?
What's the difference between the current version
and last week's?
How many lines of code did we change in this release?
DEBUGGING
In 1873 Edison first confronted what he later called a bug when he
began developing a quadruplex telegraph system.
On September 9, 1945, a Harvard technical team looked at Panel F
and found something unusual between points in Relay 70.It was a
moth, which they promptly removed and taped in the log book.
DON’T PANIC
Don't waste a single neuron on the train of thought that
begins "but that can't happen" because quite clearly it
can, and has…
It is very important to step back a pace, and
actually think about what could be causing the
symptoms that you believe indicate a bug.
WHERE TO
START?
Before you start to look at the bug, make sure that you are
working on code that compiled cleanly—without warnings
When trying to solve any problem,
you need to gather all the relevant data.
DEBUGGING
STRATEGIES
Bug Reproducing
We want a bug that can be reproduced with a single command
Visualize your data
The simplest example of this is a straightforward "variable name =
data value" approach, which may be implemented as printed text.
The DDD debugger has some visualization capabilities, and is freely
available .It is interesting to note that DDD works with multiple
languages, including Ada, C, C++, Fortran, Java, Modula, Pascal,
Perl, and Python (clearly an orthogonal design).
DEBUGGING
STRATEGIES
Tracing
Debuggers generally focus on the state of the program now.
Sometimes you need more—you need to watch the state of a program
or a data structure over time.
Rubber Ducking
DEBUGGING
STRATEGIES
Process Of Elimination
It is possible that a bug exists in the OS, the compiler, or a third-party
product—but this should not be your first thought
It is generally more profitable to assume that the application code is
incorrectly calling into a library than to assume that the library itself is
broken
DEBUGGING
CHECKLIST
• • Is the problem being reported a direct result of
the underlying bug, or merely a symptom?
• • Is the bug really in the compiler? Is it in the OS?
Or is it in your code?
• • If you explained this problem in detail to a
coworker, what would you say?
• • If the suspect code passes its unit tests, are the
tests complete enough? What happens if you run
the unit test with this data?
• • Do the conditions that caused this bug exist
anywhere else in the system?
DEBUGGING
CHALLENGES
• • Debugging is challenge
enough...
TEXT
MANIPULATIO
N
Pragmatic Programmers manipulate text the same way woodworkers
shape wood. In previous sections we discussed some specific tools—
shells, editors, debugger.
We happen to prefer Perl for hacking out short scripts.
Kernighan and Pike built the same program in five different
languages.
The Perl version was the shortest (17 lines, compared with C's 150).
With Perl you can manipulate text, interact with programs, talk over
networks, drive Web pages, perform arbitrary precision arithmetic,
and write programs.
CODE
GENERATORS
We need to achieve the same functionality, but in different
contexts. We need to repeat information in different places.
A programmer can build a code generator. Once built, it can
be used throughout the life of the project at virtually no cost.
WRITE CODE
THAT WRITE
CODES
1. Passive code generators
Run once to produce a result. From that point forward, the
result becomes freestanding—it is divorced from the code
generator.
2. Active code generators
The result is a throw-away—it can always be reproduced by
the code generator.
ANY
QUESTIONS?
THANKS FOR
LISTENING…
Leylim Yalçın

More Related Content

What's hot

Functional testing vs non functional testing | Difference Between Functional ...
Functional testing vs non functional testing | Difference Between Functional ...Functional testing vs non functional testing | Difference Between Functional ...
Functional testing vs non functional testing | Difference Between Functional ...Intellipaat
 
What is Agile Methodology?
What is Agile Methodology?What is Agile Methodology?
What is Agile Methodology?QA InfoTech
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLangNVISIA
 
Mini curso de testes ágeis
Mini curso de testes ágeisMini curso de testes ágeis
Mini curso de testes ágeisQualister
 
Refactoring and code smells
Refactoring and code smellsRefactoring and code smells
Refactoring and code smellsPaul Nguyen
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Golang Book - Go Programlama Dili Temelleri
Golang Book - Go Programlama Dili TemelleriGolang Book - Go Programlama Dili Temelleri
Golang Book - Go Programlama Dili TemelleriCihan Özhan
 
Modelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane Fidelix
Modelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane FidelixModelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane Fidelix
Modelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane FidelixCris Fidelix
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with XtextGlobalLogic Ukraine
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean ArchitectureDmytro Turskyi
 
Static Analysis with Sonarlint
Static Analysis with SonarlintStatic Analysis with Sonarlint
Static Analysis with SonarlintUT, San Antonio
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 
Aula 3 - Lógica de Programação
Aula 3 - Lógica de ProgramaçãoAula 3 - Lógica de Programação
Aula 3 - Lógica de ProgramaçãoInstituto CENTEC
 
Software development life cycle yazılım geliştirme yaşam döngüsü
Software development life cycle   yazılım geliştirme yaşam döngüsüSoftware development life cycle   yazılım geliştirme yaşam döngüsü
Software development life cycle yazılım geliştirme yaşam döngüsüMesut Günes
 

What's hot (20)

Go. Why it goes
Go. Why it goesGo. Why it goes
Go. Why it goes
 
Code smells and remedies
Code smells and remediesCode smells and remedies
Code smells and remedies
 
Functional testing vs non functional testing | Difference Between Functional ...
Functional testing vs non functional testing | Difference Between Functional ...Functional testing vs non functional testing | Difference Between Functional ...
Functional testing vs non functional testing | Difference Between Functional ...
 
What is Agile Methodology?
What is Agile Methodology?What is Agile Methodology?
What is Agile Methodology?
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
 
Mini curso de testes ágeis
Mini curso de testes ágeisMini curso de testes ágeis
Mini curso de testes ágeis
 
Refactoring and code smells
Refactoring and code smellsRefactoring and code smells
Refactoring and code smells
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Serenity-BDD training
Serenity-BDD trainingSerenity-BDD training
Serenity-BDD training
 
Golang Book - Go Programlama Dili Temelleri
Golang Book - Go Programlama Dili TemelleriGolang Book - Go Programlama Dili Temelleri
Golang Book - Go Programlama Dili Temelleri
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
Modelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane Fidelix
Modelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane FidelixModelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane Fidelix
Modelos de Processo e Desenvolvimento de Software 3 - Prof.ª Cristiane Fidelix
 
Building Your Own DSL with Xtext
Building Your Own DSL with XtextBuilding Your Own DSL with Xtext
Building Your Own DSL with Xtext
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean Architecture
 
Static Analysis with Sonarlint
Static Analysis with SonarlintStatic Analysis with Sonarlint
Static Analysis with Sonarlint
 
Modul v
Modul vModul v
Modul v
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Aula 3 - Lógica de Programação
Aula 3 - Lógica de ProgramaçãoAula 3 - Lógica de Programação
Aula 3 - Lógica de Programação
 
Software development life cycle yazılım geliştirme yaşam döngüsü
Software development life cycle   yazılım geliştirme yaşam döngüsüSoftware development life cycle   yazılım geliştirme yaşam döngüsü
Software development life cycle yazılım geliştirme yaşam döngüsü
 

Similar to The pragmatic programmer

Structured Software Design
Structured Software DesignStructured Software Design
Structured Software DesignGiorgio Zoppi
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5Alok Jain
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).pptjerlinS1
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...jeyasrig
 
Lesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptxLesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptxNeil Mutia
 
Building of systems of automatic C/C++ code logging
Building of systems of automatic C/C++ code loggingBuilding of systems of automatic C/C++ code logging
Building of systems of automatic C/C++ code loggingPVS-Studio
 
Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deploymentFilippo Zanella
 
Linux Assignment 3
Linux Assignment 3Linux Assignment 3
Linux Assignment 3Diane Allen
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...Sławomir Zborowski
 
1.7 selection and use of appropriate software
1.7 selection and use of appropriate software1.7 selection and use of appropriate software
1.7 selection and use of appropriate softwaremrmwood
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software DevelopmentJignesh Patel
 
Secret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software SystemsSecret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software SystemsBart Jonkers
 

Similar to The pragmatic programmer (20)

PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
 
Structured Software Design
Structured Software DesignStructured Software Design
Structured Software Design
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
Ss debuggers
Ss debuggersSs debuggers
Ss debuggers
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).ppt
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...
 
Quick Intro to Clean Coding
Quick Intro to Clean CodingQuick Intro to Clean Coding
Quick Intro to Clean Coding
 
Beekman5 std ppt_13
Beekman5 std ppt_13Beekman5 std ppt_13
Beekman5 std ppt_13
 
Debbuging
DebbugingDebbuging
Debbuging
 
Lesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptxLesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptx
 
Building of systems of automatic C/C++ code logging
Building of systems of automatic C/C++ code loggingBuilding of systems of automatic C/C++ code logging
Building of systems of automatic C/C++ code logging
 
Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deployment
 
Linux Assignment 3
Linux Assignment 3Linux Assignment 3
Linux Assignment 3
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
 
1.7 selection and use of appropriate software
1.7 selection and use of appropriate software1.7 selection and use of appropriate software
1.7 selection and use of appropriate software
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Debugging in .Net
Debugging in .NetDebugging in .Net
Debugging in .Net
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
 
Secret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software SystemsSecret Twists to Efficiently Develop Reactive Software Systems
Secret Twists to Efficiently Develop Reactive Software Systems
 
THE BASIC TOOLS
THE BASIC TOOLSTHE BASIC TOOLS
THE BASIC TOOLS
 

Recently uploaded

Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfsumitt6_25730773
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementDr. Deepak Mudgal
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...jabtakhaidam7
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptAfnanAhmad53
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 

Recently uploaded (20)

Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 

The pragmatic programmer

  • 2. HEADLINES The Power Of Plain Text Shell Games Power Editing Source Code Control Debugging Text Manipulation Code Generators
  • 3. PLAIN TEXT As programmers our base material = KNOWLEDGE We gather requirements as knowledge and then express in our designs. We believe the best format for storing it is PLAIN TEXT HUMAN-READABLE AND SELF-DESCRIBING !! Fieldl9=467abe DrawingType=UMLActivityDrawing myprop.uses_menus=FALSE Contrast this with 0010010101110101
  • 4. DRAWBACKS 2 major drawbacks to using plain text: 1.It may take more space to store than a compressed binary format. 2.It may be more expensive to interpret and process a plain text file.
  • 6. THE POWER OF PLAIN TEXT Insurance Against Obsolescence As long as the data survives, you will have a chance to be able to use it. <FIELD10>123-45-6789</FIELD10> AC27123456789B11P <FIELD10>567-89-0123</FIELD10> XY43567890123QTYL <FIELD10>901-23-4567</FIELD10> 6T2190123456788AM Leverage Virtually every tool in the computing universe can operate on plain text. Easier Testing It is a simple matter to add, update, or modify the test data without having to create any special tools.
  • 7. THE UNIX PHILOSOPHY The philosophy is enabled by using a common underlying format-line oriented, plain text file. Databases used for system administration -users -passwords -network config, all kept in a plain text files.
  • 8. SUMMARY YOU NEED TO ENSURE THAT ALL PARTIES CAN COMMUNICATE USING A COMMON STANDART. PLAIN TEXT IS THAT STANDART.
  • 9. SHELL GAMES For a programmer manipulating files of text, workbench is the command shell. You can launch applications, debuggers, browsers, editors, and utilities. You can search for files, query the status of the system. If you do all your work using GUIs, you are missing out on the full capabilities of your environment. A benefit of GUIs is WYSIWYG—WHAT YOU SEE IS WHAT YOU GET. The disadvantage is WYSIAYG—WHAT YOU SEE IS ALL YOU GET.
  • 11. POWER EDITING One Editor We think it is better to know one editor very well, and use it for all editing tasks: code, documentation, system administration, and so on… If you use a single editor (or set of key bindings) across all text editing activities, you don't have to stop and think to accomplish text manipulation
  • 12. Editor Feautures CONFIGURABLE EXTENSIABLE PROGRAMMABLE Also have: Syntax highlighting Auto-completion Auto-indentation Initial code or document boilerplate Tie-in to help systems IDE-like features (compile, debug, and so on)
  • 13.
  • 14. SOURCE CODE CONTROL One of the important things we look for in a user interface is the key—a single button that forgives us our mistakes !!!!! Source code control systems, or the more widely scoped configuration management systems, keep track of every change you make in your source code and documentation. Who made changes in this line of code? What's the difference between the current version and last week's? How many lines of code did we change in this release?
  • 15. DEBUGGING In 1873 Edison first confronted what he later called a bug when he began developing a quadruplex telegraph system. On September 9, 1945, a Harvard technical team looked at Panel F and found something unusual between points in Relay 70.It was a moth, which they promptly removed and taped in the log book.
  • 16. DON’T PANIC Don't waste a single neuron on the train of thought that begins "but that can't happen" because quite clearly it can, and has… It is very important to step back a pace, and actually think about what could be causing the symptoms that you believe indicate a bug.
  • 17. WHERE TO START? Before you start to look at the bug, make sure that you are working on code that compiled cleanly—without warnings When trying to solve any problem, you need to gather all the relevant data.
  • 18. DEBUGGING STRATEGIES Bug Reproducing We want a bug that can be reproduced with a single command Visualize your data The simplest example of this is a straightforward "variable name = data value" approach, which may be implemented as printed text. The DDD debugger has some visualization capabilities, and is freely available .It is interesting to note that DDD works with multiple languages, including Ada, C, C++, Fortran, Java, Modula, Pascal, Perl, and Python (clearly an orthogonal design).
  • 19. DEBUGGING STRATEGIES Tracing Debuggers generally focus on the state of the program now. Sometimes you need more—you need to watch the state of a program or a data structure over time. Rubber Ducking
  • 20. DEBUGGING STRATEGIES Process Of Elimination It is possible that a bug exists in the OS, the compiler, or a third-party product—but this should not be your first thought It is generally more profitable to assume that the application code is incorrectly calling into a library than to assume that the library itself is broken
  • 21. DEBUGGING CHECKLIST • • Is the problem being reported a direct result of the underlying bug, or merely a symptom? • • Is the bug really in the compiler? Is it in the OS? Or is it in your code? • • If you explained this problem in detail to a coworker, what would you say? • • If the suspect code passes its unit tests, are the tests complete enough? What happens if you run the unit test with this data? • • Do the conditions that caused this bug exist anywhere else in the system?
  • 22. DEBUGGING CHALLENGES • • Debugging is challenge enough...
  • 23. TEXT MANIPULATIO N Pragmatic Programmers manipulate text the same way woodworkers shape wood. In previous sections we discussed some specific tools— shells, editors, debugger. We happen to prefer Perl for hacking out short scripts. Kernighan and Pike built the same program in five different languages. The Perl version was the shortest (17 lines, compared with C's 150). With Perl you can manipulate text, interact with programs, talk over networks, drive Web pages, perform arbitrary precision arithmetic, and write programs.
  • 24. CODE GENERATORS We need to achieve the same functionality, but in different contexts. We need to repeat information in different places. A programmer can build a code generator. Once built, it can be used throughout the life of the project at virtually no cost.
  • 25. WRITE CODE THAT WRITE CODES 1. Passive code generators Run once to produce a result. From that point forward, the result becomes freestanding—it is divorced from the code generator. 2. Active code generators The result is a throw-away—it can always be reproduced by the code generator.