SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
Programming languages and
Concepts
Vivek Parihar
VP Engineering,
XOXODay
➔ I’m a Serial Entrepreneur(Co-founded 2 startups)
Currently serves as VP oF Engineering at
XOXODay
➔ Ex-Heads Engineering for Mobile @ Yatra's all
verticals.
➔ A Polyglot Engineer*.
Big fan of The Law of “T”
➔ A staunch supporter of Open Source.
➔ Public Speaker
➔ A mad Geek and an Explorer.
When not scaling the applications or servers of the
Internet world, I ‘unwinds’ on extreme
thrill-seeking adventures from trekking to boxing.
Get in touch with me:
LinkedIn:https://in.linkedin.com/in/pariharvivek
Twitter: @vparihar
About Me
Introduction: Programming Languages and
Concepts
What is a programming language?
❏ A programming language is a notational system for describing computation in a
machine-readable and human-readable form.
❏ A programming language is a tool for developing executable models for a class of
problem domains.
❏ English is a natural language. It has words, symbols and grammatical rules.
❏ A programming language also has words, symbols and rules of grammar.
❏ The grammatical rules are called syntax.
❏ Each programming language has a different set of syntax rules.
Reasons for Studying Concepts of
Programming Languages
● Increased ability to express ideas.
○ It is believed that the depth at which we think is influenced by the expressive power of
the language in which we communicate our thoughts. It is difficult for people to
conceptualize structures they can’t describe, verbally or in writing.
○ Language in which they develop S/W places limits on the kinds of control structures,
data structures, and abstractions they can use.
○ Awareness of a wider variety of P/L features can reduce such limitations in S/W
development.
○ Can language constructs be simulated in other languages that do not support those
constructs directly?
Reasons for Studying Concepts of
Programming Languages - Cont…...
● Improved background for choosing appropriate languages
○ Many programmers, when given a choice of languages for a new project, continue to
use the language with which they are most familiar, even if it is poorly suited to new
projects.
○ If these programmers were familiar with other languages available, they would be in a
better position to make informed language choices.
Reasons for Studying Concepts of
Programming Languages - Cont…...
● Greater ability to learn new languages
○ Programming languages are still in a state of continuous evolution, which means
continuous learning is essential.
○ Programmers who understand the concept of OO programming will have easier time
learning Java.
○ Once a thorough understanding of the fundamental concepts of languages is
acquired, it becomes easier to see how concepts are incorporated into the design of
the language being learned.
Reasons for Studying Concepts of
Programming Languages - Cont…...
● Understand significance of implementation
○ Understanding of implementation issues leads to an understanding of why languages
are designed the way they are.
○ This in turn leads to the ability to use a language more intelligently, as it was designed
to be used.
Reasons for Studying Concepts of
Programming Languages - Cont…...
● Ability to design new languages
○ The more languages you gain knowledge of, the better understanding of programming
languages concepts you understand.
● Overall advancement of computing
○ In some cases, a language became widely used, at least in part, b/c those in positions
to choose languages were not sufficiently familiar with P/L concepts.
What makes a good programming language?
❏ Clarity, simplicity, and unity.
❏ Orthogonality.
❏ Naturalness for the application.
❏ Support of abstraction.
❏ Ease of program verification.
❏ Programming environments.
❏ Portability of programs.
❏ Cost of use.
❏ Cost of execution.
❏ Cost of program translation.
❏ Cost of program creation, testing, and use.
❏ Cost of program maintenance.
Why study programming languages?
❏ To improve the ability to develop effective algorithms.
❏ To improve the use of familiar languages.
❏ To increase the vocabulary of useful programming constructs.
❏ To allow a better choice of programming language.
❏ To make it easier to learn a new language.
❏ To make it easier to design a new language.
❏ To simulate useful features in languages that lack them.
❏ To make better use of language technology wherever it appears.
❏ Why does some people speak French?
❏ Programming languages have evolved over time as better ways have been developed
to design them.
❏ First programming languages were developed in the 1950s
❏ Since then thousands of languages have been developed
❏ Different programming languages are designed for different types of programs.
❏ It could be due to evolution.
❏ Or Special Purpose.
❏ Personal Preferences.
Why are there so many programming
languages?
Different Types of Programming Domains?
❏ Scientific applications
❏ Business applications
❏ Artificial intelligence
❏ Systems programming
❏ Scripting languages
❏ Special-purpose languages
How do Programming Languages Differ?
Language Styles …..
…. And Programming Paradigms
Programming Paradigms
Programming Paradigms
Ok let’s leave
that go
back to more
basics:
Imperative Programming Paradigm
❏ It is one of the oldest programming paradigm.
❏ It features close relation relation to machine architecture.
❏ It is based on Von Neumann architecture. It works by changing the program state through assignment
statements.
❏ It performs step by step task by changing state.
❏ The main focus is on how to achieve the goal.
❏ The paradigm consist of several statements and after execution of all the result is stored.
Advantage:
❏ Very simple to
implement
❏ It contains loops,
variables etc.
Disadvantage:
❏ Complex problem cannot be
solved
❏ Less efficient and less
productive
❏ Parallel programming is not
possible
Procedural programming paradigm
❏ This paradigm emphasizes on procedure in terms of under lying machine model.
❏ There is no difference in between procedural and imperative approach.
❏ It has the ability to reuse the code and it was boon at that time when it was in use because of its
reusability.
Examples of Procedural programming paradigm:
C : developed by Dennis Ritchie and Ken Thompson
C++ : developed by Bjarne Stroustrup
Java : developed by James Gosling at Sun Microsystems
ColdFusion : developed by J J Allaire
Pascal : developed by Niklaus Wirth
Object oriented programming
❏ The program is written as a collection of classes and object which are meant for communication. The
smallest and basic entity is object and all kind of computation is performed on the objects only. More
emphasis is on data rather procedure. It can handle almost all kind of real life problems which are
today in scenario.
Advantages:
❏ Data security
❏ Inheritance
❏ Code reusability
❏ Flexible and abstraction is also present
Examples of Object Oriented programming
paradigm:
Simula : first OOP language
Java : developed by James Gosling at Sun
Microsystems
C++ : developed by Bjarne Stroustrup
Objective-C : designed by Brad Cox
Visual Basic .NET : developed by Microsoft
Python : developed by Guido van Rossum
Ruby : developed by Yukihiro Matsumoto
Declarative languages
❏ It is divided as Logic, Functional.
❏ In computer science the declarative programming is a style of building programs that expresses logic of
computation without talking about its control flow.
❏ This is the only difference between imperative (how to do) and declarative (what to do)
Logic Programming paradigm
❏ It can be termed as abstract model of computation.
❏ It would solve logical problems like puzzles, series etc.
❏ In logic programming we have a knowledge base which we know before and along with the question
and knowledge base which is given to machine, it produces result.
❏ In normal programming languages, such concept of knowledge base is not available but while using
the concept of artificial intelligence, machine learning we have some models like Perception model
which is using the same mechanism.
❏ In logical programming the main emphasize is on knowledge base and the problem.
❏ The execution of the program is very much like proof of mathematical statement, e.g., Prolog
Functional Programming paradigm
❏ The functional programming paradigms has its roots in mathematics and it is language independent.
❏ The key principal of this paradigms is the execution of series of mathematical functions.
❏ The central model for the abstraction is the function which are meant for some specific computation and not the
data structure.
❏ Data are loosely coupled to functions.
❏ The function hide their implementation.
❏ Function can be replaced with their values without changing the meaning of the program.
❏ Some of the languages like perl, javascript mostly uses this paradigm.
Examples of Functional programming paradigm:
JavaScript , Haskwell , Scala, Erlang , Lisp , Clojure
Static vs Dynamic
● static: types are checked at compile time
// example in c#
string s = "asdf";
● dynamic: types are checked at runtime
# example in ruby
s = "asdf”
Strong vs Weak
● strong: types must match, only explicit conversion
# example in ruby
"1" + 1 # TypeError
● weak: implicit type conversion
// example in javascript
"1" + 1 // "11”
Duck Typing
❏ Duck typing is a style of dynamic typing.
❏ Duck typing, the set of methods and properties determine the valid semantics of a class,
instead of inheritance from a specific class or implementation of an interface.
❏ “When I see a bird that walks like a duck and swims
like a duck and quacks like a duck, I call that bird a
duck.”
❏ This means that we actually don’t care if the class we’re using is actually of a certain type, as
long as it provides the methods or properties we’re interested in.
Language Evaluation Criteria
1. Readability
● Software development was largely thought of in term of writing code “LOC”.
● Language constructs were designed more from the point of view of the computer than the users.
● Because ease of maintenance is determined in large part by the readability of programs, readability
became an important measure of the quality of programs and programming languages.
● The most important criterion “ease of use”
● Overall simplicity “Strongly affects readability”
○ Too many features make the language difficult to learn. Programmers tend to learn a subset
of the language and ignore its other features. “ALGOL 60”
○ Multiplicity of features is also a complicating characteristic “having more than one way to
accomplish a particular operation. “Ex Java”:
● Operator overloading where a single operator symbol has more than one meaning.
● Although this is a useful feature, it can lead to reduced readability if users are allowed to
create their own overloading and do not do it sensibly.
Language Evaluation Criteria …. Cont.
1. Readability
● Orthogonality
○ Makes the language easy to learn and read.
○ Meaning is context independent. Pointers should be able to point to any type of variable or
data structure. The lack of orthogonality leads to exceptions to the rules of the language.
○ A relatively small set of primitive constructs can be combined in a relatively small number of
ways to build the control and data structures of the language.
○ Every possible combination is legal and meaningful.
○ Ex: page 11 in book.
○ The more orthogonal the design of a language, the fewer exceptions the language rules
require.
○ The most orthogonal programming language is ALGOL 68. Every language construct has a
type, and there are no restrictions on those types.
○ This form of orthogonality leads to unnecessary complexity.
Language Evaluation Criteria …. Cont.
1. Readability
● Control Statements
○ It became widely recognized that indiscriminate use of goto statements severely reduced
program readability.
○ Basic and Fortran in the early 70s lacked the control statements that allow strong
restrictions on the use of gotos, so writing highly readable programs in those languages was
difficult.
○ Since then, languages have included sufficient control structures.
○ The control statement design of a language is now a less important factor in readability than
it was in the past.
Language Evaluation Criteria …. Cont.
1. Readability
● Data Types and Structures
○ The presence of adequate facilities for defining data types and data structures in a language
is another significant aid to reliability.
○ Ex: Boolean type.
■ timeout = 1 or
■ timeout = true
Language Evaluation Criteria …. Cont.
1. Readability
● Syntax Considerations
○ The syntax of the elements of a language has a significant effect on readability.
○ The following are examples of syntactic design choices that affect readability:
○ Identifier forms: Restricting identifiers to very short lengths detracts from readability. ANSI
BASIC (1978) an identifier could consist only of a single letter of a single letter followed by a
single digit.
○ Special Words: Program appearance and thus program readability are strongly influenced by
the forms of a language’s special words. Ex: while, class, for. C uses braces for pairing control
structures. It is difficult to determine which group is being ended. Fortran 95 allows
programmers to use special names as legal variable names.
○ Form and Meaning: Designing statements so that their appearance at least partially indicates
their purpose is an obvious aid to readability.
○ Semantic should follow directly from syntax, or form.
Language Evaluation Criteria …. Cont.
2. Writability
● It is a measure of how easily a language can be used to create programs for a chosen problem domain.
● Most of the language characteristics that affect readability also affect writability.
● Simplicity and orthogonality
○ A smaller number of primitive constructs and a consistent set of rules for combining them is much
better than simply having a large number of primitives.
● Support for abstraction
○ Abstraction means the ability to define and then use complicated structures or operations in ways
that allow many of the details to be ignored.
○ A process abstraction is the use of a subprogram to implement a sort algorithm that is required
several times in a program instead of replicating it in all places where it is needed.
● Expressivity
○ It means that a language has relatively convenient, rather than cumbersome, ways of specifying
computations.
○ Ex: ++count ⇔ count = count + 1 // more convenient and shorter
Language Evaluation Criteria …. Cont.
3. Reliability
● A program is said to be reliable if it performs to its specifications under all conditions.
● Type checking: is simply testing for type errors in a given program, either by the compiler or during
program execution.
○ The earlier errors are detected, the less expensive it is to make the required repairs. Java
requires type checking of nearly all variables and expressions at compile time.
● Exception handling: the ability to intercept run-time errors, take corrective measures, and then
continue is a great aid to reliability.
● Aliasing: it is having two or more distinct referencing methods, or names, for the same memory cell.
○ It is now widely accepted that aliasing is a dangerous feature in a language.
● Readability and writability: Both readability and writability influence reliability.
Thank You

