SlideShare a Scribd company logo
O B J E C T O R I E N T E D V S F U N C T I O N A L
MARKPARSER
Utsav @kumar-utsav
Bhashwanth @bhashwanth
Our Team
Rohit @rarora4
Yatish @yatish27
Background...
What is OO Programming?
“Object-oriented programming (OOP) is a programming paradigm
based on the concept of objects which are data structures that
contain data, in the form of fields, often known as attributes; and
code, in the form of procedures, often known as methods.”
-Wikipedia
What is Functional Programming?
“In computer science, functional programming is a programming
paradigm, a style of building the structure and elements of computer
programs, that treats computation as the evaluation of mathematical
functions and avoids changing-state and mutable data.”
-Wikipedia
MarkParser
A package which converts markdown(.md) to HTML
Two Tracks
Design & Implementation...
Design:Object Oriented using Ruby
Class Document
Main class which encapsulates markdown string. It carries out the
parsing
Design:Object Oriented using Ruby
Class Element
- Base class for other element classes.
- Every Html element is an instance of this class.
- BlockElement: li, ol
- InlineElement: strong, em
Design:Object Oriented using Ruby
Utilizes...Higher Order Functions
Design:Functional Javascript
JSON Key-Value pair as dictionary
Design: Functional Javascript
Map & Reduce algorithms
STEP 1
Map
STEP 2
Reduce
STEP 3
Finalize
Design: Functional Javascript
Demo...
Demo...
Testing...
Supported Tags
Testing: Specification
Sample Markdown containing all tags
and equivalent HTML.
Rspec: Ruby testing framework
Testing: Tools
Jasmine: Javascript testing framework
Testing individual methods/functions in isolation
Testing: Unit Tests
Testing individual tags. eg h1, h2, ol
Assert equal entire markdown to HTML
Testing: Integration Tests
Test binary for file input, output files
Added ‘Live’ editor for Javascript track
Rubocop
Testing: Style Check
JSLint
Travis CI - Github Hook on master commit.
Testing: Automated Testing
Process & Tools...
Github issues based on Getting started,
Research, Requirement Analysis, MVP, Tests,
OO vs Functional Study
Process: Github Issue
Bug, Code, Ruby, Javascript, Process,
Prototype, Research, Redo, Results, Question,
Help wanted, Group work
Process: Github Issue
Needs Review, Awaiting Developer’s
Feedback, Ready to Merge, Merged
Process: Github Pull Requests & Labels
Methods: Github Pull Requests & Labels
Methods: Slack
Methods: Google Hangouts
Results & Discussion...
When we were new to
Object Oriented Programming
Results & Discussion
when…
we gained some expertise in OOPS
Results & Discussion
and when…
we started functional programming
Results & Discussion
What can be the reason???
Results & Discussion
Can be the way we
have been trained
Results & Discussion
Or may be….
Results & Discussion
by default we think and talk
in imperative terms
Results & Discussion
but we soon realized...
functional
Results & Discussion
as we described our team knew only OOPS
Results & Discussion
Results & Discussion
we would like to share our experience
so initially
functional == alien terms
Results & Discussion
Our Solution...
LEARN
Results & Discussion
and the results of our learnings...
MarkParser
Results & Discussion
and some points for discussion...
Results & Discussion
we think functional programming has higher
expressibility
Results & Discussion
Results & Discussion
we also think higher order functions make a lot
of sense in programming
Results & Discussion
we also think higher order functions make a lot
of sense in programming
also gives you a chance to put high school
mathematics into use
Part 1: Results & Discussion
a lot less time is spent in building and operating
on data structures
Results & Discussion
code for functional is very concise
in comparison to OOPS
Results & Discussion
however, we feel data encapsulation and abstraction
are easier to achieve in OOPS
Results & Discussion
refactoring code is easier, without telling the other
modules that don’t need to know
Results & Discussion
and at many instances, it was easier for us to think
in Object Oriented terms
OBJECT
Results & Discussion
rather than functional terms
Results & Discussion
some also claims that making GUI is easier in
OOPS but we have mixed opinion on that
Results & Discussion
So the question is which paradigm
is better?
Results & Discussion
So the question is which paradigm
is better?
FUNCTIONAL??
Results & Discussion
So the question is which paradigm
is better?
FUNCTIONAL??
(NO)
Results & Discussion
So the question is which paradigm
is better?
OOPS??
Results & Discussion
So the question is which paradigm
is better?
OOPS??
(NO)
Results & Discussion
Its like a fight between a bear and an alligator, the terrain
determines the outcome.
Results & Discussion
OOPS is generally better when there are fixed set of
OPERATIONS on things, and as code evolves new things are
added (e.g. new class)
Results & Discussion
Functional is generally good when there are fixed set of
THINGS, and as code evolves new operations are added to
existing things (e.g. avg func).
DATA
sum()
avg()
Results & Discussion
Conclusions...
Every programming paradigm consists of certain principal
features that makes solving particular set of problems much
easier/optimal
Universal Programming paradigm is a myth
Hybrid approach may involve some trade off, and chances of
messing up may increase
Conclusions
- https://github.com/jjyr/minidown
- https://github.com/gettalong/kramdown
- http://codepen.io/branneman/details/nbyrK/
- http://shamansir.github.io/blog/articles/generating-functional-
parsers/
- http://code.google.com/p/pagedown/
Other work in this area
- Add CSS for HTML
- Custom Markdown Tags
- Support for All Markdown tags
- Improve Testing
Future Work
- http://c2.com/cgi/wiki?OoVsFunctional
- http://www.srirangan.net/2011-12-functional-programming-in-
javascript
- http://functionaljavascript.blogspot.com/2013/07/monads.html
- https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Guide/Regular_Expressions#special-
word-boundary
- http://stackoverflow.com/questions/2373524/how-do-i-display-
values-of-an-json-object
- http://www.ctrlshift.net/project/markdowneditor/
References
Paradigm Wars: Object Oriented Vs Functional Programming in creating MarkParser

