ES6 Metaprogramming presentation at MediterraneaJS on June 22th, 2015.
ES6 delivers some exciting metaprogramming capabilities with its new Proxies feature. Metaprogramming is powerful, but remember: "With great power comes great responsibility". In the talk we will shortly revisit Javascript metaprogramming and explain ES6 Proxies with code examples.
This document discusses metaprogramming in JavaScript using ES6 features like proxies. It provides an example of using a proxy to create a domain-specific language that allows chaining method calls like "to(3).double.pow.get", which returns 36. It explains how the proxy intercepts property access and method calls to push functions into a pipeline and execute them on a value. This demonstrates how proxies enable powerful metaprogramming that allows programs to manipulate other programs and representations.
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
The document discusses dependency injection and inversion of control principles in PHP applications. It provides examples of using global variables, Zend Registry, and Zend Application to manage dependencies. It also summarizes various PHP dependency injection containers and how they can be used to configure services and their dependencies. The document advocates designing applications with loose coupling, separation of concerns, and configuring via configuration files rather than code for improved maintainability.
Symfony2 Service Container: Inject me, my friendKirill Chebunin
This document discusses the Symfony service container and dependency injection container. It covers topics such as inversion of control, dependency injection patterns like constructor injection, service definitions, scopes, extensions, compiler passes, and how bundles integrate with the container.
PHP string function helps us to manipulate string in various ways. There are various types of string function available. Here we discuss some important functions and its use with examples.
Modern Objective-C introduces several syntactic sugars that simplify working with collections and objects in Objective-C, including array, dictionary and boxed expression literals that avoid explicit constructor methods, as well as object subscripting syntax that allows accessing elements in collections using subscript syntax like nsarray[index]. These features help reduce verbosity and make code more readable while still generating the same underlying method calls as before.
Zephir - A Wind of Change for writing PHP extensionsMark Baker
Zephir is a high-level domain-specific language that simplifies creating and maintaining native PHP extensions in C. It was developed by the team behind Phalcon to make it easier for developers to write low-level PHP extensions. Zephir compiles to C code and generates PHP extensions. It supports object-oriented programming and common control structures like if/else statements, while loops, and for loops. Zephir code is type safe and supports type hints.
This document discusses metaprogramming in JavaScript using ES6 features like proxies. It provides an example of using a proxy to create a domain-specific language that allows chaining method calls like "to(3).double.pow.get", which returns 36. It explains how the proxy intercepts property access and method calls to push functions into a pipeline and execute them on a value. This demonstrates how proxies enable powerful metaprogramming that allows programs to manipulate other programs and representations.
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
The document discusses dependency injection and inversion of control principles in PHP applications. It provides examples of using global variables, Zend Registry, and Zend Application to manage dependencies. It also summarizes various PHP dependency injection containers and how they can be used to configure services and their dependencies. The document advocates designing applications with loose coupling, separation of concerns, and configuring via configuration files rather than code for improved maintainability.
Symfony2 Service Container: Inject me, my friendKirill Chebunin
This document discusses the Symfony service container and dependency injection container. It covers topics such as inversion of control, dependency injection patterns like constructor injection, service definitions, scopes, extensions, compiler passes, and how bundles integrate with the container.
PHP string function helps us to manipulate string in various ways. There are various types of string function available. Here we discuss some important functions and its use with examples.
Modern Objective-C introduces several syntactic sugars that simplify working with collections and objects in Objective-C, including array, dictionary and boxed expression literals that avoid explicit constructor methods, as well as object subscripting syntax that allows accessing elements in collections using subscript syntax like nsarray[index]. These features help reduce verbosity and make code more readable while still generating the same underlying method calls as before.
Zephir - A Wind of Change for writing PHP extensionsMark Baker
Zephir is a high-level domain-specific language that simplifies creating and maintaining native PHP extensions in C. It was developed by the team behind Phalcon to make it easier for developers to write low-level PHP extensions. Zephir compiles to C code and generates PHP extensions. It supports object-oriented programming and common control structures like if/else statements, while loops, and for loops. Zephir code is type safe and supports type hints.
Automatic Reference Counting (ARC) makes memory management the job of the compiler by inserting retain and release calls. ARC consists of a frontend compiler that inserts the appropriate memory management calls and an optimizer that removes unnecessary calls. ARC supports iOS 5+ and OS X 10.7+ and allows using variable ownership qualifiers like __strong (default), __weak, __unsafe_unretained, and __autoreleasing to avoid retain cycles.
Are you an intermediate Python developer looking to level up? Luckily, Python provides us with a unique set of tools to make our code more elegant and readable. I’ll share practical pythonic solutions for supercharging your code with tools like Decorators, Context Managers, and NamedTuples.
👉 Watch the video: https://www.youtube.com/watch?v=WiQqqB9MlkA 👈
Elegant Solutions for Everyday Python Problems - Pycon 2018
Are you an intermediate python developer looking to level up? Luckily, python provides us with a unique set of tools to make our code more elegant and readable by providing language features that make your code more intuitive and cut down on repetition. In this talk, I’ll share practical pythonic solutions for supercharging your code.
Specifically, I'll cover:
What magic methods are, and show you how to use them in your own code.
When and how to use partial methods.
An explanation of ContextManagers and Decorators, as well as multiple techniques for implementing them.
How to effectively use NamedTuples, and even subclass and extend them!
Lastly, I'll go over some example code that ties many of these techniques together in a cohesive way. You'll leave this talk feeling confident about using these tools and techniques in your next python project!
Diving into HHVM Extensions (PHPNW Conference 2015)James Titcumb
HHVM is currently gaining popularity at quite a pace, and it's a pretty exciting time for PHP runtimes. Have you ever wondered what is going on beneath this slick and super-speedy engine? I wondered that myself, so I dived into the internals of HHVM, discovering a treasure trove of awesome stuff. In this talk, I'll show you how HHVM itself works with a guided tour of the codebase, demonstrating how it all pieces together. I'll also show you a couple of ways to write your own incredible HHVM extension. You don't need to know C++ to understand this talk - just PHP language knowledge is enough.
This document discusses common anti-patterns, pitfalls, and bad practices when using Puppet, including: using boolean facts ambiguously, expecting C-like values for parameters, excessively using "if defined()" checks, relying on large numbers of exec resources, and depending on dynamic scoping. The author recommends avoiding these practices in favor of more deterministic approaches like using Hiera for shared values and parameters, creating wrapper classes for shared dependencies, using single robust scripts instead of many exec resources, and avoiding dynamic scoping which can cause unpredictable behavior.
This document contains the slides from a presentation on advanced JavaScript and object-oriented programming concepts. The presentation covers topics like functions, scopes, closures, objects, classes/prototypes, and more. It provides code examples and explanations for each concept. The slides are from a software engineer presenting to help others learn JavaScript programming.
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
Functions being first-class citizens in JavaScript offers developers a tremendous amount power and
flexibilty. However, what good is all this power if you don't know how to harness it?
This talk will provide a thorough examination of JavaScript functions. Topics
that will be covered in this talk are:
* Functions are objects
* Execution Context and the Scope Chain
* Closures
* Modifying Context
* The Various Forms of Functions.
Attendees will leave this talk understanding the power of JavaScript functions and the knowledge to apply new
techiques that will make their JavaScript cleaner, leaner and more maintainable.
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPGuilherme Blanco
The document provides an overview of Doctrine 2, an object-relational mapper (ORM) for PHP. It discusses the key components of Doctrine 2 including Common, DBAL, and ORM. Common includes cache drivers, class loading, collections, and annotations parsing functionality. DBAL provides a database abstraction layer built on PDO and supports drivers for databases like MySQL, PostgreSQL, SQLite. ORM provides object-relational mapping functionality to map database rows to PHP objects. The document also discusses performance comparisons showing Doctrine 2 can be faster than raw PHP for certain operations like inserts due to its use of transactions.
The document provides an overview of the Zugspitze framework, including its core components, services, examples, and repositories. Some key points:
- Zugspitze is built on top of Foomo and provides MVC, commands, operations, proxies and services.
- Core components include commands, operations, status manager, and proxy support. Services can be generated from IDL files.
- Examples are provided for ActionScript, mobile, MX, Spark and Flex projects.
- Code is organized into source and example repositories with naming conventions.
- The framework supports different approaches like pure MVC, command-based or operation-based workflows.
Presentation on how Puppet has been introduced in Seat Pagine Gialle to automate system administration tasks and easy the cooperation between Ops and Others.
This document discusses object oriented PHP concepts including classes, inheritance, overriding functions, error handling, and file uploads. It provides examples of creating a class with methods, instantiating objects, extending classes, overriding parent methods, and defining custom error handling functions. It also demonstrates how to upload files in PHP by handling the file on the server, checking for errors, and moving the file to a target directory.
WPF and Prism 4.1 Workshop at BASTA AustriaRainer Stropek
At BASTA Austria (http://www.basta-austria.at) I did a workshop about WPF and Prism. This is my slide deck. It summarizes the most important take-aways from the workshop. Additionally it contains sample code snippets.
The document describes a project to build a website called PerkyProfiler that retrieves user profile information from different services like GitHub, Flickr, and Twitter by taking URLs as input. It will use Perl and several Perl modules. The project will be built using the Catalyst web framework and Moose/MooseX for object-oriented programming. It describes using Moose roles, custom types, declarative class definitions, and functional programming techniques in Perl. The goal is to generate a unified user profile by combining data from different services for a given URL.
JavaFX Script is a new declarative and dynamically typed scripting language created by Sun Microsystems as part of their JavaFX product family. It aims to provide a productive way to create rich client applications that can be deployed across desktops, mobile devices, and set-top boxes using Java. Key features of JavaFX Script include first-class functions, list comprehensions, and the ability to call Java APIs and leverage existing Java classes and libraries.
7 lessons to learn of Brazil defeat, to your company Alexandre Uehara
Brazil's defeat in the 2014 World Cup offers 7 lessons for companies: 1) Continuous recruitment is needed, 2) Do not rest on past success, 3) Learn to deal with pressure, 4) Leadership is important like Thiago Silva provided, 5) Consistent training is essential as Germany only took 2 days off, 6) Stay focused as Germany trained hard, 7) Do not rely on any single person.
A alguns anos comecei a estudar para me tornar um Cientista de Dados. Ainda Não estou totalmente lá, mas essa palestra traz algumas coisas que aprendi e recursos para aprender ainda mais.
Automatic Reference Counting (ARC) makes memory management the job of the compiler by inserting retain and release calls. ARC consists of a frontend compiler that inserts the appropriate memory management calls and an optimizer that removes unnecessary calls. ARC supports iOS 5+ and OS X 10.7+ and allows using variable ownership qualifiers like __strong (default), __weak, __unsafe_unretained, and __autoreleasing to avoid retain cycles.
Are you an intermediate Python developer looking to level up? Luckily, Python provides us with a unique set of tools to make our code more elegant and readable. I’ll share practical pythonic solutions for supercharging your code with tools like Decorators, Context Managers, and NamedTuples.
👉 Watch the video: https://www.youtube.com/watch?v=WiQqqB9MlkA 👈
Elegant Solutions for Everyday Python Problems - Pycon 2018
Are you an intermediate python developer looking to level up? Luckily, python provides us with a unique set of tools to make our code more elegant and readable by providing language features that make your code more intuitive and cut down on repetition. In this talk, I’ll share practical pythonic solutions for supercharging your code.
Specifically, I'll cover:
What magic methods are, and show you how to use them in your own code.
When and how to use partial methods.
An explanation of ContextManagers and Decorators, as well as multiple techniques for implementing them.
How to effectively use NamedTuples, and even subclass and extend them!
Lastly, I'll go over some example code that ties many of these techniques together in a cohesive way. You'll leave this talk feeling confident about using these tools and techniques in your next python project!
Diving into HHVM Extensions (PHPNW Conference 2015)James Titcumb
HHVM is currently gaining popularity at quite a pace, and it's a pretty exciting time for PHP runtimes. Have you ever wondered what is going on beneath this slick and super-speedy engine? I wondered that myself, so I dived into the internals of HHVM, discovering a treasure trove of awesome stuff. In this talk, I'll show you how HHVM itself works with a guided tour of the codebase, demonstrating how it all pieces together. I'll also show you a couple of ways to write your own incredible HHVM extension. You don't need to know C++ to understand this talk - just PHP language knowledge is enough.
This document discusses common anti-patterns, pitfalls, and bad practices when using Puppet, including: using boolean facts ambiguously, expecting C-like values for parameters, excessively using "if defined()" checks, relying on large numbers of exec resources, and depending on dynamic scoping. The author recommends avoiding these practices in favor of more deterministic approaches like using Hiera for shared values and parameters, creating wrapper classes for shared dependencies, using single robust scripts instead of many exec resources, and avoiding dynamic scoping which can cause unpredictable behavior.
This document contains the slides from a presentation on advanced JavaScript and object-oriented programming concepts. The presentation covers topics like functions, scopes, closures, objects, classes/prototypes, and more. It provides code examples and explanations for each concept. The slides are from a software engineer presenting to help others learn JavaScript programming.
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
Functions being first-class citizens in JavaScript offers developers a tremendous amount power and
flexibilty. However, what good is all this power if you don't know how to harness it?
This talk will provide a thorough examination of JavaScript functions. Topics
that will be covered in this talk are:
* Functions are objects
* Execution Context and the Scope Chain
* Closures
* Modifying Context
* The Various Forms of Functions.
Attendees will leave this talk understanding the power of JavaScript functions and the knowledge to apply new
techiques that will make their JavaScript cleaner, leaner and more maintainable.
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPGuilherme Blanco
The document provides an overview of Doctrine 2, an object-relational mapper (ORM) for PHP. It discusses the key components of Doctrine 2 including Common, DBAL, and ORM. Common includes cache drivers, class loading, collections, and annotations parsing functionality. DBAL provides a database abstraction layer built on PDO and supports drivers for databases like MySQL, PostgreSQL, SQLite. ORM provides object-relational mapping functionality to map database rows to PHP objects. The document also discusses performance comparisons showing Doctrine 2 can be faster than raw PHP for certain operations like inserts due to its use of transactions.
The document provides an overview of the Zugspitze framework, including its core components, services, examples, and repositories. Some key points:
- Zugspitze is built on top of Foomo and provides MVC, commands, operations, proxies and services.
- Core components include commands, operations, status manager, and proxy support. Services can be generated from IDL files.
- Examples are provided for ActionScript, mobile, MX, Spark and Flex projects.
- Code is organized into source and example repositories with naming conventions.
- The framework supports different approaches like pure MVC, command-based or operation-based workflows.
Presentation on how Puppet has been introduced in Seat Pagine Gialle to automate system administration tasks and easy the cooperation between Ops and Others.
This document discusses object oriented PHP concepts including classes, inheritance, overriding functions, error handling, and file uploads. It provides examples of creating a class with methods, instantiating objects, extending classes, overriding parent methods, and defining custom error handling functions. It also demonstrates how to upload files in PHP by handling the file on the server, checking for errors, and moving the file to a target directory.
WPF and Prism 4.1 Workshop at BASTA AustriaRainer Stropek
At BASTA Austria (http://www.basta-austria.at) I did a workshop about WPF and Prism. This is my slide deck. It summarizes the most important take-aways from the workshop. Additionally it contains sample code snippets.
The document describes a project to build a website called PerkyProfiler that retrieves user profile information from different services like GitHub, Flickr, and Twitter by taking URLs as input. It will use Perl and several Perl modules. The project will be built using the Catalyst web framework and Moose/MooseX for object-oriented programming. It describes using Moose roles, custom types, declarative class definitions, and functional programming techniques in Perl. The goal is to generate a unified user profile by combining data from different services for a given URL.
JavaFX Script is a new declarative and dynamically typed scripting language created by Sun Microsystems as part of their JavaFX product family. It aims to provide a productive way to create rich client applications that can be deployed across desktops, mobile devices, and set-top boxes using Java. Key features of JavaFX Script include first-class functions, list comprehensions, and the ability to call Java APIs and leverage existing Java classes and libraries.
7 lessons to learn of Brazil defeat, to your company Alexandre Uehara
Brazil's defeat in the 2014 World Cup offers 7 lessons for companies: 1) Continuous recruitment is needed, 2) Do not rest on past success, 3) Learn to deal with pressure, 4) Leadership is important like Thiago Silva provided, 5) Consistent training is essential as Germany only took 2 days off, 6) Stay focused as Germany trained hard, 7) Do not rely on any single person.
A alguns anos comecei a estudar para me tornar um Cientista de Dados. Ainda Não estou totalmente lá, mas essa palestra traz algumas coisas que aprendi e recursos para aprender ainda mais.
This document provides an introduction to big data, including definitions and characteristics. It discusses:
- Definitions of big data as data that requires new techniques due to its scale, diversity, and complexity.
- Three key characteristics of big data: volume, variety, and velocity. Volume refers to the large amount of data being generated. Variety means different data formats. Velocity means data is generated and needs to be processed quickly.
- Examples of data sources that generate big data like social media, sensors, mobile devices. Technologies needed to manage and analyze big data at large scales.
Quero trabalhar com big data data science, como faço-Alexandre Uehara
The document provides recommendations for how to work with Big Data/Data Science including taking online courses from Coursera, edX, Udacity, and Big Data University. It also recommends reading books and articles on topics like Hadoop, Spark, and MapReduce. Additionally, it suggests attending events like TDC and Qcon for networking and joining the Kaggle community. Graduate programs from Mackenzie and Bandtec focused on data science and analytics are presented as options. Finally, contact information is provided for the author to discuss opportunities further.
Anhand konkreter Projekte mit Schweizer Unternehmungen stellt das Datalab der Zürcher Hochschule für Angewandte Wissenschaften die Breite und Möglichkeiten für Data Science Anwendungen im Schweizer Markt dar. Praktische Erfahrung mit potentiellen Anwendungsfällen können interessierte Unternehmen dabei im Rahmen der „Big Data Roadshow“ der Firma Serwise sammeln.
This document provides an introduction to machine learning. It discusses how machine learning gives computers the ability to learn without being explicitly programmed. It also discusses how machine learning is used widely by major companies and has become integral to many businesses. Finally, it covers different machine learning techniques including supervised learning methods like classification, regression, and artificial neural networks as well as unsupervised learning methods like clustering.
This document summarizes 7 historical software bugs that had critical impacts: 1) The Y2K bug, 2) A 1980 bug that caused false reports of incoming US missiles from Russia, 3) An undetected hole in the ozone layer from 1978-1985, 4) Radiation therapy overdoses in 1985-1987 and 2000, 5) A 1996 bug that caused the European Ariane 5 rocket to veer off course, 6) Flight crashes of a Swedish fighter jet in 1993 and Scottish helicopter in 1994, and 7) A 1999 Mars orbiter crash caused by a bug during testing.
Have you heard that Machine Learning is the next big thing?
Are you a dummy in terms of Machine Learning, and think that is a topic for mathematicians with black-magic skills?
If your response to both questions is ‘Yes’, we are in the same position.
Still, thanks to the Web, Python and OpenSource libraries, we can overcome this situation and do some interesting stuff with Machine Learning.
This document provides an introduction to machine learning. It defines machine learning as a field of study that allows computers to learn without being explicitly programmed. The document then discusses why machine learning is useful for solving complex problems, clustering unstructured data, and creating rational agents. It outlines four main types of machine learning: supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning. For each type, it provides a brief definition and examples of algorithms. The document concludes by listing some applications of machine learning and noting recent developments in neural networks and deep learning.
O documento discute as habilidades necessárias para um cientista de dados e onde encontrá-las. Ele descreve o trabalho diário de um cientista de dados, incluindo encontrar problemas, coletar e limpar dados, estabelecer hipóteses, testá-las e comunicar resultados. Também lista habilidades como programação, bancos de dados, machine learning, estatística e matemática, e sugere recursos para aprendê-las.
Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Machine learning focuses on the development of computer programs that can teach themselves to grow and change when exposed to new data.
Elastically scalable architectures with microservices. The end of the monolith?Javier Arias Losada
In the last years the microservices architecture style has been gaining traction with some companies such as Netflix, Yelp, Gilt, PayPal. Many of that companies abandoned their previous monolithic architecture and moved to a microservices approach.
Does that mean that monolithic architectures are a thing of the past?
In this talk we will review some key microservices concepts (and misconceptions), search for the essence of microservices architectures and discuss about different approaches to implement them from the industry.
[Eestec] Machine Learning online seminar 1, 12 2016Grigoris C
This document summarizes a machine learning seminar that covers:
- An introduction to machine learning and real-world applications like self-driving cars and personalized assistants.
- Supervised learning methods including classification to assign labels and regression to estimate continuous outputs.
- The machine learning process including data acquisition, model selection, preprocessing, feature extraction, model learning, and evaluation.
- Practical tips for learning machine learning like online courses and books.
- A practical example of a machine learning project with a link to the full code.
Introduction to Machine Learning for newcomers. It will show you some basic concepts like what is supervised learning, unsupervised learning, classification, regression, under/overfitting, clustering, anomaly detection, and how to have some measures. It will illustrates examples through scikit-learn and tensorflow code
MachineLearning for dummies with Python
Have you heard that Machine Learning is the next big thing?
Are you a dummy in terms of Machine Learning, and think that is a topic for mathematics with black-magic skills?
If your response to both questions is 'Yes', we are in the same position.
Still, thanks to the Web, Python and OpenSource libraries, we can overcome this situation and do some interesting stuff with Machine Learning.
Pivotal Digital Transformation Forum: Data Science VMware Tanzu
This document discusses how data science can bridge the gap between data generation and comprehension. It provides examples of smart apps that combine and link data from different sources and domains to infer patterns, identify root causes, and potentially improve outcomes in real-time. The document advocates adding smart capabilities to apps by leveraging data science and emphasizes collaborating across teams like product management and engineering rather than having isolated data science efforts.
Trasparencias de la charla Machine Learning for Dummies del grupo Meetup de Azuges @ 22 de Noviembre de 2016
Ponentes: Rodrigo Cabello y Carlos Landeras
Machine learning is a type of artificial intelligence that allows software applications to become more accurate in predicting outcomes without being explicitly programmed. The document discusses machine learning and artificial intelligence, providing an overview of the topics as well as contact information for Alexandre Uehara, an expert in the field.
Amazon Machine Learning (Amazon ML) is a service that makes it easy for developers of all skill levels to use machine learning technology. Amazon Machine Learning’s powerful algorithms create machine learning models by finding patterns in your existing data. The service uses these models to process new data and generate predictions for your application. In this session, we will show you how to use machine learning with the data you already have to arrive at accurate and actionable predictions - to create smart applications. You will learn how to use and integrate Amazon ML into your applications to take advantage of predictive analysis in the cloud.
JavaScript is evolving with the addition of modules, platform consistency, and harmony features. Modules allow JavaScript code to be organized and avoid naming collisions. CommonJS and AMD module formats are used widely. Platform consistency is improved through polyfills that mimic future APIs for older browsers. Harmony brings language-level modules and features like destructuring assignment, default parameters, and promises to JavaScript. Traceur compiles Harmony code to existing JavaScript.
This document provides an overview of the history and evolution of JavaScript. It discusses key dates and specifications including its first appearance in 1995 in Netscape Navigator 2.0 and the standardization process in the late 1990s. The document also covers JavaScript's core features like being dynamic, single-threaded, asynchronous and event-driven. It describes JavaScript's data types, objects, functions and common array methods. Overall, the document presents a comprehensive introduction to JavaScript from its origins to modern usage.
JavaScript basics
JavaScript event loop
Ajax and promises
DOM interaction
JavaScript object orientation
Web Workers
Useful Microframeworks
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
The document discusses JavaScript concepts including functions, scope, closures, context, constructors, methods, and object-oriented programming. Some key points:
- Functions are treated as values that can be assigned to variables or passed as arguments.
- Only functions have scope; blocks like if/else do not create scope. Variables declared without var are global.
- Inner functions maintain access to outer functions' variables even after execution (closures).
- Context refers to the object a function is called on, maintained through the this keyword.
- Constructors use the new operator to create object instances. Methods can be public, private, or privileged.
Best Practices in apps development with Titanium Appcelerator Alessio Ricco
This document provides best practices for developing apps using Titanium Appcelerator. It discusses software quality characteristics from both the user and developer perspectives. Key aspects of a good software project are stability, performance, rapid development, and readability. Specific practices covered include avoiding global scope, nulling object references, using namespaces, lazy script loading, avoiding memory leaks with event listeners, optimizing images, and best practices for databases.
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...Whymca
This document provides best practices for developing apps using Titanium Appcelerator. It discusses software quality characteristics from both the user and developer perspectives. Key aspects addressed include stability, performance, rapid development, and readability of code. Specific tips are given around error handling, optimization, reuse of code snippets, use of comments, and avoiding global scope issues. The document emphasizes writing stable, performant code that is also rapid to develop and readable.
How and why i roll my own node.js frameworkBen Lin
1) The document discusses the author's experience building their own node.js web framework, including their background with other technologies like Ruby on Rails.
2) It describes the key features of their framework, such as MVC structure, middleware support, asset packaging, and command line tools.
3) The author explains that they rolled their own framework to learn more about how frameworks work, have more control over the technology stack, and because node.js performance is better than Ruby on Rails. They emphasize that building the framework was a fun learning experience.
The document provides an overview of Node.js and the Express web framework. It discusses that Node.js is a platform for executing JavaScript files and includes utilities for network and file I/O. Express is a web application framework built on Node.js that uses middleware to handle requests. The document covers Express concepts like routing, middleware, templating, and popular middleware modules for tasks like compression, parsing request bodies, and sessions.
This document discusses Express.js, a popular Node.js web application framework. It begins by explaining that Express makes developing websites, web apps, and APIs easier by providing route support and templating engine integration. It then demonstrates how to install Express and a templating engine like Jade. Several code examples are provided, including creating a simple REST API with routes, using Express to serve multiple pages with query parameters, and building a RESTful API for a resource like dogs. Resources for further learning about Express and Node.js are listed at the end.
JavaScript basics
JavaScript event loop
Ajax and promises
DOM interaction
JavaScript object orientation
Web Workers
Useful Microframeworks
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2014.
http://www.ivanomalavolta.com
The document discusses JavaFX Mobile and provides an overview of its features and current status. It summarizes a speaker's presentation on designing a JavaFX Mobile application and examples shown, including calling JME code, posting content via HTTP requests, and loading resources via binding. While JavaFX Mobile was promising in 2009-2010, its future is uncertain given the dominance of Android and iOS. The speaker plans to research porting their application to Android and JME to catch platforms not adopting newer technologies.
The document provides an overview of JavaScript, covering what it is, its basics, functions, objects, prototypes, scope, asynchronous JavaScript, JSON, debugging tools, performance, events, error handling, and the future of JavaScript. It discusses that JavaScript is an object-oriented scripting language used in web pages that is not tied to specific browsers but makes use of the DOM, BOM, and ECMAScript standards. It also summarizes some of JavaScript's core features like functions, objects, prototypes, and more.
This document discusses principles for architecting JavaScript applications to be testable. It recommends:
1. Using interfaces rather than implementations to define behavior and allow for loose coupling and swapping of implementations.
2. Applying design patterns like decorator and abstract factory to handle cross-cutting concerns like logging and profiling separately from the core functionality.
3. Injecting all dependencies through constructor injection to make dependencies explicit and avoid tight coupling.
4. Programming to interfaces to allow for mocking and isolation of units for testing purposes.
MyApp provides JavaScript best practices including:
1) Using namespaces to avoid naming collisions and define packages like MyApp.string.utils for reusable functions.
2) Branching code during initialization or lazily on first use to handle browser differences efficiently.
3) Passing configuration as an object instead of many parameters to simplify function calls.
4) Defining private methods and properties using closures to encapsulate code.
5) Employing self-executing functions for one-time initialization tasks.
6) Allowing method chaining for readability when calling several related methods.
JavaScript: The Good Parts Or: How A C# Developer Learned To Stop Worrying An...Doug Jones
We rarely dive into current programming languages, touting the next new framework or the new features that will be out next year. This is about JavaScript the language as it exists today, what I picked up in going from C# to JS, and what C# picked up from JS along the way as well. It is based on Douglas Crockford's seminal book "JavaScript: The Good Parts".
The document introduces several uncommon design patterns:
1) Null Object pattern avoids using null values by implementing a "null" object that respects the expected interface.
2) Encapsulated Context pattern encapsulates common services/data needed by different components in a single context object rather than using global objects.
3) Role Object pattern handles modeling problems where an element can have different roles by using role objects that are added to and removed from a core object.
4) ISP & Object Adaptation pattern allows objects to adapt to different protocols by checking for direct implementation, using registered adapters, or throwing exceptions.
5) Essence pattern uses an "essence" class to encapsulate an object's configuration and
The document discusses JavaScript, describing it as:
- Created in 1995 by Netscape and based on the ECMAScript standard.
- A dynamic, weakly typed, object-oriented programming language that is often misunderstood.
- Used for client-side scripting of webpages as well as server-side and application scripting.
- Commonly disliked due to past bad practices, implementations, and browser differences, but these issues are improving over time.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Preparing Non - Technical Founders for Engaging a Tech AgencyISH Technologies
Preparing non-technical founders before engaging a tech agency is crucial for the success of their projects. It starts with clearly defining their vision and goals, conducting thorough market research, and gaining a basic understanding of relevant technologies. Setting realistic expectations and preparing a detailed project brief are essential steps. Founders should select a tech agency with a proven track record and establish clear communication channels. Additionally, addressing legal and contractual considerations and planning for post-launch support are vital to ensure a smooth and successful collaboration. This preparation empowers non-technical founders to effectively communicate their needs and work seamlessly with their chosen tech agency.Visit our site to get more details about this. Contact us today www.ishtechnologies.com.au
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Consistent toolbox talks are critical for maintaining workplace safety, as they provide regular opportunities to address specific hazards and reinforce safe practices.
These brief, focused sessions ensure that safety is a continual conversation rather than a one-time event, which helps keep safety protocols fresh in employees' minds. Studies have shown that shorter, more frequent training sessions are more effective for retention and behavior change compared to longer, infrequent sessions.
Engaging workers regularly, toolbox talks promote a culture of safety, empower employees to voice concerns, and ultimately reduce the likelihood of accidents and injuries on site.
The traditional method of conducting safety talks with paper documents and lengthy meetings is not only time-consuming but also less effective. Manual tracking of attendance and compliance is prone to errors and inconsistencies, leading to gaps in safety communication and potential non-compliance with OSHA regulations. Switching to a digital solution like Safelyio offers significant advantages.
Safelyio automates the delivery and documentation of safety talks, ensuring consistency and accessibility. The microlearning approach breaks down complex safety protocols into manageable, bite-sized pieces, making it easier for employees to absorb and retain information.
This method minimizes disruptions to work schedules, eliminates the hassle of paperwork, and ensures that all safety communications are tracked and recorded accurately. Ultimately, using a digital platform like Safelyio enhances engagement, compliance, and overall safety performance on site. https://safelyio.com/
Project Management: The Role of Project Dashboards.pdfKarya Keeper
Project management is a crucial aspect of any organization, ensuring that projects are completed efficiently and effectively. One of the key tools used in project management is the project dashboard, which provides a comprehensive view of project progress and performance. In this article, we will explore the role of project dashboards in project management, highlighting their key features and benefits.
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...kalichargn70th171
In today's business landscape, digital integration is ubiquitous, demanding swift innovation as a necessity rather than a luxury. In a fiercely competitive market with heightened customer expectations, the timely launch of flawless digital products is crucial for both acquisition and retention—any delay risks ceding market share to competitors.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
Malibou Pitch Deck For Its €3M Seed Roundsjcobrien
French start-up Malibou raised a €3 million Seed Round to develop its payroll and human resources
management platform for VSEs and SMEs. The financing round was led by investors Breega, Y Combinator, and FCVC.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
3. about me
Javier Arias Losada, senior software engineer at Telefonica.
Currently working at EyeOS, helping to create an VDI (Virtual
Desktop Infrastructure) platform.
@javier_arilos
http://about.me/javier.arilos
7. reflective metaprogramming
A program that modifies itself -
Reflective Metaprogramming in JS-
This is the subject of the talk!
MMM… very
interesting … but
when are we
going to JS?
8. Introspection
Introspection: read the structure of a program.
Object.keys()
var obj = { //Base level
name: 'Santa',
hello: function() {
console.log('Hello', this.name,'!');
}
};
Object.keys(obj).forEach(function(prop) {
console.log(prop); //Meta level
});
10. Intercession
Intercession: redefine semantics of some language operations.
Object.defineProperty(obj, "roProp", {
value: 101,
writable: false,
enumerable: true});
obj.roProp = 102
obj.roProp //101
11. ‘Cheating’ quine:
(function a(){console.log('('+a+')()')})()
‘Cheating’ quine:
(function a(){console.log('('+a+')()')})()
A real one:
_='"'+";document.write('_=',_[17],_[0],_[17],'+',_,_)";document.write('_=',_[17],_
[0],_[17],'+',_,_)
metaprogramming fun: Quines
Quine: a program that prints a copy of its own
source code (no input allowed)
12. Caffeine Facts:
A cup of coffee works just 10
minutes after you drink it.
It takes 45 minutes for 99% of
caffeine to be absorbed.
Please… awake people
around you!!
13. JS metaprogramming up to ES5
THE GOOD:
object metaprogramming API
THE UGLY:
function metaprogramming
THE BAD:
eval
15. Sample: Test Spy
Test Spy myFunction
[1] myFunction = spy (myFunction)
[5] assert eg. calledOnce
[2] myFunction(1, ‘a’)
Test spy is a function that records calls to a spied function
- SinonJS
[3] store call [4] call
16. // we define a very interesting function
function sayHi(name){ console.log('Hi '+name+'!') }
// now we Spy on sayHi function.
sayHi = functionSpy(sayHi);
console.log('calledOnce?', sayHi.once); // false. Note that ‘once’ looks like a property!!
sayHi('Gregor'); // calling our Function!!
console.log('calledOnce?', sayHi.once); // true
Sample: Test Spy
17. accessor properties sample - Spy
function functionSpy(func){
var proxyFunc = function () { //intercept and count calls to func
proxyFunc._callCount += 1;
return func.apply(null, arguments);
};
Object.defineProperty(proxyFunc, "_callCount", {value: 0, writable: true});
Object.defineProperty(proxyFunc, "once", {get: function(){return this._callCount==1});
return proxyFunc;
}
18. The Bad: eval
avoid using eval in the browser for input from the user or your
remote servers (XSS and man-in-the-middle)
“is sometimes necessary, but in most cases it
indicates the presence of extremely bad coding.”
- Douglas Crockford
19. The Ugly: func metaprogramming
● Function constructor
● Function reflection:
○ Function.prototype.length
○ Ugly hacks
20. var remainder = new Function('a', 'b', 'return a % b;');
remainder(5, 2); // 1
function constructor
Seems similar to eval but…
21. function constructor vs eval
function functionCreate(aParam) { //Func consctructor cannot access to the closure
var funcAccessToClosure = Function('a', 'b', 'return a + b + aParam');
return funcAccessToClosure(1, 2);
}
functionCreate(3); //ReferenceError: aParam is not defined
function functionInEval(aParam) {//has access to the closure
eval("function funcAccessToClosure(a, b){return a + b + aParam}");
return funcAccessToClosure(1, 2);
}
functionInEval(3); // 6
var aParam = 62; //Now, define aParam.
functionCreate(3); // 65
functionInEval(3); // 6
22. function constructor vs eval
function functionCreate(aParam) { //Func consctructor cannot access to the closure
var funcAccessToClosure = Function('a', 'b', 'return a + b + aParam');
return funcAccessToClosure(1, 2);
}
functionCreate(3); //ReferenceError: aParam is not defined
function functionInEval(aParam) {//has access to the closure
eval("function funcAccessToClosure(a, b){return a + b + aParam}");
return funcAccessToClosure(1, 2);
}
functionInEval(3); // 6
var aParam = 62; //Now, define aParam.
functionCreate(3); // 65
functionInEval(3); // 6
23. function reflection - length
Function.length returns the number of parameters
of a function.
Usage example: Express checking middlewares signature
24. function parameters reflection
We want to get informaton about function
parameters.
Parameters belong to function signature.
Arguments are passed to a function call.
27. getParameters : function(func) { //The regex is from Angular
var FN_PARAMS = /^functions*[^(]*(s*([^)]*))/m;
var funcParams = func.toString().match(FN_PARAMS)[1].split(',');
return funcParams;
}
fucntion parameters reflection
Some libraries with Dependency Injection, such
as Angular.js use this technique:
37. DSL with Proxies- implementation
// ==== to(3).double.pow.get ===
var to = (function closure() { // closure for containing our context
var functionsProvider = { //Object containing our functions
double: function (n) { return n*2 },
pow: function (n) { return n*n }
};
return function toImplementation(value) { // Magic happens here!
// (...) implementation
return new Proxy(functionsProvider, handler);
}
}());
38. DSL with Proxies- implementation
// ==== to(3).double.pow.get ===
return function toImplementation(value) {
var pipe = []; //stores functions to be called
var handler =
{ get(target, fnName, receiver) {
if (fnName in target){ //eg. .double : get the function and push it
pipe.push(target[fnName]);
return receiver;} //receiver is our Proxy object: to(3)
if (fnName == "get")
return pipe.reduce(function (val, fn) { return fn(val) }, value);
throw Error('Method: '+ fnName +' not yet supported');
}, set(target, fnName, fn, receiver) {
target[fnName] = fn;} //dynamic declaration of functions
};
return new Proxy(functionsProvider, handler);}}());
39. DSL with Proxies- implementation
// ==== to(3).double.pow.get ===
return function toImplementation(value) {
var pipe = []; //stores functions to be called
var handler =
{ get(target, fnName, receiver) {
if (fnName in target){ //eg. .double : get the function and push it
pipe.push(target[fnName]);
return receiver;} //receiver is our Proxy object: to(3)
if (fnName == "get")
return pipe.reduce(function (val, fn) { return fn(val) }, value);
throw Error('Method: '+ fnName +' not yet supported');
}, set(target, fnName, fn, receiver) {
target[fnName] = fn;} //dynamic declaration of functions
};
return new Proxy(functionsProvider, handler);}}());
40. DSL with Proxies- implementation
// ==== to(3).double.pow.get ===
return function toImplementation(value) {
var pipe = []; //stores functions to be called
var handler =
{ get(target, fnName, receiver) {
if (fnName in target){ //eg. .double : get the function and push it
pipe.push(target[fnName]);
return receiver;} //receiver is our Proxy object: to(3)
if (fnName == "get")
return pipe.reduce(function (val, fn) { return fn(val) }, value);
throw Error('Method: '+ fnName +' not yet supported');
}, set(target, fnName, fn, receiver) {
target[fnName] = fn;} //dynamic declaration of functions
};
return new Proxy(functionsProvider, handler);}}());
41. DSL with Proxies - new methods
to(2).triple.get; //Error: Method: triple not yet supported
to().triple = function(n) {return n*3}; //Add new method: triple
to(2).triple.get; // 6
42. That’s all folks!
No animals were harmed in the preparation of
this presentation.
43. references
● Alex Rauschmayer on Proxies: http://www.2ality.com/2014/12/es6-proxies.html
● About quines: http://c2.com/cgi/wiki?QuineProgram
● Kiczales on metaprogramming and AOP: http://www.drdobbs.com/its-not-metaprogramming/184415220
● Brendan Eich. Proxies are awesome: http://www.slideshare.net/BrendanEich/metaprog-5303821
● eval() isn’t evil, just misunderstood: http://www.nczonline.net/blog/2013/06/25/eval-isnt-evil-
just-misunderstood/
● On DI: http://krasimirtsonev.com/blog/article/Dependency-injection-in-JavaScript
● Express middlewares: http://expressjs.com/guide/using-middleware.html
● Proxies by Daniel Zautner: http://www.dzautner.com/meta-programming-javascript-using-proxies/
44. Media
● Storm by Kelly Delay: https://flic.kr/p/seaiyf
● The complete explorer: https://www.flickr.com/photos/nlscotland/
● Record Player by Andressa Rodrigues: http://pixabay.com/en/users/AndressaRodrigues-40306/
● Wall by Nicole Köhler: http://pixabay.com/en/users/Nikiko-268709/
● Remote by Solart: https://pixabay.com/en/users/solart-621401/
● Rocket launch by Space-X: https://pixabay.com/en/users/SpaceX-Imagery-885857/
● Coffee by Skeeze: https://pixabay.com/en/users/skeeze-272447/
● Sleeping Monkey by Mhy: https://pixabay.com/en/users/Mhy-333962/
● Funny Monkey by WikiImages: https://pixabay.com/en/users/WikiImages-1897
● Lemur by ddouk: https://pixabay.com/en/users/ddouk-607002/
46. function sayHi(name){ console.log('Hi '+name+'!') }// we define a very interesting function
sayHi = functionSpy(sayHi);// now we Spy on sayHi function.
console.log('calledOnce?', sayHi.once); // false. Note that ‘once’ looks like a property!!
sayHi('Gregor'); // calling our Function!!
console.log('calledOnce?', sayHi.once); // true
function functionSpy(func){
var proxyFunc = function () { //intercept and count calls to func
proxyFunc._callCount += 1;
return func.apply(null, arguments);
};
Object.defineProperty(proxyFunc, "_callCount", {value: 0, writable: true});
Object.defineProperty(proxyFunc, "once", {get: function(){return this._callCount==1});
return proxyFunc;
}
Test Spy
47. DI container
● Function reflection (parameters) eg: Dependency Injection
var Injector = {dependencies: {},
add : function(qualifier, obj){
this.dependencies[qualifier] = obj;},
get : function(func){
var obj = Object.create(func.prototype);
func.apply(obj, this.resolveDependencies(func));
return obj;},
resolveDependencies : function(func) {
var args = this.getParameters(func);
var dependencies = [];
for ( var i = 0; i < args.length; i++) {
dependencies.push(this.dependencies[args[i]]);}
return dependencies;},
getParameters : function(func) {//This regex is from require.js
var FN_ARGS = /^functions*[^(]*(s*([^)]*))/m;
var args = func.toString().match(FN_ARGS)[1].split(',');
return args;}};
var aFancyLogger = {
log: function(log){console.log(Date().toString()+" => "+ log);}
};
var ItemController = function(logger){
this.logger = logger;
this.doSomething = function(item){this.logger.log("Item["+item.id+"] handled!");};
};
Injector.add("logger", aFancyLogger); //register logger into DI container
var itemController = Injector.get(ItemController); //get Item controller from DI
itemController.doSomething({id : 5});
48. DSL with Proxies
var to = (function closure() {
var functionsProvider = {
double: function (n) { return n*2 },
pow: function (n) { return n*n }
};
return function toImplementation(value) {
var pipe = [];
var handler =
{
get(target, fnName, receiver) {
if (fnName == "get")
return pipe.reduce(function (val, fn) { return fn(val) }, value);
if (fnName in target) {
pipe.push(target[fnName]);
return receiver;}
throw Error('Method: '+ fnName +' not yet supported');
},
set(target, fnName, fn, receiver) {
target[fnName] = fn;} //dynamic declaration of functions
};
return new Proxy(functionsProvider, handler);}}());
console.log('to(3).double.pow.get::',to(3).double.pow.get); // 36
console.log('to(2).triple::', to(2).triple.get); //Error: Method: triple not yet supported
to().triple = function(n) {return n*3};
console.log('to(2).triple::',to(2).triple.get);
Editor's Notes
Programs have a domain.
Shipping system domain are customers, orders…
Metaprograms domain is programs
people need to extend javascript, not only with c++ with a lot of security issues, but with javascript itself in order to continue to extend the language and the libraries in a way that they look as built-in objects. ant that can virtualize/substitute builtin objects.
that's very important when you implement libraries.
we want to rebuild the world Smalltalk had, we want to get to the very low native code (C++) nirvana. the proxies here are brilliant, otherwise I do not know how we will get there.