Mais conteúdo relacionado

Mais procurados

Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer Ashim Lamichhane
 
Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenationAshwini Awatare
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentationfazli khaliq
 
Programming language
Programming languageProgramming language
Programming languageRajThakuri
 
Programming language
Programming languageProgramming language
Programming languageShuja Qais
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming languageVasavi College of Engg
 
Programming Languages / Translators
Programming Languages / TranslatorsProgramming Languages / Translators
Programming Languages / TranslatorsProject Student
 
Program & language generation
Program & language generationProgram & language generation
Program & language generationBuxoo Abdullah
 
computer languages
computer languagescomputer languages
computer languagesRajendran
 
High level and Low level Language
High level and Low level Language High level and Low level Language
High level and Low level Language adnan usmani
 
Programming languages
Programming languagesProgramming languages
Programming languagesAsmasum
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Akshay Nagpurkar
 
Software development slides
Software development slidesSoftware development slides
Software development slidesiarthur
 
Compiler Design
Compiler DesignCompiler Design
Compiler DesignMir Majid
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Akshay Nagpurkar
 
Operating System Overview
Operating System OverviewOperating System Overview
Operating System OverviewAnas Ebrahim
 

Mais procurados (20)

Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenation
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
Programming language
Programming languageProgramming language
Programming language
 