More Related Content

ODP
CLEAN CODE
Knoldus Inc.
 
PPTX
Clean code, Feb 2012
cobyst
 
PPTX
Clean Code
swaraj Patil
 
PPTX
Programming Paradigms Seminar 2
neoxiuting
 
PPTX
Clean code coding like a professional
Nhật Nguyễn Khắc
 
PDF
Tag Extraction Final Presentation - CS185CSpring2014
Naoki Nakatani
 
PPT
Clean code
Uday Pratap Singh
 
PDF
Object Oriented Programming vs Functional Programming - Valencia.rb
Daniel Pecos Martínez
 
CLEAN CODE
Knoldus Inc.
 
Clean code, Feb 2012
cobyst
 
Clean Code
swaraj Patil
 
Programming Paradigms Seminar 2
neoxiuting
 
Clean code coding like a professional
Nhật Nguyễn Khắc
 
Tag Extraction Final Presentation - CS185CSpring2014
Naoki Nakatani
 
Clean code
Uday Pratap Singh
 
Object Oriented Programming vs Functional Programming - Valencia.rb
Daniel Pecos Martínez
 

Viewers also liked (14)

PDF
HTTP/2 - The Web of Future
Vahè Èvoyan
 
PDF
Data flow vs. procedural programming: How to put your algorithms into Flink
Mikio L. Braun
 
PDF
Code Your Agility - Tips for Boosting Technical Agility in Your Organization
Lemi Orhan Ergin
 
PDF
Lean DevOps - Lessons Learned from Innovation-driven Companies
Xavier Amatriain
 
PDF
Scaling Uber
C4Media
 
PDF
10 books that every developer must read
Ganesh Samarthyam
 
PDF
The Charming Genius of the Apollo Guidance Computer
Brian Troutwine
 
PPTX
Wearable Tech - Trends for 2016
Scott Eggertsen
 
PDF
CSS Grid Layout for Topconf, Linz
Rachel Andrew
 
PDF
Node.js and The Internet of Things
Losant
 
PDF
Launching a Rocketship Off Someone Else's Back
joshelman
 
PDF
8 Tips for Scaling Mobile Users in China by Edith Yeung
Edith Yeung
 
PDF
Creative Traction Methodology - For Early Stage Startups
Tommaso Di Bartolo
 
PDF
Dear NSA, let me take care of your slides.
Emiland
 
HTTP/2 - The Web of Future
Vahè Èvoyan
 
Data flow vs. procedural programming: How to put your algorithms into Flink
Mikio L. Braun
 
Code Your Agility - Tips for Boosting Technical Agility in Your Organization
Lemi Orhan Ergin
 
Lean DevOps - Lessons Learned from Innovation-driven Companies
Xavier Amatriain
 
Scaling Uber
C4Media
 
10 books that every developer must read
Ganesh Samarthyam
 
The Charming Genius of the Apollo Guidance Computer
Brian Troutwine
 
Wearable Tech - Trends for 2016
Scott Eggertsen
 
CSS Grid Layout for Topconf, Linz
Rachel Andrew
 
Node.js and The Internet of Things
Losant
 
Launching a Rocketship Off Someone Else's Back
joshelman
 
8 Tips for Scaling Mobile Users in China by Edith Yeung
Edith Yeung
 
Creative Traction Methodology - For Early Stage Startups
Tommaso Di Bartolo
 
Dear NSA, let me take care of your slides.
Emiland
 
Ad

Similar to Paradigm Wars: Object Oriented Vs Functional Programming in creating MarkParser (20)

PDF
Reactive design: languages, and paradigms
Dean Wampler
 
PPTX
Functional programming and ruby in functional style
Niranjan Sarade
 
PDF
Cs344 project
JudoSa1
 
PDF
Object Modelling Technique " ooad "
AchrafJbr
 
PPTX
Ooad unit – 1 introduction
Babeetha Muruganantham
 
