SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Test-Driven Development
with TypeScript+Jasmine
+AngularJS
1
#smartorgdev
Somik Raha Kai Wu
Github repo: https://github.com/behappyrightnow/anagram
Thilak Selvan
2
A Brief History of Software
Engineering
ENIAC, 1946-55
3
Programs were input with Punched Cards
Human labor was cheap. Computer time was expensive.
More value in getting program right the first time.
4
IBM 360 Mainframes
Time-sharing computers
Late 1960s
Waterfall is a result of human
confusion
5
“Managing the Development of Large Software Systems”, Dr.
Winston W. Royce (Link) - 1970
6
For some mysterious reason, people latched
on to Fig 2, and thought it looked like a
waterfall.
The name caught up and ushered in
“phased” mindset of development.
7
But Dr. Royce had a Fig. 3
8
And a Fig. 4! As far back as 1970, Royce
was describing the
beginnings of an agile
mindset, but the Waterfall
religion had already
started, based on a
misunderstanding!
Meanwhile, a community of philosophers in
software engineering started forming in the
90’s
9
Ward Cunningham
Founding of the WikiWikiWeb in 1994.
Ward’s wiki became the home for
conversations on Design Patterns.
10
1995, caused a revolution in

Object-Oriented thinking
Book knows as the
“Gang of Four”
The false religion of Waterfall was then seriously
challenged in 2000
11
12
Source: agileatlas.org
Barry Boehm’s Cost of Change Curve
We were initially justified in doing high-quality design when
computer time was more expensive than programmer time
13
Aspirational Cost of Change curve
But now, programmer time is much more expensive, and we
would love to flatten the curve
time
costofchange
This is what Extreme Programming
was inviting us to consider
The XP Practices
14
The “Planning Game” had
strong influences from Scrum
What’s the difference?
Test-Driven Development
versus
Unit Testing
15
XP’s success led to a broader umbrella under a
more neutral-sounding “Agile Software
Development”
16
Core practices like TDD and Refactoring are no longer
controversial - they are a part of a programmer’s foundation.
Martin Fowler’s book is now a classic.
Most conventional IDEs support automated
refactoring.
17
Erich Gamma
One of the Gang of Four, authored
JUnit with Kent Beck, while on a long flight together,
1997
Great Article by Alberto Savoia: Beautiful Tests
History of xUnit by Martin Fowler
“JUnit took off like a rocket - and was essential to supporting
the growing movement of Extreme Programming and Test
Driven Development. I've seen a huge change of attitude
towards testing in the last decade, and I think JUnit played a
big role in that. By being small and simple it encouraged
people to learn and use it. It also proved amenable to others
extending it integrating it into tools.” — Martin Fowler
Lots of JUnit ports, generally
referred to as xUnit
18
nUnit - C#
cppUnit - C++
pyunit- Python
Functional Programming/
Behavior-Driven Development
19
Jasmine: TDD with JS from Pivotal Labs
Lettuce: DSL for testing and beyond by Gabriel Falcao
Continuous Build Servers
20
21
Let’s experience some TDD now
22
23
Anagram Unjumbler
leppa
zizap
couisldei
Unjumble this
We will use TypeScript
24
Anders Hejlsberg
Creator of C# and
TypeScript
Superset of Javascript
Supports class-based OO concepts
Takes the tedium out of JS
Keeps you in JS paradigm
(as opposed to coffee script)
We will use Testem
25
Continuously runs our unit tests
Step 1. git clone https://github.com/behappyrightnow/anagram.git
Step 2. cd anagram
Step 3. git checkout step1
Step 4. Install NodeJS from http://nodejs.org/
Step 5. npm install testem
Let’s start with checking out a basic stub from
Github
26
Let’s start by writing tests
27
Come up with 5 English words, jumble them up
Find all other words you can create with those letters
List your tests.
e.g.
INPUT OUTPUT
leppa apple
rodo door, odor
Challenge for you
28
Make the following game using existing codebase to help
game show hosts construct a puzzle.
Given an input word, create clues by adding one extra letter.
INPUT OUTPUT
rose horse without “h”
sores without “s”
Game show host can now use this program to construct
their show saying:
Can you find flowers using this clue…
Your web-interface should provide this:
PASS 1: Write the code without any tests
PASS 2: Keep your code aside, write tests first and then write code
Reflection: Write an essay on what you learned by comparing Pass 1 and
Pass 2, and in general what you learned from this session
Crack this challenge in the following way:
29

