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

More Related Content

What's hot

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
Christopher Cundill
 
Let's Contribute
Let's ContributeLet's Contribute
Let's Contribute
Anoop Thomas Mathew
 
Working with c++ legacy code
Working with c++ legacy codeWorking with c++ legacy code
Working with c++ legacy code
Dror 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 Language
John Potocny
 
Developer Job in Practice
Developer Job in PracticeDeveloper Job in Practice
Developer Job in Practice
intive
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeads
Paul Balogh
 
Develop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConfDevelop Maintainable Apps - edUiConf
Develop Maintainable Apps - edUiConf
Annyce 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
 
Git essentials
Git essentialsGit essentials
Git essentials
Otto Kekäläinen
 
Driving development in PHP
Driving development in PHPDriving development in PHP
Driving development in PHP
Eduardo Gulias Davis
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
Stanislav Petrov
 
TDD with RSpec
TDD with RSpecTDD with RSpec
TDD with RSpec
Rachid Calazans
 
C++ in our world
C++ in our worldC++ in our world
C++ in our world
Juraj Michálek
 
CI/CD with OCP
CI/CD with OCPCI/CD with OCP
CI/CD with OCP
Dmitry Kartsev
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
Tim 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 Otto
Peter Bittner
 
Test Driven Development with PHP
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHP
Rogério Vicente
 

What's hot (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
 

Similar to 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 Ansible
Greg DeKoenigsberg
 
Codemotion Berlin 2015 recap
Codemotion Berlin 2015   recapCodemotion Berlin 2015   recap
Codemotion Berlin 2015 recap
Torben 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 Slides
DSC UTeM
 
Introduction To Open Source
Introduction To Open SourceIntroduction To Open Source
Introduction To Open Source
Uchechukwu Obimma
 
'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
Nathan 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
 
Developer disciplines
Developer disciplinesDeveloper disciplines
Developer disciplines
Chris Howe-Jones
 
놀아요 Swift Playgrounds
놀아요 Swift Playgrounds놀아요 Swift Playgrounds
놀아요 Swift PlaygroundsWooKyoung Noh
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
Alexandru Bolboaca
 
Visualising conversation around #c4thepromise
Visualising conversation around #c4thepromiseVisualising conversation around #c4thepromise
Visualising conversation around #c4thepromise
Steve Winton
 
Hcplphx920
Hcplphx920Hcplphx920
Hcplphx920
Thinkful
 
A Tale of Two Apps
A Tale of Two AppsA Tale of Two Apps
A Tale of Two Apps
Chris Tankersley
 
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
PVS-Studio
 
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
fOSSa - Free Open Source Software Academia Conference
 
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
Wojciech 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 196
Mahmoud Samir Fayed
 
Visualization of Complex Systems
Visualization of Complex SystemsVisualization of Complex Systems
Visualization of Complex Systems
Chris 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 playgrounds
NAVER D2
 

Similar to 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
 

More from 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 Innovation
SmartOrg
 
Head and Heart in Decision Quality
Head and Heart in Decision QualityHead and Heart in Decision Quality
Head and Heart in Decision Quality
SmartOrg
 
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
SmartOrg
 
Embedded Decision Analysis: Systems Design Patterns
Embedded Decision Analysis: Systems Design PatternsEmbedded Decision Analysis: Systems Design Patterns
Embedded Decision Analysis: Systems Design Patterns
SmartOrg
 
Design strategies for AngularJS
Design strategies for AngularJSDesign strategies for AngularJS
Design strategies for AngularJS
SmartOrg
 
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
SmartOrg
 
Experimenting with Values
Experimenting with ValuesExperimenting with Values
Experimenting with Values
SmartOrg
 
Portfolio management 101
Portfolio management 101Portfolio management 101
Portfolio management 101
SmartOrg
 
Embedded Decision Analysis
Embedded Decision AnalysisEmbedded Decision Analysis
Embedded Decision Analysis
SmartOrg
 
Failing forward v2
Failing forward v2Failing forward v2
Failing forward v2
SmartOrg
 
Agile business development
Agile business developmentAgile business development
Agile business development
SmartOrg
 
Infographics GIL 2013 Silicon Valley
Infographics GIL 2013 Silicon ValleyInfographics GIL 2013 Silicon Valley
Infographics GIL 2013 Silicon Valley
SmartOrg
 
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 management
SmartOrg
 
Innovation story
Innovation storyInnovation story
Innovation story
SmartOrg
 
Agile business development
Agile business developmentAgile business development
Agile business development
SmartOrg
 
Framing Patterns
Framing PatternsFraming Patterns
Framing Patterns
SmartOrg
 

More from 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
 

Recently uploaded

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 

Recently uploaded (20)

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 

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