Computer languages 11
Computer languages 11Computer languages 11
Computer languages 11
 
Programming language
Programming languageProgramming language
Programming language
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
 
Programming Languages / Translators
Programming Languages / TranslatorsProgramming Languages / Translators
Programming Languages / Translators
 
Program & language generation
Program & language generationProgram & language generation
Program & language generation
 
computer languages
computer languagescomputer languages
computer languages
 
High level and Low level Language
High level and Low level Language High level and Low level Language
High level and Low level Language
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
 
Software development slides
Software development slidesSoftware development slides
Software development slides
 
Introduction to programming languages
Introduction to programming languagesIntroduction to programming languages
Introduction to programming languages
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
 
Operating System Overview
Operating System OverviewOperating System Overview
Operating System Overview
 

Semelhante a Programming languages and concepts by vivek parihar

Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1 ITNet
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Professor Lili Saghafi
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptxAryanSharma853911
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptxDishaSharma737984
 
Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaKim Moore
 
APP_All Five Unit PPT_NOTES.pptx
APP_All Five Unit PPT_NOTES.pptxAPP_All Five Unit PPT_NOTES.pptx
APP_All Five Unit PPT_NOTES.pptxHaniyaMumtaj1
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacionVillalba Griselda
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data TypesKaty Allen
 