Contenu connexe

Tendances

Releaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy processReleaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy processChristopher Cundill
 
Working with c++ legacy code
Working with c++ legacy codeWorking with c++ legacy code
Working with c++ legacy codeDror Helper
 
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDays Riga
 
ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
ATO 2014 - So You Think You Know 'Go'? The Go Programming LanguageATO 2014 - So You Think You Know 'Go'? The Go Programming Language
ATO 2014 - So You Think You Know 'Go'? The Go Programming LanguageJohn Potocny
 
Developer Job in Practice
Developer Job in PracticeDeveloper Job in Practice
Developer Job in Practiceintive
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsPaul Balogh
 
Develop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConfDevelop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConfAnnyce Davis
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...VincitOy
 
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone beforeJAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone beforejazoon13
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplateStanislav Petrov
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideTim Burks
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoPeter Bittner
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHPRogério Vicente
 

Tendances (20)

Releaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy processReleaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy process
 
Let's Contribute
Let's ContributeLet's Contribute
Let's Contribute
 
Working with c++ legacy code
Working with c++ legacy codeWorking with c++ legacy code
Working with c++ legacy code
 
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
 
ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
ATO 2014 - So You Think You Know 'Go'? The Go Programming LanguageATO 2014 - So You Think You Know 'Go'? The Go Programming Language
ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
 
Kshitij
KshitijKshitij
Kshitij
 
Developer Job in Practice
Developer Job in PracticeDeveloper Job in Practice
Developer Job in Practice
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeads
 
Develop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConfDevelop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConf
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
 
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone beforeJAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
 
Git essentials
Git essentialsGit essentials
Git essentials
 
Driving development in PHP
Driving development in PHPDriving development in PHP
Driving development in PHP
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
TDD with RSpec
TDD with RSpecTDD with RSpec
TDD with RSpec
 
C++ in our world
C++ in our worldC++ in our world
C++ in our world
 
CI/CD with OCP
CI/CD with OCPCI/CD with OCP
CI/CD with OCP
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon Otto
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHP
 

Similaire à Test-Driven Development with TypeScript+Jasmine+AngularJS

Community building lessons from Ansible
Community building lessons from AnsibleCommunity building lessons from Ansible
Community building lessons from AnsibleGreg DeKoenigsberg
 
Codemotion Berlin 2015 recap
Codemotion Berlin 2015   recapCodemotion Berlin 2015   recap
Codemotion Berlin 2015 recapTorben Dohrn
 
DSC UTeM DevOps Session#1: Intro to DevOps Presentation Slides
DSC UTeM DevOps Session#1: Intro to DevOps Presentation SlidesDSC UTeM DevOps Session#1: Intro to DevOps Presentation Slides
DSC UTeM DevOps Session#1: Intro to DevOps Presentation SlidesDSC UTeM
 
'Scikit-project': How open source is empowering open science – and vice versa
'Scikit-project': How open source is empowering open science – and vice versa'Scikit-project': How open source is empowering open science – and vice versa
'Scikit-project': How open source is empowering open science – and vice versaNathan Shammah
 
2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...
2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...
2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...Ambassador Labs
 
놀아요 Swift Playgrounds
놀아요 Swift Playgrounds놀아요 Swift Playgrounds
놀아요 Swift PlaygroundsWooKyoung Noh
 
Visualising conversation around #c4thepromise
Visualising conversation around #c4thepromiseVisualising conversation around #c4thepromise
Visualising conversation around #c4thepromiseSteve Winton
 
Hcplphx920
Hcplphx920Hcplphx920
Hcplphx920Thinkful
 
The Development History of PVS-Studio for Linux
The Development History of PVS-Studio for LinuxThe Development History of PVS-Studio for Linux
The Development History of PVS-Studio for LinuxPVS-Studio
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedWojciech Koszek
 
The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196Mahmoud Samir Fayed
 
Visualization of Complex Systems
Visualization of Complex SystemsVisualization of Complex Systems
Visualization of Complex SystemsChris Laffra
 
Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...Carmen Sanborn
 
Everyone wants (someone else) to do it: writing documentation for open source...
Everyone wants (someone else) to do it: writing documentation for open source...Everyone wants (someone else) to do it: writing documentation for open source...
Everyone wants (someone else) to do it: writing documentation for open source...Jody Garnett
 
[Osxdev]3.swift playgrounds
[Osxdev]3.swift playgrounds[Osxdev]3.swift playgrounds
[Osxdev]3.swift playgroundsNAVER D2
 