PDF
Handout on Object orienetd Analysis and Design
SAFAD ISMAIL
 
PDF
Ruby Functional Programming
Geison Goes
 
PDF
Design functional solutions in Java, a practical example
Marian Wamsiedel
 
PDF
MiniTool Partition Wizard Crack Latest Version? | PPT
banooshabana70
 
PDF
AOMEI Backupper Crack Latest Version 2025
amaralhasv86
 
PDF
Download- Enscape Crack + Activvation key
aroojkhanssc
 
PDF
The Open-Closed Principle - Part 1 - The Original Version
Philip Schwarz
 
PDF
CorelDraw X7 Crack Latest Version 2025 ?
kakol4174
 
PDF
12. Objects I
Joseph Murphy
 
PDF
OOP vs COP
Gianluca Padovani
 
PDF
Becoming Functional Steps For Transforming Into A Functional Programmer Joshu...
chelliidzia
 
PDF
From Mess To Masterpiece - JFokus 2017
Sven Ruppert
 
PDF
Oop's
JatinSaini84
 
PDF
OOPs-Interview-Questions.pdf
Samir P.
 
PDF
Funtional Ruby - Mikhail Bortnyk
Ruby Meditation
 
Reactive design: languages, and paradigms
Dean Wampler
 
Functional programming and ruby in functional style
Niranjan Sarade
 
Cs344 project
JudoSa1
 
Object Modelling Technique " ooad "
AchrafJbr
 
Ooad unit – 1 introduction
Babeetha Muruganantham
 
Handout on Object orienetd Analysis and Design
SAFAD ISMAIL
 
Ruby Functional Programming
Geison Goes
 
Design functional solutions in Java, a practical example
Marian Wamsiedel
 
MiniTool Partition Wizard Crack Latest Version? | PPT
banooshabana70
 
AOMEI Backupper Crack Latest Version 2025
amaralhasv86
 
Download- Enscape Crack + Activvation key
aroojkhanssc
 
The Open-Closed Principle - Part 1 - The Original Version
Philip Schwarz
 
CorelDraw X7 Crack Latest Version 2025 ?
kakol4174
 
12. Objects I
Joseph Murphy
 
OOP vs COP
Gianluca Padovani
 
Becoming Functional Steps For Transforming Into A Functional Programmer Joshu...
chelliidzia
 
From Mess To Masterpiece - JFokus 2017
Sven Ruppert
 
OOPs-Interview-Questions.pdf
Samir P.
 
Funtional Ruby - Mikhail Bortnyk
Ruby Meditation
 
Ad

More from Rohit Arora (8)

PDF
Hot and cold data storage
Rohit Arora
 
PPTX
Introduction to Git/Github - A beginner's guide
Rohit Arora
 
PPTX
Forest Cover Type Prediction
Rohit Arora
 
PPTX
Facility Booking System
Rohit Arora
 
PDF
Advanced Traveler's Information System
Rohit Arora
 
PPTX
Sign Language Recognition using Wavelet Transform and Neural Networks
Rohit Arora
 
PPTX
Sign Language Recognition using Hough Transform and Neural Networks
Rohit Arora
 
PPT
Ambient intelligence & Ubiquitous Computing
Rohit Arora
 
Hot and cold data storage
Rohit Arora
 
Introduction to Git/Github - A beginner's guide
Rohit Arora
 
Forest Cover Type Prediction
Rohit Arora
 
Facility Booking System
Rohit Arora
 
Advanced Traveler's Information System
Rohit Arora
 
Sign Language Recognition using Wavelet Transform and Neural Networks
Rohit Arora
 
Sign Language Recognition using Hough Transform and Neural Networks
Rohit Arora
 
Ambient intelligence & Ubiquitous Computing
Rohit Arora
 

Recently uploaded (20)

PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
EU POPs Limits & Digital Product Passports Compliance Strategy 2025.pptx
Certivo Inc
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
AZ900_SLA_Pricing_2025_LondonIT (1).pptx
chumairabdullahph
 
PPT
Order to Cash Lifecycle Overview R12 .ppt
nbvreddy229
 
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
Michael624841
 
PDF
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pdf
Certivo Inc
 
PDF
Solar Panel Installation Guide – Step By Step Process 2025.pdf
CRMLeaf
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
EU POPs Limits & Digital Product Passports Compliance Strategy 2025.pptx
Certivo Inc
 
oapresentation.pptx
mehatdhavalrajubhai
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
AZ900_SLA_Pricing_2025_LondonIT (1).pptx
chumairabdullahph
 
Order to Cash Lifecycle Overview R12 .ppt
nbvreddy229
 
A REACT POMODORO TIMER WEB APPLICATION.pdf
Michael624841
 
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
Exploring AI Agents in Process Industries
amoreira6
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pdf
Certivo Inc
 
Solar Panel Installation Guide – Step By Step Process 2025.pdf
CRMLeaf
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 

Paradigm Wars: Object Oriented Vs Functional Programming in creating MarkParser