The document discusses using vfsStream to mock the filesystem in unit tests. vfsStream provides a virtual filesystem that uses PHP streams, allowing tests to manipulate files and directories without interacting with the real filesystem. It describes how to set up vfsStream, create and interact with virtual files and directories, and a vfsStream PHPUnit helper that simplifies its integration with PHPUnit tests.
vfsStream - a better approach for file system dependent testsFrank Kleine
Have you ever been annoyed by testing classes or functions operating on the file system? Be it tests that rely on presence of physical files, the problem of not cleaning up correctly after the test run or checking that your algorithm creates the correct directories and files with correct file permissions. Then this is for you: vfsStream to the rescue!
The document discusses BioPerl, an open source collection of Perl modules for bioinformatics tasks. It provides examples of using BioPerl to work with sequence objects, read sequences from files in different formats, and retrieve sequences from GenBank. Methods are demonstrated for looping through sequences, converting file formats, and calculating properties like isoelectric points. The most acidic and basic amino acids can be identified by isoelectric point, and there is a biological explanation for these results.
The Perforce Web Content Management System development team, lacking a pre-existing solution in PHP, designed and implemented their own object model and record layer to ease the interaction of the system with the Perforce Server. This session will focus on how users can access files in Perforce via a simple CRUD API, the subsystems exposed, and their usage.
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.
The document discusses the Getopt::Long module for parsing command line arguments in R. It provides an example of using Getopt::Long to parse arguments in an R script called getopt_long_sample.R, where the --save.path argument is parsed and assigned to the save.path variable. Getopt::Long allows defining argument types like strings, integers, and flags to parse command line options consistently in both Perl and R scripts.
The document discusses processing large sequence data files in parallel using Raku. It describes reading input sequences from files in fixed-size chunks, passing the chunks to worker threads for processing, and using techniques like gather/take and lazy evaluation to improve performance over alternative approaches. The key steps are:
1. Read the input file in chunks and pass chunks to worker threads for parallel processing.
2. Use gather/take and lazy evaluation to improve throughput over alternatives like forking processes or using channels that introduce overhead.
3. SHA sequences in parallel to detect duplicates while avoiding memory issues from comparing all pairs directly.
The document discusses using functional programming techniques in Perl to efficiently calculate tree hashes of large files uploaded in chunks to cloud storage services. It presents a tree_fold keyword and implementation that allows recursively reducing a list of values using a block in a tail-call optimized manner to avoid stack overflows. This approach is shown to provide concise, efficient and elegant functional code for calculating tree hashes in both Perl 5 and Perl 6.
This document discusses six Python packages that are useful to know:
1. First - A utility for selecting the first successful result from a sequence of functions.
2. Parse - A library for parsing Python format strings and extracting values.
3. Filecmp - A module for comparing files and directories.
4. Bitrot - A tool for detecting silent data corruption in files.
5. Docopt - A tool for generating command-line interfaces from a docstring.
6. Six - A library for writing code that is compatible with both Python 2 and Python 3.
vfsStream - a better approach for file system dependent testsFrank Kleine
Have you ever been annoyed by testing classes or functions operating on the file system? Be it tests that rely on presence of physical files, the problem of not cleaning up correctly after the test run or checking that your algorithm creates the correct directories and files with correct file permissions. Then this is for you: vfsStream to the rescue!
The document discusses BioPerl, an open source collection of Perl modules for bioinformatics tasks. It provides examples of using BioPerl to work with sequence objects, read sequences from files in different formats, and retrieve sequences from GenBank. Methods are demonstrated for looping through sequences, converting file formats, and calculating properties like isoelectric points. The most acidic and basic amino acids can be identified by isoelectric point, and there is a biological explanation for these results.
The Perforce Web Content Management System development team, lacking a pre-existing solution in PHP, designed and implemented their own object model and record layer to ease the interaction of the system with the Perforce Server. This session will focus on how users can access files in Perforce via a simple CRUD API, the subsystems exposed, and their usage.
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.
The document discusses the Getopt::Long module for parsing command line arguments in R. It provides an example of using Getopt::Long to parse arguments in an R script called getopt_long_sample.R, where the --save.path argument is parsed and assigned to the save.path variable. Getopt::Long allows defining argument types like strings, integers, and flags to parse command line options consistently in both Perl and R scripts.
The document discusses processing large sequence data files in parallel using Raku. It describes reading input sequences from files in fixed-size chunks, passing the chunks to worker threads for processing, and using techniques like gather/take and lazy evaluation to improve performance over alternative approaches. The key steps are:
1. Read the input file in chunks and pass chunks to worker threads for parallel processing.
2. Use gather/take and lazy evaluation to improve throughput over alternatives like forking processes or using channels that introduce overhead.
3. SHA sequences in parallel to detect duplicates while avoiding memory issues from comparing all pairs directly.
The document discusses using functional programming techniques in Perl to efficiently calculate tree hashes of large files uploaded in chunks to cloud storage services. It presents a tree_fold keyword and implementation that allows recursively reducing a list of values using a block in a tail-call optimized manner to avoid stack overflows. This approach is shown to provide concise, efficient and elegant functional code for calculating tree hashes in both Perl 5 and Perl 6.
This document discusses six Python packages that are useful to know:
1. First - A utility for selecting the first successful result from a sequence of functions.
2. Parse - A library for parsing Python format strings and extracting values.
3. Filecmp - A module for comparing files and directories.
4. Bitrot - A tool for detecting silent data corruption in files.
5. Docopt - A tool for generating command-line interfaces from a docstring.
6. Six - A library for writing code that is compatible with both Python 2 and Python 3.
Perl6 regular expression ("regex") syntax has a number of improvements over the Perl5 syntax. The inclusion of grammars as first-class entities in the language makes many uses of regexes clearer, simpler, and more maintainable. This talk looks at a few improvements in the regex syntax and also at how grammars can help make regex use cleaner and simpler.
A lot of people using PHPunit for testing their source code. While I was observing my team I recognized most of them are only using the standard assertions like 'assertEquals()' and are complaining about how hard it is to test the code even when the tests are written first. This talk is about all the stuff not used on a daily basis and it digs deep into uncommon features of PHPUnit.
The most acidic and basic amino acids in Swiss-Prot were identified by calculating their isoelectric points. Glutamic acid was found to be the most acidic with a pI of 3.22, while lysine was the most basic with a pI of 10.76. Biologically, acidic and basic amino acids are often found on the surface of proteins where they can participate in electrostatic interactions.
This document discusses smartmatch (~~), a feature introduced in Perl 5.10 that provides pattern matching capabilities. It was initially designed to work similarly to equality (==) checks but is now more flexible. The document provides examples of how smartmatch can be used for tasks like command line argument checking, array element checking, IP address matching, and URL routing in a concise way. It advocates keeping the smartmatch operator in Perl.
Perl Bag of Tricks - Baltimore Perl mongersbrian d foy
The document discusses various Perl tricks and techniques, including using regular expressions to manipulate strings, testing code with arrays of test cases, and handling errors gracefully by returning a null object.
This document summarizes some new features in PHP 5.4:
- Array syntax can now be written more concisely using square brackets instead of array functions.
- PHP 5.4 includes a built-in web server for development purposes, allowing PHP scripts to be run without Apache.
- Traits allow sharing of methods across classes to reduce code duplication, similar to mixins in Ruby.
- Closures now support accessing properties of the enclosing class scope via $this.
PHP 7.1 contains new exciting features and improvements that can facilitate the life of many PHP developers. During the talk I will show some of these new features like nullable types, catching of multiple exceptions, the curl HTTP/2 server push support, void return types, Class constant visibility, authenticated encryption in OpenSSL with GCM and CCM modes, and more.
The document discusses parsing JSON with a single regular expression in Perl. It describes using grammars, recursion, and code execution within the regex to build a data structure that is returned. Key features include using (?&NAME) to recurse on named patterns, (?{ CODE }) to execute code during matching, and $^R to build and return a data structure.
This document provides an overview of regular expressions (regexes) and grammars in Perl 6. It discusses key concepts like rules, tokens, and capturing matches. Regexes allow matching patterns in strings, while grammars parse strings according to defined rules and tokens. The document gives examples of grammars for search queries and dates that capture city, country, from and to dates, and guest numbers. It demonstrates parsing strings and accessing captured values to retrieve individual fields.
The document discusses API design in PHP for the Ning platform. It covers how the PHP API provides an interface to the Ning REST APIs, which are used for content storage, user profiles, tagging, search, and more. Examples are given of using the PHP XN_Content class to create and save content to the REST API. The document emphasizes designing APIs that promote predictability, stability, and human performance over computer performance.
This document summarizes Brian D Foy's presentation on "My Perl Bag of Tricks" given at YAPC::Brasil 2011. Some of the tricks discussed include eliminating special cases, using Perl to do more of the work, scaling code gracefully, parsing XML data efficiently, testing code with sample inputs/outputs, and handling errors gracefully. The presentation aims to show Perl techniques for writing cleaner, more robust code.
The document describes updates to modernize a Perl script. It proposes changes like using object-oriented approaches instead of procedural code, replacing calls to functions like stat() with object methods, and improving error handling. Key changes include using objects for dates/times instead of timestamps, autoboxing scalar values, and extending scalars to allow method calls on values.
This document provides examples of unit testing code in PHP using PHPUnit. It demonstrates how to write test cases with assertions, use PHPUnit features like data providers and expected exceptions, and addresses challenges like external dependencies by implementing dependency injection. Mocking and stubs are also presented as ways to isolate code during testing. The overall content aims to explain PHPUnit and best practices for writing clean, isolated and effective unit tests.
Tied variables allow the underlying implementation of scalars, arrays, hashes and filehandles to be customized by tying them to classes. This allows the normal Perl syntax and usage to remain the same while providing flexibility in how the data is stored and accessed behind the scenes. The tie interface hides this complexity from the user and makes the tied variables act like normal variables.
The document discusses many new features in PHP 5.3 including improved unicode support, garbage collection, additions to the Standard PHP Library (SPL) like stacks and queues, magic method calls, late static binding, namespaces, improved error handling, and deprecation of old PHP settings. It provides an overview of major new capabilities and changes in PHP 5.3.
Legacy applications - 4Developes konferencja, Piotr PasichPiotr Pasich
This document discusses strategies for integrating legacy applications into the Symfony framework. It describes using bundles to namespace the legacy code, autoloading to include the legacy files, and controllers to proxy requests to the legacy application. It also covers testing legacy functionality, using ESI and Varnish for caching parts of pages, and mapping legacy database tables to Doctrine entities. The goal is to modernize the application over time by rewriting specific functionality into Symfony while keeping the legacy system running.
Laying the proper foundation for plugin and theme developmentTammy Hart
This document provides guidelines for proper plugin and theme development in WordPress. It discusses setting up directory structures and file naming conventions, using namespaces and constants, enqueueing scripts and stylesheets, including separate code files, localization, and using controller classes for activation, deactivation and uninstall hooks. Proper foundation practices like commenting, documentation and readme files are also covered to help developers build well-structured and organized plugins and themes.
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnitsmueller_sandsmedia
PHPUnit provides many features beyond just testing code including:
- Command line options like --testdox to generate styled reports and --filter to select specific tests.
- Annotations like @covers and @group to document and organize tests.
- Various assertion methods like assertContains(), assertType(), and assertSelectRegExp() to validate test conditions.
- Test listeners that get called at different test execution stages to add functionality.
- Ways to test exceptions like @expectedException and try/catch blocks.
- Mocking features to isolate tests from external dependencies using callbacks and return values.
Perl6 regular expression ("regex") syntax has a number of improvements over the Perl5 syntax. The inclusion of grammars as first-class entities in the language makes many uses of regexes clearer, simpler, and more maintainable. This talk looks at a few improvements in the regex syntax and also at how grammars can help make regex use cleaner and simpler.
A lot of people using PHPunit for testing their source code. While I was observing my team I recognized most of them are only using the standard assertions like 'assertEquals()' and are complaining about how hard it is to test the code even when the tests are written first. This talk is about all the stuff not used on a daily basis and it digs deep into uncommon features of PHPUnit.
The most acidic and basic amino acids in Swiss-Prot were identified by calculating their isoelectric points. Glutamic acid was found to be the most acidic with a pI of 3.22, while lysine was the most basic with a pI of 10.76. Biologically, acidic and basic amino acids are often found on the surface of proteins where they can participate in electrostatic interactions.
This document discusses smartmatch (~~), a feature introduced in Perl 5.10 that provides pattern matching capabilities. It was initially designed to work similarly to equality (==) checks but is now more flexible. The document provides examples of how smartmatch can be used for tasks like command line argument checking, array element checking, IP address matching, and URL routing in a concise way. It advocates keeping the smartmatch operator in Perl.
Perl Bag of Tricks - Baltimore Perl mongersbrian d foy
The document discusses various Perl tricks and techniques, including using regular expressions to manipulate strings, testing code with arrays of test cases, and handling errors gracefully by returning a null object.
This document summarizes some new features in PHP 5.4:
- Array syntax can now be written more concisely using square brackets instead of array functions.
- PHP 5.4 includes a built-in web server for development purposes, allowing PHP scripts to be run without Apache.
- Traits allow sharing of methods across classes to reduce code duplication, similar to mixins in Ruby.
- Closures now support accessing properties of the enclosing class scope via $this.
PHP 7.1 contains new exciting features and improvements that can facilitate the life of many PHP developers. During the talk I will show some of these new features like nullable types, catching of multiple exceptions, the curl HTTP/2 server push support, void return types, Class constant visibility, authenticated encryption in OpenSSL with GCM and CCM modes, and more.
The document discusses parsing JSON with a single regular expression in Perl. It describes using grammars, recursion, and code execution within the regex to build a data structure that is returned. Key features include using (?&NAME) to recurse on named patterns, (?{ CODE }) to execute code during matching, and $^R to build and return a data structure.
This document provides an overview of regular expressions (regexes) and grammars in Perl 6. It discusses key concepts like rules, tokens, and capturing matches. Regexes allow matching patterns in strings, while grammars parse strings according to defined rules and tokens. The document gives examples of grammars for search queries and dates that capture city, country, from and to dates, and guest numbers. It demonstrates parsing strings and accessing captured values to retrieve individual fields.
The document discusses API design in PHP for the Ning platform. It covers how the PHP API provides an interface to the Ning REST APIs, which are used for content storage, user profiles, tagging, search, and more. Examples are given of using the PHP XN_Content class to create and save content to the REST API. The document emphasizes designing APIs that promote predictability, stability, and human performance over computer performance.
This document summarizes Brian D Foy's presentation on "My Perl Bag of Tricks" given at YAPC::Brasil 2011. Some of the tricks discussed include eliminating special cases, using Perl to do more of the work, scaling code gracefully, parsing XML data efficiently, testing code with sample inputs/outputs, and handling errors gracefully. The presentation aims to show Perl techniques for writing cleaner, more robust code.
The document describes updates to modernize a Perl script. It proposes changes like using object-oriented approaches instead of procedural code, replacing calls to functions like stat() with object methods, and improving error handling. Key changes include using objects for dates/times instead of timestamps, autoboxing scalar values, and extending scalars to allow method calls on values.
This document provides examples of unit testing code in PHP using PHPUnit. It demonstrates how to write test cases with assertions, use PHPUnit features like data providers and expected exceptions, and addresses challenges like external dependencies by implementing dependency injection. Mocking and stubs are also presented as ways to isolate code during testing. The overall content aims to explain PHPUnit and best practices for writing clean, isolated and effective unit tests.
Tied variables allow the underlying implementation of scalars, arrays, hashes and filehandles to be customized by tying them to classes. This allows the normal Perl syntax and usage to remain the same while providing flexibility in how the data is stored and accessed behind the scenes. The tie interface hides this complexity from the user and makes the tied variables act like normal variables.
The document discusses many new features in PHP 5.3 including improved unicode support, garbage collection, additions to the Standard PHP Library (SPL) like stacks and queues, magic method calls, late static binding, namespaces, improved error handling, and deprecation of old PHP settings. It provides an overview of major new capabilities and changes in PHP 5.3.
Legacy applications - 4Developes konferencja, Piotr PasichPiotr Pasich
This document discusses strategies for integrating legacy applications into the Symfony framework. It describes using bundles to namespace the legacy code, autoloading to include the legacy files, and controllers to proxy requests to the legacy application. It also covers testing legacy functionality, using ESI and Varnish for caching parts of pages, and mapping legacy database tables to Doctrine entities. The goal is to modernize the application over time by rewriting specific functionality into Symfony while keeping the legacy system running.
Laying the proper foundation for plugin and theme developmentTammy Hart
This document provides guidelines for proper plugin and theme development in WordPress. It discusses setting up directory structures and file naming conventions, using namespaces and constants, enqueueing scripts and stylesheets, including separate code files, localization, and using controller classes for activation, deactivation and uninstall hooks. Proper foundation practices like commenting, documentation and readme files are also covered to help developers build well-structured and organized plugins and themes.
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnitsmueller_sandsmedia
PHPUnit provides many features beyond just testing code including:
- Command line options like --testdox to generate styled reports and --filter to select specific tests.
- Annotations like @covers and @group to document and organize tests.
- Various assertion methods like assertContains(), assertType(), and assertSelectRegExp() to validate test conditions.
- Test listeners that get called at different test execution stages to add functionality.
- Ways to test exceptions like @expectedException and try/catch blocks.
- Mocking features to isolate tests from external dependencies using callbacks and return values.
Refactoring, Agile Entwicklung, Continuous Integration – all diese für nachhaltigen Erfolg wichtigen Vorgehensweisen setzen Erfahrung mit Unit Testing voraus. Abseits von den üblichen "Bowling"-Beispielen möchten wir gerne einen Crashkurs inkl. Best Practices für das erfolgreiche Unit Testing durchführen. Anhand eines Beispielprojekts auf Basis des Zend Frameworks werden wir nach der Installation von PHPUnit auf allen Notebooks gemeinsam eine kleine Applikation aufbauen, die durchgehend Test-driven entwickelt wird.
Go beyond the documentation and explore some of what's possible if you stretch symfony to its limits. We will look at a number of aspects of symfony 1.4 and Doctrine 1.2 and tease out some powerful functionality you may not have expected to find, but will doubtless be able to use. Topics covered will include routing, forms, the config cache and record listeners. If you're comfortable in symfony and wondering what's next, this session is for you.
This document summarizes the Aura Project for PHP 5.4. The Aura Project provides independent library packages that can be used individually or together to build applications. It includes components like autoloading, routing, database abstraction, and more. Each component is built as a separate package that can be included as needed for applications.
The document discusses various PHP wrappers that can be used to read and write data in non-standard ways and bypass security restrictions. It describes how wrappers like php://filter, zip://, and data:// can be used to read and write local files, modify file contents, bypass authentication, and perform XXE attacks. It also notes that filters in the php://filter wrapper can be used to selectively remove parts of file contents during I/O operations.
The document discusses jQuery, a JavaScript library that simplifies HTML and JavaScript interactions. It allows selecting elements, handling events, animating elements, and making AJAX calls. Some key points covered include:
- jQuery simplifies DOM manipulation and event handling across browsers.
- Common tasks like selecting elements, handling events, and animating elements are simplified.
- jQuery supports AJAX and makes asynchronous requests easily.
- Plugins can be created using jQuery's plugin authoring features like $.fn.extend().
- The $.ajax() method forms the basis of all AJAX calls in jQuery and has many options to customize requests.
In 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
A lot of people using PHPunit for testing their source code. While I was observing my team
I recognized most of them are only using the standard ssertions like 'assertEquals()' or
'assertTrue()' and are complaining about how hard it is to test the code even when the tests are written first. This talk is about all the stuff not used on a daily basis. It shows you some nice features of PHPUnit and how to use them for your benefit.
The document discusses unit testing Zend Framework applications. It begins by explaining the importance of testing and some common excuses for not testing. It then provides examples of setting up PHPUnit configuration and bootstrap files for testing Zend Framework applications. The document demonstrates how to write tests for Zend Forms and models, including testing with both valid and invalid data. It shows how to modify models to add validation filters and validators.
The document discusses unit testing Zend Framework applications. It provides an overview of setting up PHPUnit for testing, including creating a phpunit.xml file and TestHelper bootstrap file. It also discusses testing Zend Forms and Models, including writing tests to validate form data and test that models are empty on construction. Code examples are provided for writing tests for a CommentForm and CommentModel class.
Building Lithium Apps (Like a Boss) was a workshop presented on the structure and philosophy of the Lithium framework and its applications, and how best to take advantage of them.
Presentation for azPHP on setting up a new project using Zend_Tool. Also goes over creating basic modules, controllers, actions, models and layouts.
All code in the presentation has not necessarily been tested. Will update presentation when done.
The document discusses different strategies for testing persistence in PHP applications, including unit testing with mocks and dependencies, integration testing using DbUnit to insert test data and assert expected results, and techniques for setting up common initial states across tests. It also covers the benefits and downsides of different types of tests, such as layer crossing tests that test interactions across layers but may be more brittle, versus end-to-end black box tests that test through the public API but are harder to debug.
Creating "Secure" PHP Applications, Part 1, Explicit Code & QAarchwisp
The document provides tips for writing more secure PHP code such as using typing assertions and avoiding global variables, recommends using tools like PHPMD and PHPCS to analyze code quality and identify issues, and emphasizes the importance of unit testing, continuous integration, and secure deployment practices.
Getting to The Loop - London Wordpress Meetup July 28thChris Adams
This is a slightly modified version of the talk I gave at the London Wordpress meetup.
I'm putting it up here a) for people who were taking notes last night and b) to shame me into putting a polished version up here for people who couldn't make it.
thanks for @folletto for providing the graphics that split up the endless code snippets.
PHP 5.3 introduced many new features and improvements including:
- Performance improvements with up to 40% faster speeds on Windows and 5-15% overall.
- New error reporting levels, garbage collection, and the MySQLnd native driver.
- Backwards compatibility changes like deprecated EREG functions and magic methods requirements.
- Namespaces, late static bindings, closures/lambdas, the __callStatic magic method, and get_called_class().
- Additions to the SPL like new iterators, the date/time object, and new constants like __DIR__ and __NAMESPACE__.
Similar to vfsStream - effective filesystem mocking (20)
The document discusses the journey of implementing continuous integration (CI) practices. It describes initial frustrations with ad hoc builds and lack of standards. A council was formed including managers and developers to address threats, opportunities and plan implementation. Automation tools were adopted, including Cruisecontrol, PHPUnit, phpDocumentor, PHP_Codesniffer, and others to enable automated builds, testing, documentation and metrics. Jenkins was later adopted for its improved installation, configuration and support for multiple languages. SonarQube was also used for continuous analysis and quality management. Implementing a CI culture involved adopting development models, scaling the build process, code reviews and improving communication.
CodeClub - Teaching the young generation programmingSebastian Marek
Code Club is all about connecting talented computer programmers with their local schools and providing them with the materials they need to help kids learn to code. It is a nationwide network of free volunteer-led after-school coding clubs for children aged 9-11. In this talk I will tell you what this is all about and how you can get involved and support this great initiative.
Wbrew powszechnym opiniom, nie tak prosto jest zrobić dobre Code Review. Robione w pośpiechu, tylko po to by je "odbębnić", często stwarza więcej szkody niż pożytku. Opowiem wam dlaczego code review jest ważne i jak wykorzystać ten proces aby upewnić się, że napisany kod jest najwyższej jakości. Będę nie tylko mówił o tym kto powinien robić code reviews, i dla kogo, jakie informacje są potrzebne do przeprowadzenia skutecznego code review, ale także jak zrobić dobre code review w najkrótszym możliwym czasie.
Managing and Monitoring Application PerformanceSebastian Marek
Writing your application is one thing. Making the application to perform well is another. We usually forget there is somebody else on the other side of the screen, that becomes very frustrated and upset when he needs to wait until this one page finally loads. It requires a lot of experience to predict specific behaviour and to know what kind of things to avoid. And even with that there is so many different factors that can affect the end user experience. During this talk I will talk about tools and techniques you can use to measure and monitor your application performance.
Software engineering is not an easy profession. You have to constantly learn new things to improve your coding skills and make sure you produce better and cleaner code over time. It’s not difficult, but you have to be aware of a few basic principles. With them in mind you will feel a better engineer and will gain respect from your fellow engineers. And the Lord said: “Thou shall always remember to write unit tests - no matter the deadline. Remember to keep the build green. Thou shall commit often and with meaningful messages (...)”
Continuous Inspection: Fight back the 7 deadly sins of a developer!Sebastian Marek
This document discusses continuous inspection as a way for developers to fight against the seven deadly sins of development. It introduces each of the seven deadly sins - lust, gluttony, greed, sloth, wrath, envy, and pride - and provides examples of how they may manifest in code. It then discusses how tools like Sonar can help with continuous inspection by analyzing code for potential issues and tracking metrics over time to control technical debt.
Test your code like a pro - PHPUnit in practiceSebastian Marek
The day you realised that you can’t really tell what your code does is the day you stop being an amateur programmer and you turn into a professional developer. During this workshop you will learn about the most famous unit testing framework – PHPUnit, how it can help you gain confidence in your code and what to do (and what to avoid) to make your code testable. We will discuss unit testing best practices and talk about tools that can help you automate the whole process, so it becomes more of a habit then a necessity.
It’s not easy to perform a good code review. Often done in a hurry just to get it done, it only makes things worse. People treat it as an obstacle, not a helpful thing. I am gonna tell you why code reviews are important and how they can help you maintain good quality code. I will not only tell who are the code reviews for, how to raise a useful code review, but also how to perform a good code review in the quickest time possible.
Code reviews are a powerful tool in ensuring and maintaining quality in your application, but they can be very difficult to get right. When they're misunderstood or poorly executed, they can even make a bad situation worse.
In this session I'll use my professional experience to give you some tactics for getting great benefit from code reviews. We'll talk about tools, about process and most importantly about attitude! Whether you're a developer or a technical lead, come along and find out how to perform a genuinely useful code review and provide constructive feedback in the quickest time possible.
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practiceSebastian Marek
We use static code analysis tools more often these days that create great reports and funky graphs. But do we understand what it all means?
Software metrics tends to be magic numbers for a lot of people, but they don’t really have to be. Seb will introduce you to a few basic, the most popular software metrics and tools. He will explain to you what they mean and how you can use them to produce better software.
Software engineering is not an easy profession. You have to constantly learn new things to improve your coding skills and make sure you produce better and cleaner code over time. It's not difficult, but you have to be aware of a few basic principles. With them in mind you will feel a better engineer and will gain respect from your fellow engineers. And the Lord said: "Thou shall always remember to write unit tests - no matter the deadline. Remember to keep the build green. Thou shall commit often and with meaningful messages (...)"
PHP Benelux 2012: Magic behind the numbers. Software metrics in practice Sebastian Marek
Software metrics can provide useful insights into code quality and complexity. Code metrics like lines of code, cyclomatic complexity, and weighted method count measure characteristics like code size, logic complexity, and class complexity. Design metrics evaluate qualities like coupling and cohesion. Metrics are most effective when used to identify improvement opportunities rather than to judge the overall quality of code or designs. Calculating and tracking metrics over time can help optimize code and catch regressions during development.
Magic behind the numbers - software metrics in practiceSebastian Marek
We use static code analysis tools more often these days that create great reports and funky graphs. But do we understand what it all mean?
Software metrics tends to be magic numbers for a lot of people, but they don't really have to be. Let me introduce you to a few basic and
most popular software metric and tools and explain you what they mean and how you can use them to produce better software.
Unit testing involves testing individual units of code to ensure they function as intended. Unit tests isolate and test each part of a program to show they are correct. Benefits of unit testing include finding problems early, facilitating change, simplifying integration, and serving as living documentation. PHPUnit is a popular unit testing framework for PHP, which can be installed via PEAR. Tests are written to make assertions and test exceptions, data, and dependencies. Results can be logged in verbose mode or testdox format.
There are several tools out there that help to develop and maintain high quality PHP code. They allow you to identify the most fragile and messy parts of your codebase. PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards. Learn how it works, how you can use it and how can you bend it to meet your requirements!
Sonar is a platform for continuously inspecting code quality to detect issues, ensure technical debt is under control, and monitor code complexity, duplications, and potential bugs. It provides visual reporting across projects and allows tracking metrics over time. Sonar supports PHP projects using tools like PHP_Codesniffer, PHPUnit, PHP Depend, and PHP Mess Detector. It can be set up with Maven and integrated with Hudson via a plugin or phpUnderControl via Ant tasks to run analysis as part of the continuous integration build process.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Webinar: Designing a schema for a Data WarehouseFederico Razzoli
Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you.
A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services.
But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts.
We will discuss these topics:
- How to gather information about a business;
- Understanding dictionaries and how to identify business entities;
- Dimensions and facts;
- Setting a table granularity;
- Types of facts;
- Types of dimensions;
- Snowflakes and how to avoid them;
- Expanding existing dimensions and facts.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
10. Learning by example <?php class Config { private $filename ; public function __construct($filename) { if (!is_file($filename)) { throw new Exception( "Can't set the filename - it doesn't exists!" ); } $this -> filename = $filename; } public function fetchConfig() { return parse_ini_file( $this -> filename , true ); } public function createCacheDir($directory) { if (!is_dir($directory)) { return mkdir($directory, 0700, true ); } return false ; } }
43. vfsStream PHPUnit Helper <?php class MyClassTest extends PHPUnit_Framework_TestCase { // (...) /** * - It will skip the test if vfsStream is not installed * - It will register vfsStream in default root directory called 'root' * - creates 'tmp' directory in root directory */ public function testCreateDirectoryInDefaultRootDirectory() { $vfsStreamWrapper = new vfsStreamHelper_Wrapper( $this ); $vfsStreamWrapper->createDirectory( "tmp" ); $this ->assertFileExists(vfsStream:: url ( 'root/tmp' )); } // (...) }
44. vfsStream PHPUnit Helper <?php class MyClassTest extends PHPUnit_Framework_TestCase { // (...) /** * - It will skip the test if vfsStream is not installed * - It will register vfsStream in default root directory called 'root' * - creates empty 'myFile.txt' file in root directory */ public function testCreateEmptyFileInDefaultRootDirectory() { $vfsStreamWrapper = new vfsStreamHelper_Wrapper( $this ); $vfsStreamWrapper->createFile( "myFile.txt" ); $this ->assertFileExists(vfsStream:: url ( 'root/myFile.txt' )); } // (...) }
45. vfsStream PHPUnit Helper <?php class MyClassTest extends PHPUnit_Framework_TestCase { // (...) /** * - It will skip the test if vfsStream is not installed * - It will register vfsStream in root directory called 'myDir' * - creates 'home' directory in root directory */ public function testCreateDirectoryInCustomRootDirectory() { $vfsStreamWrapper = new vfsStreamHelper_Wrapper( $this , 'myDir' ); $vfsStreamWrapper->createDirectory( "home" ); $this ->assertFileExists(vfsStream:: url ( 'myDir/home' )); } // (...) }
46. vfsStream PHPUnit Helper <?php class MyClassTest extends PHPUnit_Framework_TestCase { // (...) /** * - It will skip the test if vfsStream is not installed * - It will register vfsStream in default root directory called 'root' * - creates directory in different possible ways */ public function testDifferentWaysOfCreatingDirectories() { $vfsStreamWrapper = new vfsStreamHelper_Wrapper( $this ); // create a single directory $vfsStreamWrapper->createDirectory( "tmp" ); // create nested directories $vfsStreamWrapper->createDirectory( "home/proofek/downloads" ); // create a directory using vfsStreamHelper_Directory in default root $vfsStreamWrapper->createDirectory( new vfsStreamHelper_Directory( 'etc' )); // create a directory using vfsStreamHelper_Directory in a subdirectory $vfsStreamWrapper->createDirectory( new vfsStreamHelper_Directory( 'init.d' , 'etc' ) ); // (...)
48. vfsStream PHPUnit Helper <?php class MyClassTest extends PHPUnit_Framework_TestCase { // (...) /** * - It will skip the test if vfsStream is not installed * - It will register vfsStream in default root directory called 'root' * - creates files in different possible ways */ public function testDifferentWaysOfCreatingFiles() { $vfsStreamWrapper = new vfsStreamHelper_Wrapper( $this ); // create a single empty file in default root directory $vfsStreamWrapper->createFile( "myFile.txt" ); // create a single empty file using vfsStreamHelper_File in default root $vfsStreamWrapper->createFile( new vfsStreamHelper_File( 'anotherFile.txt' ) ); // create a single file with contents using vfsStreamHelper_File in default root $fileContent = "First line in the fileSecond line in the file" ; $vfsStreamWrapper->createFile( new vfsStreamHelper_File( 'thirdFile.txt' , $fileContent) ); // (...)
49. vfsStream PHPUnit Helper // (...) // create a single file with contents using vfsStreamHelper_File in // a subdirectory $fileContent = "First line in the fileSecond line in the file" ; $vfsStreamWrapper->createDirectory( "tmp" ); $vfsStreamWrapper->createFile( new vfsStreamHelper_File( 'file.txt' , $fileContent, 'tmp' ) ); // create multiple files $vfsStreamWrapper->createDirectory( "etc" ); $vfsStreamWrapper->createFile( array ( new vfsStreamHelper_File( 'file1.txt' , 'some content' , 'etc' ), new vfsStreamHelper_File( 'file2.txt' , null , 'etc' ), new vfsStreamHelper_File( 'file3.txt' ), ) ); } // (...) }
Not full support Helps test things like is_readable(), is_writable() or is_executable() Default file mode 0666 Default dir mode 0777 Subdirs get parents perms