Similaire à Test-Driven Development with TypeScript+Jasmine+AngularJS (20)

Community building lessons from Ansible
Community building lessons from AnsibleCommunity building lessons from Ansible
Community building lessons from Ansible
 
Codemotion Berlin 2015 recap
Codemotion Berlin 2015   recapCodemotion Berlin 2015   recap
Codemotion Berlin 2015 recap
 
DSC UTeM DevOps Session#1: Intro to DevOps Presentation Slides
DSC UTeM DevOps Session#1: Intro to DevOps Presentation SlidesDSC UTeM DevOps Session#1: Intro to DevOps Presentation Slides
DSC UTeM DevOps Session#1: Intro to DevOps Presentation Slides
 
Introduction To Open Source
Introduction To Open SourceIntroduction To Open Source
Introduction To Open Source
 
'Scikit-project': How open source is empowering open science – and vice versa
'Scikit-project': How open source is empowering open science – and vice versa'Scikit-project': How open source is empowering open science – and vice versa
'Scikit-project': How open source is empowering open science – and vice versa
 
2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...
2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...
2017 Microservices Practitioner Virtual Summit - Opening Keynote: Trends in M...
 
Developer disciplines
Developer disciplinesDeveloper disciplines
Developer disciplines
 
놀아요 Swift Playgrounds
놀아요 Swift Playgrounds놀아요 Swift Playgrounds
놀아요 Swift Playgrounds
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
Visualising conversation around #c4thepromise
Visualising conversation around #c4thepromiseVisualising conversation around #c4thepromise
Visualising conversation around #c4thepromise
 
Hcplphx920
Hcplphx920Hcplphx920
Hcplphx920
 
A Tale of Two Apps
A Tale of Two AppsA Tale of Two Apps
A Tale of Two Apps
 
The Development History of PVS-Studio for Linux
The Development History of PVS-Studio for LinuxThe Development History of PVS-Studio for Linux
The Development History of PVS-Studio for Linux
 
From open source labs to ceo methods and advice by sysfera
From open source labs to ceo methods and advice by sysferaFrom open source labs to ceo methods and advice by sysfera
From open source labs to ceo methods and advice by sysfera
 
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196
 
Visualization of Complex Systems
Visualization of Complex SystemsVisualization of Complex Systems
Visualization of Complex Systems
 
Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...Unit 4 Assignment 1 Comparative Study Of Programming...
Unit 4 Assignment 1 Comparative Study Of Programming...
 
Everyone wants (someone else) to do it: writing documentation for open source...
Everyone wants (someone else) to do it: writing documentation for open source...Everyone wants (someone else) to do it: writing documentation for open source...
Everyone wants (someone else) to do it: writing documentation for open source...
 
[Osxdev]3.swift playgrounds
[Osxdev]3.swift playgrounds[Osxdev]3.swift playgrounds
[Osxdev]3.swift playgrounds
 

Plus de SmartOrg

FEI Digital Week Webinar at Innovation Management - October 2019
FEI Digital Week Webinar at Innovation Management - October 2019 FEI Digital Week Webinar at Innovation Management - October 2019
FEI Digital Week Webinar at Innovation Management - October 2019 SmartOrg
 
Comic Book: Adventures in Product Innovation
Comic Book: Adventures in Product InnovationComic Book: Adventures in Product Innovation
Comic Book: Adventures in Product InnovationSmartOrg
 
Head and Heart in Decision Quality
Head and Heart in Decision QualityHead and Heart in Decision Quality
Head and Heart in Decision QualitySmartOrg
 
Embedded DA vs Consultative DA: Audience Workshop
Embedded DA vs Consultative DA: Audience WorkshopEmbedded DA vs Consultative DA: Audience Workshop
Embedded DA vs Consultative DA: Audience WorkshopSmartOrg
 
Embedded Decision Analysis: Systems Design Patterns
Embedded Decision Analysis: Systems Design PatternsEmbedded Decision Analysis: Systems Design Patterns
Embedded Decision Analysis: Systems Design PatternsSmartOrg
 
Design strategies for AngularJS
Design strategies for AngularJSDesign strategies for AngularJS
Design strategies for AngularJSSmartOrg
 
Stanford-SDG Webinar Six critical principles of strategic portfolio management
Stanford-SDG Webinar Six critical principles of strategic portfolio managementStanford-SDG Webinar Six critical principles of strategic portfolio management
Stanford-SDG Webinar Six critical principles of strategic portfolio managementSmartOrg
 
