SlideShare a Scribd company logo
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 (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
John Blanco
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHP
Rogério Vicente
 
Testing and symfony2
Testing and symfony2Testing and symfony2
Testing and symfony2
The Software House
 
PHP Code Quality
PHP Code QualityPHP Code Quality
PHP Code Quality
Usman Zafar
 
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
guest9aa151
 
Lessons learned on software testing automation
Lessons learned on software testing automationLessons learned on software testing automation
Lessons learned on software testing automation
gaoliang641
 
【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
EZTABLE
 
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
Adam Englander
 
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
Giulio De Donato
 
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)
Matheus Marabesi
 
Tdd presentation
Tdd presentationTdd presentation
Tdd presentation
fernando_chimicoviaki
 
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
Massimiliano Arione
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
Anatoliy Okhotnikov
 
Best practices in pair programming
Best practices in pair programmingBest practices in pair programming
Best practices in pair programming
Lucas Aquiles
 
Developing for Developers
Developing for DevelopersDeveloping for Developers
Developing for Developers
Francois Zaninotto
 
Testing In Django
Testing In DjangoTesting In Django
Testing In Django
Daniel Greenfeld
 
Test Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEMTest Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEM
Sagar Sane
 
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
QADay
 
Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)
Michal Juhas
 
Tdd red-green-refactor
Tdd red-green-refactorTdd red-green-refactor
Tdd red-green-refactor
Francisco Iglesias Gómez
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
John Blanco
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHP
Rogério Vicente
 
PHP Code Quality
PHP Code QualityPHP Code Quality
PHP Code Quality
Usman Zafar
 
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
guest9aa151
 
Lessons learned on software testing automation
Lessons learned on software testing automationLessons learned on software testing automation
Lessons learned on software testing automation
gaoliang641
 
【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
EZTABLE
 
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
Adam Englander
 
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
Giulio De Donato
 
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)
Matheus Marabesi
 
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
Massimiliano Arione
 
Best practices in pair programming
Best practices in pair programmingBest practices in pair programming
Best practices in pair programming
Lucas Aquiles
 
Test Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEMTest Driven Development in CQ5/AEM
Test Driven Development in CQ5/AEM
Sagar Sane
 
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
РОМАН ЯКИМЧУК «Оптимізація QA процесів» Kyiv QADay 2021
QADay
 
Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)
Michal Juhas
 

Similar to Autotools, Design Patterns and more (20)

His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
Getachew Ganfur
 
C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
Franciny Salles
 
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
CESAR A. RUIZ C
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
rupeshchanchal
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
Rafael Camacho Dejay
 
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"
Sigma Software
 
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
guest5639fa9
 
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
Elad Elrom
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
Tech Bikram
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.
Richard Taylor
 
ID E's features
ID E's featuresID E's features
ID E's features
wajahat Gul
 
Makefile
MakefileMakefile
Makefile
Ionela
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
Robin O'Brien
 
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
Naoto Ono
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdf
RavinderKSingla
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
Anton Serdyuk
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
grades4u
 
C++ language basic
C++ language basicC++ language basic
C++ language basic
Waqar Younis
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
Emma Jane Hogbin Westby
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
Abid Malik
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
Getachew Ganfur
 
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
CESAR A. RUIZ C
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
rupeshchanchal
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
Rafael Camacho Dejay
 
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"
Sigma Software
 
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
guest5639fa9
 
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
Elad Elrom
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
Tech Bikram
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.
Richard Taylor
 
Makefile
MakefileMakefile
Makefile
Ionela
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
Robin O'Brien
 
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
Naoto Ono
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdf
RavinderKSingla
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
grades4u
 
C++ language basic
C++ language basicC++ language basic
C++ language basic
Waqar Younis
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
Abid Malik
 

More from Vicente Bolea (7)

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

Recently uploaded (20)

"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 

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