The document discusses how to use template strings in JavaScript to improve code readability and functionality. It provides examples of using template strings for logging, internationalization, SQL queries, fetching URLs, and dependency injection. Some key points include:
- Template strings allow embedding expressions and variables directly in strings which improves readability over string concatenation.
- Examples are given for using template strings for logging, internationalization support with different languages, building SQL queries, and fetching URLs from configuration objects.
- Methods are defined to wrap common operations like getting nested configuration values and fetching URLs/APIs to simplify their use with template strings.
- The examples also demonstrate enhancing template strings to support additional functionality like options, dependency
I put on my mink and wizard behat (tutorial)xsist10
An indepth dive into using Behat/Mink/Selenium for BDD testing.
* http://behat.org
* http://mink.behat.org/
* http://docs.seleniumhq.org/
In this talk I'll cover:
* why and when to use Behat (and when not)
* Installation and configuration of Behat and Mink
* Building Behat Contexts
* Avoiding data deadlocks and "test user account" syndrome
* Introduction to Selenium and testing JavaScript
* Best practises for writing tests (what to avoid, what to aspire for, writing stories like you mean it, how to get your product owners to write them)
* Common gotchas
An indepth dive into using Behat/Mink/Selenium for BDD testing.
* http://behat.org
* http://mink.behat.org/
* http://docs.seleniumhq.org/
In this talk I'll cover:
* why and when to use Behat (and when not)
* Installation and configuration of Behat and Mink
* Building Behat Contexts
* Avoiding data deadlocks and "test user account" syndrome
* Introduction to Selenium and testing JavaScript
* Best practises for writing tests (what to avoid, what to aspire for, writing stories like you mean it, how to get your product owners to write them)
* Common gotchas
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
I Don't Care About Security (And Neither Should You)Joel Lord
Remember when setting up an auth system was easy? Me neither. From the signup form, the login form, password reset form, and all the validation in between it can easily take weeks if not months to get something basic up and running. Then you have to deal with all the security considerations. No thanks. During this presentation, the attendees will be introduced to OpenID and OAuth. They will learn how to leverage these technologies to create secure applications, but most importantly, they will learn why and how to delegate authorization and authentication so they can focus on their real work and forget about all that security stuff.
I put on my mink and wizard behat (tutorial)xsist10
An indepth dive into using Behat/Mink/Selenium for BDD testing.
* http://behat.org
* http://mink.behat.org/
* http://docs.seleniumhq.org/
In this talk I'll cover:
* why and when to use Behat (and when not)
* Installation and configuration of Behat and Mink
* Building Behat Contexts
* Avoiding data deadlocks and "test user account" syndrome
* Introduction to Selenium and testing JavaScript
* Best practises for writing tests (what to avoid, what to aspire for, writing stories like you mean it, how to get your product owners to write them)
* Common gotchas
An indepth dive into using Behat/Mink/Selenium for BDD testing.
* http://behat.org
* http://mink.behat.org/
* http://docs.seleniumhq.org/
In this talk I'll cover:
* why and when to use Behat (and when not)
* Installation and configuration of Behat and Mink
* Building Behat Contexts
* Avoiding data deadlocks and "test user account" syndrome
* Introduction to Selenium and testing JavaScript
* Best practises for writing tests (what to avoid, what to aspire for, writing stories like you mean it, how to get your product owners to write them)
* Common gotchas
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
I Don't Care About Security (And Neither Should You)Joel Lord
Remember when setting up an auth system was easy? Me neither. From the signup form, the login form, password reset form, and all the validation in between it can easily take weeks if not months to get something basic up and running. Then you have to deal with all the security considerations. No thanks. During this presentation, the attendees will be introduced to OpenID and OAuth. They will learn how to leverage these technologies to create secure applications, but most importantly, they will learn why and how to delegate authorization and authentication so they can focus on their real work and forget about all that security stuff.
Storing all of the reply content is usually not possible: it may be dynamic. A proxy allows directing only the content that needs to be handled locally to the test server, other content can go to the cloud. The final step, closing the loop between client and server, requires wapping LWP::UserAgent to direct locally handled requests to the test server.
HTTP For the Good or the Bad - FSEC EditionXavier Mertens
A review of the webshells used by bad guys. How they are protected but also mistakes in their implementation. This talk was updated and presented at the FSEC conference in Croatia, September 2017.
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)Dotan Dimet
A lightning talk given at Rails Israel 2014
(http://railsisrael2014.events.co.il/presentations/1319-mojolicious-perl-framework-for-the-real-time-web).
Uses some slides lifted from Glen Hinkle's YAPC 2012 talk
(https://speakerdeck.com/tempire/intro-to-mojolicious-perl)
and an image created by Marcus Ramburg.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
3. www.luxoft.com
ES5 Style
const name = 'Yuriy Voziy';
const city = 'Kyiv';
const birth = 1984;
const greeting = '<html>' + "n"
+ '<body>' + "n"
+ '<div>' + "n"
+ 'Hi, my name is ' + name + ".n"
+ 'I live in ' + _.upperFirst(city) + ".n"
+ _.upperFirst(city) + " is a beatiful place!n"
+ "</div></body></html>";
4. www.luxoft.com
With ES6 Template Strings
const name = 'Yuriy Voziy';
const city = 'Kyiv';
const birth = 1984;
const greeting = `<html>
<body>
<div>
Hi, my name is ${name}.
I am ${new Date().getFullYear() - birth} years old.
I live in ${_.upperFirst(city)}.
And I must say that ${_.upperFirst(city)} is a beautiful place!
</div>
</body>
</html>`
5. www.luxoft.com
Let’s write a simple log function
function log(strings) {
console.log(string[0]);
}
log `Entering log data`
// Prints "Entering log data"
6. www.luxoft.com
Let’s make it look nice
const log = ([strings]) => console.log(string);
log `Entering log data`
// Prints "Entering log data"
That’s better
7. www.luxoft.com
What about variables?
const log = ([string]) => console.log(string);
log `Entering log data`
// Prints "Entering log data“
log `Entered variable: ${1}`
// Prints "Entered variable: "
//Fix
const log = ([string], data) => console.log(string, data);
log `Entered variable: ${1}`
// Prints "Entered variable: 1"
Що трапилось?
Всі змінні передаються у шаблонну
функцію, як аргументи.
Зазвичай нам потрібно зробити
щось більше, ніж надрукувати всі
строки разом.
8. www.luxoft.com
Let’s make it universal
const log = (strings, ...values) =>
console.log(strings.reduce(
(str, value, index) => str += value + (values[index] || '')
, ''))
log `Welcome to ${new Date().getFullYear()}
Your local date is: ${new Date}`
//Welcome to 2018
//Your local date is: Mon Dec 03 2018 20:45:59 GMT+0200 (Eastern European Standard Time)
9. www.luxoft.com
Use it as i18n
// default
i18n `Hello ${'World'}`
// "Hello World"
// we switch to German
i18n.locale = 'de';
// but we still write in English
i18n`Hello ${'World'}`
// "Hallo World"
i18n.locale = 'it';
i18n `Hello ${'World'}`
// Ciao World
i18n.locale = 'sp';
i18n `Hello ${'World'}`
// Hola World
https://codeburst.io/easy-i18n-in-10-lines-of-javascript-poc-eb9e5444d71e
10. www.luxoft.com
Use it for a SQL queries
const SQL = require('sql-template-strings')
const book = 'harry potter'
const author = 'J. K. Rowling'
// sequelize:
sequelize.query('SELECT author FROM books WHERE name = ? AND author = ?', {replacements: [book, author]})
// is equivalent to
sequelize.query(SQL `SELECT author FROM books WHERE name = ${book} AND author = ${author}`)
https://github.com/felixfbecker/node-sql-template-strings
11. www.luxoft.com
Or slightly modify to be more advanced
//If we slightly modify this
const SQL = require('sql-query')
const Sequelize = require('sequelize')
SQL.db = new Sequelize('mysql://user:pass@example.com:9821/db_name')
const results = await SQL `SELECT author FROM books WHERE name = ${book} AND author = ${author}` ()
https://github.com/felixfbecker/node-sql-template-strings
13. www.luxoft.com
Use a shorthand for your nested JSONs
function _get([key], object) {
if (object) {
return _.get(object, key);
}
return (object, defValue) => _.get(object, key, defValue);
}
let config = {
author: 'Yuriy Voziy',
company: {
name: 'Luxoft',
url: 'https://career.luxoft.com',
office: {
rad: {
name: 'Irva',
address: 'Rad 1014'
}
}
}
}
_get `company.office.rad.name` (config, 'Dafault') //Irva
_get `company.of_fice.rad.name` (config) || 'Default' //Default
_get `company.office.rad.name${config}`; // Irva
14. www.luxoft.com
Or create a wrapper for the configs
let config = {
author: 'Yuriy Voziy',
company: {
name: 'Luxoft',
url: 'https://career.luxoft.com'
}
}
_get.wrap = function (object) {
return ([key], keyv) => _.get(object, key || keyv);
}
_config = _get.wrap(config);
log `${ _config `company.name` }` //Luxoft
log `${ _config `company.url` }` //https://career.Luxoft.com
15. www.luxoft.com
Fetching urls
_fetch = ([url], urlv) => fetch(url || urlv);
//This is just to make
_fetch `http://www.mocky.io/v2/5c058daf3300005f01e812e0`
//and
_fetch `${_config `site.url`}`
//and
fetch (_config `site.url`)
//Work the same
17. www.luxoft.com
So let’s make comfort of this
//Most of the times we want data, so let's wait for it
_fetch = ([url], ...[urlv]) => new Promise((resolve, reject) =>
fetch(url || urlv).then((response) => resolve(response.json())).catch(reject)
);
await _fetch `http://www.mocky.io/v2/5c058daf3300005f01e812e0` //{hello: {my: 'world’}}
await _fetch `${ _config `site.url` }` //{hello: {my: 'world'}}
//Still no HEAD, POST, PUT, DELETE and other header though…