SlideShare a Scribd company logo
1 of 21
Common practices
and tools
vicente.bolea@gmail.com
Motivation
So far we have covered tools and practices which helps you in
your project in a high level.
However, normally projects integrate tools and practices
when it comes to coding which becomes a integral part of the
project itself.
Scope
1. GNU autotools
2. Design patterns
3. Strategy pattern
Autotools vs. Make
➢ Make let you instruct your compiler how to build your
project for your platform. All the variable are hardcoded.
➢ Autotools does the same thing as Make, however, it also
let you: Forget about dependencies, library building,
different platforms, check for compatibility, build the
actual release package (*.tar.gz) and much more.
Autotools drawbacks
➢ It check compatibility for a useless amount of old
platforms.
➢ It’s bloated.
➢ It’s slow.
➢ It’s hard to learn and you will not expect newbies to
master this tool.
But Autotools is:
➢ Ubiquitous within Linux.
➢ No competitors.
➢ Standard.
➢ Does not require the user to install autotools.
➢ Believe or not, it makes the life easier to the users.
This is how I see
Autotools...
Autotools: user tutorial
Fairly simple:
$ sh autogen.sh
$ sh ./configure --help # Check if there is any relevant opt
$ sh ./configure --prefix /usr/local # for the most cases
# if you are missing a dependency install it by apt, yum ...
$ make [-j #proc] install
Autotools: Developer
tutorial
You need the two files to configure autotools:
- Configure.ac # General options and checkings
- Makefile.am # Options for the generation of
the Makefile
Autotools: Developer
tutorial
Often you will like to automatize all those calls
shown in the figure.
Thus, the convention is to write a file called
autogen.sh.
That file will call all those commands for you so that
you can forget about that complex graph of calls.
Autotools: Developer
tutorial
One more convention is to call sh autogen.sh at the
source code directory while calling the rest of the
command in a separated directory.
That separated directory is often refer as build
folder and contains temporary files which can be
safely removed.
The source code directory remains intact. (Good for
git)
Design patterns: Motivation
➢ Create a vocabulary among your peers to communicate
faster and more accurately.
➢ Being able to generate a extensible and good class design
for your project.
➢ Gives you a tested solution of your problem.
➢ Easy for other peers to read your code.
I can’t cover all of
the design patterns.
Let’s just focus on
one...
Strategy pattern
Features:
➢ Abstracts a family of algorithms
➢ Encapsulate algorithms (Remove dependencies)
➢ Easy to add new algorithms
Strategy pattern: Diagram
Strategy pattern:
Implementation
The source code is too big for this slide, we can see it in the
following website.
Example
Strategy pattern: Review
As we have seen in the previous example, benefits of strategy
are clear:
➔ Strategy class only has no dependency.
➔ TestBed only depends on Strategy class.
➔ We can add more Strategies without modifying different
classes.
➔ Imagine if you more than 50 different strategies… !
Design pattern: Conclusion
In this mini-tutorial of strategy pattern we can see the
potential benefit of using them.
That is just one of the more than 20 basic design patterns, I
invite you to research and incorporate in your designs.
BONUS:
C++14
shoutout
So far we have used C++98 which is clumsy and
some of its features such as multithreading, lambda
functions and so on are half-cooked. Good new is
that we now have C++14 which allows us to:
● Use lambda functions.
● Multithreading API.
● Auto keyword.
● Move operator.
BONUS: C++14 shoutout
To start using C++14 make sure that your GCC compiler’s version is
higher than 4.9 and compile with the flag -std=c++11.
Also as for your assignments as your TA’s whether is acceptable to use
C++11, 14. Your code will not compile in an old compiler or if they
don’t specified the previously mentioned flags.
Q&A

More Related Content

What's hot

What's hot (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHP
 
Testing and symfony2
Testing and symfony2Testing and symfony2
Testing and symfony2
 
PHP Code Quality
PHP Code QualityPHP Code Quality
PHP Code Quality
 
2 Getting To Know Your Programing Environment
2 Getting To Know Your Programing Environment2 Getting To Know Your Programing Environment
2 Getting To Know Your Programing Environment
 
Lessons learned on software testing automation
Lessons learned on software testing automationLessons learned on software testing automation
Lessons learned on software testing automation
 
【Edd workshop@140725】TDD introduction_Andy Huang
【Edd workshop@140725】TDD introduction_Andy Huang 【Edd workshop@140725】TDD introduction_Andy Huang
【Edd workshop@140725】TDD introduction_Andy Huang
 
Php[tek] 2016 - BDD with Behat for Beginners
Php[tek] 2016 - BDD with Behat for BeginnersPhp[tek] 2016 - BDD with Behat for Beginners
Php[tek] 2016 - BDD with Behat for Beginners
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
 
GDG Passo fundo - Apps with unit tests (Karma + jasmine + angular)
GDG Passo fundo - Apps with unit tests (Karma + jasmine + angular)GDG Passo fundo - Apps with unit tests (Karma + jasmine + angular)
GDG Passo fundo - Apps with unit tests (Karma + jasmine + angular)
 
Tdd presentation
Tdd presentationTdd presentation
Tdd presentation
 
Managing frontend libs in your php project
Managing frontend libs in your php projectManaging frontend libs in your php project
Managing frontend libs in your php project
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
 
Best practices in pair programming
Best practices in pair programmingBest practices in pair programming
Best practices in pair programming
 
Developing for Developers
Developing for DevelopersDeveloping for Developers
Developing for Developers
 
Testing In Django
Testing In DjangoTesting In Django
Testing In Django
 
Test Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEMTest Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEM
 
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
 
Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)
 
