The document discusses best practices for designing Java APIs. It emphasizes making APIs intuitive, consistent, flexible and evolvable. Key recommendations include writing meaningful documentation, using static factories instead of overloading methods, promoting fluent interfaces, using the weakest possible types, and supporting lambdas. The document notes API design is iterative and different perspectives should be considered to balance various characteristics and trade-offs.
Let's make a contract: the art of designing a Java APIMario Fusco
An API is what developers use to achieve some task. More precisely it establishes a contract between them and the designers of the software exposing its services through that API. In this sense we're all API designers: our software doesn't work in isolation, but becomes useful only when it interacts with other software written by other developers. When writing software we're not only consumers, but also providers of one or more API and that's why every developer should know the features of a good API. During this presentation we will go through real-world examples, also taken from the standard Java API, of good and bad API and comment them in order to show the dos and don'ts of API design. More in general we will discuss the characteristics of an easy and pleasant to use API, like consistency, discoverability and understandability, together with some basic concepts like the principle of least astonishment, and find out how to achieve them.
Video and more content at fsharpforfunandprofit.com/pbt
"The lazy programmer's guide to writing 1000's of tests: An introduction to property based testing"
We are all familiar with example-based testing, as typified by TDD and BDD. Property-based testing takes a very different approach, where a single test is run hundreds of times with randomly generated inputs.
Property-based testing is a great way to find edge cases, and also helps you to understand and document the behaviour of your code under all conditions.
This talk will introduce property-based testing and show how it works, and why you should consider adding it to your arsenal of testing tools.
Esoft Metro Campus - Diploma in Web Engineering - (Module VII) Advanced PHP Concepts
(Template - Virtusa Corporate)
Contents:
Arrays
Indexed Arrays
Associative Arrays
Multidimensional arrays
Array Functions
PHP Objects and Classes
Creating an Object
Properties of Objects
Object Methods
Constructors
Inheritance
Method overriding
PHP Strings
printf() Function
String Functions
PHP Date/Time Functions
time() Function
getdate() Function
date() Function
mktime() function
checkdate() function
PHP Form Handling
Collecting form data with PHP
GET vs POST
Data validation against malicious code
Required fields validation
Validating an E-mail address
PHP mail() Function
Using header() function to redirect user
File Upload
Processing the uploaded file
Check if File Already Exists
Limit File Size
Limit File Type
Check if image file is an actual image
Uploading File
Cookies
Sessions
Sven and I are going to classify Xtext compared to other concepts and frameworks and demonstrate its capabilities with a refined version of an example I presented in London the week before. After that we discuss the versatile possibilities for extending and customizing the framework and finish with an exciting outlook.
Let's make a contract: the art of designing a Java APIMario Fusco
An API is what developers use to achieve some task. More precisely it establishes a contract between them and the designers of the software exposing its services through that API. In this sense we're all API designers: our software doesn't work in isolation, but becomes useful only when it interacts with other software written by other developers. When writing software we're not only consumers, but also providers of one or more API and that's why every developer should know the features of a good API. During this presentation we will go through real-world examples, also taken from the standard Java API, of good and bad API and comment them in order to show the dos and don'ts of API design. More in general we will discuss the characteristics of an easy and pleasant to use API, like consistency, discoverability and understandability, together with some basic concepts like the principle of least astonishment, and find out how to achieve them.
Video and more content at fsharpforfunandprofit.com/pbt
"The lazy programmer's guide to writing 1000's of tests: An introduction to property based testing"
We are all familiar with example-based testing, as typified by TDD and BDD. Property-based testing takes a very different approach, where a single test is run hundreds of times with randomly generated inputs.
Property-based testing is a great way to find edge cases, and also helps you to understand and document the behaviour of your code under all conditions.
This talk will introduce property-based testing and show how it works, and why you should consider adding it to your arsenal of testing tools.
Esoft Metro Campus - Diploma in Web Engineering - (Module VII) Advanced PHP Concepts
(Template - Virtusa Corporate)
Contents:
Arrays
Indexed Arrays
Associative Arrays
Multidimensional arrays
Array Functions
PHP Objects and Classes
Creating an Object
Properties of Objects
Object Methods
Constructors
Inheritance
Method overriding
PHP Strings
printf() Function
String Functions
PHP Date/Time Functions
time() Function
getdate() Function
date() Function
mktime() function
checkdate() function
PHP Form Handling
Collecting form data with PHP
GET vs POST
Data validation against malicious code
Required fields validation
Validating an E-mail address
PHP mail() Function
Using header() function to redirect user
File Upload
Processing the uploaded file
Check if File Already Exists
Limit File Size
Limit File Type
Check if image file is an actual image
Uploading File
Cookies
Sessions
Sven and I are going to classify Xtext compared to other concepts and frameworks and demonstrate its capabilities with a refined version of an example I presented in London the week before. After that we discuss the versatile possibilities for extending and customizing the framework and finish with an exciting outlook.
Function Applicative for Great Good of Palindrome Checker Function - Polyglot...Philip Schwarz
Embark on an informative and fun journey through everything you need to know to understand how the Applicative instance for functions makes for a terse palindrome checker function definition in point-free style.
Composition is a fundamental principle of functional programming, but how is it different from an object-oriented approach, and how do you use it in practice?
In this talk for beginners, we'll start by going over the basic concepts of functional programming, and then look at some different ways that composition can be used to build large things from small things.
After that, we'll see how composition is used in practice, beginning with a simple FizzBuzz example, and ending with a complete (object-free!) web application.
Building DSLs with Xtext - Eclipse Modeling Day 2009Heiko Behrens
Slides of Eclipse Modeling Day in New York and Toronto http://wiki.eclipse.org/Eclipse_Modeling_Day
Motivation of specific tools with apple corer analogy, Example of domain-specific language (chess notation), introduction to Xtext with demo plus outlook
Introduction to ad-3.4, an automatic differentiation library in Haskellnebuta
Haskellの自動微分ライブラリ Ad-3.4 の紹介(の試み) If you don't see 21 slides in this presentation, try this one (re-uploaded): http://www.slideshare.net/nebuta/130329-ad-by-ekmett
Author: Vladimir Khorikov www.eastbanctech.com
With the advent of LINQ, C# has gotten a significant exposure to functional programming. However, functional programming in C# is not restricted to the use of extension methods, lambdas and immutable classes. There are a lot of practices that haven't been adopted as widely because there's not much of native language support for them in C#. Still, they can be extremely beneficial should you incorporate them into your day-to-day work.
From this presentation you’ll learn:
• The fundamental principles behind functional programming,
• Why they are important,
• How to apply them in practice.
Function Applicative for Great Good of Palindrome Checker Function - Polyglot...Philip Schwarz
Embark on an informative and fun journey through everything you need to know to understand how the Applicative instance for functions makes for a terse palindrome checker function definition in point-free style.
Composition is a fundamental principle of functional programming, but how is it different from an object-oriented approach, and how do you use it in practice?
In this talk for beginners, we'll start by going over the basic concepts of functional programming, and then look at some different ways that composition can be used to build large things from small things.
After that, we'll see how composition is used in practice, beginning with a simple FizzBuzz example, and ending with a complete (object-free!) web application.
Building DSLs with Xtext - Eclipse Modeling Day 2009Heiko Behrens
Slides of Eclipse Modeling Day in New York and Toronto http://wiki.eclipse.org/Eclipse_Modeling_Day
Motivation of specific tools with apple corer analogy, Example of domain-specific language (chess notation), introduction to Xtext with demo plus outlook
Introduction to ad-3.4, an automatic differentiation library in Haskellnebuta
Haskellの自動微分ライブラリ Ad-3.4 の紹介(の試み) If you don't see 21 slides in this presentation, try this one (re-uploaded): http://www.slideshare.net/nebuta/130329-ad-by-ekmett
Author: Vladimir Khorikov www.eastbanctech.com
With the advent of LINQ, C# has gotten a significant exposure to functional programming. However, functional programming in C# is not restricted to the use of extension methods, lambdas and immutable classes. There are a lot of practices that haven't been adopted as widely because there's not much of native language support for them in C#. Still, they can be extremely beneficial should you incorporate them into your day-to-day work.
From this presentation you’ll learn:
• The fundamental principles behind functional programming,
• Why they are important,
• How to apply them in practice.
Functional programming is getting a lot of attention because it eases many of the difficulties faced in object-oriented programming (OOP) such as testability, maintainability, scalability, and concurrency. Swift has a lot of functional programming features that can be easily used, but most of Objective-C and Swift programmers are not familiar with these concepts.
This talk aims to introduce some of the core concepts of functional programming with Swift such as:
• Importance of Immutability
• First-class, Higher-order and Pure functions
• Closures
• Generics and Associated Type Protocols
• Functors, Applicative Functors and Monads
• Enumerations and Pattern Matching
• Optionals
PHP 8.0 is expected to be released by the end of the year, so it’s time to take a first look at the next major version of PHP. Attributes, union types, and a just-in-time compiler are likely the flagship features of this release, but there are many more improvements to be excited about. As PHP 8.0 is a major version, this release also includes backwards-incompatible changes, many of which are centered around stricter error handling and more type safety.
This talk will discuss new features already implemented in PHP 8, backwards-compatibility breaks to watch out for, as well as some features that are still under discussion.
PHP 8.0 is expected to be released by the end of the year, so it’s time to take a first look at the next major version of PHP. Attributes, union types, and a just-in-time compiler are likely the flagship features of this release, but there are many more improvements to be excited about. As PHP 8.0 is a major version, this release also includes backwards-incompatible changes, many of which are centered around stricter error handling and more type safety.
Presentation from phpfwdays 2020.
Presented at jDD Krakow Oct 2017
Developers love to complain about their legacy systems, but if you have a legacy system, it means you have a working, successful system which deliver real value to business, and this is definitely a good thing.
MongoDB World 2019: BSON Transpilers: Transpiling from Any Language to Any La...MongoDB
This talk will go through the technical design of our anything-to-anything transpiler and teach attendees how they can add their own favorite language to Compass. We'll talk about classic compiler design principles and how we leveraged various technologies to create a dynamic, extensible transpiler.
Statically Checked Physical Dimensions for Haskell
Slides for a talk at the Boston Haskell meetup about dimensional, a Haskell library for statically-checked computing with physical quantities.
SeriesTester/.classpath
SeriesTester/.project
SeriesTester
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
SeriesTester/.settings/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
SeriesTester/bin/seriesTester/FibonacciSequence.classpackage seriesTester;
publicsynchronizedclass FibonacciSequence {
private int firstNumber;
private int secondNumber;
public void FibonacciSequence();
public boolean validStartNumbers(int, int);
public void printSequence(int);
public void printSequence(int, int, int);
private void setSecondNumber(int);
private void setFirstNumber(int);
public void resetSequence();
}
SeriesTester/bin/seriesTester/PowerSeries.classpackage seriesTester;
publicsynchronizedclass PowerSeries {
private math2 myMath;
private double value_of_x;
private double number_of_terms;
public void PowerSeries();
public void setX(double);
public void setNumOfTerms(double);
public double run_eTo_xSeries();
public double run_sin_Of_xSeries();
public double run_PowerSeries();
}
SeriesTester/bin/seriesTester/SeriesTester.classpackage seriesTester;
publicsynchronizedclass SeriesTester {
privatestatic java.util.Scanner keyboard;
privatestatic FibonacciSequence myFibonacci;
privatestatic PowerSeries myPower;
static void <clinit>();
public void SeriesTester();
publicstatic void main(String[]);
privatestatic void powerSeries();
privatestatic void fibonociiSeries();
privatestatic String selectSerries();
}
SeriesTester/bin/seriesTester/math2.classpackage seriesTester;
publicsynchronizedclass math2 {
public void math2();
public int factorial(int);
}
SeriesTester/src/seriesTester/SeriesTester.javaSeriesTester/src/seriesTester/SeriesTester.javapackage seriesTester;
import java.util.Scanner;
publicclassSeriesTester
{
/**
* @param args
* Author Larry R Shannon This is the demo/testing program for the
* Fibonacci/Power series project. The algorithm for the demo part of
* this project is as follows: Variables needed: State Variables:
* Scanner keyboard is used to read data from the input data buffer.
* (the keyboard) FibonacciSequence myFibonacci is the class object
* that contains the data and methods needed to explore the Fi.
Milano JS Meetup - Gabriele Petronella - Codemotion Milan 2016Codemotion
TypeError: “x" is not a function. Quale sviluppatore JavaScript non ha mai incontrato questo errore, magari su un sito in produzione? Non sarebbe invece fantastico intercettare questi errori durante lo sviluppo? In questo talk presenteremo Flow, uno static typechecker per javascript che ci può aiutare a scrivere codice più affidabile e sicuro. Il talk conterrà esempi concreti e demo. ATTENZIONE: può causare forti sbalzi di JavaScript fatigue!
In 2022 we heard your GitOps questions at meetups and gatherings, big stages and local panels and one question was often top of mind: how do I get started? The benefits of GitOps are calling your name, but getting started isn’t that straightforward.
Red Hat is excited to kick off 2023 with a DevNation TechTalk, focused on GitOps to help you sift through your questions. At DevNation you’ll hear from passionate GitOps practitioners about the pitfalls to avoid and hurdles to jump while kicking off or evolving your GitOps practices. This event is aimed at audiences that are new to GitOps or early in their practice development within a cloud native environment.
During this live session you’ll learn:
Upcoming updates and key milestones in the ArgoCD roadmap and how Red Hat will support them
How to simplify the delivery GitOps across multi-cloud environments
GitOps best practices from experts at:
PostNord Strålfors: Filip Jansson
Arbetsförmedlingen: Misho Kmetovski & Richard Hermansson
Swiss Railways (SBB): Manuel Wallrapp & Thomas Bruederli
Plus stick around for an “Ask me Anything” segment to ask any outstanding questions live.
Modern cloud-native applications are incredibly complex systems. Keeping the systems healthy and meeting SLAs for our customers is crucial for long-term success. In this session, we will dive into the three pillars of observability - metrics, logs, tracing - the foundation of successful troubleshooting in distributed systems. You'll learn the gotchas and pitfalls of rolling out the OpenTelemetry stack on Kubernetes to effectively collect all your signals without worrying about a vendor lock in. Additionally we will replace parts of the Prometheus stack to scrape metrics with OpenTelemetry collector and operator.
GitHub plays a key role in the everyday work of thousands of developers and is a central piece of the open-source software ecosystem. Even though it is getting better and better every day, it still misses some key features that we need. If you want a better way of reviewing PRs, navigating through the code or better yet - writing the code without leaving the browser - this talk is for you!
This talk will be demo driven, and as the title suggests, we will start with the aesthetic revamp. But we definitely won’t stop there! You will also learn a few cool things about interacting with GitHub through the command line. So not only your UI will be officially revamped, but you will also gain a productivity boost.
Quinoa: A modern Quarkus UI with no hassles | DevNation tech TalkRed Hat Developers
The Quarkus Quinoa extension takes care of all the web UI build/wiring/dev-mode hassles and lets you focus on your web application logic. In this tech talk, we’ll bring a shopping list app to life with Quarkus, Hibernate as a backend, and React as a frontend. Quinoa will be the glue that makes it all work seamlessly from dev to production.
Extra micrometer practices with Quarkus | DevNation Tech TalkRed Hat Developers
How do you know you have improved the performance of your portfolio of applications? By measuring it, of course! The ultimate goal of gathering application metrics is to have a standardized practice that is applicable across multiple microservices and that adds minimal runtime overhead. Join this session to discuss what metrics are available out of the box with the Quarkus micrometer extensions, what (and, more importantly, why) you should customize, and how those pieces of information will impact your development outcomes.
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...Red Hat Developers
This talk will teach you how to redesign an event-driven autoscaling architecture for cloud-native microservices by utilizing Apache Kafka, Knative, and KEDA infrastructure. You will also learn how to deploy serverless applications (Quarkus) using a Knative service. Finally, KEDA will enable you to autoscale Knative Eventing components (KafkaSource) through events consumption over standard resources (CPU, memory).
Loom is among the most highly anticipated projects in the Java world. It promises to address concurrency and Java execution model issues by providing virtual threads. Thus, there is no need to write concurrent programs using asynchronous or reactive APIs; it will be possible to use the traditional imperative model and let Loom handle the rest. The JVM will execute the program and leverage non-blocking APIs automatically!
Sounds good, doesn't it? How does it work, though? Are there any hidden costs? What is Loom going to change in modern Java frameworks? We will answer these questions in this talk. Starting with the integration of Loom in Quarkus, we will compare the different approaches we considered, discuss their respective pros and cons, and show how Loom might change the Java world.
Quarkus Renarde 🦊♥: an old-school Web framework with today's touch | DevNatio...Red Hat Developers
Quarkus Renarde 🦊♥ is a new Web framework based on Quarkus. This framework focuses not on microservices but web applications and makes Quarkus even easier to use for web apps: - Endpoints based on convention, even easier than RESTEasy Reactive and JAX-RS - Server-side templating with Qute - Validation with Hibernate Validation - Data with Hibernate ORM or Reactive with Panache - Simple authentication with OpenID Connect or WebAuthn Quarkus Renarde 🦊♥ can deliver all this while still providing the joy of developing with Quarkus, with live reload, continuous testing, the Dev, and more.
Recent changes in one desktop product generated many doubts in developer communities regarding containers. Can we still use or create them? Do we have alternatives to docker? We have some answers! Join us in this session to learn more about some popular docker alternatives. You can create containers without docker, and you can also run and publish them. There's life after docker, and containers are here to stay.
Distributed deployment of microservices across multiple OpenShift clusters | ...Red Hat Developers
Hybrid-cloud and multi-cloud patterns are the next application deployment architectures, and Kubernetes is the de facto container orchestration engine. 50% of production Kubernetes workloads involve some form of microservices applications. How can we manage this inter-cluster application connectivity? Meet Skupper: an open-source project that solves multi-cloud communication for Kubernetes. In this Tech Talk, you will briefly learn about Skupper and watch a live demo of an e-commerce application with 10 microservices spanning three OpenShift clusters running on three different public cloud providers.
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...Red Hat Developers
In this workshop, you’ll learn an easy way to incorporate data science and AI/ML into an OpenShift development workflow. As an example, you’ll use an object detection model to detect ‘dog(s)’ in an image.
You will:
Use Jupyter Notebooks and TensorFlow to explore a pre-trained object detection model
Serve the model in a REST API as a Flask App
Use Source-to-Image (S2I) to build and deploy the Flask app
Explore Kafka streams from Notebooks
Deploy a Kafka consumer with the same object detection model
You’ll be able to do all of this without having to install anything on your own computer, thanks to Red Hat OpenShift Data Science and Red Hat OpenShift Streams for Apache Kafka.
Note: Beginner data handling and Python skills are required for this workshop.
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...Red Hat Developers
DevOps solved the conflict between development and operations, but other essential aspects of the delivery lifecycle—security, compliance, and audit—were left out. DevSecOps is an excellent reminder that security must be DevOps’d, but compliance and audit are still missing. There’s no need for a new DevSecAuditComplianceOps buzzword; instead, let’s talk about continuous authorization, which applies Zero Trust principles to continuous monitoring. In this tech talk, Bill Bensing will discuss practical ways to start with continuous authorization for the software delivery lifecycle using Ploigos.
11 CLI tools every developer should know | DevNation Tech TalkRed Hat Developers
What's your favorite IDE? VS Code? IDEA? Eclipse? Visual Studio? The right IDE is fundamental to your productivity as a developer, but you might need something else to become more outstanding. Why don't we take a look at your terminal? Come to this session to learn eleven CLI tools that will boost your developer productivity.
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkRed Hat Developers
We will dissect the world famous todo app that provides a REST API (which is the foundation of microservices) with data backed by Apache Cassandra. We will leverage the TODO MVC and the TODO backend projects with the back end that we will build with Quarkus and Cassandra. Attendees will get an overview of Cassandra, including the driver for Quarkus. Through live coding (that attendees can try out later) in a cloud-based environment, primarily in Quarkus and Cassandra, attendees will understand how to implement and connect the APIs to the backend and leverage the generic client(s)provided. After attending this session attendees will walk away with a good understanding of implementing microservices using Cassandra and Quarkus. They will also get a working knowledge of how Astra (Cassandra as a service) can be leveraged in other solutions.
GitHub Actions and OpenShift: Supercharging your software development loops...Red Hat Developers
Every software developer wants more productivity. What if the only commands you needed to deploy were "git commit" and "git push"? Join us as we walk you through a live demonstration of how you can ship your lovely application code from your local machine to a free OpenShift cluster, fully automated through GitHub Actions. By the end of this session, you'll have a sound understanding of building a GitHub Action workflow for your codebase that leverages OpenShift to deploy your application.
To the moon and beyond with Java 17 APIs! | DevNation Tech TalkRed Hat Developers
Since moving to a 6 monthly release cadence, the Java platform is evolving more dynamically than ever before. It can be quite a challenge to stay on top of all the changes and new features. In this talk we're going to explore the most important developments in the Java API: which classes have been added, and what has been removed? Join Duke, the Java mascot, for a trip to space and learn which exciting new APIs provided by the Java platform can help him with his journey:
The Java Vector API for utilizing the SIMD capabilities of modern CPU architectures
The Foreign Linker API for integrating with native code
The JFR Event Streaming API for publishing JDK Flight Recorder Events
We'll also take a look at some useful changes to the Java runtime, such as CDS archives for a faster spaceship..., uhm, application launch!
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...Red Hat Developers
Did you know that OpenJDK comes with Java Flight Recorder (JFR), an embedded production time profiler? Cryostat provides easy and secure access to JFR across container boundaries so you can profile that performance bottleneck, or find that annoying bug. Join this session to learn about using Cryostat to profile Java applications in production on OpenShift.
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Red Hat Developers
Apache Kafka is taking the world by storm and is rapidly becoming the de-facto event bus for event-driven and streaming applications that respond to events and data in real time. OpenShift Streams for Apache Kafka is Red Hat's fully hosted and managed Apache Kafka service targeting development teams that want to incorporate streaming data and scalable messaging in their applications, without the burden of setting up and maintaining a Kafka cluster infrastructure.
In this session you will discover how Apache Kafka can be used in an IoT scenario to ingest data from devices and make them available in real-time to other applications.
More specifically you will learn how to:
Simulate devices that send MQTT messages to a MQTT broker
Use Apache Camel and Camel-K to bridge MQTT with Apache Kafka
Use Kafka Streams in a Quarkus application to process the device messages
Query the state of the devices using GraphQ
Kubernetes configuration and security policies with KubeLinter | DevNation Te...Red Hat Developers
With Kubernetes, implementing security policies can be challenging. First, developers, administrators, and security teams need to understand security policies in collaboration to have the best chance of successful adoption. Next, policy enforcement needs to integrate with developer workflows. Lastly, policies need to contain corrective action that is as close to the developer as possible. KubeLinter solves these problems by linting Kubernetes YAML files and Helm charts at the source: the developer.
In this session, we will evaluate KubeLinter by moving through a hands-on demo of the application, showing a use case for local machines and CI pipeline integration, and chatting about how best to integrate it into your organization:
KubeLinter, and its default checks
How you can leverage the application in your day-to-day operations
The open source StackRox community
Level-up your gaming telemetry using Kafka Streams | DevNation Tech TalkRed Hat Developers
Many modern video games are constantly evolving post-release. New maps, game modes, and game balancing adjustments are rolled out, often on a weekly basis. This continuous iteration to improve player engagement and satisfaction requires data-driven decision making based on events and telemetry captured during gameplay, and from community forums and discussions.
In this session you will learn how OpenShift Streams for Apache Kafka and Kafka Streams can be used to analyze real-time events and telemetry reported by a game server, using a practical example that encourages audience participation. Specifically you’ll learn how to:
Provision Kafka clusters on OpenShift Streams for Apache Kafka.
Develop a Java application that uses Kafka Streams and Quarkus to process event data.
Deploy the application locally, or on OpenShift and connect it to your OpenShift Streams for Apache Kafka Cluster.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
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.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
4. An API is what a
developer uses to
achieve some task
What is an API?
5. What is an API?
An API is a contract between
its implementors and its users
6. And why should I care?
We are all API designers
Our software doesn't work in
isolation, but becomes
useful only when it interacts
with other software written
by other developers
16. Convenience methods
public interface StockOrder {
void sell(String symbol, double price, int quantity);
void buy(String symbol, int quantity, double price);
void buy(String symbol, int quantity, double price, double commission);
void buy(String symbol, int quantity, double minPrice, double maxPrice, double commission);
}
What’s wrong with this?
17. Convenience methods
public interface StockOrder {
void sell(String symbol, double price, int quantity);
void buy(String symbol, int quantity, double price);
void buy(String symbol, int quantity, double price, double commission);
void buy(String symbol, int quantity, double minPrice, double maxPrice, double commission);
}
Too many overloads
What’s wrong with this?
18. Convenience methods
public interface StockOrder {
void sell(String symbol, double price, int quantity);
void buy(String symbol, int quantity, double price);
void buy(String symbol, int quantity, double price, double commission);
void buy(String symbol, int quantity, double minPrice, double maxPrice, double commission);
}
Too many overloads
Inconsistent argument order
What’s wrong with this?
19. Convenience methods
Long arguments lists (especially of same type)
public interface StockOrder {
void sell(String symbol, double price, int quantity);
void buy(String symbol, int quantity, double price);
void buy(String symbol, int quantity, double price, double commission);
void buy(String symbol, int quantity, double minPrice, double maxPrice, double commission);
}
Too many overloads
Inconsistent argument order
What’s wrong with this?
20. Convenience methods
Long arguments lists (especially of same type)
public interface StockOrder {
void sell(String symbol, double price, int quantity);
void buy(String symbol, int quantity, double price);
void buy(String symbol, int quantity, double price, double commission);
void buy(String symbol, int quantity, double minPrice, double maxPrice, double commission);
}
public interface StockOrder {
void sell(String symbol, int quantity, Price price);
void buy(String symbol, int quantity, Price price);
}
Too many overloads
Inconsistent argument order
What’s wrong with this?
How to do better
21. Consider static
factories
public interface Price {
static Price price( double price ) {
if (price < 0) return Malformed.INSTANCE;
return new Fixed(price);
}
static Price price( double minPrice, double maxPrice ) {
if (minPrice > maxPrice) return Malformed.INSTANCE;
return new Range(minPrice, maxPrice);
}
class Fixed implements Price {
private final double price;
private Fixed( double price ) {
this.price = price;
}
}
class Range implements Price {
private final double minPrice;
private final double maxPrice;
private Range( double minPrice, double maxPrice ) {
this.minPrice = minPrice;
this.maxPrice = maxPrice;
}
}
enum Malformed implements Price { INSTANCE }
}
➢
nicer syntax for users
(no need of new
keyword)
22. Consider static
factories
public interface Price {
static Price price( double price ) {
if (price < 0) return Malformed.INSTANCE;
return new Fixed(price);
}
static Price price( double minPrice, double maxPrice ) {
if (minPrice > maxPrice) return Malformed.INSTANCE;
return new Range(minPrice, maxPrice);
}
class Fixed implements Price {
private final double price;
private Fixed( double price ) {
this.price = price;
}
}
class Range implements Price {
private final double minPrice;
private final double maxPrice;
private Range( double minPrice, double maxPrice ) {
this.minPrice = minPrice;
this.maxPrice = maxPrice;
}
}
enum Malformed implements Price { INSTANCE }
}
➢
nicer syntax for users
(no need of new
keyword)
➢
can return different
subclasses
23. Consider static
factories
public interface Price {
static Price price( double price ) {
if (price < 0) return Malformed.INSTANCE;
return new Fixed(price);
}
static Price price( double minPrice, double maxPrice ) {
if (minPrice > maxPrice) return Malformed.INSTANCE;
return new Range(minPrice, maxPrice);
}
class Fixed implements Price {
private final double price;
private Fixed( double price ) {
this.price = price;
}
}
class Range implements Price {
private final double minPrice;
private final double maxPrice;
private Range( double minPrice, double maxPrice ) {
this.minPrice = minPrice;
this.maxPrice = maxPrice;
}
}
enum Malformed implements Price { INSTANCE }
}
➢
nicer syntax for users
(no need of new
keyword)
➢
can return different
subclasses
➢
can check
preconditions and
edge cases returning
different
implementations
accordingly
24. Promote fluent API
public interface Price {
Price withCommission(double commission);
Price gross();
}
public interface Price {
void setCommission(double commission);
void setGross();
}
29. Promote fluent API
Name consistency???
Streams are a very
nice and convenient
example of fluent API
30. Use the weakest possible type
public String concatenate( ArrayList<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
31. Use the weakest possible type
public String concatenate( ArrayList<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
Do I care of the actual
List implementation?
32. Use the weakest possible type
public String concatenate( List<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
33. Use the weakest possible type
public String concatenate( List<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
Do I care of the
elements’ order?
34. Use the weakest possible type
public String concatenate( Collection<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
35. Use the weakest possible type
public String concatenate( Collection<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
Do I care of the
Collection’s size?
36. Use the weakest possible type
public String concatenate( Iterable<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
37. Using the weakest possible type...
public String concatenate( Iterable<String> strings ) {
StringBuilder sb = new StringBuilder();
for (String s : strings) {
sb.append( s );
}
return sb.toString();
}
… enlarges the applicability of your method, avoiding to restrict your client
to a particular implementation or forcing it to perform an unnecessary and
potentially expensive copy operation if the input data exists in other forms
38. Use the weakest possible type
also for returned value
public List<Address> getFamilyAddresses( Person person ) {
List<Address> addresses = new ArrayList<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return addresses;
}
39. Use the weakest possible type
also for returned value
public List<Address> getFamilyAddresses( Person person ) {
List<Address> addresses = new ArrayList<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return addresses;
}
Is the order of this List
meaningful for client?
40. Use the weakest possible type
also for returned value
public List<Address> getFamilyAddresses( Person person ) {
List<Address> addresses = new ArrayList<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return addresses;
}
Is the order of this List
meaningful for client?
… and shouldn’t we maybe return only
the distinct addresses?
Yeah, that will be easy let’s do this!
41. Use the weakest possible type
also for returned value
public List<Address> getFamilyAddresses( Person person ) {
Set<Address> addresses = new HashSet<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return addresses;
}
It should be enough to
change this List into a Set
42. Use the weakest possible type
also for returned value
public List<Address> getFamilyAddresses( Person person ) {
Set<Address> addresses = new HashSet<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return addresses;
}
It should be enough to
change this List into a Set
But this doesn’t
compile :(
43. Use the weakest possible type
also for returned value
public List<Address> getFamilyAddresses( Person person ) {
Set<Address> addresses = new HashSet<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return addresses;
}
It should be enough to
change this List into a Set
But this doesn’t
compile :(
and I cannot change the returned type to
avoid breaking backward compatibility :(((
44. Use the weakest possible type
also for returned value
public List<Address> getFamilyAddresses( Person person ) {
Set<Address> addresses = new HashSet<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return new ArrayList<>( addresses );
}
I’m obliged to uselessly create an expensive
copy of data before returning them
45. Use the weakest possible type
also for returned value
public Collection<Address> getFamilyAddresses( Person person ) {
List<Address> addresses = new ArrayList<>();
addresses.add(person.getAddress());
for (Person sibling : person.getSiblings()) {
addresses.add(sibling.getAddress());
}
return addresses;
}
Returning a more generic type (if this is acceptable
for your client) provides better flexibility in future
46. Support lambdas
public interface Listener {
void beforeEvent(Event e);
void afterEvent(Event e);
}
class EventProducer {
public void registerListener(Listener listener) {
// register listener
}
}
public interface Listener {
void beforeEvent(Event e);
void afterEvent(Event e);
}
public interface Listener {
void beforeEvent(Event e);
void afterEvent(Event e);
}
EventProducer producer = new EventProducer();
producer.registerListener( new Listener() {
@Override
public void beforeEvent( Event e ) {
// ignore
}
@Override
public void afterEvent( Event e ) {
System.out.println(e);
}
} );
47. Support lambdas
class EventProducer {
public void registerBefore(BeforeListener before) {
// register listener
}
public void registerAfter(AfterListener after) {
// register listener
}
}
@FunctionalInterface
interface BeforeListener {
void beforeEvent( Event e );
}
@FunctionalInterface
interface AfterListener {
void afterEvent( Event e );
}
EventProducer producer = new EventProducer();
producer.registerAfter( System.out::println );
Taking functional interfaces as
argument of your API enables
clients to use lambdas
48. Support lambdas
class EventProducer {
public void registerBefore(Consumer<Event> before) {
// register listener
}
public void registerAfter(Consumer<Event> after) {
// register listener
}
}
@FunctionalInterface
interface BeforeListener {
void beforeEvent( Event e );
}
@FunctionalInterface
interface AfterListener {
void afterEvent( Event e );
}
EventProducer producer = new EventProducer();
producer.registerAfter( System.out::println );
Taking functional interfaces as
argument of your API enables
clients to use lambdas
In many cases you don’t need
to define your own functional
interfaces and use Java’s one
50. Optional – the mother of all bikeshedding
Principle of least
astonishment???
"If a necessary feature has a high
astonishment factor, it may be
necessary to redesign the feature."
- Cowlishaw, M. F. (1984). "The
design of the REXX language"
51. Optional – the mother of all bikeshedding
Principle of least
astonishment???
Wrong default
52. Optional – the mother of all bikeshedding
Principle of least
astonishment???
Wrong default
This could be removed if
the other was correctly
implemented
53. API design is an
iterative process
and there could
be different points
of view ...
54. … that could be
driven by the fact
that different
people may
weigh possible
use cases
differently...
55. … or even see
use cases to
which you didn’t
think at all
56. Also a good API
has many
different
characteristics ...
57. … and they
could be
conflicting so you
may need to
trade off one to
privilege another
58. What should
always drive the
final decision is
the intent of the
API … but even
there it could be
hard to find an
agreement
59. ●
Write lots of tests and examples against your API
●
Discuss it with colleagues and end users
●
Iterates multiple times to eliminate
➢
Unclear intentions
➢
Duplicated or redundant code
➢
Leaky abstraction
API design is an
iterative process
60. ●
Write lots of tests and examples against your API
●
Discuss it with colleagues and end users
●
Iterates multiple times to eliminate
➢
Unclear intentions
➢
Duplicated or redundant code
➢
Leaky abstraction
Practice Dogfeeding
API design is an
iterative process
61. And that’s all
what you were
getting wrong :)
… questions?
Mario Fusco
Red Hat – Principal Software Engineer
mario.fusco@gmail.com
twitter: @mariofusco