Experimenting with Values
Experimenting with ValuesExperimenting with Values
Experimenting with ValuesSmartOrg
 
Portfolio management 101
Portfolio management 101Portfolio management 101
Portfolio management 101SmartOrg
 
Embedded Decision Analysis
Embedded Decision AnalysisEmbedded Decision Analysis
Embedded Decision AnalysisSmartOrg
 
Failing forward v2
Failing forward v2Failing forward v2
Failing forward v2SmartOrg
 
Agile business development
Agile business developmentAgile business development
Agile business developmentSmartOrg
 
Infographics GIL 2013 Silicon Valley
Infographics GIL 2013 Silicon ValleyInfographics GIL 2013 Silicon Valley
Infographics GIL 2013 Silicon ValleySmartOrg
 
Accelerating the deployment of technology to business opportunities-chevron T...
Accelerating the deployment of technology to business opportunities-chevron T...Accelerating the deployment of technology to business opportunities-chevron T...
Accelerating the deployment of technology to business opportunities-chevron T...SmartOrg
 
Principles of strategic portfolio management
Principles of strategic portfolio managementPrinciples of strategic portfolio management
Principles of strategic portfolio managementSmartOrg
 
Innovation story
Innovation storyInnovation story
Innovation storySmartOrg
 
Agile business development
Agile business developmentAgile business development
Agile business developmentSmartOrg
 
Framing Patterns
Framing PatternsFraming Patterns
Framing PatternsSmartOrg
 

Plus de SmartOrg (18)

FEI Digital Week Webinar at Innovation Management - October 2019
FEI Digital Week Webinar at Innovation Management - October 2019 FEI Digital Week Webinar at Innovation Management - October 2019
FEI Digital Week Webinar at Innovation Management - October 2019
 
Comic Book: Adventures in Product Innovation
Comic Book: Adventures in Product InnovationComic Book: Adventures in Product Innovation
Comic Book: Adventures in Product Innovation
 
Head and Heart in Decision Quality
Head and Heart in Decision QualityHead and Heart in Decision Quality
Head and Heart in Decision Quality
 
Embedded DA vs Consultative DA: Audience Workshop
Embedded DA vs Consultative DA: Audience WorkshopEmbedded DA vs Consultative DA: Audience Workshop
Embedded DA vs Consultative DA: Audience Workshop
 
Embedded Decision Analysis: Systems Design Patterns
Embedded Decision Analysis: Systems Design PatternsEmbedded Decision Analysis: Systems Design Patterns
Embedded Decision Analysis: Systems Design Patterns
 
Design strategies for AngularJS
Design strategies for AngularJSDesign strategies for AngularJS
Design strategies for AngularJS
 
Stanford-SDG Webinar Six critical principles of strategic portfolio management
Stanford-SDG Webinar Six critical principles of strategic portfolio managementStanford-SDG Webinar Six critical principles of strategic portfolio management
Stanford-SDG Webinar Six critical principles of strategic portfolio management
 
Experimenting with Values
Experimenting with ValuesExperimenting with Values
Experimenting with Values
 
Portfolio management 101
Portfolio management 101Portfolio management 101
Portfolio management 101
 
Embedded Decision Analysis
Embedded Decision AnalysisEmbedded Decision Analysis
Embedded Decision Analysis
 
Failing forward v2
Failing forward v2Failing forward v2
Failing forward v2
 
Agile business development
Agile business developmentAgile business development
Agile business development
 
Infographics GIL 2013 Silicon Valley
Infographics GIL 2013 Silicon ValleyInfographics GIL 2013 Silicon Valley
Infographics GIL 2013 Silicon Valley
 
Accelerating the deployment of technology to business opportunities-chevron T...
Accelerating the deployment of technology to business opportunities-chevron T...Accelerating the deployment of technology to business opportunities-chevron T...
Accelerating the deployment of technology to business opportunities-chevron T...
 
Principles of strategic portfolio management
Principles of strategic portfolio managementPrinciples of strategic portfolio management
Principles of strategic portfolio management
 
Innovation story
Innovation storyInnovation story
Innovation story
 
Agile business development
Agile business developmentAgile business development
Agile business development
 
Framing Patterns
Framing PatternsFraming Patterns
Framing Patterns
 