Tdd red-green-refactor
Tdd red-green-refactorTdd red-green-refactor
Tdd red-green-refactor
 

Similar to Autotools, Design Patterns and more

His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
Getachew Ganfur
 

Similar to Autotools, Design Patterns and more (20)

C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it security
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
 
Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010
 
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoTest Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.
 
ID E's features
ID E's featuresID E's features
ID E's features
 
Makefile
MakefileMakefile
Makefile
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
 
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdf
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
 
C++ language basic
C++ language basicC++ language basic
C++ language basic
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
 

More from Vicente Bolea (7)

Basic Git Tutorial
Basic Git TutorialBasic Git Tutorial
Basic Git Tutorial
 
BOOST ASIO overview
BOOST ASIO overviewBOOST ASIO overview
BOOST ASIO overview
 
Linux Developing Stack
Linux Developing StackLinux Developing Stack
Linux Developing Stack
 
Github developing stack
Github developing stackGithub developing stack
Github developing stack
 
Project management frameworks for software developing
Project management frameworks for software developingProject management frameworks for software developing
Project management frameworks for software developing
 
Debuging like a pro
Debuging like a proDebuging like a pro
Debuging like a pro
 
VeloxDFS
VeloxDFSVeloxDFS
VeloxDFS
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 

Autotools, Design Patterns and more

  • 2. Motivation So far we have covered tools and practices which helps you in your project in a high level. However, normally projects integrate tools and practices when it comes to coding which becomes a integral part of the project itself.
  • 3. Scope 1. GNU autotools 2. Design patterns 3. Strategy pattern
  • 4. Autotools vs. Make ➢ Make let you instruct your compiler how to build your project for your platform. All the variable are hardcoded. ➢ Autotools does the same thing as Make, however, it also let you: Forget about dependencies, library building, different platforms, check for compatibility, build the actual release package (*.tar.gz) and much more.
  • 5. Autotools drawbacks ➢ It check compatibility for a useless amount of old platforms. ➢ It’s bloated. ➢ It’s slow. ➢ It’s hard to learn and you will not expect newbies to master this tool.
  • 6. But Autotools is: ➢ Ubiquitous within Linux. ➢ No competitors. ➢ Standard. ➢ Does not require the user to install autotools. ➢ Believe or not, it makes the life easier to the users.
  • 7. This is how I see Autotools...
  • 8. Autotools: user tutorial Fairly simple: $ sh autogen.sh $ sh ./configure --help # Check if there is any relevant opt $ sh ./configure --prefix /usr/local # for the most cases # if you are missing a dependency install it by apt, yum ... $ make [-j #proc] install
  • 9. Autotools: Developer tutorial You need the two files to configure autotools: - Configure.ac # General options and checkings - Makefile.am # Options for the generation of the Makefile
  • 10. Autotools: Developer tutorial Often you will like to automatize all those calls shown in the figure. Thus, the convention is to write a file called autogen.sh. That file will call all those commands for you so that you can forget about that complex graph of calls.
  • 11. Autotools: Developer tutorial One more convention is to call sh autogen.sh at the source code directory while calling the rest of the command in a separated directory. That separated directory is often refer as build folder and contains temporary files which can be safely removed. The source code directory remains intact. (Good for git)
  • 12. Design patterns: Motivation ➢ Create a vocabulary among your peers to communicate faster and more accurately. ➢ Being able to generate a extensible and good class design for your project. ➢ Gives you a tested solution of your problem. ➢ Easy for other peers to read your code.
  • 13. I can’t cover all of the design patterns. Let’s just focus on one...
  • 14. Strategy pattern Features: ➢ Abstracts a family of algorithms ➢ Encapsulate algorithms (Remove dependencies) ➢ Easy to add new algorithms
  • 16. Strategy pattern: Implementation The source code is too big for this slide, we can see it in the following website. Example
  • 17. Strategy pattern: Review As we have seen in the previous example, benefits of strategy are clear: ➔ Strategy class only has no dependency. ➔ TestBed only depends on Strategy class. ➔ We can add more Strategies without modifying different classes. ➔ Imagine if you more than 50 different strategies… !
  • 18. Design pattern: Conclusion In this mini-tutorial of strategy pattern we can see the potential benefit of using them. That is just one of the more than 20 basic design patterns, I invite you to research and incorporate in your designs.
  • 19. BONUS: C++14 shoutout So far we have used C++98 which is clumsy and some of its features such as multithreading, lambda functions and so on are half-cooked. Good new is that we now have C++14 which allows us to: ● Use lambda functions. ● Multithreading API. ● Auto keyword. ● Move operator.
  • 20. BONUS: C++14 shoutout To start using C++14 make sure that your GCC compiler’s version is higher than 4.9 and compile with the flag -std=c++11. Also as for your assignments as your TA’s whether is acceptable to use C++11, 14. Your code will not compile in an old compiler or if they don’t specified the previously mentioned flags.
  • 21. Q&A