Introduction Programming Languages
Introduction Programming LanguagesIntroduction Programming Languages
Introduction Programming LanguagesManish Kharotia
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer ProgrammingHussain Buksh
 
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
 
A Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And RlbpA Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And RlbpRikki Wright
 
PL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesPL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesSchwannden Kuo
 

Semelhante a Programming languages and concepts by vivek parihar (20)

Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
 
History Of C Essay
History Of C EssayHistory Of C Essay
History Of C Essay
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptx
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptx
 
Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of Java
 
APP_All Five Unit PPT_NOTES.pptx
APP_All Five Unit PPT_NOTES.pptxAPP_All Five Unit PPT_NOTES.pptx
APP_All Five Unit PPT_NOTES.pptx
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacion
 
Unit 1
Unit 1Unit 1
Unit 1
 
JAVA
JAVAJAVA
JAVA
 
Presentation-1.pptx
Presentation-1.pptxPresentation-1.pptx
Presentation-1.pptx
 
Learning to code in 2020
Learning to code in 2020Learning to code in 2020
Learning to code in 2020
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data Types
 
Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
 
Introduction Programming Languages
Introduction Programming LanguagesIntroduction Programming Languages
Introduction Programming Languages
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer 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...
Unit 4 Assignment 1 Comparative Study Of Programming...
 
A Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And RlbpA Strong Object Recognition Using Lbp, Ltp And Rlbp
A Strong Object Recognition Using Lbp, Ltp And Rlbp
 
PCCF Unit 2.pptx
PCCF Unit 2.pptxPCCF Unit 2.pptx
PCCF Unit 2.pptx
 
PL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesPL Lecture 01 - preliminaries
PL Lecture 01 - preliminaries
 

Mais de Vivek Parihar

A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyVivek Parihar
 
Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Vivek Parihar
 
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Vivek Parihar
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginnersVivek Parihar
 
How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?Vivek Parihar
 
Centralized logging system using mongoDB
Centralized logging system using mongoDBCentralized logging system using mongoDB
Centralized logging system using mongoDBVivek Parihar
 
Mobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designMobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designVivek Parihar
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocolsVivek Parihar
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetVivek Parihar
 
Cloud foundry presentation
Cloud foundry presentation Cloud foundry presentation
Cloud foundry presentation Vivek Parihar
 

Mais de Vivek Parihar (11)

A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.
 
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginners
 
How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?
 
Centralized logging system using mongoDB
Centralized logging system using mongoDBCentralized logging system using mongoDB
Centralized logging system using mongoDB
 
Mobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designMobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface design
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-Set
 
Cloud foundry presentation
Cloud foundry presentation Cloud foundry presentation
Cloud foundry presentation
 
