This document discusses the differences between statically and dynamically typed programming languages. It covers topics like data types, static vs dynamic languages, core differences, examples of languages in each category, and considerations for language selection and maintenance. Static languages are compiled and catch errors early, while dynamic languages are interpreted and more flexible. Both have advantages for different types of projects.
Contextual Analysis for Middle Eastern Languages with Hidden Markov Modelsijnlc
Displaying a document in Middle Eastern languages requires contextual analysis due to different presentational forms for each character of the alphabet. The words of the document will be formed by the joining of the correct positional glyphs representing corresponding presentational forms of the
characters. A set of rules defines the joining of the glyphs. As usual, these rules vary from language to language and are subject to interpretation by the software developers.
This document discusses transfer error identification in English language learners. It begins with an introduction that defines language transfer as the influence of a learner's native language on their target language. When patterns differ between the native and target languages, errors can occur which are difficult to unlearn. The document then explores using natural language processing tasks like tokenization, n-grams, part-of-speech tagging and parsing to build supervised learning models that can identify patterns of negative syntactic transfer caused by differences between a learner's native and target languages.
There are three main types of programming languages: procedural, declarative, and object-oriented. Procedural languages specify operations in a sequence and use subprograms, variables, and data types. Declarative languages declare facts and rules to solve problems using queries. Object-oriented languages are modeled around objects that can have attributes and methods, and classes act as blueprints to create object instances that can inherit properties from other classes.
This document provides an introduction to machine translation and different approaches to machine translation. It discusses the history of machine translation, beginning in the 1950s. It then describes four main approaches to machine translation: direct machine translation, rule-based machine translation, corpus-based machine translation, and knowledge-based machine translation. For each approach, it provides a brief overview and example. It focuses in more depth on direct machine translation and rule-based machine translation, explaining their process and limitations.
PSEUDOCODE TO SOURCE PROGRAMMING LANGUAGE TRANSLATORijistjournal
Pseudocode is an artificial and informal language that helps developers to create algorithms. In this papera software tool is described, for translating the pseudocode into a particular source programminglanguage. This tool compiles the pseudocode given by the user and translates it to a source programminglanguage. The scope of the tool is very much wide as we can extend it to a universal programming toolwhich produces any of the specified programming language from a given pseudocode. Here we present thesolution for translating the pseudocode to a programming language by using the different stages of acompiler
This document discusses factors to consider when choosing a programming language such as the type of application being developed, the skills of the programming team, the type of data being used, the operating system requirements, and the need for speed of execution or available APIs and functions. It also recommends practices like using modular and well-named code with internal commentary.
The document describes the evolution of programming languages from machine languages to high-level languages. It discusses four programming paradigms: procedural, object-oriented, functional, and declarative. The procedural paradigm views a program as an active agent that manipulates passive data objects using procedures. Some key procedural languages mentioned include FORTRAN, COBOL, Pascal, C, and Ada.
DRuby is a tool that adds static typing to the dynamically typed Ruby programming language. It includes a type system with features like union, intersection, and parametric polymorphism types. DRuby uses type inference to discover errors but also allows programmer annotations. It was applied to Ruby benchmarks and found potential errors and warnings. The goal of DRuby is to combine benefits of static and dynamic typing for Ruby.
Contextual Analysis for Middle Eastern Languages with Hidden Markov Modelsijnlc
Displaying a document in Middle Eastern languages requires contextual analysis due to different presentational forms for each character of the alphabet. The words of the document will be formed by the joining of the correct positional glyphs representing corresponding presentational forms of the
characters. A set of rules defines the joining of the glyphs. As usual, these rules vary from language to language and are subject to interpretation by the software developers.
This document discusses transfer error identification in English language learners. It begins with an introduction that defines language transfer as the influence of a learner's native language on their target language. When patterns differ between the native and target languages, errors can occur which are difficult to unlearn. The document then explores using natural language processing tasks like tokenization, n-grams, part-of-speech tagging and parsing to build supervised learning models that can identify patterns of negative syntactic transfer caused by differences between a learner's native and target languages.
There are three main types of programming languages: procedural, declarative, and object-oriented. Procedural languages specify operations in a sequence and use subprograms, variables, and data types. Declarative languages declare facts and rules to solve problems using queries. Object-oriented languages are modeled around objects that can have attributes and methods, and classes act as blueprints to create object instances that can inherit properties from other classes.
This document provides an introduction to machine translation and different approaches to machine translation. It discusses the history of machine translation, beginning in the 1950s. It then describes four main approaches to machine translation: direct machine translation, rule-based machine translation, corpus-based machine translation, and knowledge-based machine translation. For each approach, it provides a brief overview and example. It focuses in more depth on direct machine translation and rule-based machine translation, explaining their process and limitations.
PSEUDOCODE TO SOURCE PROGRAMMING LANGUAGE TRANSLATORijistjournal
Pseudocode is an artificial and informal language that helps developers to create algorithms. In this papera software tool is described, for translating the pseudocode into a particular source programminglanguage. This tool compiles the pseudocode given by the user and translates it to a source programminglanguage. The scope of the tool is very much wide as we can extend it to a universal programming toolwhich produces any of the specified programming language from a given pseudocode. Here we present thesolution for translating the pseudocode to a programming language by using the different stages of acompiler
This document discusses factors to consider when choosing a programming language such as the type of application being developed, the skills of the programming team, the type of data being used, the operating system requirements, and the need for speed of execution or available APIs and functions. It also recommends practices like using modular and well-named code with internal commentary.
The document describes the evolution of programming languages from machine languages to high-level languages. It discusses four programming paradigms: procedural, object-oriented, functional, and declarative. The procedural paradigm views a program as an active agent that manipulates passive data objects using procedures. Some key procedural languages mentioned include FORTRAN, COBOL, Pascal, C, and Ada.
DRuby is a tool that adds static typing to the dynamically typed Ruby programming language. It includes a type system with features like union, intersection, and parametric polymorphism types. DRuby uses type inference to discover errors but also allows programmer annotations. It was applied to Ruby benchmarks and found potential errors and warnings. The goal of DRuby is to combine benefits of static and dynamic typing for Ruby.
The document discusses key concepts related to names, variables, and scopes in programming languages:
- Names identify entities and have attributes like case sensitivity; variables have a name, type, value, address, lifetime and scope.
- Variables can be declared statically or dynamically; static variables are bound at compile time while dynamic binding occurs at runtime.
- The scope of a variable determines its visibility - local variables are only visible within their function while global variables have broader visibility.
- Referencing environments contain all variables visible within a statement, including those in ancestor scopes for languages with static scoping.
- Other concepts discussed include binding, aliases, constants, and how variables are allocated and deallocated memory.
The document provides an overview of the .NET framework including its architecture, components like the Common Language Runtime (CLR), intermediate language (IL), advantages of IL like platform independence and language interoperability. It discusses .NET framework versions, data types in C# like value types and reference types, variable declaration and scope, and basic input/output using the console.
SOFTWARE TOOL FOR TRANSLATING PSEUDOCODE TO A PROGRAMMING LANGUAGEIJCI JOURNAL
Pseudocode is an artificial and informal language that helps programmers to develop algorithms. In this
paper a software tool is described, for translating the pseudocode into a particular programming
language. This tool takes the pseudocode as input, compiles it and translates it to a concrete programming
language. The scope of the tool is very much wide as we can extend it to a universal programming tool
which produces any of the specified programming language from a given pseudocode. Here we present the
solution for translating the pseudocode to a programming language by implementing the stages of a
compiler.
The document describes the evolution of programming languages from machine languages to high-level languages, and how a program written in a high-level language is translated into machine language. It discusses four main programming paradigms - procedural, object-oriented, functional, and declarative - and provides details on the procedural paradigm. Key aspects of the procedural paradigm include programs made up of procedures that manipulate passive data items, and common procedural languages like FORTRAN, COBOL, Pascal, C, and Ada.
Architecture DSLs are a useful tool to capture the cornerstones of platform or product line architectures. In addition, interesting analyses can be performed on the models, and much of the infrastructure and configuration code can be generated. On the flip side, these DSLs themselves must be architected consciously: while many architectural abstractions are specific to any given platform or product line, many other aspects are generic and hence can be reused for several architecture DSLs. In this talk I trace how my thinking on architecture modeling has changed over time, and how this is reflected in the architecture DSLs I have built (or helped to build), and how evolving tools have made these changes possible.
The document discusses text editors and integrated development environments (IDEs) that programmers use to write code. It explains that good text editors offer features like automatic indentation, syntax highlighting, and line numbering, while Notepad++ is one commonly used by programmers. The document also states that many programmers prefer to use an IDE, which combines a text editor with additional tools for debugging, file management, drag and drop user interfaces, collaboration, and emulation. Popular IDEs mentioned include Android Studio, LiveCode, IDLE, Thonny, and PyCharm.
Machine translation from English to HindiRajat Jain
Machine translation a part of natural language processing.The algorithm suggested is word based algorithm.We have done Translation from English to Hindi
submitted by
Garvita Sharma,10103467,B3
Rajat Jain,10103571,B6
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...ijpla
This document presents a tool called BOOP (Basic Object Oriented Programming) that was created to help learn concepts of object-oriented programming. The tool includes a domain-specific programming language in Spanish, an interpreter for the language, and an integrated development environment (IDE). The IDE provides buttons and dialog boxes to guide users in writing code without needing deep knowledge of syntax. It also includes an assistant that explains OOP concepts to complement the learning process. The goal of the tool is to help users understand OOP concepts before learning to develop complex applications in other languages.
This document provides a conceptual framework for building domain-specific languages (DSLs). It discusses key characteristics of DSLs such as their focused domain, small size, and fast evolution compared to general purpose languages. The document outlines design dimensions for DSLs, including expressivity, completeness, coverage, supported paradigms, semantics, modularity, and separation of concerns. It provides examples of DSLs for components, refrigerators, extended C, and pension plans to illustrate concepts. The document argues that DSLs should provide linguistic abstractions that directly represent the semantics of a domain to avoid requiring semantic analysis during processing.
Script to Sentiment : on future of Language TechnologyMysore latestJaganadh Gopinadhan
The document discusses developments in the field of human language technology (HLT) and its future applications. It notes that HLT is no longer confined to academia and is becoming integrated into information and communication technology products and services in daily life. The document provides an overview of developments in text and speech processing, including machine translation systems and spell checkers. It also discusses the role of open source tools and frameworks in advancing research in HLT, particularly for Indian languages.
Machine translation is the use of computers to translate text from one language to another. There are two main approaches: rule-based systems which directly convert words and grammar between languages, and statistical systems which analyze phrases and "learn" translations from large datasets. While rule-based systems can model complex translations, statistical systems are better suited for most applications today due to lower costs and greater robustness. Current popular machine translation services include Google Translate, Microsoft Translator, and IBM's statistical speech-to-speech translator Mastor.
A programming language is a formal language used to describe computations. It consists of syntax, semantics, and tools like compilers or interpreters. Programming languages support different paradigms like procedural, functional, object-oriented, and logic-based approaches. Variables are named locations in memory that hold values and have properties like name, scope, type, and values.
Principles of-programming-languages-lecture-notes-Krishna Sai
This document summarizes key concepts from Chapter 1 of a programming languages textbook. It discusses reasons for studying programming language concepts, including increased ability to express ideas, improved language choice, and easier learning of new languages. It also covers programming domains like scientific, business, AI and systems programming. The document evaluates language criteria such as readability, writability and reliability. It discusses influences on language design like computer architecture and programming methodologies. It categorizes languages as imperative, functional, logic and object-oriented. Finally, it provides examples of programming environments like UNIX, JBuilder and Visual Studio.
Course: Programming Languages and Paradigms:
A brief introduction to imperative programming principles: history, von neumann, BNF, variables (r-values, l-values), modifiable data structures, order of evaluation, static and dynamic scopes, referencing environments, call by value, control flow (sequencing, selection, iteration), ...
This document provides an introduction to generic programming. It discusses the motivation for generic programming, which includes providing better abstraction and reusability in programming languages. It describes two main models for generic programming - parametric polymorphism in statically typed languages and dynamic typing in dynamically typed languages. The document also discusses implementation issues around generic programming such as efficiency, code generation, and language details.
Procedural Programming Of Programming LanguagesTammy Moncrief
Here is a summary of the key points about the specification of the Java programming language:
Java is an object-oriented programming language developed by Sun Microsystems. Some of the main specifications of the Java programming language include:
- Platform independence: Java code can run on any platform that has a Java virtual machine (JVM) without needing to be recompiled. This allows Java programs to run on various operating systems like Windows, Linux, macOS, etc.
- Object-oriented: Java follows the OOP paradigm with concepts like classes, objects, inheritance, polymorphism, etc. Everything in Java is an object.
- Simple, familiar and general-purpose: Java syntax is based on C and C++ but
This document discusses programming languages and their key concepts. It defines a programming language as a set of rules that tells a computer what operations to perform. It describes the syntax, semantics, and pragmatics of languages. It also discusses different language paradigms like imperative, functional, object-oriented, and rule-based languages. Finally, it outlines criteria for evaluating languages, including readability, writability, reliability, and cost.
A Strong Object Recognition Using Lbp, Ltp And RlbpRikki Wright
This document discusses the evolution of object-oriented technology and languages. It notes that many object-oriented languages have emerged but companies commonly use open source OO languages like Java, C++, C# and Visual Basic due to their low or no licensing costs. These languages also have readily available libraries and development resources. The history of object-oriented concepts is traced back to Simula 67 and Smalltalk in the 1960s-70s, which introduced key ideas like classes, objects, inheritance and polymorphism. Exponential growth has occurred as more systems adopt object-oriented technologies.
Irrespective of devices, C language is the best when it comes to Embedded Systems. This detailed course talks about various finer details of the language.
The document provides an overview of programming languages and the program development life cycle (PDLC). It discusses several types of programming languages including machine/assembly languages, algorithmic languages, business-oriented languages, education-oriented languages, and object-oriented languages. It also describes the six main steps of the PDLC: defining the problem, designing the program, coding the program, testing and debugging the program, documenting the program, and deploying and maintaining the program.
The document discusses key concepts related to names, variables, and scopes in programming languages:
- Names identify entities and have attributes like case sensitivity; variables have a name, type, value, address, lifetime and scope.
- Variables can be declared statically or dynamically; static variables are bound at compile time while dynamic binding occurs at runtime.
- The scope of a variable determines its visibility - local variables are only visible within their function while global variables have broader visibility.
- Referencing environments contain all variables visible within a statement, including those in ancestor scopes for languages with static scoping.
- Other concepts discussed include binding, aliases, constants, and how variables are allocated and deallocated memory.
The document provides an overview of the .NET framework including its architecture, components like the Common Language Runtime (CLR), intermediate language (IL), advantages of IL like platform independence and language interoperability. It discusses .NET framework versions, data types in C# like value types and reference types, variable declaration and scope, and basic input/output using the console.
SOFTWARE TOOL FOR TRANSLATING PSEUDOCODE TO A PROGRAMMING LANGUAGEIJCI JOURNAL
Pseudocode is an artificial and informal language that helps programmers to develop algorithms. In this
paper a software tool is described, for translating the pseudocode into a particular programming
language. This tool takes the pseudocode as input, compiles it and translates it to a concrete programming
language. The scope of the tool is very much wide as we can extend it to a universal programming tool
which produces any of the specified programming language from a given pseudocode. Here we present the
solution for translating the pseudocode to a programming language by implementing the stages of a
compiler.
The document describes the evolution of programming languages from machine languages to high-level languages, and how a program written in a high-level language is translated into machine language. It discusses four main programming paradigms - procedural, object-oriented, functional, and declarative - and provides details on the procedural paradigm. Key aspects of the procedural paradigm include programs made up of procedures that manipulate passive data items, and common procedural languages like FORTRAN, COBOL, Pascal, C, and Ada.
Architecture DSLs are a useful tool to capture the cornerstones of platform or product line architectures. In addition, interesting analyses can be performed on the models, and much of the infrastructure and configuration code can be generated. On the flip side, these DSLs themselves must be architected consciously: while many architectural abstractions are specific to any given platform or product line, many other aspects are generic and hence can be reused for several architecture DSLs. In this talk I trace how my thinking on architecture modeling has changed over time, and how this is reflected in the architecture DSLs I have built (or helped to build), and how evolving tools have made these changes possible.
The document discusses text editors and integrated development environments (IDEs) that programmers use to write code. It explains that good text editors offer features like automatic indentation, syntax highlighting, and line numbering, while Notepad++ is one commonly used by programmers. The document also states that many programmers prefer to use an IDE, which combines a text editor with additional tools for debugging, file management, drag and drop user interfaces, collaboration, and emulation. Popular IDEs mentioned include Android Studio, LiveCode, IDLE, Thonny, and PyCharm.
Machine translation from English to HindiRajat Jain
Machine translation a part of natural language processing.The algorithm suggested is word based algorithm.We have done Translation from English to Hindi
submitted by
Garvita Sharma,10103467,B3
Rajat Jain,10103571,B6
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...ijpla
This document presents a tool called BOOP (Basic Object Oriented Programming) that was created to help learn concepts of object-oriented programming. The tool includes a domain-specific programming language in Spanish, an interpreter for the language, and an integrated development environment (IDE). The IDE provides buttons and dialog boxes to guide users in writing code without needing deep knowledge of syntax. It also includes an assistant that explains OOP concepts to complement the learning process. The goal of the tool is to help users understand OOP concepts before learning to develop complex applications in other languages.
This document provides a conceptual framework for building domain-specific languages (DSLs). It discusses key characteristics of DSLs such as their focused domain, small size, and fast evolution compared to general purpose languages. The document outlines design dimensions for DSLs, including expressivity, completeness, coverage, supported paradigms, semantics, modularity, and separation of concerns. It provides examples of DSLs for components, refrigerators, extended C, and pension plans to illustrate concepts. The document argues that DSLs should provide linguistic abstractions that directly represent the semantics of a domain to avoid requiring semantic analysis during processing.
Script to Sentiment : on future of Language TechnologyMysore latestJaganadh Gopinadhan
The document discusses developments in the field of human language technology (HLT) and its future applications. It notes that HLT is no longer confined to academia and is becoming integrated into information and communication technology products and services in daily life. The document provides an overview of developments in text and speech processing, including machine translation systems and spell checkers. It also discusses the role of open source tools and frameworks in advancing research in HLT, particularly for Indian languages.
Machine translation is the use of computers to translate text from one language to another. There are two main approaches: rule-based systems which directly convert words and grammar between languages, and statistical systems which analyze phrases and "learn" translations from large datasets. While rule-based systems can model complex translations, statistical systems are better suited for most applications today due to lower costs and greater robustness. Current popular machine translation services include Google Translate, Microsoft Translator, and IBM's statistical speech-to-speech translator Mastor.
A programming language is a formal language used to describe computations. It consists of syntax, semantics, and tools like compilers or interpreters. Programming languages support different paradigms like procedural, functional, object-oriented, and logic-based approaches. Variables are named locations in memory that hold values and have properties like name, scope, type, and values.
Principles of-programming-languages-lecture-notes-Krishna Sai
This document summarizes key concepts from Chapter 1 of a programming languages textbook. It discusses reasons for studying programming language concepts, including increased ability to express ideas, improved language choice, and easier learning of new languages. It also covers programming domains like scientific, business, AI and systems programming. The document evaluates language criteria such as readability, writability and reliability. It discusses influences on language design like computer architecture and programming methodologies. It categorizes languages as imperative, functional, logic and object-oriented. Finally, it provides examples of programming environments like UNIX, JBuilder and Visual Studio.
Course: Programming Languages and Paradigms:
A brief introduction to imperative programming principles: history, von neumann, BNF, variables (r-values, l-values), modifiable data structures, order of evaluation, static and dynamic scopes, referencing environments, call by value, control flow (sequencing, selection, iteration), ...
This document provides an introduction to generic programming. It discusses the motivation for generic programming, which includes providing better abstraction and reusability in programming languages. It describes two main models for generic programming - parametric polymorphism in statically typed languages and dynamic typing in dynamically typed languages. The document also discusses implementation issues around generic programming such as efficiency, code generation, and language details.
Procedural Programming Of Programming LanguagesTammy Moncrief
Here is a summary of the key points about the specification of the Java programming language:
Java is an object-oriented programming language developed by Sun Microsystems. Some of the main specifications of the Java programming language include:
- Platform independence: Java code can run on any platform that has a Java virtual machine (JVM) without needing to be recompiled. This allows Java programs to run on various operating systems like Windows, Linux, macOS, etc.
- Object-oriented: Java follows the OOP paradigm with concepts like classes, objects, inheritance, polymorphism, etc. Everything in Java is an object.
- Simple, familiar and general-purpose: Java syntax is based on C and C++ but
This document discusses programming languages and their key concepts. It defines a programming language as a set of rules that tells a computer what operations to perform. It describes the syntax, semantics, and pragmatics of languages. It also discusses different language paradigms like imperative, functional, object-oriented, and rule-based languages. Finally, it outlines criteria for evaluating languages, including readability, writability, reliability, and cost.
A Strong Object Recognition Using Lbp, Ltp And RlbpRikki Wright
This document discusses the evolution of object-oriented technology and languages. It notes that many object-oriented languages have emerged but companies commonly use open source OO languages like Java, C++, C# and Visual Basic due to their low or no licensing costs. These languages also have readily available libraries and development resources. The history of object-oriented concepts is traced back to Simula 67 and Smalltalk in the 1960s-70s, which introduced key ideas like classes, objects, inheritance and polymorphism. Exponential growth has occurred as more systems adopt object-oriented technologies.
Irrespective of devices, C language is the best when it comes to Embedded Systems. This detailed course talks about various finer details of the language.
The document provides an overview of programming languages and the program development life cycle (PDLC). It discusses several types of programming languages including machine/assembly languages, algorithmic languages, business-oriented languages, education-oriented languages, and object-oriented languages. It also describes the six main steps of the PDLC: defining the problem, designing the program, coding the program, testing and debugging the program, documenting the program, and deploying and maintaining the program.
The document discusses computer programming paradigms and languages. It provides a history of programming languages from machine code to modern high-level languages. It covers key concepts like abstraction, computational paradigms including imperative and functional paradigms, and the lambda calculus foundation of functional programming. Programming language characteristics like readability, portability and security/reliability are also examined.
Computer Science Is The Study Of Principals And How The...Laura Martin
Computer science is the study of principles of how computers work, which leads to computer programming. Computer programming is the process of formulating a computing problem and developing executable programs to solve it. It is important because many everyday devices like Microsoft Word had to be programmed to function. Common programming languages include Java, Python, C, C++, Ruby, and JavaScript. As a computer programmer, there are always new languages to learn and existing ones to refresh skills in due to constantly evolving technologies.
The film Cold Mountain follows the journey of Inman as he tries to return home to Ada after being separated by the Civil War. The movie shows flashbacks of Inman and Ada's relationship before the war. It also shows Ada struggling to survive on her own after being left alone. The film focuses on Inman's dangerous journey back to Cold Mountain and Ada learning to take care of herself in his absence.
This document provides an overview of the CSC 447 course on Organization of Programming Languages taught at the Federal University of Agriculture, Abeokuta. The course will cover topics like language definition structures, data types, control structures, runtime considerations, and language evaluation over weeks 1 and 2. It also outlines various programming language paradigms, implementation methods, influences on language design, and criteria for comparing languages.
The document describes a language workbench called Generic Tools Specific Languages (GTSL). It discusses how GTSL allows building generic tools that can support arbitrary domain-specific languages through language extensions. This is achieved by focusing on the underlying language data first before tooling. Language workbenches provide common tooling for any language definition while also allowing these languages to be customized. The document provides an example of GTSL being used to build an IDE for embedded software engineering that combines several DSLs through a shared language workbench.
This document provides an industrial training presentation on Python programming. It introduces Python, explaining that it is an interpreted, object-oriented, high-level programming language. It then covers why Python is used, its basic data types like numbers, strings, lists, dictionaries, tuples and sets. The presentation also discusses Python concepts like conditionals, loops, functions, exceptions, file handling, object-oriented programming and databases. It concludes that Python supports both procedural and object-oriented programming and can be universally accepted. References for further reading are also included.
Creating a compiler for your own languageAndrea Tino
A guide through Computational Linguistics for developing Compilers and Interpreters.
The document is not in a definitive state and some parts might be incomplete or still at draft level. Definitive version will be uploaded soon by updating this document.
This document discusses several key concepts for comparing programming languages. It begins by explaining that programming languages conform to rules for syntax and semantics and that there are thousands of languages, though few become widely popular. It then outlines 12 main concepts for comparing languages: object orientation, static vs dynamic typing, generic classes, inheritance, feature renaming, method overloading, operator overloading, higher order functions/lexical closures, garbage collection, uniform access, class variables/methods, and reflection. For each concept, it provides details on how it is implemented in different languages.
Rhein-Main Scala Enthusiasts — Your microservice as a FunctionPhil Calçado
This document discusses applying functional programming principles to microservice architecture. It begins by discussing how the author got started with functional and object-oriented programming. It then discusses how functional principles like avoiding side effects and function composition correlate with good design, implementation, and architecture of microservices. Some examples discussed include applying filters as composable functions, keeping services stateless, and storing different data in different databases. The document argues that functional principles lead to microservices that are flexible, scalable and maintainable.
KernelF is a functional language built on top of MPS. It is designed to be highly extensible and embeddable in order to support its use at the core of domain-specific languages, realising an approach we sometimes call Funclerative Programming. 'Funclerative' is of course a mash-up of 'functional' and 'declarative' and refers to the idea of using functional programming in the small, and declarative language constructs for the larger-scale, often domain-specific, structures in a program. We have used KernelF in a wide range of languages including health and medicine, insurance contract definition, security analysis, salary calculations, smart contracts and language-definition. In this keynote, I illustrate the evolution of KernelF over the last two years. I discuss requirements on the language, and how those drove design decisions. I showcase a couple of the DSLs we built on top of KernelF to explain how MPS was used to enable the necessary language modularity. I demonstrate how we have integrated the Z3 solver to verify some aspects of programs. I present the architecture we have used to use KernelF-based DSLs in safety-critical environments. I close the keynote with an outlook on how KernelF might evolve in the future, and point out a few challenges for which we don't yet have good solutions.
More on Indexing Text Operations (1).pptxMahsadelavari
This document discusses various text processing techniques used in information retrieval systems, including tokenization, removal of stop words, normalization, stemming/lemmatization, and handling different languages. It provides examples and issues to consider for each technique. For example, it explains tokenization may involve splitting text at punctuation or deciding if "San Francisco" is one or two tokens. For normalization, it discusses techniques like case folding, handling accents, and creating equivalence classes. The document also compares stemming versus lemmatization and notes stemming is less accurate but requires less linguistic knowledge than lemmatization.
The document discusses intermediate languages, which are languages used internally by compilers to represent code in a platform-independent way. Intermediate languages allow code to be compiled once and run on multiple platforms, improving portability. Popular intermediate languages include p-code for Pascal compilers and Java bytecodes. The document explores the history and approaches to intermediate languages, including stack-based representations and using high-level languages like C as intermediates.
Unveiling the Origins, Myths, Use and Benefits of Dynamic LanguagesActiveState
Dynamic languages are high-level, dynamically typed open source languages. These languages, designed to solve the problems that programmers of all abilities face in building and integrating heterogeneous systems, have proven themselves both despite and thanks to their independence from corporate platform strategies, relying instead on grassroots development and support. Ideally suited to building loosely coupled systems that adapt to changing requirements, they form the foundation of myriad programming projects, from the birth of the web to tomorrow’s challenges.
Similar to Maintenance of Dynamically vs. Statically typed Languages (20)
This document presents a process model for software measurement methods consisting of four main steps: 1) devising a measurement method, 2) applying the method to software, 3) producing results, and 4) exploiting results in quantitative models. It also discusses validation requirements for measurement methods, identifying checks needed to validate each step and sub-step in the process. While offering a knowledgeable discussion, the document notes that a complete validation framework addressing the full measurement process is still needed.
SOFTWARE MEASUREMENT ESTABLISHING A SOFTWARE MEASUREMENT PROCESSAmin Bandeali
This document provides a framework for establishing a software measurement process within an organization. It outlines a four step architecture for designing such a process, including identifying what data to collect, how to collect and report it, how to use the data to make decisions, and how to evolve the process over time. The document also recommends establishing a focal group to lead the measurement effort, designing the initial process, testing it on projects, documenting results, and integrating the process fully within the organization. The goal is to provide managers visibility into the software development lifecycle through measurement in order to improve processes, products, planning, and decision making.
SOFTWARE MEASUREMENT ESTABLISHING A SOFTWARE MEASUREMENT PROCESSAmin Bandeali
This document provides guidelines for establishing a software measurement process. It outlines objectives like tying measurement to goals and defining measurements clearly. It recommends following the Plan-Do-Check-Act cycle and using the Entry-Task-Validation-Exit framework. The document also describes starting a software measurement program by forming a focal group, identifying objectives, designing and prototyping the process, documenting and implementing it, then expanding the program. The overall goal is to provide insights into software processes and products to make better decisions through measurement.
Privacy Identity Theft National ID Card and REAL ID ActAmin Bandeali
Identity theft occurs when someone uses someone else's personal information like name, Social Security number, or credit card number without permission to commit fraud. The FTC estimates 9 million Americans have their identities stolen each year, with average losses of $5,720 per victim. Identity thieves do this to illegally obtain goods and services like renting apartments, opening credit cards or bank accounts, or filing fraudulent tax returns in the victim's name. Victims must file police reports, check credit reports, notify creditors of errors, and change account numbers to protect themselves from further damages. While a national ID card could help reduce identity theft and illegal immigration, it also risks easier identity theft through lost or stolen cards and increased government monitoring of citizens.
This document discusses extending agile methodologies to large, distributed projects. It argues that with some modifications, agile practices can be applied successfully to complex projects. Some key extensions discussed are establishing an agile architecture team, using "super leads" to oversee multiple agile teams, and emphasizing light-weight documentation. The advantages of taking an agile approach to large projects include gaining an early market edge, improving quality through incremental releases, better managing risks, and ensuring the delivered product meets customer needs.
Lead Allocation System's Attribute Driven Design (ADD)Amin Bandeali
This document summarizes the Attribute Driven Design approach for a Lead Allocation System (LAS) architecture. It identifies the functional requirements, design constraints, and quality attribute requirements for LAS. It then goes through each step of the ADD process, including choosing architectural drivers, design concerns, and patterns to address the concerns. The key patterns selected include FIFO queue for performance, active redundancy for availability, and authorizing users for security. The document provides rationale for pattern selections to satisfy the architectural drivers.
Lead Allocation System - Attribute Driven Design (ADD)Amin Bandeali
The document describes applying Attribute-Driven Design (ADD) to design the architecture for a Lead Allocation System (LAS). It involves decomposing the system into elements, identifying architectural drivers from requirements, designing concepts to address the drivers, instantiating elements and defining interfaces. The security service element is decomposed in the second iteration to address authentication, authorization and integrity concerns using an Active Directory, user role database and gateway.
The document discusses a new lead allocation system (LAS) that aims to improve upon the legacy system. The new LAS allows for real-time allocation of leads based on location and acquisition rates. Key benefits include reduced costs for marketing and IT departments within the first year, and increased lead conversions and partner satisfaction. The system analyzes bids from partners in real-time and routes non-duplicate leads to the partner with the highest bid for that lead based on location. Stakeholders want an accurate, responsive system that is easy to use and maintain, while being delivered on budget and with all key features.
Software Process Improvement – CMMI and IDEALAmin Bandeali
This document summarizes the homework report for a software process improvement project. It discusses using the CMMI and IDEAL models to improve a company's software development process from CMMI maturity level 1 to level 2. The document outlines the current immature ad hoc process and the desired managed process at level 2. It then describes using the five phases of the IDEAL model (Initiating, Diagnosing, Establishing, Acting, and Learning) to guide the process improvement effort. The focus areas are determined to be project planning and project monitoring/control, and plans are described to establish new processes, obtain commitment, and monitor/control projects going forward.
Software Process Improvement SCAMPI: Standard CMMI Appraisal Method for Proce...Amin Bandeali
The document summarizes the appraisal plan and process for assessing the Project Planning and Project Monitoring and Control process areas of the RIA team at Extron Electronics using the SCAMPI method. An appraisal team was selected and trained. Initial documentation was collected from the RIA team and reviewed. Interviews and workshops were planned with RIA team members. Specific practices for the process areas were examined and found to be satisfactorily addressed based on the documentation. The appraisal was proceeding as planned.
The document discusses two software verification and validation tools: NUnit and HP LoadRunner. NUnit is a unit testing framework for .NET that provides features like assertions, setup/teardown functionality, and test runners. It is used to verify code meets specifications. HP LoadRunner performs load and performance testing to validate systems can meet service level agreements under certain user loads. It generates virtual users, runs tests via a controller, and provides analysis to identify bottlenecks. Both tools are used in later software development phases like implementation and verification to help ensure quality.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
OpenID AuthZEN Interop Read Out - AuthorizationDavid Brossard
During Identiverse 2024 and EIC 2024, members of the OpenID AuthZEN WG got together and demoed their authorization endpoints conforming to the AuthZEN API
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Maintenance of Dynamically vs. Statically typed Languages
1. CPSC 543
Dynamically and Statically typed Languages
June 10, 2009
Submitted By
Muhammad Bandeali
Submitted to
Prof. Allen Holliday
California State University, Fullerton
i
5. Introduction
For the last few years a major change has been taking place; more and more people have been
transitioning from static system languages such as Java, C#, C++ to dynamic languages such as
Perl, Python, etc. Even though many people are participating in the change, not many know why
is it really happening? Do dynamic languages handle many of the programming tasks better than
static languages?
The answer to this phenomenon is not so simple. Static system programming languages were
designed for creating data structures and algorithms in a bottom up manner by hand typing in the
most primitive variables to high level abstract classes. Dynamic languages are designed for
gluing the already built set of powerful components on static system programming languages.
Hence, both dynamic and static languages could be complementary [4].
Static languages strive to minimize surprises at the runtime and therefore fix any errors at
compile time. But the nature of design and implementation of these languages places constraints
on the user that narrows any choices.
Dynamic languages on the other hand minimize those constraints and let the user do anything
they want by eliminating bookkeeping, organizations and declarations. That makes them a
perfect candidate for prototyping ideas.
However, performance have been a key issue in dynamic languages, while static languages have
overcome that challenge by compiler code optimizations and further optimizations by their
respective virtual machines (platforms).
This paper is geared towards defining, comparing and contrasting dynamically typed languages
to statically typed languages in their most basic traits. It will also shed light on the different
aspects of those language types that assist or hinder in maintaining software.
Data Types
A data type is an abstraction. It is the common property of a set of similar data objects. This
property is used to define a representation for these objects in a program. Objects are said to
“have” or to “be of” that type to which they belong [1].
In a statically typed language, every variable and parameter has a fixed type that is chosen by the
programmer. Thus the type of each expression can be deduced, and each operation type-checked,
at compile-time. Most high-level languages are statically typed [2].
In a dynamically typed language, only the values have fixed types. A variable or parameter has
no designated type, but may take values of different types at different times. This implies that the
operands must be type-checked immediately before performing an operation at run-time. [2]
These are the different forms of type systems:
1.1 Sound types
A sound type system is one that provides some kind of guarantee for the user. Many modern type
systems like JAVA and C# are sound; but older languages like C often do not have sound type
systems by design; their type systems are just designed to give warnings for common errors [20].
1.2 Explicit/Implicit types
Implicit / explicit types refer to the extent to which a compiler will reason about the static types
of a language. ML and Haskell have implicit types, in that no type declarations are needed. Java
and Ada have very explicit types, and one is constantly declaring the types of things [20].
1
6. 1.2.1 Implicit type
// i is compiled as an int
var i = 5;
1.2.2 Explicit type
// i is declared as an int
Int32 i = new Int32(5);
1.3 Structural types
This distinction is generally applied to static types with sub-typing. Structural typing means a
type is assumed whenever it is possible to validly assume it. It also allows you to be a bit more
explicit about your expectations on an object.
// In scala the object f passed in this method should have the
method called getName()
def test(f: { def getName(): String }) {
log(f.getName)
}
1.4 Duck typing
If it walks like a duck and quacks like a duck, it must be a duck. This is a concept that has
become popular recently. It refers to the dynamic type analogue of structural typing in which an
object’s current set of methods and properties determines the valid semantics, rather than its
inheritance from a particular class or implementation of a specific interface [21].
//pseudo code for the calculate method
function calculate(a, b, c) => return (a+b)*c
//calculate method called with different parameters
example1 = calculate (1, 2, 3)
example2 = calculate ([1, 2, 3], [4, 5, 6], 2)
example3 = calculate ('apples ', 'and oranges', 3)
//printing the output from above
print to_string example1
9
print to_string example2
[1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6]
print to_string example3
apples and oranges, apples and oranges, apples and oranges,
As we can see, the language outputted the correct result as long as any of the input data types
(int, string) supported the ‘+’ and ‘*’ operator.
2
7. Static Programming Languages
Static system languages were introduced as an alternative to assembly. In assembly languages,
virtually every aspect of the machine is reflected in the program. Each statement represents a
single machine instruction and programmers must deal with low-level details such as register
allocation and procedure calling sequences. As a result, it is difficult to write and maintain large
programs in assembly language [4]. Static languages are also known as strongly typed languages.
These are called strong because they guarantee a certain runtime behavior before running the
actual program. The compiler ensures that operands only function in a pre-destined way with the
actual operations and the data objects never changes over the object’s lifespan. They also provide
type safety. At compile or run time, the rejection of operations or function calls which attempt to
disregard data types. In a more rigorous setting, type safety is proved about a formal language by
proving progress and preservation [5]. Statically typed systems are necessarily also conservative.
They can categorically prove the absence of some bad program behaviors, but they cannot prove
their presence [9].
Dynamic Programming Languages
Dynamic programming language is a term used broadly in computer science to describe a class
of high-level programming languages that execute at runtime many common behaviors that other
languages might perform during compilation, if at all. These behaviors could include extension
of the program, by adding new code, by extending objects and definitions, or by modifying the
type system, all during program execution [6].
Dynamically typed languages support dynamic allocation of storage objects whenever they are
needed to contain an input value or the result of a computation. Identifiers are typeless in the
sense that types are not permanently attached to them. Rather, a type tag is attached to each
storage object when it is created. The storage object is then bound dynamically to an identifier.
Thus the type that is indirectly associated with an identifier may change dynamically [1].
Dynamic language opponents argue that these languages cannot scale in terms of capacity
handling, because they are “built on top of their own runtimes, which are arguably vastly inferior
to the engineering effort that goes into the garbage collection facilities found in the JVM Hotspot
or CLR implementations.” [7]
Core Differences
The following table illustrates major differences between static and dynamic languages in a
nutshell that are in production today:
Static Languages Dynamic Languages
Earlier detection of programming mistakes at Detection is delayed until runtime
compile-time
Better documentation through type signatures Documentation possible through comments
Compiler and runtime code optimizations Runtime code optimizations only
Better IDE support for a at design time IDE support limited to few well-known
developer experience, through features like languages, since it is considerably hard for IDE
Refactor, Rename, etc. to assume types at design time. [13]
Not too good for prototyping. Static typing is Well suited for prototyping due to its ad-hoc
too rigid. nature, implicit and duck typing.
Have to be compiled, deployed and forked Can usually be run from an interactive
3
8. using the underlying platform. command prompt, increasing productivity. [13]
Longer learning curve. Usually shorter learning curve. [13]
Languages
The following table houses few popular static and dynamic languages that are in lime light
today:
Statically Typed Languages Dynamically Typed Languages
ML, Haskell, Java, C#, C++, etc Lisp, Scheme, Php, Ruby, Postscript,
JavaScript, etc
Static to Dynamic
For illustration purposes, the following section would show the steps involved in transforming a
traditional statically typed language, Java to a modern dynamic language, Ruby. The following
method is taking an object of the class country and printing the output by calling a method on it,
called capitalCity.
private static void printCapitalOf(Country country)
{
System.out.println(country.capitalCity());
}
public static void main(String[] args)
{
Country aus = new Australia();
Country jpn = new Japan();
printCapitalOf(aus);
printCapitalOf(jpn);
}
The above could turn into a dynamically typed language, by leaving out the types, as follows:
private static void printCapitalOf(Country country)
{
System.out.println(country.capitalCity());
}
public static void main(String[] args)
{
Country aus = new Australia();
Country jpn = new Japan();
printCapitalOf(aus);
printCapitalOf(jpn);
}
The same logic as above implemented in a dynamically typed language Ruby. As we can see,
duck typing is being used to assume the type of the object country:
4
9. def printCapitalOf(country)
{
print(country.capitalCity())
}
def aus = new Australia();
def jpn = new Japan();
printCapitalOf(aus);
printCapitalOf(jpn);
Type Inference and Binding
Type inference plays a big role in language performance and security. Dynamic typing implies
that execution of the program is slowed down by implicit run-type checks, and also implies that
every value must be tagged to identify its type in order to make these type checks possible. These
time and space overheads are avoided in a statically typed language, because all type checks are
performed at compile-time. Another feature of static typing is compile time security. Type errors
are guaranteed to be detected by the compiler, rather than being left to the vagaries of testing [2].
Static binding happens when the body of a function is evaluated in the environment of the
function definition, whereas dynamic binding occurs when the function body is evaluated in the
environment of the function call. With static binding we can do this at compile-time; with
dynamic binding we must delay this until run-time [2].
Sub-typing
Static type systems can enforce higher-level modularity properties to protect the integrity of user
defined abstractions, therefore enforcing disciplined programming. Violations of information
hiding, such as directly accessing the fields of a data value whose representation is supposed to
be abstract, are caught at compile time, instead of runtime in opposed to dynamic typed
languages. In large-scale software composition, statically typed languages form the backbone of
module languages used to package and tie together the components of large systems. Structuring
larger systems in terms of modules with clear interfaces leads to a more abstract style of design,
where interfaces are designed and discussed independently from their eventual implementations.
More abstract thinking about interfaces generally leads to better design [9].
Generics
Generic programming is a style of computer programming in which algorithms are written in
terms of to-be-specified-later types that are then instantiated when needed for specific types
provided as parameters. Generic programming refers to features of certain statically typed
programming languages that allow some code to effectively circumvent the static typing
requirements. Generic programming is commonly used to implement containers such as lists and
hash tables and functions such as a particular sorting algorithm for objects specified in terms
more general than a concrete type [14].
//The following is an interface which allows the methods to work
on a type T unknown till runtime.
interface IEnumerator<T>
5
10. {
bool MoveNext();
T Current { get; }
}
Generic classes and methods in statically typed languages combine reusability, type safety and
efficiency in a way that dynamically typed languages cannot. By allowing types and programs to
be parameterized by types, it becomes possible to create highly reusable libraries, while
maintaining the benefits of compile-time type checking [11].
In combination with type-inference, usually writing types explicitly is unnecessary. In the
example below, the compiler infers that variable xs has type IEnumerator<string>, and hence
that variable x has type string:
var xs = {
yield return quot;Helloquot;;
yield return quot;Worldquot;;
};
foreach(x in xs)
{
Console.WriteLine(x);
}
In languages without generics a new sort function would require for any element type, and any
kind of collection. Using generics a single function that sorts arbitrary collections of arbitrary
element types void Sort<T>(...) and IComparer<T> would be enough.
void Sort<T>(IComparer<T> comparer)
{
...
}
Reflection
Reflection is the ability to find out information about objects, the application details
(assemblies), its metadata at run-time [15]. It is a special trait of statically typed languages. It is
very powerful since it is a way of collecting and manipulating information present in application
shared libraries and its metadata. Metadata contain all the Type information used by the
application. The ability to obtain information at runtime also makes it even more advantageous
[15].
It is a consensus that that the ability to dynamically eval strings as programs is what sets
dynamic languages apart from static languages. But, in reality any language that can dynamically
load class loaders in some form or another, either via DLLs, shared libraries or dynamic class
loading, has the ability to do eval, even though eval is considered a poor man’s substitute for
higher-order functions. Instead of passing around a function and call it, they pass around a string
and eval it [12].
6
11. Maintenance
12.1 Packages/Namespaces
Namespaces are well-defined boundaries that are used to organize code in a unique fashion.
Every statically programming language supports various forms of namespaces, be they as fine-
grained as the context of a procedure or a block, or as coarse-grained as packages or modules.
Namespaces provide a consistent way of grouping related source code together in a pre defined
fashion. This makes code cleaner, streamlined and easier to maintain. In most, if not all statically
typed languages namespaces are first-class citizens. Namespaces can be used to model objects,
classes, meta-objects, software components, modules, and a variety of compositional
abstractions, such as wrappers and mix-in layers. Furthermore, namespaces lend themselves well
to formal specification using standard semantic modeling techniques, which can form the basis
for reasoning about language constructs [22]. Dynamic languages have second class namespaces.
In languages like JavaScript, most global functions that are part of the language are in the global
namespace. These class names have to be organized in ways that there are no conflicts between
two classes of same names in two files. This type of distinction is usually done by
company_namespace_class
{
…
}
Good namespaces could aid quite a bit in development and maintenance activities. In languages
where namespaces are not available, the above technique has to be used; otherwise there is a
good possibility of method or class name confusion. Namespaces also help when reading,
understanding, restructuring or reengineering software.
12.2 Contracts
In human affairs, contracts are written between two parties when one of them performs some
task for the other. Each party expects some benefits from the contract, and accepts some
obligations in return. Contracts in object oriented languages, facilitates the concept of
inheritance, which makes software more maintainable by avoiding redundancy and sharing
structures and behaviors. Statically typed languages provide a very solid means for contracts
between elements and provide a standard way to document them [3]. A method with three
arguments, in Java for example would only and only accept the objects it is expecting in a well-
defined sequence. However, static typing could provide a false sense of safety, since it can only
prove the absence of certain errors statically at compile time. Even if a program does not contain
any static type-errors, it does not imply that you will not encounter any unwanted runtime errors.
Dynamic languages being susceptive to runtime surprises forces developers to put in place very
strict unit testing frameworks therefore eliminating any chances for run-time contract
nightmares. In a dynamic language like PHP, contracts could be loose; depending on how a
method is written, it could accept a combination of parameters based on their default values in
the method. The same method could have multiple contracts, therefore unit tests should be
written for each type of method usage.
7
12. 12.3 New Requirements Testing
Dynamic languages could be more productive and easier to use than static languages. However,
making code easier to write does not necessarily yield long term gains. In bigger projects, the
lack of language formality can be detrimental to the maintenance bottom line. That includes
adding new features to the system. Unit testing helps but they are a form of sampling and as
such, they tend to suffer from selection bias. Static languages, while limited in what they can
accomplish right off the bat, have a 100% success rate for what is type checked and covered.
Unit tests on the other hand have a failure rate due to limited input/output/state coverage and
should not be considered as a replacement for basic error checking but as a supplement to it.
New features are far easier to add in dynamic languages than static, however both paradigms
need strict and well to do unit tests to verify and validate the new features/requirements. The
type of issues that should be cared for while testing dynamic languages are:
• Order of tests in case of interpreters since they interpret code line by line
• Tests cannot be run in parallel due to global state variables and their sharing
• New tests can break old tests by changing global state variables
Even though in static languages like Java, method definitions could be replaced at runtime using
a Class Loaders and Aspect Oriented Programming frameworks; this is not how Java is used in
the real world and therefore there are not many unknown cases that have to be brought into
perspective when unit testing while adding new features. Usually unit tests that cover 90% or
more validate the design.
12.4 Refactoring
Refactoring is a disciplined technique for restructuring an existing body of code, altering its
internal structure without changing its external behavior. Its heart is a series of small behavior
preserving transformations. Each transformation (called a ‘refactoring’) does little, but a
sequence of transformations can produce a significant restructuring. Since each refactoring is
small, it’s less likely to go wrong. The system is also kept fully working after each small
refactoring, reducing the chances that a system can get seriously broken during the restructuring
[10].
Refactoring is usually aided by very sophisticated editors. Few of them are eclipse and IntelliJ.
Static typing helps these editors navigate between modules. A well-factored, well-tested
application spreads each feature over several layers and unites them all by type. These editors
can easily bounce between related tests, views, controllers, and models, simply by tracking the
types they use. Dynamic languages however, don’t have a notion of types at development time.
Hence, any IDE would have a hard time navigating through code. Here are few ways that
dynamic languages could be modeled for refactoring. Using PHP interpreter and running the
code [18]. In order to find all occurrences of a function, for example few work-around have been
proposed like renaming the original function name and create a function with the old name that
adds the caller to a list and then modifying the callers to call the renamed functions. At the end
delete the function with the old name. Refactoring of dynamic languages depend on a 100%
coverage test suite so each and every possible path in the program’s flow could be covered.
8
13. 12.5 Reengineering
Reengineering software is defined as “reorganizing and modifying existing software system(s) to
make them more maintainable by re-structuring or re-writing part or all of a legacy system
without changing its functionality.” [17] It is applicable where few or all of the components or
modules of a larger system require frequent maintenance. Reengineering plays a big role in
adaptive, perfective and preventive change. In order to implement a new version of a software
system, it is crucial to obtain its architecture and design if not already present. This information
is required for the identification of all the entities that have some relation with the evolving part
of the software. In addition, we need it for providing new source code that will fit in the existing
system. Recovering the design of an application has to be done by using both static and dynamic
information. Static information describes the structure of the software as it is written in the
source code, while dynamic information describes what is really happening at runtime. Statically
typed languages provide a very comprehensive set of static information, while dynamically typed
languages do not reveal much at development time. Therefore, it could be possible that structural
information would show that two classes are just a bit related, as there could only be one method
call from one class to the other. However, it dynamic information could show that the same call
occurs continuously when running the application, making the two classes very related.
12.6 Reuse
Reusability is the likelihood a segment of source code that can be used again to add new
functionalities with slight or no modification. Reusable modules and classes reduce
implementation time, increase the likelihood that prior testing and use has eliminated bugs and
localizes code modifications when a change in implementation is required. Martin Fowler says:
“Any fool can write code that a computer can understand. Good programmers write code that
humans can understand.” However, for software to be reusable, it must be usable in a variety of
contexts. An important attribute of reusability at the code level is genericity. Generic software
can operate, unmodified, on a variety of object types. Dynamically typed languages provide
genericity naturally:
//Python function that determines the smallest of whatever it
receives as a parameter
def smallest(stuff):
assert len(stuff) > 0
theMin = stuff[0]
for x in stuff[1:]:
if x < theMin: theMin = x
return theMin
This function can be called with any type of sequence:
smallest([1,2,3])
1
smallest(quot;cbaquot;)
a
9
14. The only constraints on the parameter stuff are that it is an iterable entity and that its contained
objects support the less than operator [16]. Hence, smallest is a generic function and is very
easily reusable in variety of applications. Statically typed languages cannot have such flexibility
out of the box [16], but that is changing. Modern languages such as Java and C# now have
generic programming capability while retaining the safety and efficiency that comes with static
type checking.
12.7 Documentation
Statically typed languages could prove to be easier when reading programs. Because
documentation is not just about comments. It is about everything that helps people understand
software. Static type systems build ideas that help explain a system and what it does. They
capture information about the inputs and outputs of various functions and modules. The type
declarations in procedure headers and module interfaces constitute a form of documentation,
giving useful hints about behavior. Moreover, unlike descriptions embedded in comments (in
dynamically typed languages), this form of documentation cannot become outdated, since it is
checked during every run of the compiler. This role of types is particularly important in module
signatures [9].
This is exactly the set of information needed in documentation. Clearly, if all of this information
is written in comments, there is a pretty good chance it will eventually become out of date. If this
information is written in identifier names, it will be nearly impossible to fit it all in. Type
information is a very nice place to keep this information.
After all it is better to have self-documenting code than code that needs a lot of comments. Most
languages with static type systems have type inference, which is directly analogous to self-
documenting code. Information about the correct way to use a piece of code is extracted from the
code itself, but then verified and presented in a convenient format. It is this type of
documentation that doesn’t need to be maintained or even written, but is available on demand
even without reading the source code.
Language Selection
There is no universally superior language, but language selection has long term implications
including those of business capability, cost and technology lock-in. So how should a team choose
a language for its next “big” project? According to Dhananjay Nene [19], these are the
dimensions of selection of a programming language:
13.1 Capability
What the languages can and cannot do?
13.2 Productivity
How efficiently can one write programs using the language?
13.3 Costs
What are the costs of using the language?
13.4 Expectations
Can the language deliver on expectations? What is the cost of delivering on expectations?
13.5 Development
10
15. How long does it take to write and debug code? If skills are not present, what is the cost and
time required to build them?
13.6 Support
What is the support structure available from community?
13.7 Deployment
What are the hardware and deployment costs?
13.8 Performance
How fast can the programs run for given hardware?
13.9 Scalability
How cost effectively can the software be scaled to handle higher loads?
13.10 Reliability
How fault tolerant can the resultant software be?
13.11 Hardware
Ease of cloud/virtualized hosting; hosting requirements for small vs. medium vs. big apps.
13.12 Ramp- Up Time
How easily can you get online?
As things stand, today’s programmer has a wide range of languages to choose from but none of
them is perfect for every job. However, a programmer who has a knowledge of static (usually for
back-end) and dynamic languages (usually for front-end) probably does not need anything
beyond those tools. The following is the breakdown of languages currently being part of the
O’Reilly’s code zoo, [24] which is one view point of various languages being in use today. As
we can see, dynamic languages like Python, PHP, Ruby, and Perl seem to have taken down
almost 50% of the pie chart with C, C# and C++ taking down a large majority of the rest. It is
also interesting to note that Java, a major language is missing from this pie chart.
11
16. Conclusion
Maintenance is an ongoing activity in the world of software. Therefore, a lot of effort should go
into choosing the right languages and tools for a new software application. The languages and
tools usually stay with the application for its entire lifetime. The creators of the application
usually leave the project after development due to what I call software maintenance syndrome.
Maintenance programmers could then be overwhelmed by the complexity of the source code.
After a number of modifications, design documents could be outdated or non-existent. They just
have to do it hoping the bugs disappear before the deadline. Despite of the fact that maintenance
requires experience and skills, novice programmers are often assigned to this time-consuming
task, making the situation worse.
In many ways, we are still in the dark ages of programming language design. Consider, for
example, the great innovations in programming languages over the past fifty years. To a large
extent, most of these innovations were achieved in the 1950s and 1960s. It is harder and harder
to identify significant contributions over the past 20 years. It is also hard to identify truly radical
language designs in recent years [23]. The software industry is faced with new challenges posed
12
17. by enormous advances in hardware and internet technology. Silicon chips cannot go up in
performance and clock cycle anymore; we therefore need language features like inherit
concurrency and multi threading. The truth is there is no silver bullet; if I want to drive on the
race track, my regular car wouldn’t fit the profile, but a good performance car with special
suspension, brakes and tires would, in which case I should be ready to pay the price for constant
barrage of new tires and brake pads.
13
18. References
[1] Alice E. Fischer, Frances S. Grodzinsky. “The Anatomy of Programming Languages”.
Prentice Hall. January 1993.
[2] Watt, David. “Programming Language Concepts and Paradigms”. Prentice Hall. May 1990.
[3] Building bug-free O-O software: An introduction to Design by Contract(TM).
http://archive.eiffel.com/doc/manuals/technology/contract/page.html
[4] Ousterhout , John.“Scripting: Higher Level Programming for the 21st Century”. Sun
Microsystems Laboratories.
[5] http://en.wikipedia.org/wiki/Strongly-
typed_programming_language#Meanings_in_computer_literature
[6] http://en.wikipedia.org/wiki/Dynamic_programming_language
[7] http://sadekdrobi.com/2008/02/09/scalability-dynamic-and-static-programming-languages/
[8] Erik Meijer, Peter Drayton. “Static Typing Where Possible, Dynamic Typing When Needed:
The End of the Cold War Between Programming Languages”. Microsoft Corporation.
[9] Pierce, Benjamin. “Types and Programming Languages”. The MIT Press.2002
[10] Fowler, Martin. http://www.refactoring.com
[11] D. A. Schmidt. quot;The Structure of Typed Programming Languagesquot;. MIT Press. 1994.
[12] D. Ungar and R. B. Smith. “Self: The Power of Simplicity”. In Proceedings OOPSLA’87.
1987.
[13] Visual Numerics, Inc. “Components for Analytic Prototyping and Production Deployment”.
February 2009
[14] http://en.wikipedia.org/wiki/Generic_programming
[15] Code Source. http://www.codersource.net/published/view/291/reflection_in.aspx
[16] Allison, Chuck. “Designing Reusable Software”. StickyMinds.
[17] Sommerville,Ian. “Software Engineering”. Addison Wesley; 6 edition. August 21, 2000.
[18] Don Roberts, John Brant, Ralph Johnson. “A Refactoring Tool for Smalltalk”.
[19] Nene, Dhananjay. “Programming Language Selection”. A PuneTech event. March 28, 2009.
[20] Smith, Chris. http://www.pphsg.org/cdsmith/types.html.
[21] http://en.wikipedia.org/wiki/Duck_typing
[22] Oscar Nierstrasz, Alexandre Bergel, Marcus Denker, St´ephane Ducasse, Markus G¨alli, and
Roel Wuyts. “On the Revival of Dynamic Languages”. Software Composition Group, University
of Bern.
[23] Black, Greg. “Programming Language Selection”.
[24] http://lesscode.org/2005/08/04/code-zoo-language-breakdown/
14