This document provides an overview of the JavaScript programming language, including its history, key concepts, values, objects, and functions. It summarizes JavaScript as a dynamic language that unifies objects and functions, uses prototype-based inheritance, and loosely typed values. Everything in JavaScript is an object, which can be used to represent records, trees, and other data structures using dynamic object literals.
One of the advantages of learning a new language is being exposed to new idioms and new approaches to solving old problems. In this talk, we will introduce the Ruby language with particular focus on the idioms and concepts that are different from what is found in Java.
We will introduce concepts such as closures, continuations and meta programming. We will also examine powerful techniques that are practically impossible in Java due to its compile time binding of types.
No experience with Ruby is assumed although an understanding of Java would be helpful.
This talk was given at the Toronto Java Users Group in April 2008
This document summarizes Martin Odersky's talk on DOT and dotty. DOT is intended to be a minimal foundational calculus for Scala that can model type parameterization, modules, and objects/classes. DOT includes dependent types to model modules as objects with type members. The DOT type system includes function types, method declarations, type declarations, and intersections. DOT's soundness proof was challenging due to programmer-definable subtyping. Dotty is the new Scala compiler prototype built on DOT, supporting new features like union and intersection types while dropping some old features. Implicit function types in dotty allow abstracting over implicit contexts without boilerplate.
1) The document discusses several Java performance myths and uses microbenchmarks to analyze them. It finds that final variables and String concatenation are not necessarily faster than alternatives.
2) It recommends using the Caliper framework for robust microbenchmarking and provides several useful JVM flags for profiling and optimization.
3) The document outlines various Java optimization strategies used by the JVM compiler including inlining, intrinsics, escape analysis, and loop unrolling. It emphasizes the importance of clear and readable code over premature optimization.
The document discusses four approaches to implementing higher-kinded types in the Dotty compiler: the simple encoding, projection encoding, refinement encoding, and direct representation. It describes each approach and its limitations. The simple encoding provides a modest way to support basic higher-kinded concepts but has difficulty explaining legality. The projection and refinement encodings had problems and were ultimately less successful than initially hoped. A direct representation of higher-kinded types through special type forms was needed for robust support. While compiler hacking validated ideas, a better theoretical foundation relating higher-kinded types to the DOT calculus may have avoided some experiments.
The JavaScript programming language is a multi-paradigm language that is misunderstood due to its name, design errors in early implementations, and use in web browsers. It is a functional language that uses objects, prototypes, and closures. Values in JavaScript include numbers, strings, Booleans, objects, null, and undefined. All other values are objects.
Shapeless- Generic programming for ScalaKnoldus Inc.
"Introduction to Shapeless- Generic programming for Scala !". Broadly speaking, shapeless is about programming with types. Doing things at compile-time that would more commonly be done at runtime to ensure type-safety. A long list of features provided by Shapeless are explained in the enclosed presentation.
One of the advantages of learning a new language is being exposed to new idioms and new approaches to solving old problems. In this talk, we will introduce the Ruby language with particular focus on the idioms and concepts that are different from what is found in Java.
We will introduce concepts such as closures, continuations and meta programming. We will also examine powerful techniques that are practically impossible in Java due to its compile time binding of types.
No experience with Ruby is assumed although an understanding of Java would be helpful.
This talk was given at the Toronto Java Users Group in April 2008
This document summarizes Martin Odersky's talk on DOT and dotty. DOT is intended to be a minimal foundational calculus for Scala that can model type parameterization, modules, and objects/classes. DOT includes dependent types to model modules as objects with type members. The DOT type system includes function types, method declarations, type declarations, and intersections. DOT's soundness proof was challenging due to programmer-definable subtyping. Dotty is the new Scala compiler prototype built on DOT, supporting new features like union and intersection types while dropping some old features. Implicit function types in dotty allow abstracting over implicit contexts without boilerplate.
1) The document discusses several Java performance myths and uses microbenchmarks to analyze them. It finds that final variables and String concatenation are not necessarily faster than alternatives.
2) It recommends using the Caliper framework for robust microbenchmarking and provides several useful JVM flags for profiling and optimization.
3) The document outlines various Java optimization strategies used by the JVM compiler including inlining, intrinsics, escape analysis, and loop unrolling. It emphasizes the importance of clear and readable code over premature optimization.
The document discusses four approaches to implementing higher-kinded types in the Dotty compiler: the simple encoding, projection encoding, refinement encoding, and direct representation. It describes each approach and its limitations. The simple encoding provides a modest way to support basic higher-kinded concepts but has difficulty explaining legality. The projection and refinement encodings had problems and were ultimately less successful than initially hoped. A direct representation of higher-kinded types through special type forms was needed for robust support. While compiler hacking validated ideas, a better theoretical foundation relating higher-kinded types to the DOT calculus may have avoided some experiments.
The JavaScript programming language is a multi-paradigm language that is misunderstood due to its name, design errors in early implementations, and use in web browsers. It is a functional language that uses objects, prototypes, and closures. Values in JavaScript include numbers, strings, Booleans, objects, null, and undefined. All other values are objects.
Shapeless- Generic programming for ScalaKnoldus Inc.
"Introduction to Shapeless- Generic programming for Scala !". Broadly speaking, shapeless is about programming with types. Doing things at compile-time that would more commonly be done at runtime to ensure type-safety. A long list of features provided by Shapeless are explained in the enclosed presentation.
NSCoder Swift - An Introduction to SwiftAndreas Blick
The document provides an overview of the Swift programming language, introducing key concepts like variables and constants, strings, numbers, arrays, dictionaries, tuples, loops, conditionals, functions, closures, classes, properties, methods, initialization, and inheritance. It describes Swift as a modern language that builds on C and Objective-C without compatibility constraints, and supports safe patterns, modern features, and seamless access to Cocoa frameworks.
This document discusses text and numbers in programming. It covers defining and manipulating text strings using single or double quotes. Escape characters can be used inside strings. Text can be validated and formatted using various string functions like trim(), strlen(), strtoupper(), substr(), and str_replace(). Numbers can be integers or floats. Variables hold data and can be operated on with arithmetic and assignment operators like +, -, *, /, %, and .=. Variables can also be incremented, decremented, and placed inside strings.
The document compares and contrasts the Java and C# programming languages. It summarizes that Java is not fully object-oriented as it uses primitive types, while C# makes all types objects. It also discusses various language features introduced over time, showing that C# often introduced useful features earlier than Java, such as generics and LINQ. The document provides code examples to demonstrate how tasks can be expressed more declaratively and concisely in C# compared to Java.
This is an intermediate conversion course for C++, suitable for second year computing students who may have learned Java or another language in first year.
This document provides an agenda and notes for a talk on optimizing Scala code to solve real-world problems without explosions, broken thumbs, or bullet wounds. The agenda includes discussing mantras, collection functions, implicits, and style. It emphasizes writing expressions instead of statements, avoiding null, staying immutable, using options instead of null checks, and limiting the scope of implicits. It also covers collection functions, type classes, and breaking out of for-comprehensions. The overall message is to write clear, concise Scala code using best practices around expressions, immutability, and type safety.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
Java is an object-oriented programming language developed by Sun Microsystems to be small, simple, and portable across platforms. It uses classes and objects, inheritance, interfaces, and packages. A class is a template that defines objects, which are instances of a class. Inheritance allows classes to inherit attributes and behaviors from parent classes. Interfaces define behaviors without implementations. Packages organize related classes.
The document discusses new features in .NET 3.5 including automatic properties, extension methods, object initialization, anonymous types, partial methods, type inference, LINQ, lambda expressions, and query expressions. It explains that these language enhancements combined with query expressions enable LINQ by providing a unified way to query and manipulate data from various sources.
1 kotlin vs. java: some java issues addressed in kotlinSergey Bandysik
Kotlin addresses several issues in Java by controlling null references in the type system, eliminating raw types, making arrays invariant, defining proper function types, allowing use-site variance without wildcards, and removing checked exceptions. It fixes null references by allowing nullable types and non-null types, provides null-safe calls and operators like Elvis and safe casts, and filters nulls from collections.
Xbase - Implementing Domain-Specific Languages for Javameysholdt
This document discusses using Xtext to implement domain-specific languages for Java. Xtext allows defining the grammar of a DSL and generates an IDE and runtime. Key points:
- Xtext generates editors, compilers/interpreters, debuggers from a DSL grammar. The grammar reuse and customization allow adapting Xtext to different needs.
- Xbase provides a reusable expression language that can be embedded in Xtext DSLs, providing features like lambda expressions, extension methods, and type inference.
- A JvmModel inference performs a model-to-model transformation to map DSL models to equivalent Java classes, providing context for linking, type system, and compilation of DSL expressions.
The document discusses Guild, a new concurrency abstraction for Ruby that allows parallel execution across Guilds while avoiding data races. It provides demonstrations of Guild performance on a 40 vCPU system. Guilds allow sharing immutable and specially defined mutable objects between Guilds, while normal mutable objects cannot be shared to avoid data races. Inter-Guild communication uses an actor model with sending/receiving semantics. Non-shareable objects can be sent between Guilds either by copying or moving ownership.
Ruby is a fully object-oriented programming language where everything is an object. It uses modules to group classes and symbols to name variables and methods. Ruby code is written in blocks delimited by keywords like 'if' and 'end'. An example program demonstrates how a Person class in Ruby compares to a similar class in Java, using object instantiation, attributes, and a method. Key differences between Ruby and Java include Ruby being dynamically typed, using '# ' for comments, and 'attr_accessor' for getters and setters.
Phantom types allow using the type system to enforce correctness by distinguishing types that are never instantiated at runtime. The summary describes how phantom types can be used to define a Form trait where the type parameter distinguishes validated and unvalidated form data, ensuring validation is performed before accessing validated data. This provides static type safety without runtime overhead from phantom types, which are never instantiated.
The document provides an overview of the JavaScript programming language, including its history, key concepts, values, operators, statements, functions, and objects. It discusses JavaScript's origins, misunderstandings, dynamic and loosely typed nature, use of prototypes for inheritance rather than classes, and treatment of arrays and objects.
The document provides an overview of the JavaScript programming language, including its history, key concepts, values, operators, statements, and objects. It discusses JavaScript's misunderstood nature due to its name, design errors in early implementations, and use in browsers. Some key points made include: JavaScript is a functional language; it uses prototypal inheritance instead of classes; all values are objects except for primitive values; and functions are first-class objects that can be assigned and passed around.
Kotlin is a programming language that can be used for Android development. It is interoperable with Java and compiles to JVM bytecode. Some key features of Kotlin discussed in the document include null safety, properties, functions, classes, inheritance, and Android integration. Kotlin code can inherit from and call Java code, and most Android APIs are written in Java so they can be called from Kotlin as well. The document provides examples of Kotlin syntax for variables, control flow, collections, and comparing Kotlin and Java implementations of common patterns like fragments. References are also included for further Kotlin learning resources.
NSCoder Swift - An Introduction to SwiftAndreas Blick
The document provides an overview of the Swift programming language, introducing key concepts like variables and constants, strings, numbers, arrays, dictionaries, tuples, loops, conditionals, functions, closures, classes, properties, methods, initialization, and inheritance. It describes Swift as a modern language that builds on C and Objective-C without compatibility constraints, and supports safe patterns, modern features, and seamless access to Cocoa frameworks.
This document discusses text and numbers in programming. It covers defining and manipulating text strings using single or double quotes. Escape characters can be used inside strings. Text can be validated and formatted using various string functions like trim(), strlen(), strtoupper(), substr(), and str_replace(). Numbers can be integers or floats. Variables hold data and can be operated on with arithmetic and assignment operators like +, -, *, /, %, and .=. Variables can also be incremented, decremented, and placed inside strings.
The document compares and contrasts the Java and C# programming languages. It summarizes that Java is not fully object-oriented as it uses primitive types, while C# makes all types objects. It also discusses various language features introduced over time, showing that C# often introduced useful features earlier than Java, such as generics and LINQ. The document provides code examples to demonstrate how tasks can be expressed more declaratively and concisely in C# compared to Java.
This is an intermediate conversion course for C++, suitable for second year computing students who may have learned Java or another language in first year.
This document provides an agenda and notes for a talk on optimizing Scala code to solve real-world problems without explosions, broken thumbs, or bullet wounds. The agenda includes discussing mantras, collection functions, implicits, and style. It emphasizes writing expressions instead of statements, avoiding null, staying immutable, using options instead of null checks, and limiting the scope of implicits. It also covers collection functions, type classes, and breaking out of for-comprehensions. The overall message is to write clear, concise Scala code using best practices around expressions, immutability, and type safety.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
Java is an object-oriented programming language developed by Sun Microsystems to be small, simple, and portable across platforms. It uses classes and objects, inheritance, interfaces, and packages. A class is a template that defines objects, which are instances of a class. Inheritance allows classes to inherit attributes and behaviors from parent classes. Interfaces define behaviors without implementations. Packages organize related classes.
The document discusses new features in .NET 3.5 including automatic properties, extension methods, object initialization, anonymous types, partial methods, type inference, LINQ, lambda expressions, and query expressions. It explains that these language enhancements combined with query expressions enable LINQ by providing a unified way to query and manipulate data from various sources.
1 kotlin vs. java: some java issues addressed in kotlinSergey Bandysik
Kotlin addresses several issues in Java by controlling null references in the type system, eliminating raw types, making arrays invariant, defining proper function types, allowing use-site variance without wildcards, and removing checked exceptions. It fixes null references by allowing nullable types and non-null types, provides null-safe calls and operators like Elvis and safe casts, and filters nulls from collections.
Xbase - Implementing Domain-Specific Languages for Javameysholdt
This document discusses using Xtext to implement domain-specific languages for Java. Xtext allows defining the grammar of a DSL and generates an IDE and runtime. Key points:
- Xtext generates editors, compilers/interpreters, debuggers from a DSL grammar. The grammar reuse and customization allow adapting Xtext to different needs.
- Xbase provides a reusable expression language that can be embedded in Xtext DSLs, providing features like lambda expressions, extension methods, and type inference.
- A JvmModel inference performs a model-to-model transformation to map DSL models to equivalent Java classes, providing context for linking, type system, and compilation of DSL expressions.
The document discusses Guild, a new concurrency abstraction for Ruby that allows parallel execution across Guilds while avoiding data races. It provides demonstrations of Guild performance on a 40 vCPU system. Guilds allow sharing immutable and specially defined mutable objects between Guilds, while normal mutable objects cannot be shared to avoid data races. Inter-Guild communication uses an actor model with sending/receiving semantics. Non-shareable objects can be sent between Guilds either by copying or moving ownership.
Ruby is a fully object-oriented programming language where everything is an object. It uses modules to group classes and symbols to name variables and methods. Ruby code is written in blocks delimited by keywords like 'if' and 'end'. An example program demonstrates how a Person class in Ruby compares to a similar class in Java, using object instantiation, attributes, and a method. Key differences between Ruby and Java include Ruby being dynamically typed, using '# ' for comments, and 'attr_accessor' for getters and setters.
Phantom types allow using the type system to enforce correctness by distinguishing types that are never instantiated at runtime. The summary describes how phantom types can be used to define a Form trait where the type parameter distinguishes validated and unvalidated form data, ensuring validation is performed before accessing validated data. This provides static type safety without runtime overhead from phantom types, which are never instantiated.
The document provides an overview of the JavaScript programming language, including its history, key concepts, values, operators, statements, functions, and objects. It discusses JavaScript's origins, misunderstandings, dynamic and loosely typed nature, use of prototypes for inheritance rather than classes, and treatment of arrays and objects.
The document provides an overview of the JavaScript programming language, including its history, key concepts, values, operators, statements, and objects. It discusses JavaScript's misunderstood nature due to its name, design errors in early implementations, and use in browsers. Some key points made include: JavaScript is a functional language; it uses prototypal inheritance instead of classes; all values are objects except for primitive values; and functions are first-class objects that can be assigned and passed around.
Kotlin is a programming language that can be used for Android development. It is interoperable with Java and compiles to JVM bytecode. Some key features of Kotlin discussed in the document include null safety, properties, functions, classes, inheritance, and Android integration. Kotlin code can inherit from and call Java code, and most Android APIs are written in Java so they can be called from Kotlin as well. The document provides examples of Kotlin syntax for variables, control flow, collections, and comparing Kotlin and Java implementations of common patterns like fragments. References are also included for further Kotlin learning resources.
This document provides an introduction to JavaScript, including what JavaScript is used for, how it interacts with HTML and CSS, and some basic JavaScript concepts. JavaScript allows making web pages interactive by inserting dynamic text, reacting to events like clicks, performing calculations, and getting information about the user's computer. It is commonly used for calculations, waiting for and responding to events, and manipulating HTML tags. The document discusses JavaScript's role on the client-side, using variables, data types, operators, arrays, functions, and the console for debugging. It provides examples of declaring variables, strings, logical operators, arrays, and functions.
This document provides an introduction to Swift 2 and covers various Swift language basics including variables and constants, arrays, optionals, functions and closures, classes, structs, enums, protocols, and generics. It discusses syntax, properties, methods and gives examples for each language feature. The document is organized into sections for each language concept and provides code samples and explanations.
This document provides an overview of JavaScript, including its uses, syntax, data types, operators, and objects. JavaScript is an object-based scripting language used to program the behavior of web pages. It allows for client-side validation, dynamic drop-down menus, displaying data and time, and other interactive effects. JavaScript code can be embedded directly in HTML using <script> tags or linked externally. The core data types include numbers, strings, Booleans, arrays, and objects. Objects are similar to arrays but use named indexes instead of numbered indexes. Key JavaScript concepts covered include variables, literals, functions, conditionals, and more.
JavaScript was originally created as LiveScript in 1995 and renamed to JavaScript. It is an interpreted scripting language that can be added to HTML pages to provide dynamic interactivity. JavaScript code is executed by the browser's JavaScript engine and does not need to be compiled. It allows manipulating the structure, style, and content of HTML documents, validating form data, detecting browser capabilities, and much more.
The document provides an overview of the Swift programming language, summarizing that it is fast, modern, and safe. It then covers key Swift concepts like variables, strings, arrays, dictionaries, optionals, control flow, functions, closses, classes, inheritance, enums, structs, protocols, extensions, and generics in under 3 sentences each. The document encourages learning more about Swift from Apple's official documentation.
Go is a general purpose programming language created by Google. It is statically typed, compiled, garbage collected, and memory safe. Go has good support for concurrency with goroutines and channels. It has a large standard library and integrates well with C. Some key differences compared to other languages are its performance, explicit concurrency model, and lack of classes. Common data types in Go include arrays, slices, maps, structs and interfaces.
Ruby for Java Programmers provides an overview of the Ruby programming language for Java developers. It discusses Ruby's origins and timeline, key differences from Java like duck typing and mixins, and how Ruby approaches concepts like classes, objects, and closures differently. The document aims to explain Ruby's philosophy and help Java programmers transition to Ruby's more dynamic style.
Ruby for Java Programmers provides an overview of the Ruby programming language for Java developers. Some key points:
- Ruby was created in 1993 and gained popularity with the Rails framework in the mid-2000s. It influences include Smalltalk and Lisp.
- Ruby is dynamically typed with duck typing. Classes are objects that can be modified. Everything is an object with message passing.
- Similarities to Java include garbage collection and use of a virtual machine. Differences include optional syntax, mixins instead of interfaces, and reopening of classes.
- Ruby focuses on solving problems concisely while Java focuses on reusable building blocks. Closures and metaprogramming allow more flexible programming in Ruby.
A MAC URISA event. This talk is oriented to GIS users looking to learn more about the Python programming language. The Python language is incorporated into many GIS applications. Python also has a considerable installation base, with many freely available modules that help developers extend their software to do more.
The beginning third of the talk discusses the history and syntax of the language, along with why a GIS specialist would want to learn how to use the language. The middle of the talk discusses how Python is integrated with the ESRI ArcGIS Desktop suite. The final portion of the talk discusses two Python projects and how they can be used to extend your GIS capabilities and improve efficiency.
Recording of the talk: https://www.youtube.com/watch?v=F1_FqvbXHb4
This document introduces Java programming concepts including object-oriented programming, primitive data types, control structures, predefined classes like Math and String, writing and documenting classes, and summarizing key characteristics of Java like being platform independent. It also covers topics like processing Java code, defining and using classes and objects, arrays, input/output streams, and more.
Swift is a modern, safe, and interactive programming language. It is fast, supports modern features like closures and generics, and is type safe with static typing and ARC memory management. The document provides an overview of key Swift concepts like variables and constants, basic types, optionals, collection types like arrays and dictionaries, control flow, and switch statements. Examples are given for working with strings, integers, floating point numbers, collections, and optional values.
Adobe Flash Actionscript language basics chapter-2Nafis Ahmed
In this chapter, I have discussed about the language basics that creates the foundation of Adobe Actionscript 3. From variables, data types, comments, loops to conditionals, much of the basics are covered about flash actionscript in this chapter. In the next chapter, chapter-3, I will be discussing about creating classes and making objects out of it. So tighten your seat bealts buddies!
Visit my youtube channel Nafis's Classroom to watch the entire lesson:
https://www.youtube.com/channel/UCD1a7Kgz4m8tp-U6T8dLyMg
This document provides an introduction to Python, including:
- Python is an open source, high-level programming language that is dynamic typed and includes many standard modules.
- It can be used for GIS tasks like interfacing with ArcGIS and automating geoprocessing workflows.
- Key Python concepts covered include strings, lists, tuples, dictionaries, conditionals, loops, modules, and error handling.
- The document demonstrates how to use the Python IDLE development environment and provides additional resources for learning Python.
This document provides an introduction to Python, including:
- Python is an open source, high-level programming language that is dynamic typed and includes many standard modules.
- It can be used for GIS tasks like interfacing with ArcGIS and automating geoprocessing workflows.
- Key Python concepts covered include strings, lists, tuples, dictionaries, conditionals, loops, modules, and error handling.
- The document demonstrates how to use the Python interactive shell and development environments like IDLE.
This document discusses JSON (JavaScript Object Notation) and its role as a lightweight data interchange format, particularly for use in AJAX applications. It provides an overview of JSON's syntax and design, describing how it represents common data types like strings, numbers, objects, and arrays. It also addresses some criticisms of JSON and potential extensions to make it more flexible.
Java is an object-oriented programming language and platform. It uses a virtual machine (JVM) to run bytecode, making Java programs platform independent. The JVM handles memory management through garbage collection. Java uses classes and objects to implement OOP concepts. Variables are declared with a specific primitive data type or class type. Java supports control flow statements like if/else and loops. Arrays allow storing multiple values of the same type. Methods define reusable blocks of code that can operate on objects.
- JavaScript was created in 1995 by Brandon Eich and was originally called LiveScript. It was renamed to JavaScript to capitalize on the popularity of Java, though the two languages are unrelated.
- JavaScript is an interpreted, prototype-based scripting language that is commonly used for client-side web development but can also be used for server-side applications and other programs. It has dynamic typing and supports functions as first-class objects.
- The document discusses JavaScript syntax including variables, numbers, strings, comments, control flow statements like if/else and loops, and functions. It also covers the Rhino runtime environment for running JavaScript without a browser.
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.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
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.
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
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
4. Sources of
Misunderstanding
• The Name
• Mispositioning
• Design Errors
• Bad Implementations
• The Browser
• Bad Books
• Substandard Standard
• JavaScript is a Functional
Language
5. History
• 1992
Oak, Gosling at Sun & FirstPerson
• 1995
HotJava
LiveScript, Eich at Netscape
• 1996
JScript at Microsoft
• 1998
ECMAScript
6. Not a Web Toy
• It is a real language
• Small, but sophisticated
• It is not a subset of Java
7. Key Ideas
• Load and go delivery
• Loose typing
• Objects as general containers
• Prototypal inheritance
• Lambda
• Linkage though global variables
9. Numbers
• Only one number type
No integers
• 64-bit floating point
• IEEE-754 (aka “Double”)
• Does not map well to common
understanding of arithmetic:
• 0.1 + 0.2 = 0.30000000000000004
10. NaN
• Special number: Not a Number
• Result of undefined or erroneous
operations
• Toxic: any arithmetic operation
with NaN as an input will have NaN
as a result
• NaN is not equal to anything,
including NaN
12. parseInt function
parseInt(value, 10)
• Converts the value into a number.
• It stops at the first non-digit character.
• The radix (10) should be required.
parseInt("08") === 0
parseInt("08", 10) === 8
13. Math
• Math object is modeled on Java's Math class.
• It contains
abs absolute value
floor integer
log logarithm
max maximum
pow raise to a power
random random number
round nearest integer
sin sine
sqrt square root
14. Strings
• Sequence of 0 or more 16-bit
characters
UCS-2, not quite UTF-16
No awareness of surrogate pairs
• No separate character type
Characters are represented as strings with
a length of 1
• Strings are immutable
• Similar strings are equal ( == )
• String literals can use single or double
quotes
24. Dynamic Objects
• Unification of Object and Hashtable
• new Object() produces an empty container of
name/value pairs
• A name can be any string, a value can be any
value except undefined
• members can be accessed with dot notation
or subscript notation
• No hash nature is visible (no hash codes or
rehash methods)
25. Loosely Typed
• Any of these types can be stored
in an variable, or passed as a
parameter to any function
• The language is not "untyped"
26. C
• JavaScript is syntactically a C
family language
• It differs from C mainly in its type
system, which allows functions to
be values
27. Identifiers
• Starts with a letter or _ or $
• Followed by zero or more letters, digits, _ or $
• By convention, all variables, parameters,
members, and function names start with
lower case
• Except for constructors which start with
upper case
• Initial _ should be reserved for
implementations
• $ should be reserved for machines.
28. Reserved Words
abstract
boolean break byte
case catch char class const continue
debugger default delete do double
else enum export extends
false final finally float for function
goto
if implements import in instanceof int
interface
long
native new null
package private protected public
return
short static super switch synchronized
this throw throws transient true try typeof
var volatile void
while with
31. +
• Addition and concatenation
• If both operands are numbers,
then
add them
else
convert them both to strings
concatenate them
'$' + 3 + 4 = '$34'
32. +
• Unary operator can convert
strings to numbers
+"42" = 42
• Also
Number("42") = 42
• Also
parseInt("42", 10) = 42
+"3" + (+"4") = 7
33. /
• Division of two integers can
produce a non-integer result
10 / 3 = 3.3333333333333335
34. == !=
• Equal and not equal
• These operators can do type
coercion
• It is better to use === and !==,
which do not do type coercion.
35. &&
• The guard operator, aka logical and
• If first operand is truthy
then result is second operand
else result is first operand
• It can be used to avoid null references
if (a) {
return a.member;
} else {
return a;
}
• can be written as
return a && a.member;
36. ||
• The default operator, aka logical or
• If first operand is truthy
then result is first operand
else result is second operand
• It can be used to fill in default values.
var last = input || nr_items;
• (If input is truthy, then last is input,
otherwise set last to nr_items.)
37. !
• Prefix logical not operator.
• If the operand is truthy, the result
is false. Otherwise, the result is
true.
• !! produces booleans.
38. Bitwise
& | ^ >> >>> <<
• The bitwise operators convert the
operand to a 32-bit signed integer,
and turn the result back into 64-
bit floating point.
40. Break statement
• Statements can have labels.
• Break statements can refer to those
labels.
loop: for (;;) {
...
if (...) {
break loop;
}
...
}
41. For statement
• Iterate through all of the elements
of an array:
for (var i = 0; i < array.length; i += 1) {
// within the loop,
// i is the index of the current member
// array[i] is the current element
}
42. For statement
• Iterate through all of the members of
an object:
for (var name in object) {
if (object.hasOwnProperty(name)) {
// within the loop,
// name is the key of current member
// object[name] is the current value
}
}
43. Switch statement
• Multiway branch
• The switch value does not need to
a number. It can be a string.
• The case values can be
expressions.
47. Try Statement
• The JavaScript implementation
can produce these exception
names:
'Error'
'EvalError'
'RangeError'
'SyntaxError'
'TypeError'
'URIError'
48. With statement
• Intended as a
short-hand
• Ambiguous
• Error-prone
• Don't use it
with (o) {
foo = null;
}
o.foo = null;
foo = null;
50. Var statement
• Defines variables within a
function.
• Types are not specified.
• Initial values are optional.
var name;
var nrErrors = 0;
51. Scope
• In JavaScript, {blocks} do not
have scope.
• Only functions have scope.
• Vars defined in a function are not
visible outside of the function.
52. Return statement
return expression;
• or
return;
• If there is no expression, then the
return value is undefined.
• Except for constructors, whose
default return value is this.
53. Objects
• Everything else is objects
• Objects can contain data and
methods
• Objects can inherit from other
objects.
54. Collections
• An object is an unordered collection of
name/value pairs
• Names are strings
• Values are any type, including other
objects
• Good for representing records and
trees
55. Object Literals
• Object literals are wrapped in { }
• Names can be names or strings
• Values can be expressions
• : separates names and values
• , separates pairs
56. Object Literals
var myObject = {name: "Jack B. Nimble",
'goto': 'Jail', grade: 'A', level: 3};
"name" "Jack B. Nimble"
"goto" "Jail"
"grade" "A"
"level" 3
var theName = myObject.name;
var destination = myObject['goto'];
57. Maker Function
function maker(name, where, grade, level) {
var it = {};
it.name = name;
it['goto'] = where;
it.grade = grade;
it.level = level;
return it;
}
myObject = maker("Jack B. Nimble",
'Jail', 'A', 3);
62. Object Augmentation
• New members can be added to
any object by simple assignment
• There is no need to define a new
class
myObject.format.colorModel =
'YCgCb';
myObject[name] = value;
63. Linkage
• Objects can be created with a secret
link to another object.
• If an attempt to access a name fails,
the secret linked object will be used.
• The secret link is not used when
storing. New members are only added
to the primary object.
• The object(o) function makes a new
empty object with a link to object o.
64. Linkage
"name" "Jack B. Nimble"
"goto" "Jail"
"grade" "A"
"level" 3
var myNewObject = object(myOldObject);
myNewObject
myOldObject
67. Prototypal Inheritance
• Some languages have classes,
methods, constructors, and modules.
JavaScript's functions do the work of
all of those.
• Instead of Classical Inheritance,
JavaScript has Prototypal Inheritance.
• It accomplishes the same things, but
differently.
• It offers greater expressive power.
• But it's different.
68. Prototypal Inheritance
• Instead of organizing objects into rigid
classes, new objects can be made that are
similar to existing objects, and then
customized.
• Object customization is a lot less work than
making a class, and less overhead, too.
• One of the keys is the object(o) function.
• The other key is functions.
69. Object Methods
• All objects are linked directly or indirectly
to Object.prototype
• All objects inherit some basic methods.
• None of them are very useful.
• hasOwnProperty(name)
Is the name a true member of this
object?
• No copy method.
• No equals method.
70. Object Construction
• Make a new empty object
• All three of these expressions have
exactly the same result:
new Object()
{}
object(Object.prototype)
• {} is the preferred form.
71. Reference
• Objects can be passed as
arguments to functions, and can
be returned by functions
Objects are passed by reference.
Objects are not passed by value.
• The === operator compares object
references, not values
true only if both operands are the
same object
72. Delete
• Members can be removed from an
object with the delete operator
delete myObject[name];
73. Arrays
• Array inherits from Object.
• Indexes are converted to strings and
used as names for retrieving values.
• Very efficient for sparse arrays.
• Not very efficient in most other cases.
• One advantage: No need to provide a
length or type when creating an array.
74. length
• Arrays, unlike objects, have a special
length member.
• It is always 1 larger than the highest
integer subscript.
• It allows use of the traditional for
statement.
for (i = 0; i < a.length; i += 1) {
...
}
75. Array Literals
• An array literal uses []
• It can contain any number of
expressions, separated by commas
myList = ['oats', 'peas', 'beans'];
• New items can be appended
myList[myList.length] = 'barley';
• The dot notation should not be used
with arrays.
• [] is preferred to new Array().
77. Deleting Elements
delete array[number]
• Removes the element, but leaves
a hole in the numbering.
array.splice(number, 1)
• Removes the element and
renumbers all the following
elements.
79. Arrays v Objects
• Use objects when the names are
arbitrary strings.
• Use arrays when the names are
sequential integers.
• Don't get confused by the term
Associative Array.
81. Arrays and Inheritance
• Don’t use arrays as prototypes.
The object produced this way does not
have array nature. It will inherit the array's
values and methods, but not its length.
• You can augment an individual array.
Assign a method to it.
This works because arrays are objects.
• You can augment all arrays.
Assign methods to Array.prototype
82. Functions
• Functions are first-class objects
1. Functions can be passed,
returned, and stored just like any
other value
2. Functions inherit from Object
and can store name/value pairs.
83. Function operator
• The function operator takes an
optional name, a parameter list,
and a block of statements, and
returns a function object.
function name(parameters) {
statements
}
• A function can appear anywhere
that an expression can appear.
84. lambda
• What JavaScript calls function,
other languages call lambda.
• It is a source of enormous
expressive power.
• Unlike most power-constructs, it
is secure.
85. Function statement
• The function statement is just a
short-hand for a var statement
with a function value.
function foo() {}
expands to
var foo = function foo() {};
86. Inner functions
• Functions do not all have to be
defined at the top level (or left
edge).
• Functions can be defined inside of
other functions.
87. Scope
• An inner function has access to
the variables and parameters of
functions that it is contained
within.
• This is known as Static Scoping
or Lexical Scoping.
88. Closure
• The scope that an inner function
enjoys continues even after the
parent functions have returned.
• This is called closure.
89. Example
function fade(id) {
var dom = document.getElementById(id),
level = 1;
function step () {
var h = level.toString(16);
dom.style.backgroundColor =
'#FFFF' + h + h;
if (level < 15) {
level += 1;
setTimeout(step, 100);
}
}
setTimeout(step, 100);
}
90. Function Objects
• Functions are objects, so they can
contain name/value pairs.
• This can serve the same purpose
as static members in other
languages.
91. Method
• Since functions are values,
functions can be stored in
objects.
• A function in an object is called a
method.
92. Invocation
• If a function is called with too
many arguments, the extra
arguments are ignored.
• If a function is called with too few
arguments, the missing values
will be undefined.
• There is no implicit type checking
on the arguments.
93. Invocation
• There are four ways to call a function:
Function form
functionObject(arguments)
Method form
thisObject.methodName(arguments)
thisObject["methodName"](arguments)
Constructor form
new functionObject(arguments)
Apply form
functionObject.apply(thisObject,
[arguments])
94. Method form
thisObject.methodName(arguments)
• When a function is called in the
method form, this is set to
thisObject, the object containing
the function.
• This allows methods to have a
reference to the object of
interest.
95. Function form
functionObject(arguments)
• When a function is called in the
function form, this is set to the
global object.
That is not very useful.
It makes it harder to write helper
functions within a method because
the helper function does not get
access to the outer this.
var that = this;
96. Constructor form
new functionObject(arguments)
• When a function is called with the
new operator, a new object is
created and assigned to this.
• If there is not an explicit return
value, then this will be returned.
97. this
• this is an extra
parameter. Its
value depends on
the calling form.
• this gives
methods access
to their objects.
• this is bound at
invocation time.
Invocation
form
this
function
the global
object
method the object
constructor
the new
object
98. arguments
• When a function is invoked, in addition
to its parameters, it also gets a special
parameter called arguments.
• It contains all of the arguments from
the invocation.
• It is an array-like object.
• arguments.length is the number of
arguments passed.
99. Example
function sum() {
var i,
n = arguments.length,
total = 0;
for (i = 0; i < n; i += 1) {
total += arguments[i];
}
return total;
}
104. typeof
• The typeof prefix operator returns
a string identifying the type of a
value. type typeof
object 'object'
function 'function'
array 'object'
number 'number'
string 'string'
boolean 'boolean'
null 'object'
undefined 'undefined'
105. eval
eval(string)
• The eval function compiles and
executes a string and returns the
result.
• It is what the browser uses to convert
strings into actions.
• It is the most misused feature of the
language.
106. Function function
new Function(parameters, body)
• The Function constructor takes zero or
more parameter name strings, and a
body string, and uses the JavaScript
compiler to produce a function object.
• It should only be used to compile fresh
source from a server.
• It is closely related to eval.
107. Built-in Type Wrappers
• Java has int and Integer, two
incompatible types which can both
carry the same value with differing
levels of efficiency and
convenience.
• JavaScript copied this pattern to no
advantage. Avoid it.
• Avoid new Boolean()
• Avoid new String()
• Avoid new Number()
109. Augmentation
• We can directly modify individual
objects to give them just the
characteristics we want.
• We can do this without having to
create classes.
• We can then use our new object as the
prototype for lots of new objects, each
of which can also be augmented.
110. Working with the Grain
• Classical patterns are less
effective than prototypal patterns
or parasitic patterns.
• Formal classes are not needed for
reuse or extension.
111. (global) Object
• The object that dares not speak its
name.
• It is the container for all global
variables and all built-in objects.
• Sometimes this points to it.
var global = this;
• On browsers, window is the global
object.
112. Global variables are evil
• Functions within an application
can clobber each other.
• Cooperating applications can
clobber each other.
• Use of the global namespace
must be minimized.
113. Implied Global
• Any var which is not properly declared
is assumed to be global by default.
• This makes it easy for people who do
not know or care about encapsulation
to be productive, but it makes
applications less reliable.
• JSLint is a tool which helps identify
implied globals and other weaknesses.
http://www.JSLint.com
114. Namespace
• Every object is a separate namespace.
• Use an object to organize your
variables and functions.
• The YAHOO Object.
<head>
<script>
YAHOO={};
</script>
• http://twiki.corp.yahoo.com/view/Devel/TheYAHOOObject
115. Encapsulate
• Function scope can create an
encapsulation.
• Use an anonymous function to
wrap your application.
116. Example
YAHOO.Trivia = function () {
// define your common vars here
// define your common functions here
return {
getNextPoser: function (cat, diff) {
...
},
showPoser: function () {
...
}
};
} ();
117. Thinking about type
• Trading type-safety for dynamism.
• JavaScript has no cast operator.
• Reflection is really easy, and
usually unnecessary.
• Why inheritance?
Automatic casting
Code reuse
• Trading brittleness for flexibility.
119. RegExp
• Regular expression pattern
matcher
• Patterns are enclosed in slashes
• Example: a pattern that matches
regular expressions
//([^x00-x1f]|[([^x00-x1f]|
[^x00-x1f/])*]|[^x00-x1f/[])+/
[gim]*/
• Bizarre notation, difficult to read.
120. Threads
• The language definition is neutral on
threads
• Some language processors (like
SpiderMonkey) provide thread support
• Most application environments (like
browsers) do not provide it
• Threads are evil
122. ActionScript
• Empty strings are truthy
• keywords are case insensitive
• No Unicode support
• No RegExp
• No try
• No statement labels
• || and && return booleans
• separate operators for strings and
numbers
123. E4X
• Extensions to ECMAScript for XML
• Proposed by BEA
• Allows <XML> literals
• Not compatible with ECMAScript
Third Edition
• Not widely accepted yet
• Not in IE7
124. ECMAScript Fourth Edition
• A very large set of new features
are being considered.
• Mozilla and Opera are committed.
• It is not clear that Microsoft will
adopt it.
• No word from Safari yet.
125. Style
• Programming style isn't about
personal taste.
• It is about rigor in expression.
• It is about clearness in
presentation.
• It is about product adaptability
and longevity.
• Good rules help us to keep the
quality of our programs high.
126. Style and JavaScript
• Style is critically important for
JavaScript.
• The dynamic nature of the
language is considered by some
to be "too soft". Discipline is
necessary for balance.
• Most of the world's body of
JavaScript programs is crap.
127. Code Conventions for the
JavaScript Programming
Language
http://javascript.crockford.com/code.html
128. Semicolon insertion
• When the compiler sees an error, it
attempts to replace a nearby linefeed
with a semicolon and try again.
• This should alarm you.
• It can mask errors.
• Always use the full, correct forms,
including semicolons.
129. Line Ending
• Break a line after a punctuator:
, . ; : { } ( [ = < > ? ! + - * / %
~ ^ | & == != <= >= += -= *= /= %=
^= |= &= << >> || && === !== <<= >>=
>>> >>>=
• Do not break after a name, string,
number, or ) ] ++ --
• Defense against copy/paste errors.
130. Comma
• Avoid tricky expressions using the
comma operators.
• Do not use extra commas in array
literals.
• Good: [1, 2, 3]
• Bad: [1, 2, 3,]
132. Forbidden Blocks
• Blocks do not have scope in JavaScript.
• Blocks should only be used with structured
statements
function
if
switch
while
for
do
try
133. Variables
• Define all variables at the
beginning of the function.
• JavaScript does not have block
scope, so their is no advantage in
declaring variables at the place of
their first use.
134. Expression Statements
• Any expression can be used as a
statement. That can mask errors.
• Only assignment expressions and
invocation expressions should be used
as statements.
• Good:
foo();
• Bad:
foo && foo();
135. switch Statement
• Avoid using fallthrough.
• Each clause should explicitly
break or return or throw.
136. Assignment Expressions
• Do not use assignment
expressions in the condition parts
of if, while, or for.
• It is more likely that
if (a = b) { ... }
• was intended to be
if (a == b) { ... }
• Avoid tricky expressions.
137. == and !=
• Be aware that == and != do type
coercion.
• Bad
if (a == null) { ... }
• Good:
if (a === null) { ... }
if (!a) { ... }
138. Labels
• Use labels only on these
statements:
do
for
switch
while
• Never use javascript: as a label.
139. JSLint
• JSLint can help improve the robustness
and portability of your programs.
• It enforces style rules.
• It can spot some errors that are very
difficult to find in debugging.
• It can help eliminate implied globals.
• Currently available on the web and as a
Konfabulator widget.
• Soon, in text editors and Eclipse.
http://www.JSLint.com/
140. UHOH!
• Universal Header Onerror Handler
• Inserted into 0.1% of pages
• Reports on JavaScript errors
• http://uhoh.corp.yahoo.com/
141. Key Ideas
• Load and go delivery
• Loose typing
• Objects as general containers
• Prototypal inheritance
• Lambda
• Linkage though global variables