Hu mongous db v2
Hu mongous db v2Hu mongous db v2
Hu mongous db v2
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Programming languages and concepts by vivek parihar

  • 1. Programming languages and Concepts Vivek Parihar VP Engineering, XOXODay
  • 2. ➔ I’m a Serial Entrepreneur(Co-founded 2 startups) Currently serves as VP oF Engineering at XOXODay ➔ Ex-Heads Engineering for Mobile @ Yatra's all verticals. ➔ A Polyglot Engineer*. Big fan of The Law of “T” ➔ A staunch supporter of Open Source. ➔ Public Speaker ➔ A mad Geek and an Explorer. When not scaling the applications or servers of the Internet world, I ‘unwinds’ on extreme thrill-seeking adventures from trekking to boxing. Get in touch with me: LinkedIn:https://in.linkedin.com/in/pariharvivek Twitter: @vparihar About Me
  • 4. What is a programming language? ❏ A programming language is a notational system for describing computation in a machine-readable and human-readable form. ❏ A programming language is a tool for developing executable models for a class of problem domains. ❏ English is a natural language. It has words, symbols and grammatical rules. ❏ A programming language also has words, symbols and rules of grammar. ❏ The grammatical rules are called syntax. ❏ Each programming language has a different set of syntax rules.
  • 5. Reasons for Studying Concepts of Programming Languages ● Increased ability to express ideas. ○ It is believed that the depth at which we think is influenced by the expressive power of the language in which we communicate our thoughts. It is difficult for people to conceptualize structures they can’t describe, verbally or in writing. ○ Language in which they develop S/W places limits on the kinds of control structures, data structures, and abstractions they can use. ○ Awareness of a wider variety of P/L features can reduce such limitations in S/W development. ○ Can language constructs be simulated in other languages that do not support those constructs directly?
  • 6. Reasons for Studying Concepts of Programming Languages - Cont…... ● Improved background for choosing appropriate languages ○ Many programmers, when given a choice of languages for a new project, continue to use the language with which they are most familiar, even if it is poorly suited to new projects. ○ If these programmers were familiar with other languages available, they would be in a better position to make informed language choices.
  • 7. Reasons for Studying Concepts of Programming Languages - Cont…... ● Greater ability to learn new languages ○ Programming languages are still in a state of continuous evolution, which means continuous learning is essential. ○ Programmers who understand the concept of OO programming will have easier time learning Java. ○ Once a thorough understanding of the fundamental concepts of languages is acquired, it becomes easier to see how concepts are incorporated into the design of the language being learned.
  • 8. Reasons for Studying Concepts of Programming Languages - Cont…... ● Understand significance of implementation ○ Understanding of implementation issues leads to an understanding of why languages are designed the way they are. ○ This in turn leads to the ability to use a language more intelligently, as it was designed to be used.
  • 9. Reasons for Studying Concepts of Programming Languages - Cont…... ● Ability to design new languages ○ The more languages you gain knowledge of, the better understanding of programming languages concepts you understand. ● Overall advancement of computing ○ In some cases, a language became widely used, at least in part, b/c those in positions to choose languages were not sufficiently familiar with P/L concepts.
  • 10. What makes a good programming language? ❏ Clarity, simplicity, and unity. ❏ Orthogonality. ❏ Naturalness for the application. ❏ Support of abstraction. ❏ Ease of program verification. ❏ Programming environments. ❏ Portability of programs. ❏ Cost of use. ❏ Cost of execution. ❏ Cost of program translation. ❏ Cost of program creation, testing, and use. ❏ Cost of program maintenance.
  • 11. Why study programming languages? ❏ To improve the ability to develop effective algorithms. ❏ To improve the use of familiar languages. ❏ To increase the vocabulary of useful programming constructs. ❏ To allow a better choice of programming language. ❏ To make it easier to learn a new language. ❏ To make it easier to design a new language. ❏ To simulate useful features in languages that lack them. ❏ To make better use of language technology wherever it appears.
  • 12. ❏ Why does some people speak French? ❏ Programming languages have evolved over time as better ways have been developed to design them. ❏ First programming languages were developed in the 1950s ❏ Since then thousands of languages have been developed ❏ Different programming languages are designed for different types of programs. ❏ It could be due to evolution. ❏ Or Special Purpose. ❏ Personal Preferences. Why are there so many programming languages?
  • 13. Different Types of Programming Domains? ❏ Scientific applications ❏ Business applications ❏ Artificial intelligence ❏ Systems programming ❏ Scripting languages ❏ Special-purpose languages
  • 14. How do Programming Languages Differ?
  • 16. …. And Programming Paradigms
  • 19. Ok let’s leave that go back to more basics:
  • 20. Imperative Programming Paradigm ❏ It is one of the oldest programming paradigm. ❏ It features close relation relation to machine architecture. ❏ It is based on Von Neumann architecture. It works by changing the program state through assignment statements. ❏ It performs step by step task by changing state. ❏ The main focus is on how to achieve the goal. ❏ The paradigm consist of several statements and after execution of all the result is stored. Advantage: ❏ Very simple to implement ❏ It contains loops, variables etc. Disadvantage: ❏ Complex problem cannot be solved ❏ Less efficient and less productive ❏ Parallel programming is not possible
  • 21. Procedural programming paradigm ❏ This paradigm emphasizes on procedure in terms of under lying machine model. ❏ There is no difference in between procedural and imperative approach. ❏ It has the ability to reuse the code and it was boon at that time when it was in use because of its reusability. Examples of Procedural programming paradigm: C : developed by Dennis Ritchie and Ken Thompson C++ : developed by Bjarne Stroustrup Java : developed by James Gosling at Sun Microsystems ColdFusion : developed by J J Allaire Pascal : developed by Niklaus Wirth
  • 22. Object oriented programming ❏ The program is written as a collection of classes and object which are meant for communication. The smallest and basic entity is object and all kind of computation is performed on the objects only. More emphasis is on data rather procedure. It can handle almost all kind of real life problems which are today in scenario. Advantages: ❏ Data security ❏ Inheritance ❏ Code reusability ❏ Flexible and abstraction is also present Examples of Object Oriented programming paradigm: Simula : first OOP language Java : developed by James Gosling at Sun Microsystems C++ : developed by Bjarne Stroustrup Objective-C : designed by Brad Cox Visual Basic .NET : developed by Microsoft Python : developed by Guido van Rossum Ruby : developed by Yukihiro Matsumoto
  • 23. Declarative languages ❏ It is divided as Logic, Functional. ❏ In computer science the declarative programming is a style of building programs that expresses logic of computation without talking about its control flow. ❏ This is the only difference between imperative (how to do) and declarative (what to do)
  • 24. Logic Programming paradigm ❏ It can be termed as abstract model of computation. ❏ It would solve logical problems like puzzles, series etc. ❏ In logic programming we have a knowledge base which we know before and along with the question and knowledge base which is given to machine, it produces result. ❏ In normal programming languages, such concept of knowledge base is not available but while using the concept of artificial intelligence, machine learning we have some models like Perception model which is using the same mechanism. ❏ In logical programming the main emphasize is on knowledge base and the problem. ❏ The execution of the program is very much like proof of mathematical statement, e.g., Prolog
  • 25. Functional Programming paradigm ❏ The functional programming paradigms has its roots in mathematics and it is language independent. ❏ The key principal of this paradigms is the execution of series of mathematical functions. ❏ The central model for the abstraction is the function which are meant for some specific computation and not the data structure. ❏ Data are loosely coupled to functions. ❏ The function hide their implementation. ❏ Function can be replaced with their values without changing the meaning of the program. ❏ Some of the languages like perl, javascript mostly uses this paradigm. Examples of Functional programming paradigm: JavaScript , Haskwell , Scala, Erlang , Lisp , Clojure
  • 26. Static vs Dynamic ● static: types are checked at compile time // example in c# string s = "asdf"; ● dynamic: types are checked at runtime # example in ruby s = "asdf”
  • 27. Strong vs Weak ● strong: types must match, only explicit conversion # example in ruby "1" + 1 # TypeError ● weak: implicit type conversion // example in javascript "1" + 1 // "11”
  • 28. Duck Typing ❏ Duck typing is a style of dynamic typing. ❏ Duck typing, the set of methods and properties determine the valid semantics of a class, instead of inheritance from a specific class or implementation of an interface. ❏ “When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.” ❏ This means that we actually don’t care if the class we’re using is actually of a certain type, as long as it provides the methods or properties we’re interested in.
  • 29. Language Evaluation Criteria 1. Readability ● Software development was largely thought of in term of writing code “LOC”. ● Language constructs were designed more from the point of view of the computer than the users. ● Because ease of maintenance is determined in large part by the readability of programs, readability became an important measure of the quality of programs and programming languages. ● The most important criterion “ease of use” ● Overall simplicity “Strongly affects readability” ○ Too many features make the language difficult to learn. Programmers tend to learn a subset of the language and ignore its other features. “ALGOL 60” ○ Multiplicity of features is also a complicating characteristic “having more than one way to accomplish a particular operation. “Ex Java”: ● Operator overloading where a single operator symbol has more than one meaning. ● Although this is a useful feature, it can lead to reduced readability if users are allowed to create their own overloading and do not do it sensibly.
  • 30. Language Evaluation Criteria …. Cont. 1. Readability ● Orthogonality ○ Makes the language easy to learn and read. ○ Meaning is context independent. Pointers should be able to point to any type of variable or data structure. The lack of orthogonality leads to exceptions to the rules of the language. ○ A relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language. ○ Every possible combination is legal and meaningful. ○ Ex: page 11 in book. ○ The more orthogonal the design of a language, the fewer exceptions the language rules require. ○ The most orthogonal programming language is ALGOL 68. Every language construct has a type, and there are no restrictions on those types. ○ This form of orthogonality leads to unnecessary complexity.
  • 31. Language Evaluation Criteria …. Cont. 1. Readability ● Control Statements ○ It became widely recognized that indiscriminate use of goto statements severely reduced program readability. ○ Basic and Fortran in the early 70s lacked the control statements that allow strong restrictions on the use of gotos, so writing highly readable programs in those languages was difficult. ○ Since then, languages have included sufficient control structures. ○ The control statement design of a language is now a less important factor in readability than it was in the past.
  • 32. Language Evaluation Criteria …. Cont. 1. Readability ● Data Types and Structures ○ The presence of adequate facilities for defining data types and data structures in a language is another significant aid to reliability. ○ Ex: Boolean type. ■ timeout = 1 or ■ timeout = true
  • 33. Language Evaluation Criteria …. Cont. 1. Readability ● Syntax Considerations ○ The syntax of the elements of a language has a significant effect on readability. ○ The following are examples of syntactic design choices that affect readability: ○ Identifier forms: Restricting identifiers to very short lengths detracts from readability. ANSI BASIC (1978) an identifier could consist only of a single letter of a single letter followed by a single digit. ○ Special Words: Program appearance and thus program readability are strongly influenced by the forms of a language’s special words. Ex: while, class, for. C uses braces for pairing control structures. It is difficult to determine which group is being ended. Fortran 95 allows programmers to use special names as legal variable names. ○ Form and Meaning: Designing statements so that their appearance at least partially indicates their purpose is an obvious aid to readability. ○ Semantic should follow directly from syntax, or form.
  • 34. Language Evaluation Criteria …. Cont. 2. Writability ● It is a measure of how easily a language can be used to create programs for a chosen problem domain. ● Most of the language characteristics that affect readability also affect writability. ● Simplicity and orthogonality ○ A smaller number of primitive constructs and a consistent set of rules for combining them is much better than simply having a large number of primitives. ● Support for abstraction ○ Abstraction means the ability to define and then use complicated structures or operations in ways that allow many of the details to be ignored. ○ A process abstraction is the use of a subprogram to implement a sort algorithm that is required several times in a program instead of replicating it in all places where it is needed. ● Expressivity ○ It means that a language has relatively convenient, rather than cumbersome, ways of specifying computations. ○ Ex: ++count ⇔ count = count + 1 // more convenient and shorter
  • 35. Language Evaluation Criteria …. Cont. 3. Reliability ● A program is said to be reliable if it performs to its specifications under all conditions. ● Type checking: is simply testing for type errors in a given program, either by the compiler or during program execution. ○ The earlier errors are detected, the less expensive it is to make the required repairs. Java requires type checking of nearly all variables and expressions at compile time. ● Exception handling: the ability to intercept run-time errors, take corrective measures, and then continue is a great aid to reliability. ● Aliasing: it is having two or more distinct referencing methods, or names, for the same memory cell. ○ It is now widely accepted that aliasing is a dangerous feature in a language. ● Readability and writability: Both readability and writability influence reliability.