Generative testing is great for testing pure functions, but it is also used to test the behavior of stateful systems that change over time. Those systems are often designed for highly concurrent usage, such as queues, databases, and storage. And then sometimes your code is also asynchronous, such as in JavaScript. Learn several patterns to find inconsistencies across platforms, race conditions, and corner cases. This talk assumes basic understanding of generative testing.
The document discusses PigUnit, a library for unit testing Pig scripts. It allows running Pig scripts from JUnit tests, overriding script variables with test values, inspecting variable values, and making STORE statements no-ops. The document provides examples of simple Pig scripts, test programs using PigUnit, and more complex testing scenarios where PigUnit can rewrite scripts to load test input from temporary files.
Closing keynote, as presented at Codemotion 2014, LaraconEU 2014, Redevelop 2014, CodeConnexx 2013 and PHP North East 2014.
This presentation makes a reference to a reading list I received. For those interested, the release consists of most of the general classics, such as Gang Of Four "Design Patterns", The Pragmatic Programmer, Structure and Interpretation of Computer Programs, Domain Driven Design and a few others. The actual list remains tucked away in a box somewhere.
The document discusses Puppet's future type system including complex types like hashes, enums, variants, and defining custom types. It provides examples of how the new type system would allow defining types for variables and parameters. It also discusses testing catalogs compiled with different Puppet versions to identify differences and fix bugs before rolling out updates.
This document provides an overview of common string, data structure, file, operating system, security, XML, SQL, and web service operations in PowerShell. It discusses how to work with strings, arrays, dictionaries, hashtables, files, environment variables, events, services, WMI, encryption, XML processing, SQL queries and transactions, sending emails, downloading files from URLs, and using proxies. The document is a helpful reference for many PowerShell tasks.
As presented at Dutch PHP Conference 2015, an introduction to command buses, how to implement your own in PHP and why they're both useful but unimportant.
This document provides an introduction and overview of using MongoDB and the Doctrine MongoDB ODM with code examples. It demonstrates basic MongoDB operations like saving, finding, and updating documents. It then shows how the Doctrine MongoDB ODM can be used to map documents to PHP objects to work with them in an object-oriented way, including associations, queries, and lifecycle callbacks. The presenter encourages interested developers to contact them about open positions at OpenSky.
With over 3400 available built-in function, PHP offers a tremendously rich environment. Yet, some of these functions are still unknown to most programmers. During this session, Damien Seguy will highlight a number of functions that are rarely used in PHP, but are nonetheless useful and available within standard distributions.
The document discusses PigUnit, a library for unit testing Pig scripts. It allows running Pig scripts from JUnit tests, overriding script variables with test values, inspecting variable values, and making STORE statements no-ops. The document provides examples of simple Pig scripts, test programs using PigUnit, and more complex testing scenarios where PigUnit can rewrite scripts to load test input from temporary files.
Closing keynote, as presented at Codemotion 2014, LaraconEU 2014, Redevelop 2014, CodeConnexx 2013 and PHP North East 2014.
This presentation makes a reference to a reading list I received. For those interested, the release consists of most of the general classics, such as Gang Of Four "Design Patterns", The Pragmatic Programmer, Structure and Interpretation of Computer Programs, Domain Driven Design and a few others. The actual list remains tucked away in a box somewhere.
The document discusses Puppet's future type system including complex types like hashes, enums, variants, and defining custom types. It provides examples of how the new type system would allow defining types for variables and parameters. It also discusses testing catalogs compiled with different Puppet versions to identify differences and fix bugs before rolling out updates.
This document provides an overview of common string, data structure, file, operating system, security, XML, SQL, and web service operations in PowerShell. It discusses how to work with strings, arrays, dictionaries, hashtables, files, environment variables, events, services, WMI, encryption, XML processing, SQL queries and transactions, sending emails, downloading files from URLs, and using proxies. The document is a helpful reference for many PowerShell tasks.
As presented at Dutch PHP Conference 2015, an introduction to command buses, how to implement your own in PHP and why they're both useful but unimportant.
This document provides an introduction and overview of using MongoDB and the Doctrine MongoDB ODM with code examples. It demonstrates basic MongoDB operations like saving, finding, and updating documents. It then shows how the Doctrine MongoDB ODM can be used to map documents to PHP objects to work with them in an object-oriented way, including associations, queries, and lifecycle callbacks. The presenter encourages interested developers to contact them about open positions at OpenSky.
With over 3400 available built-in function, PHP offers a tremendously rich environment. Yet, some of these functions are still unknown to most programmers. During this session, Damien Seguy will highlight a number of functions that are rarely used in PHP, but are nonetheless useful and available within standard distributions.
Corephpcomponentpresentation 1211425966721657-8PrinceGuru MS
The document discusses various components and techniques for developing extensions for Joomla! 1.5, including using libraries, retrieving data from requests, working with databases, routing, errors, security, and redirects. It also mentions tools like Aptana and J!Dump that can aid development and covers methods for querying, loading, and receiving results from databases.
Replacing dependents with doubles is a central part of testing that every developer has to master. This talk goes over the different types of doubles and explains their place in testing, how to implement them in a mainstream mocking framework, and which strategies or doubles to use in different message exchange scenarios between objects. After this talk you will have moved a step forward in your understanding of testing in the context of object oriented programming.
What makes your code slow? How do you make it faster? And how do you prove it?
This talk will describe my adventures benchmarking and optimizing ordered hashes in Perl, culminating in the release of Hash::Ordered (http://p3rl.org/Hash::Ordered) — which outperforms all other CPAN alternatives, often by a substantial margin. We will cover:
* How to customize Benchmark.pm
* How and why to benchmark at different scales
* Why tied anything in Perl is a horrible idea
* How ordered hashes got faster from a simple algorithm change
The document contains code for unit testing a PHP MVC application using PHPUnit. It includes:
- Code for the Todo model and its tests using PHPUnit assertions.
- Configuration for PHPUnit to run tests for the application and library.
- Tests for the IndexController using a Test_ControllerTestCase class with helper methods.
- Code for Request, Response and View classes to mock the MVC framework.
- A test to interact with the application interface using Selenium.
The document shows the project structure for an MVC application and library with tests. It demonstrates how to test models, controllers and the user interface using test doubles, assertions and helper methods in PHPUnit.
From mysql to MongoDB(MongoDB2011北京交流会)Night Sailer
The document summarizes differences between MySQL and MongoDB data types and operations. MongoDB uses BSON for data types rather than separate numeric, text and blob types. It supports embedded documents and arrays. Unlike MySQL, MongoDB does not have tables or rows, but collections and documents. Operations like insert, update, find, sort and index are discussed as alternatives to SQL equivalents.
Backbone.js is a JavaScript MVC framework that allows developers to build single page applications. It includes models, views, and controllers (routers). Models represent data, views display models, and routers handle navigation between views. Collections are groups of models that can be filtered, sorted, and manipulated. Views can display both individual models and entire collections. Events can be bound to views to handle user interactions. The framework uses a client-side routing system to change views based on the URL hash fragment.
As presented at Confoo 2013.
More than some arcane NoSQL tool, Redis is a simple but powerful swiss army knife you can begin using today.
This talk introduces the audience to Redis and focuses on using it to cleanly solve common problems. Along the way, we'll see how Redis can be used as an alternative to several common PHP tools.
The document provides an overview of the DBI module in Perl, which provides a standard interface for working with databases. Some key points:
- DBI provides a common API that works across different database drivers (DBD modules) like DBD::Pg, DBD::mysql, etc. It handles connecting to databases, executing queries, and retrieving results.
- The architecture involves the DBI module and separate DBD driver modules for each database. The drivers provide database-specific functionality while DBI provides a common interface.
- The lifecycle of a query involves preparing SQL, executing it, and fetching result rows. DBI offers convenience methods for common tasks like selecting rows.
- Features include
Python Ireland Nov 2010 Talk: Unit TestingPython Ireland
Unit testing for those seeking instant gratification - Maciej Bliziński
Abstract: Unit testing has long term benefits. However, depending on how you use it, it can have short term benefits too. This is an introductory talk, aimed at both beginner and experienced Python programmers who would like to get started testing their code.
PHP 7 – What changed internally? (Forum PHP 2015)Nikita Popov
One of the main selling points of PHP 7 is greatly improved performance, with many real-world applications now running twice as fast… But where do these improvements come from?
At the core of PHP 7 lies an engine rewrite with focus on improving memory usage and performance. This talk provides an overview of the most significant changes, briefly covering everything from data structure changes, over enhancements in the executor, to the new compiler implementation.
The document discusses CoffeeScript, a programming language that compiles to JavaScript. It provides examples of CoffeeScript syntax for functions, conditionals, loops, classes, and other constructs. It explains how CoffeeScript aims to have less syntactic noise than JavaScript while remaining true to the underlying JavaScript semantics through compilation.
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. It allows users to declare infrastructure as code and manage Azure, AWS, Google Cloud, and other providers through configuration files. The document discusses using Terraform to manage resources like DNS records, virtual machines, and networking on Azure through concepts like modules, providers, variables, and remote state.
This document introduces Assetic, an asset management library for PHP. It allows developers to work with assets like CSS, JavaScript, images and more. Key features include:
- Asset collections to merge multiple assets into one file for fewer HTTP requests
- Filters to minify, compress, compile or otherwise process asset contents
- Caching of processed assets for improved performance
- Integration with Symfony and other frameworks
- Tools to deploy optimized static assets to servers or content delivery networks
This document describes the implementation of a blog application using the Django web framework. It defines models for categories and posts using Django's model layer. It includes views for listing, detail, and category pages. Templates render the content and extend a base template. URLs are mapped to views. Form and template tags are used to implement a contact page. The application uses Django's admin interface and ORM to manage the database content.
The document describes a blog application built with Django. It includes models for categories and posts with a many-to-one relationship. It defines views for listing posts, displaying individual posts and categories. Templates render the content and use template inheritance. Forms and email sending are implemented for contact. URLs are configured to map to the views. Tags extend template capabilities to include recent posts. The application uses Django components and patterns for building the blog functionality.
PHP data structures (and the impact of php 7 on them), phpDay Verona 2015, ItalyPatrick Allaert
We all have certainly learned data structures at school: arrays, lists, sets, stacks, queues (LIFO/FIFO), heaps, associative arrays, trees, ... and what do we mostly use in PHP? The "array"! In most cases, we do everything and anything with it but we stumble upon it when profiling code. During this session, we'll learn again to use the structures appropriately, leaning closer on the way to employ arrays, the SPL and other structures from PHP extensions as well.The impact that PHP 7 should have on data structures will be introduced as well.
This document discusses agile database access with CakePHP 3. It covers types of object-relational mappers (ORMs), setting up associations between tables, performing simple and complex queries, formatting and debugging queries, modifying JSON output, using value objects, and more advanced topics like custom serialization and associations between databases. The goal is to provide an ORM that is quick, flexible, and easy to work with for both simple and complex database needs.
This document provides an introduction and overview of the Google Guava libraries. It describes what Guava is, why developers would use it, how it compares to Apache Commons libraries, its design principles and release cycles. It provides descriptions of some key Guava packages and classes for common Java utilities, including Preconditions, Optional, Objects, Strings, Charsets, CaseFormat, CharMatcher, Joiner and Splitter. The document aims to explain the purpose and usage of important Guava functionality.
This document summarizes the history of PHP persistence from 1995 to present day. It begins with early file handling in PHP/FI in 1995 and the introduction of database support. It then discusses the evolution of code reusability through functions and classes. Professional abstraction layers like PEAR and later ORM frameworks provided more robust and standardized APIs. NoSQL databases and drivers were later incorporated, moving beyond relational databases. Current frameworks provide object document mapping for non-SQL databases like MongoDB.
This document summarizes the new features in version 2.6 of MongoDB, including:
1) Aggregation cursors that allow controlling batch size and iterating over aggregation results.
2) A maxTimeMS option that sets a timeout for queries and commands.
3) New and enhanced update operations like $mul, $bit, $min/$max, $currentDate, and $push enhancements.
4) A new security model with roles and rights to customize access control.
Play Framework and Ruby on Rails are web application frameworks that help developers build web applications. Both frameworks provide tools and libraries for common tasks like routing, database access, templates and more. Some key similarities include using MVC patterns, supporting SQL/NoSQL databases via libraries, and including tools for unit testing and deployment. Some differences are Play uses Scala and Java while Rails uses Ruby, and they have different project structures and ways of handling assets, templates and dependencies. Both aim to help developers build web applications faster with their features and ecosystem of supporting libraries.
Corephpcomponentpresentation 1211425966721657-8PrinceGuru MS
The document discusses various components and techniques for developing extensions for Joomla! 1.5, including using libraries, retrieving data from requests, working with databases, routing, errors, security, and redirects. It also mentions tools like Aptana and J!Dump that can aid development and covers methods for querying, loading, and receiving results from databases.
Replacing dependents with doubles is a central part of testing that every developer has to master. This talk goes over the different types of doubles and explains their place in testing, how to implement them in a mainstream mocking framework, and which strategies or doubles to use in different message exchange scenarios between objects. After this talk you will have moved a step forward in your understanding of testing in the context of object oriented programming.
What makes your code slow? How do you make it faster? And how do you prove it?
This talk will describe my adventures benchmarking and optimizing ordered hashes in Perl, culminating in the release of Hash::Ordered (http://p3rl.org/Hash::Ordered) — which outperforms all other CPAN alternatives, often by a substantial margin. We will cover:
* How to customize Benchmark.pm
* How and why to benchmark at different scales
* Why tied anything in Perl is a horrible idea
* How ordered hashes got faster from a simple algorithm change
The document contains code for unit testing a PHP MVC application using PHPUnit. It includes:
- Code for the Todo model and its tests using PHPUnit assertions.
- Configuration for PHPUnit to run tests for the application and library.
- Tests for the IndexController using a Test_ControllerTestCase class with helper methods.
- Code for Request, Response and View classes to mock the MVC framework.
- A test to interact with the application interface using Selenium.
The document shows the project structure for an MVC application and library with tests. It demonstrates how to test models, controllers and the user interface using test doubles, assertions and helper methods in PHPUnit.
From mysql to MongoDB(MongoDB2011北京交流会)Night Sailer
The document summarizes differences between MySQL and MongoDB data types and operations. MongoDB uses BSON for data types rather than separate numeric, text and blob types. It supports embedded documents and arrays. Unlike MySQL, MongoDB does not have tables or rows, but collections and documents. Operations like insert, update, find, sort and index are discussed as alternatives to SQL equivalents.
Backbone.js is a JavaScript MVC framework that allows developers to build single page applications. It includes models, views, and controllers (routers). Models represent data, views display models, and routers handle navigation between views. Collections are groups of models that can be filtered, sorted, and manipulated. Views can display both individual models and entire collections. Events can be bound to views to handle user interactions. The framework uses a client-side routing system to change views based on the URL hash fragment.
As presented at Confoo 2013.
More than some arcane NoSQL tool, Redis is a simple but powerful swiss army knife you can begin using today.
This talk introduces the audience to Redis and focuses on using it to cleanly solve common problems. Along the way, we'll see how Redis can be used as an alternative to several common PHP tools.
The document provides an overview of the DBI module in Perl, which provides a standard interface for working with databases. Some key points:
- DBI provides a common API that works across different database drivers (DBD modules) like DBD::Pg, DBD::mysql, etc. It handles connecting to databases, executing queries, and retrieving results.
- The architecture involves the DBI module and separate DBD driver modules for each database. The drivers provide database-specific functionality while DBI provides a common interface.
- The lifecycle of a query involves preparing SQL, executing it, and fetching result rows. DBI offers convenience methods for common tasks like selecting rows.
- Features include
Python Ireland Nov 2010 Talk: Unit TestingPython Ireland
Unit testing for those seeking instant gratification - Maciej Bliziński
Abstract: Unit testing has long term benefits. However, depending on how you use it, it can have short term benefits too. This is an introductory talk, aimed at both beginner and experienced Python programmers who would like to get started testing their code.
PHP 7 – What changed internally? (Forum PHP 2015)Nikita Popov
One of the main selling points of PHP 7 is greatly improved performance, with many real-world applications now running twice as fast… But where do these improvements come from?
At the core of PHP 7 lies an engine rewrite with focus on improving memory usage and performance. This talk provides an overview of the most significant changes, briefly covering everything from data structure changes, over enhancements in the executor, to the new compiler implementation.
The document discusses CoffeeScript, a programming language that compiles to JavaScript. It provides examples of CoffeeScript syntax for functions, conditionals, loops, classes, and other constructs. It explains how CoffeeScript aims to have less syntactic noise than JavaScript while remaining true to the underlying JavaScript semantics through compilation.
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. It allows users to declare infrastructure as code and manage Azure, AWS, Google Cloud, and other providers through configuration files. The document discusses using Terraform to manage resources like DNS records, virtual machines, and networking on Azure through concepts like modules, providers, variables, and remote state.
This document introduces Assetic, an asset management library for PHP. It allows developers to work with assets like CSS, JavaScript, images and more. Key features include:
- Asset collections to merge multiple assets into one file for fewer HTTP requests
- Filters to minify, compress, compile or otherwise process asset contents
- Caching of processed assets for improved performance
- Integration with Symfony and other frameworks
- Tools to deploy optimized static assets to servers or content delivery networks
This document describes the implementation of a blog application using the Django web framework. It defines models for categories and posts using Django's model layer. It includes views for listing, detail, and category pages. Templates render the content and extend a base template. URLs are mapped to views. Form and template tags are used to implement a contact page. The application uses Django's admin interface and ORM to manage the database content.
The document describes a blog application built with Django. It includes models for categories and posts with a many-to-one relationship. It defines views for listing posts, displaying individual posts and categories. Templates render the content and use template inheritance. Forms and email sending are implemented for contact. URLs are configured to map to the views. Tags extend template capabilities to include recent posts. The application uses Django components and patterns for building the blog functionality.
PHP data structures (and the impact of php 7 on them), phpDay Verona 2015, ItalyPatrick Allaert
We all have certainly learned data structures at school: arrays, lists, sets, stacks, queues (LIFO/FIFO), heaps, associative arrays, trees, ... and what do we mostly use in PHP? The "array"! In most cases, we do everything and anything with it but we stumble upon it when profiling code. During this session, we'll learn again to use the structures appropriately, leaning closer on the way to employ arrays, the SPL and other structures from PHP extensions as well.The impact that PHP 7 should have on data structures will be introduced as well.
This document discusses agile database access with CakePHP 3. It covers types of object-relational mappers (ORMs), setting up associations between tables, performing simple and complex queries, formatting and debugging queries, modifying JSON output, using value objects, and more advanced topics like custom serialization and associations between databases. The goal is to provide an ORM that is quick, flexible, and easy to work with for both simple and complex database needs.
This document provides an introduction and overview of the Google Guava libraries. It describes what Guava is, why developers would use it, how it compares to Apache Commons libraries, its design principles and release cycles. It provides descriptions of some key Guava packages and classes for common Java utilities, including Preconditions, Optional, Objects, Strings, Charsets, CaseFormat, CharMatcher, Joiner and Splitter. The document aims to explain the purpose and usage of important Guava functionality.
This document summarizes the history of PHP persistence from 1995 to present day. It begins with early file handling in PHP/FI in 1995 and the introduction of database support. It then discusses the evolution of code reusability through functions and classes. Professional abstraction layers like PEAR and later ORM frameworks provided more robust and standardized APIs. NoSQL databases and drivers were later incorporated, moving beyond relational databases. Current frameworks provide object document mapping for non-SQL databases like MongoDB.
This document summarizes the new features in version 2.6 of MongoDB, including:
1) Aggregation cursors that allow controlling batch size and iterating over aggregation results.
2) A maxTimeMS option that sets a timeout for queries and commands.
3) New and enhanced update operations like $mul, $bit, $min/$max, $currentDate, and $push enhancements.
4) A new security model with roles and rights to customize access control.
Play Framework and Ruby on Rails are web application frameworks that help developers build web applications. Both frameworks provide tools and libraries for common tasks like routing, database access, templates and more. Some key similarities include using MVC patterns, supporting SQL/NoSQL databases via libraries, and including tools for unit testing and deployment. Some differences are Play uses Scala and Java while Rails uses Ruby, and they have different project structures and ways of handling assets, templates and dependencies. Both aim to help developers build web applications faster with their features and ecosystem of supporting libraries.
Designing a database like an archaeologistyoavrubin
The document describes the design approach for Datomic, a database modeled after archaeological excavation sites. Each change to an entity creates a new layer in the database, similar to layers uncovered during excavation. Entities have attributes with values at specific times, represented as datoms. Transactions operate by adding layers and updating database state. Queries can retrieve the evolutionary history of attributes or treat the database as a graph with entities as nodes and references as labeled links.
This document provides an overview of DataMapper, an object-relational mapper (ORM) library for Ruby applications. It summarizes DataMapper's main features such as associations, migrations, database adapters, naming conventions, validations, custom types and stores. The document also provides examples of how to use DataMapper with different databases, import/export data, and validate models for specific contexts.
A presentation to introduce the Lobos project made at the Bonjure group meeing on 2011/01/21. For more information on Lobos, visit the website: http://budu.github.com/lobos/
Riak at The NYC Cloud Computing Meetup Groupsiculars
Riak is a distributed key-value store inspired by Dynamo. It is homogeneous, with a single key space and is distributed and replicated across nodes. Riak aims to provide predictable scalability and high availability while allowing for some flexibility in consistency versus availability tradeoffs. It uses a ring topology and vector clocks to manage data distribution and conflict resolution. Riak supports schemaless data storage and provides features like links for basic graph capabilities and map/reduce functions for querying data.
1. The document discusses various JavaScript frameworks and libraries including jQuery, Underscore.js, Backbone.js, and RequireJS.
2. It provides overviews of what each framework/library is used for such as DOM manipulation with jQuery, utility functions with Underscore, and model-view-controller architecture with Backbone.
3. The document also discusses concepts like asynchronous module definition that RequireJS uses to manage dependencies between JavaScript files.
This talks covers some of the basic aspects of the JIP pipeline system (http://pyjip.readthedocs.org) and it's command line interface.
JIP is a system to manage jobs on a Cluster system and simplify the process of building computational pipelines. JIP can interact with Slurm, SGE, PBS/Torque, or LSF clusters and comes with a small local scheduler to run without any remote grid engine.
The document provides an overview of using the Drupal database API for interacting with the Drupal database. It covers basics of db_query and dynamic queries using db_select. Key points include using placeholders in queries, working with result sets, and more advanced topics like joins, sorting, conditional statements, and query tagging. The document suggests considering the database API as an alternative to Views when custom queries or aggregated data are needed that may require complex Views configuration.
This document provides an overview of jQuery, a JavaScript library for DOM scripting. It discusses why libraries like jQuery are useful for making DOM scripting easy and handling cross-browser compatibility issues. The core features of jQuery are then summarized, including selectors, DOM manipulation, events, effects, Ajax functionality, and utilities. Examples are provided throughout to illustrate how various jQuery methods work.
This document discusses techniques for improving the performance of Django projects handling high traffic volumes. It identifies common areas of concern like database performance, web server configuration, caching, and template rendering. It provides examples of optimizing ORM queries, implementing object caching with invalidation plans, profiling code to identify bottlenecks, and leveraging tools like Varnish, memcached, and database query profiling. The key lessons are to develop a caching strategy, use profiling to optimize problem areas, and consider alternative web server software or configurations to improve performance.
This document discusses techniques for improving the performance of Django projects handling high traffic volumes. It identifies common areas of concern like database usage, web server configuration, caching, and template rendering. It provides examples of optimizing database queries, implementing caching strategies, profiling code to identify bottlenecks, and leveraging tools like memcached, Varnish, and multiple web servers. The key lessons are to carefully design caching and database access, use profiling to find problematic areas rather than prematurely optimizing, and leverage server configuration expertise.
This document provides an overview of using the Perl programming language for bioinformatics applications. It introduces Perl variables like scalars, arrays, and hashes. It also covers flow control and loops. The document demonstrates how to open and read/write files in Perl. It provides examples of commonly used bioinformatics tools that incorporate Perl components and recommends resources for learning more about Perl and BioPerl.
Data driven testing using Integrant & SpecLeon Mergen
Conventional wisdom tells you to keep your code DRY and your tests WET, but that only gets you so far. At Autheos, we rely heavily on an extensive test suite that was getting out of control. This talk will cover the concepts of data driven testing, and how we used Integrant & Spec for the implementation.
This document provides an overview of Puppet, an open source configuration management tool. It discusses key Puppet concepts like infrastructure as code, reproducible setups, and aligned environments. It also describes Puppet's architecture including the Puppet master, agent nodes, catalogs, resources, and the lifecycle of a Puppet run. The Puppet language is declarative and node-based. Resources are defined and organized into classes. Relationships between resources can be specified.
Cucumber lets software teams describe how software should behave in plain text using a business-readable domain-specific language. This text serves as documentation, automated tests, and aids development by being written as features and scenarios. Cucumber uses plugins like Webrat and Nokogiri to run scenarios and check behavior. It generates step definitions to map scenarios to code.
Clojure for Java developers - StockholmJan Kronquist
This document provides an overview of the Clojure programming language from the perspective of a Java developer. It begins with an introduction to the presenter and an outline of what will not be covered. It then discusses some popular Clojure applications and frameworks. The core sections explain that Clojure was created in 2007, is a Lisp dialect that runs on the JVM and JavaScript, and is designed for concurrency. It provides an example of Clojure code, discusses reasons for using Clojure like its functional nature and interactive development environment. It addresses common complaints about Clojure and discusses Lisp concepts. It also covers Clojure data types, programming structures, working with Java classes using macros, editor support
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...BradNeuberg
This document discusses persistent storage options for web applications beyond cookies. It describes name/value storage, databases, static files, and how HTML5 specifications like localStorage, sessionStorage, databases, and the application cache provide similar persistent storage capabilities to older technologies like Gears and Flash. Use cases, code examples, and browser support are provided for each HTML5 storage mechanism.
The document discusses testing practices for the Ruby programming language. It provides details on how to run various test suites that are part of the Ruby source code repository, including:
1. Running the "make test" command which runs sample tests, known bug tests, and tests defined in the test/ directory.
2. Running "make test-all" which runs core library and standard library tests under the test/ directory.
3. Running "make check" which builds encodings and extensions, runs all test tasks including test frameworks like Test::Unit and Minitest.
4. It also discusses strategies for merging test changes from external repositories like RubyGems and RDoc back into the Ruby source code
Similar to Testing stateful, concurrent, and async systems using test.check (20)
You are in a maze of deeply nested maps, all alikeEric Normand
The document discusses encapsulating data operations and avoiding deep nesting when working with nested data structures like maps. It recommends separating code into distinct layers based on rates of change, with each layer only depending on the layer below. This stratified design approach aims to make the code easier to understand and maintain by programing at a higher level of abstraction closer to the domain concepts.
Many people ask about how to develop a functional mindset. It’s difficult if you’ve learned another paradigm and don’t know where to start. Functional thinking is a set of habits that you can train that will serve you well while programming in any language.
All I Needed for Functional Programming I Learned in High School AlgebraEric Normand
Are you tired of forgetting which keys go in which maps? Are your data transformation pipelines reaching trans-continental proportions? A smidgen of high school algebra may go a long way to eliminating your deeply nested headaches. In this talk, we will explore several functional programming concepts and techniques, lifted right out of high school algebra, that can deepen your functional programming skills and get you slicing your problems along new dimensions.
Did you learn Object-Oriented Programming in school or at work? Were you told the same lies as I was? In this talk, I document the oversimplifications, generalizations, and misinformation my professors dished out that I had to discover as I learned Functional Programming.
This document discusses the problems of complexity in software development and proposes functional programming as a solution. It outlines three main sources of complexity: time, state, and architecture. Functional programming aims to master these through an immutable data and stateless function model where functions take inputs and produce outputs without side effects. This reduces complexity by avoiding unintended interactions between different parts of a program over time and through state changes.
A Theory of Functional Programming LambdUpEric Normand
There are two common questions we hear from outside the functional programming community: ‘What is functional programming?’, and ‘Why should I use it?’. I have struggled to find good answers to these questions. In this talk, we will look at the existing definition and I will present a formulation I’ve been working on that attempts to answer both of these questions, and also why functional programming is so special.
Do you want to create robust and composable abstractions? Here’s an iterative process to define the essence of a domain and build composability into the core and then demonstrates how to apply this process to the Processing graphics library to develop a composable vector graphics system.
ClojureScript: I can't believe this is JavaScriptEric Normand
There are 6 difficult problems frameworks and libraries try to solve in JavaScript, but never quite get there. Learn how these problems (and more!) are solved by ClojureScript and how it can provide a platform for new solutions.
artificial intelligence and data science contents.pptxGauravCar
What is artificial intelligence? Artificial intelligence is the ability of a computer or computer-controlled robot to perform tasks that are commonly associated with the intellectual processes characteristic of humans, such as the ability to reason.
› ...
Artificial intelligence (AI) | Definitio
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...shadow0702a
This document serves as a comprehensive step-by-step guide on how to effectively use PyCharm for remote debugging of the Windows Subsystem for Linux (WSL) on a local Windows machine. It meticulously outlines several critical steps in the process, starting with the crucial task of enabling permissions, followed by the installation and configuration of WSL.
The guide then proceeds to explain how to set up the SSH service within the WSL environment, an integral part of the process. Alongside this, it also provides detailed instructions on how to modify the inbound rules of the Windows firewall to facilitate the process, ensuring that there are no connectivity issues that could potentially hinder the debugging process.
The document further emphasizes on the importance of checking the connection between the Windows and WSL environments, providing instructions on how to ensure that the connection is optimal and ready for remote debugging.
It also offers an in-depth guide on how to configure the WSL interpreter and files within the PyCharm environment. This is essential for ensuring that the debugging process is set up correctly and that the program can be run effectively within the WSL terminal.
Additionally, the document provides guidance on how to set up breakpoints for debugging, a fundamental aspect of the debugging process which allows the developer to stop the execution of their code at certain points and inspect their program at those stages.
Finally, the document concludes by providing a link to a reference blog. This blog offers additional information and guidance on configuring the remote Python interpreter in PyCharm, providing the reader with a well-rounded understanding of the process.
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
An improved modulation technique suitable for a three level flying capacitor ...IJECEIAES
This research paper introduces an innovative modulation technique for controlling a 3-level flying capacitor multilevel inverter (FCMLI), aiming to streamline the modulation process in contrast to conventional methods. The proposed
simplified modulation technique paves the way for more straightforward and
efficient control of multilevel inverters, enabling their widespread adoption and
integration into modern power electronic systems. Through the amalgamation of
sinusoidal pulse width modulation (SPWM) with a high-frequency square wave
pulse, this controlling technique attains energy equilibrium across the coupling
capacitor. The modulation scheme incorporates a simplified switching pattern
and a decreased count of voltage references, thereby simplifying the control
algorithm.
Design and optimization of ion propulsion dronebjmsejournal
Electric propulsion technology is widely used in many kinds of vehicles in recent years, and aircrafts are no exception. Technically, UAVs are electrically propelled but tend to produce a significant amount of noise and vibrations. Ion propulsion technology for drones is a potential solution to this problem. Ion propulsion technology is proven to be feasible in the earth’s atmosphere. The study presented in this article shows the design of EHD thrusters and power supply for ion propulsion drones along with performance optimization of high-voltage power supply for endurance in earth’s atmosphere.
3. A stateful example
• A key-value database
• Operations:
(db/create)
(db/clear! db)
(db/store! db k v)
(db/delete! db k)
(db/fetch db k)
(db/size db)
4. For the video and transcript
of this presentation,
click here:
https://lispcast.com/testing-stateful-and-concurrent-syste
ms-using-test-check/
6. DB should contain a key/value
after storing
(deftest store-contains
)
7. DB should contain a key/value
after storing
(deftest store-contains
(let [db (db/create)
k “a”
v “b”]
))
8. DB should contain a key/value
after storing
(deftest store-contains
(let [db (db/create)
k “a”
v “b”]
(db/store! db k v)
))
9. DB should contain a key/value
after storing
(deftest store-contains
(let [db (db/create)
k “a”
v “b”]
(db/store! db k v)
(db/fetch db k) ))
10. DB should contain a key/value
after storing
(deftest store-contains
(let [db (db/create)
k “a”
v “b”]
(db/store! db k v)
(is (= v (db/fetch db k)))))
12. store! should overwrite old
values
(deftest store-overwrite
(let [db (db/create)
k “a”
v1 “b”
v2 “c”]
))
13. store! should overwrite old
values
(deftest store-overwrite
(let [db (db/create)
k “a”
v1 “b”
v2 “c”]
(db/store! db k v1)
(db/store! db k v2)
))
14. store! should overwrite old
values
(deftest store-overwrite
(let [db (db/create)
k “a”
v1 “b”
v2 “c”]
(db/store! db k v1)
(db/store! db k v2)
(db/fetch db k) ))
15. store! should overwrite old
values
(deftest store-overwrite
(let [db (db/create)
k “a”
v1 “b”
v2 “c”]
(db/store! db k v1)
(db/store! db k v2)
(is (= v2 (db/fetch db k)))))
16. DB should be empty after
clearing
(deftest clear-empty
)
17. DB should be empty after
clearing
(deftest clear-empty
(let [db (db/create)
k “a”
v “b”]
))
18. DB should be empty after
clearing
(deftest clear-empty
(let [db (db/create)
k “a”
v “b”]
(db/store! db k v)
(db/clear! db)
))
19. DB should be empty after
clearing
(deftest clear-empty
(let [db (db/create)
k “a”
v “b”]
(db/store! db k v)
(db/clear! db)
(db/size db) ))
20. DB should be empty after
clearing
(deftest clear-empty
(let [db (db/create)
k “a”
v “b”]
(db/store! db k v)
(db/clear! db)
(is (zero? (db/size db)))))
25. How big is our system?
• How many strings are there?
• How many unicode characters are there?
• How many key-value pairs are there?
• How many operations are there?
• How many pairs of operations are there?
• How many triples of operations are there?
29. DB should contain a key/value
after storing
(defspec store-contains 100
)
30. DB should contain a key/value
after storing
(defspec store-contains 100
(prop/for-all [k gen-key
v gen-value]
))
31. DB should contain a key/value
after storing
(defspec store-contains 100
(prop/for-all [k gen-key
v gen-value]
(let [db (db/create)]
)))
32. DB should contain a key/value
after storing
(defspec store-contains 100
(prop/for-all [k gen-key
v gen-value]
(let [db (db/create)]
(db/store! db k v)
)))
33. DB should contain a key/value
after storing
(defspec store-contains 100
(prop/for-all [k gen-key
v gen-value]
(let [db (db/create)]
(db/store! db k v)
(= v (db/fetch db k)))))
35. store! should overwrite old
values
(defspec store-overwrite 100
(prop/for-all [k gen-key
v1 gen-value
v2 gen-value]
))
36. store! should overwrite old
values
(defspec store-overwrite 100
(prop/for-all [k gen-key
v1 gen-value
v2 gen-value]
(let [db (db/create)]
)))
37. store! should overwrite old
values
(defspec store-overwrite 100
(prop/for-all [k gen-key
v1 gen-value
v2 gen-value]
(let [db (db/create)]
(db/store! db k v1)
(db/store! db k v2)
)))
38. store! should overwrite old
values
(defspec store-overwrite 100
(prop/for-all [k gen-key
v1 gen-value
v2 gen-value]
(let [db (db/create)]
(db/store! db k v1)
(db/store! db k v2)
)))
39. store! should overwrite old
values
(defspec store-overwrite 100
(prop/for-all [k gen-key
v1 gen-value
v2 gen-value]
(let [db (db/create)]
(db/store! db k v1)
(db/store! db k v2)
(= v2 (db/fetch db k)))))
40. DB should be empty after
clearing
(defspec clear-empty 100
(prop/for-all [k gen-key
v gen-value]
(let [db (db/create)]
(db/store! db k v)
(db/clear! db)
(zero? (db/size db)))))
47. 3. Make 2 “runners”
(defn db-run [db ops]
(doseq [[op k v] ops]
))
48. 3. Make 2 “runners”
(defn db-run [db ops]
(doseq [[op k v] ops]
(case op
)))
49. 3. Make 2 “runners”
(defn db-run [db ops]
(doseq [[op k v] ops]
(case op
:clear! (db/clear! db)
)))
50. 3. Make 2 “runners”
(defn db-run [db ops]
(doseq [[op k v] ops]
(case op
:clear! (db/clear! db)
)))
51. 3. Make 2 “runners”
(defn db-run [db ops]
(doseq [[op k v] ops]
(case op
:clear! (db/clear! db)
:size (db/size db)
)))
52. 3. Make 2 “runners”
(defn db-run [db ops]
(doseq [[op k v] ops]
(case op
:clear! (db/clear! db)
:size (db/size db)
:store! (db/store! db k v)
:delete! (db/delete! db k)
:fetch (db/fetch db k))))
53. 3. Make 2 “runners”
(defn hm-run [db ops]
(reduce
(fn [hm [op k v]]
)
db ops))
54. 3. Make 2 “runners”
(defn hm-run [db ops]
(reduce
(fn [hm [op k v]]
(case op
))
db ops))
55. 3. Make 2 “runners”
(defn hm-run [db ops]
(reduce
(fn [hm [op k v]]
(case op
:clear! {}
))
db ops))
56. 3. Make 2 “runners”
(defn hm-run [db ops]
(reduce
(fn [hm [op k v]]
(case op
:clear! {}
:size hm
))
db ops))
57. 3. Make 2 “runners”
(defn hm-run [db ops]
(reduce
(fn [hm [op k v]]
(case op
:clear! {}
:size hm
:store! (assoc hm k v)
))
db ops))
58. 3. Make 2 “runners”
(defn hm-run [db ops]
(reduce
(fn [hm [op k v]]
(case op
:clear! {}
:size hm
:store! (assoc hm k v)
:delete! (dissoc hm k)
))
db ops))
59. 3. Make 2 “runners”
(defn hm-run [db ops]
(reduce
(fn [hm [op k v]]
(case op
:clear! {}
:size hm
:store! (assoc hm k v)
:delete! (dissoc hm k)
:fetch hm))
db ops))
74. Run it in multiple
threads
(defn run-in-thread [db ops]
(.start (Thread. (fn []
(db-run db ops)))))
(defn thread-run [db ops-sequences]
(run! #(run-in-thread db %) ops-sequences))
75. Wait for them all to
finish
(defn run-in-thread [db ops]
(let [done (promise)]
(.start (Thread. (fn []
(db-run db ops)
(deliver done :done!))))
done))
76. Wait for them all to
finish
(defn run-in-thread [db ops]
(let [done (promise)]
(.start (Thread. (fn []
(db-run db ops)
(deliver done :done!))))
done))
(defn thread-run [db ops-sequences]
(let [threads (map #(run-in-thread db %)
ops-sequences)]
(dorun threads)
(run! deref threads))
77. Start all threads at
once(defn run-in-thread [latch db ops]
(let [done (promise)]
(.start (Thread. (fn []
@latch
(db-run db ops)
(deliver done :done!))))
done))
78. Start all threads at
once(defn run-in-thread [latch db ops]
(let [done (promise)]
(.start (Thread. (fn []
@latch
(db-run db ops)
(deliver done :done!))))
done))
(defn thread-run [db ops-sequences]
(let [latch (promise)
threads (map #(run-in-thread latch db %)
ops-sequences)]
(dorun threads)
(deliver latch :go!)
(run! deref threads)))
80. Test against the model
(defspec hash-map-equiv 100
(prop/for-all [ops-a gen-ops
ops-b gen-ops]
))
81. Test against the model
(defspec hash-map-equiv 100
(prop/for-all [ops-a gen-ops
ops-b gen-ops]
(let [ops (concat ops-a ops-b)
]
)))
82. Test against the model
(defspec hash-map-equiv 100
(prop/for-all [ops-a gen-ops
ops-b gen-ops]
(let [ops (concat ops-a ops-b)
hm (hm-run {} ops)
db (db/create)]
)))
83. Test against the model
(defspec hash-map-equiv 100
(prop/for-all [ops-a gen-ops
ops-b gen-ops]
(let [ops (concat ops-a ops-b)
hm (hm-run {} ops)
db (db/create)]
(thread-run db [ops-a ops-b])
(equiv? db hm))))