Dernier

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Dernier (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

Test-Driven Development with TypeScript+Jasmine+AngularJS

  • 1. Test-Driven Development with TypeScript+Jasmine +AngularJS 1 #smartorgdev Somik Raha Kai Wu Github repo: https://github.com/behappyrightnow/anagram Thilak Selvan
  • 2. 2 A Brief History of Software Engineering ENIAC, 1946-55
  • 3. 3 Programs were input with Punched Cards Human labor was cheap. Computer time was expensive. More value in getting program right the first time.
  • 4. 4 IBM 360 Mainframes Time-sharing computers Late 1960s
  • 5. Waterfall is a result of human confusion 5 “Managing the Development of Large Software Systems”, Dr. Winston W. Royce (Link) - 1970
  • 6. 6 For some mysterious reason, people latched on to Fig 2, and thought it looked like a waterfall. The name caught up and ushered in “phased” mindset of development.
  • 7. 7 But Dr. Royce had a Fig. 3
  • 8. 8 And a Fig. 4! As far back as 1970, Royce was describing the beginnings of an agile mindset, but the Waterfall religion had already started, based on a misunderstanding!
  • 9. Meanwhile, a community of philosophers in software engineering started forming in the 90’s 9 Ward Cunningham Founding of the WikiWikiWeb in 1994. Ward’s wiki became the home for conversations on Design Patterns.
  • 10. 10 1995, caused a revolution in
 Object-Oriented thinking Book knows as the “Gang of Four”
  • 11. The false religion of Waterfall was then seriously challenged in 2000 11
  • 12. 12 Source: agileatlas.org Barry Boehm’s Cost of Change Curve We were initially justified in doing high-quality design when computer time was more expensive than programmer time
  • 13. 13 Aspirational Cost of Change curve But now, programmer time is much more expensive, and we would love to flatten the curve time costofchange This is what Extreme Programming was inviting us to consider
  • 14. The XP Practices 14 The “Planning Game” had strong influences from Scrum
  • 15. What’s the difference? Test-Driven Development versus Unit Testing 15
  • 16. XP’s success led to a broader umbrella under a more neutral-sounding “Agile Software Development” 16 Core practices like TDD and Refactoring are no longer controversial - they are a part of a programmer’s foundation. Martin Fowler’s book is now a classic. Most conventional IDEs support automated refactoring.
  • 17. 17 Erich Gamma One of the Gang of Four, authored JUnit with Kent Beck, while on a long flight together, 1997 Great Article by Alberto Savoia: Beautiful Tests History of xUnit by Martin Fowler “JUnit took off like a rocket - and was essential to supporting the growing movement of Extreme Programming and Test Driven Development. I've seen a huge change of attitude towards testing in the last decade, and I think JUnit played a big role in that. By being small and simple it encouraged people to learn and use it. It also proved amenable to others extending it integrating it into tools.” — Martin Fowler
  • 18. Lots of JUnit ports, generally referred to as xUnit 18 nUnit - C# cppUnit - C++ pyunit- Python
  • 19. Functional Programming/ Behavior-Driven Development 19 Jasmine: TDD with JS from Pivotal Labs Lettuce: DSL for testing and beyond by Gabriel Falcao
  • 21. 21
  • 24. We will use TypeScript 24 Anders Hejlsberg Creator of C# and TypeScript Superset of Javascript Supports class-based OO concepts Takes the tedium out of JS Keeps you in JS paradigm (as opposed to coffee script)
  • 25. We will use Testem 25 Continuously runs our unit tests
  • 26. Step 1. git clone https://github.com/behappyrightnow/anagram.git Step 2. cd anagram Step 3. git checkout step1 Step 4. Install NodeJS from http://nodejs.org/ Step 5. npm install testem Let’s start with checking out a basic stub from Github 26
  • 27. Let’s start by writing tests 27 Come up with 5 English words, jumble them up Find all other words you can create with those letters List your tests. e.g. INPUT OUTPUT leppa apple rodo door, odor
  • 28. Challenge for you 28 Make the following game using existing codebase to help game show hosts construct a puzzle. Given an input word, create clues by adding one extra letter. INPUT OUTPUT rose horse without “h” sores without “s” Game show host can now use this program to construct their show saying: Can you find flowers using this clue… Your web-interface should provide this:
  • 29. PASS 1: Write the code without any tests PASS 2: Keep your code aside, write tests first and then write code Reflection: Write an essay on what you learned by comparing Pass 1 and Pass 2, and in general what you learned from this session Crack this challenge in the following way: 29