Lambdas, method reference and streams explained.
For a better fonts quality, download the slides or go to GDrive (http://goo.gl/YlYqTm)
We aren't sure about you, but working with Java 8 made one of the speakers lose all of his hair and the other lose his sleep (or was it the jetlag?). If you still haven't reached the level of Brian Goetz in mastering lambdas and strings, this talk is for you. And if you think you have, we have some bad news for you, you should attend as well.
The Groovy Puzzlers – The Complete 01 and 02 SeasonsBaruch Sadogursky
Two hours of the Groovy Puzzlers as were presented at Groovy and Grails Austin Meetup!
The video: https://www.youtube.com/watch?v=9qa1seKaRCU
This document provides examples of refactoring Java code to use Guava libraries and utilities. It shows code snippets before and after refactoring to use Guava's Objects, Preconditions, Collections, Splitter, Joiner, Ranges and other utilities to clean up code and make it more readable and robust. Refactoring includes using Guava to validate arguments, create immutable collections, handle nulls safely, join/split strings, and represent ranges.
The document discusses how monads can be used to prevent bugs and handle side effects like missing data in code. It provides examples of using Optional to represent missing values and chaining operations with flatMap to avoid nested if-checks. Monads allow sequencing computations in a declarative way while handling problems in the data or failures transparently.
The document discusses features of the Kotlin programming language. It provides examples of how Kotlin simplifies object-oriented programming tasks like data classes and property access compared to Java. Data classes in Kotlin can auto-generate getters, setters, equals(), hashCode() and toString() methods. Kotlin also allows functional-style programming with properties like immutable state and avoiding null references.
This document provides an overview and examples of using Google Guava, an open-source Java library that includes common libraries useful for writing Java code. It highlights some key classes and methods in Guava, including annotations, strings, collections, I/O, and more. Code samples demonstrate using Guava features like predicates, sets, files, and InetAddress utilities.
The Ring programming language version 1.2 book - Part 16 of 84Mahmoud Samir Fayed
The document describes various functions in Ring for determining operating system and environment details. It explains functions like IsMacOSX(), IsLinux(), IsFreeBSD(), IsAndroid() that return 1 if the OS is the given one, and 0 otherwise. It also presents functions for getting command line arguments (sysargv), active source file name (filename()), Windows/Linux newline characters (Windowsnl()), current directory (CurrentDir()), Ring executable path (exefolder()), Ring version (version()), and changing directory (ChDir()). Examples are given to demonstrate the usage of these functions.
Google Guava - Core libraries for Java & AndroidJordi Gerona
Talk at GDG DevFest Barcelona 2013.
The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.
The document discusses code quality analysis tools in Visual Studio 2012, including code analysis, code metrics, code clone analysis, code coverage, and unit testing. It provides examples of code issues found by code analysis tools and how to resolve them, such as fixing spelling errors, removing exceptions, using parameterized queries to prevent SQL injection, and improving code structure and maintainability.
This document provides an overview of Guava, a common libraries project from Google that includes utilities for collections, caching, predicates and functions, I/O, and more. It highlights features like Optional for avoiding null checks, immutable collections, filtering collections, transforming collections, caching, and string/object utilities. The document also discusses when and where Guava can be used, such as for temporary collections, avoiding null checks, and leveraging a popular library maintained by others.
The core libraries you always wanted - Google GuavaMite Mitreski
Google Guava is a set of core Java libraries that includes collections, caching, predicates and functions, primitives support, and other utilities. It aims to fill in gaps in the Java class library and improve on Java SE classes. Some key features include optional types, immutable collections, caching utilities, character matching, and functional interfaces like predicates and functions. Guava provides utilities to avoid null checks, filter collections, transform values, and load resources. It also includes hashing, bloom filters, and other utilities. Using Guava can make code cleaner and safer by leveraging well-tested utilities rather than reimplementing functionality.
The document discusses Scala as a potential replacement for Java on the JVM. It provides quotes from several influential Java developers who express their view that Scala is the most capable replacement for Java currently available on the JVM, and the momentum behind Scala is growing. The document also briefly outlines an agenda for introducing Scala, covering basic syntax, patterns, functions, classes and traits.
Specs2 is a Scala library for writing acceptance and unit tests. It uses a domain specific language (DSL) approach based on behavior-driven development (BDD). Specs2 specifications are structured, immutable, and control dependencies. Unit specs extend Specification and are mutable, while acceptance specs extend Specification and are functional. Specs2 provides matchers, mock objects, and forms to make assertions in tests. Tests can be run with JUnit or from SBT with different output formats.
The document describes an implementation of two interfaces - ExamPeekableQueue and ExamImmutableQueue.
For ExamPeekableQueue, two approaches are discussed - Approach 1 maintains a sorted list and uses binary search for operations in O(lgN) amortized time. Approach 2 uses two TreeSets to partition the elements for O(lgN) enqueue and dequeue.
For ExamImmutableQueue, elements are permanently added to the queue. Enqueue and dequeue return new queues in O(1) amortized time by appending/moving elements between two pointer lists, maintaining the original queues.
This document contains the code for a program that evaluates mathematical expressions. It defines methods to:
- Read expressions from a file or user input and split them into operands and operators
- Calculate the results of valid expressions and store statistics like highest/lowest values
- Handle invalid expressions and output error messages
- Output the results of calculations and expression statistics after processing is complete
The document contains code for 9 Java programming practical assignments. The first practical accepts coefficients for a quadratic equation, calculates the roots and outputs the results. The second accepts two matrices as input and calculates their addition. The third sorts an array of strings in ascending order. The fourth creates an Animal interface and classes that implement it to demonstrate polymorphism. The remaining practicals demonstrate inheritance, exceptions, GUI programming using Swing components, and the List interface.
The Ring programming language version 1.5.2 book - Part 26 of 181Mahmoud Samir Fayed
This document provides examples and documentation for various Ring programming language functions related to input/output, file handling, debugging, and creating demo programs. It describes functions for getting command line arguments, the active source file name, changing directories, and more. It also covers try/catch error handling, the eval() function for executing code as a string, and assert() for validating conditions. Finally, it presents two demo programs - an interactive shell and a menu-driven program - to demonstrate basic Ring concepts.
This document provides an overview of Spock, a testing and specification framework for Java and Groovy applications. It discusses the key features of Spock including state based testing, data driven testing, interaction based testing using mocking, and extensions. Examples are provided to demonstrate state based testing with given/when/then blocks, data driven testing using the where clause, and interaction based testing using mocks.
This document contains source code for several Java programs that demonstrate concepts related to networking and URLs. The programs cover topics like retrieving a URL, getting URL information, working with InetAddress, demonstrating parts of a URL, and connectionless and connection-oriented communication between a server and client using UDP and TCP sockets. The code examples are accompanied by expected output.
This document describes a quiz management system created by Joyita Kundu. It includes details on the database tables, menu design, form design and event coding. The database contains tables for login information, questions and results. The menu system allows users to take IP or GK tests. Forms are used for login, registration, the quiz and results. Event coding handles form interactions and database queries. The system allows users to take timed tests, view results and track performance over time.
Evolving with Java - How to remain Relevant and EffectiveNaresha K
Slides from my GIDS 2019 presentation - Evolving with Java - How to remain relevant and effective. In this presentation, I share examples of evolving with Java to overcome the pain points.
The Ring programming language version 1.5.4 book - Part 79 of 185Mahmoud Samir Fayed
The document discusses the Trace library in Ring for debugging programs. It provides examples of using the Trace library to trace all events, control flow between functions, handle errors, use an interactive debugger, execute line by line, set breakpoints, disable breakpoints, and use the interactive debugger at breakpoints. The Trace library allows tracing programs, passing errors, debugging interactively by setting and handling breakpoints.
The Ring programming language version 1.5.2 book - Part 76 of 181Mahmoud Samir Fayed
The document describes the Trace Library in Ring which provides functions for tracing code execution and debugging. It shows examples of using the Trace Library to:
1. Trace all events like function calls and returns across multiple functions and methods.
2. Trace the control flow between functions by logging function entries and exits.
3. Handle errors by passing them to the trace function instead of crashing.
4. Provide an interactive debugger that allows setting breakpoints and inspecting variables when a breakpoint is hit.
The Ring programming language version 1.10 book - Part 17 of 212Mahmoud Samir Fayed
The document describes the new features in Ring 1.10 and Ring 1.5.1. It includes examples of using tracing functions, breakpoints, and an interactive debugger in Ring 1.5. It also provides examples of 3D rendering and textures using OpenGL and Allegro libraries. New syntax features introduced in Ring 1.5 like braces and keywords for packages/classes/functions are demonstrated. The Type Hints library for adding type information to source code is explained. Overall quality improvements and better documentation in Ring 1.5 and 1.5.1 are noted.
The Ring programming language version 1.5.1 book - Part 75 of 180Mahmoud Samir Fayed
The document describes the Trace library in Ring which provides functions for tracing code execution. It defines trace events and data and functions like TraceLib_AllEvents that prints trace information and TraceLib_Debugger that enables breaking at errors for debugging. The library allows setting breakpoints and provides an interactive debugger command line for inspecting variables and executing code while debugging.
Here are the steps to move the frontend out of the Main class and into its own thread:
1. Create a Frontend class that extends AbstractHandler and implements Runnable
2. Move the frontend handling logic from Main into the run() method of Frontend
3. Add a handleCount field to Frontend of type AtomicInteger
4. In the run() method, periodically log the value of handleCount every 5 seconds
5. In the handle() method, increment handleCount using getAndIncrement() after generating the page
6. From Main, instantiate a Frontend object and call start() on its thread to run asynchronously
This will separate the frontend into its own thread of execution. The handleCount field
The document contains 21 code snippets showing examples of various Java programming concepts. The code snippets cover topics such as classes and objects, inheritance, interfaces, exceptions, threads, applets, packages, input/output, and networking.
Jasmine is a JavaScript testing framework that allows developers to write unit tests for their JavaScript code. The document discusses what Jasmine is, its features and structure. It provides examples of how to write tests using Jasmine including describing suites and specs, expectations, spies, asynchronous tests and testing jQuery code. References for learning more about Jasmine are also included.
1. The code sample provided defines a simple Java class called HelloWorld with a main method that prints "Epic Fail".
2. The class contains a single public static void main method that takes an array of String arguments.
3. Within the main method it prints the text "Epic Fail" without any other processing or output.
The document discusses code quality analysis tools in Visual Studio 2012, including code analysis, code metrics, code clone analysis, code coverage, and unit testing. It provides examples of code issues found by code analysis tools and how to resolve them, such as fixing spelling errors, removing exceptions, using parameterized queries to prevent SQL injection, and improving code structure and maintainability.
This document provides an overview of Guava, a common libraries project from Google that includes utilities for collections, caching, predicates and functions, I/O, and more. It highlights features like Optional for avoiding null checks, immutable collections, filtering collections, transforming collections, caching, and string/object utilities. The document also discusses when and where Guava can be used, such as for temporary collections, avoiding null checks, and leveraging a popular library maintained by others.
The core libraries you always wanted - Google GuavaMite Mitreski
Google Guava is a set of core Java libraries that includes collections, caching, predicates and functions, primitives support, and other utilities. It aims to fill in gaps in the Java class library and improve on Java SE classes. Some key features include optional types, immutable collections, caching utilities, character matching, and functional interfaces like predicates and functions. Guava provides utilities to avoid null checks, filter collections, transform values, and load resources. It also includes hashing, bloom filters, and other utilities. Using Guava can make code cleaner and safer by leveraging well-tested utilities rather than reimplementing functionality.
The document discusses Scala as a potential replacement for Java on the JVM. It provides quotes from several influential Java developers who express their view that Scala is the most capable replacement for Java currently available on the JVM, and the momentum behind Scala is growing. The document also briefly outlines an agenda for introducing Scala, covering basic syntax, patterns, functions, classes and traits.
Specs2 is a Scala library for writing acceptance and unit tests. It uses a domain specific language (DSL) approach based on behavior-driven development (BDD). Specs2 specifications are structured, immutable, and control dependencies. Unit specs extend Specification and are mutable, while acceptance specs extend Specification and are functional. Specs2 provides matchers, mock objects, and forms to make assertions in tests. Tests can be run with JUnit or from SBT with different output formats.
The document describes an implementation of two interfaces - ExamPeekableQueue and ExamImmutableQueue.
For ExamPeekableQueue, two approaches are discussed - Approach 1 maintains a sorted list and uses binary search for operations in O(lgN) amortized time. Approach 2 uses two TreeSets to partition the elements for O(lgN) enqueue and dequeue.
For ExamImmutableQueue, elements are permanently added to the queue. Enqueue and dequeue return new queues in O(1) amortized time by appending/moving elements between two pointer lists, maintaining the original queues.
This document contains the code for a program that evaluates mathematical expressions. It defines methods to:
- Read expressions from a file or user input and split them into operands and operators
- Calculate the results of valid expressions and store statistics like highest/lowest values
- Handle invalid expressions and output error messages
- Output the results of calculations and expression statistics after processing is complete
The document contains code for 9 Java programming practical assignments. The first practical accepts coefficients for a quadratic equation, calculates the roots and outputs the results. The second accepts two matrices as input and calculates their addition. The third sorts an array of strings in ascending order. The fourth creates an Animal interface and classes that implement it to demonstrate polymorphism. The remaining practicals demonstrate inheritance, exceptions, GUI programming using Swing components, and the List interface.
The Ring programming language version 1.5.2 book - Part 26 of 181Mahmoud Samir Fayed
This document provides examples and documentation for various Ring programming language functions related to input/output, file handling, debugging, and creating demo programs. It describes functions for getting command line arguments, the active source file name, changing directories, and more. It also covers try/catch error handling, the eval() function for executing code as a string, and assert() for validating conditions. Finally, it presents two demo programs - an interactive shell and a menu-driven program - to demonstrate basic Ring concepts.
This document provides an overview of Spock, a testing and specification framework for Java and Groovy applications. It discusses the key features of Spock including state based testing, data driven testing, interaction based testing using mocking, and extensions. Examples are provided to demonstrate state based testing with given/when/then blocks, data driven testing using the where clause, and interaction based testing using mocks.
This document contains source code for several Java programs that demonstrate concepts related to networking and URLs. The programs cover topics like retrieving a URL, getting URL information, working with InetAddress, demonstrating parts of a URL, and connectionless and connection-oriented communication between a server and client using UDP and TCP sockets. The code examples are accompanied by expected output.
This document describes a quiz management system created by Joyita Kundu. It includes details on the database tables, menu design, form design and event coding. The database contains tables for login information, questions and results. The menu system allows users to take IP or GK tests. Forms are used for login, registration, the quiz and results. Event coding handles form interactions and database queries. The system allows users to take timed tests, view results and track performance over time.
Evolving with Java - How to remain Relevant and EffectiveNaresha K
Slides from my GIDS 2019 presentation - Evolving with Java - How to remain relevant and effective. In this presentation, I share examples of evolving with Java to overcome the pain points.
The Ring programming language version 1.5.4 book - Part 79 of 185Mahmoud Samir Fayed
The document discusses the Trace library in Ring for debugging programs. It provides examples of using the Trace library to trace all events, control flow between functions, handle errors, use an interactive debugger, execute line by line, set breakpoints, disable breakpoints, and use the interactive debugger at breakpoints. The Trace library allows tracing programs, passing errors, debugging interactively by setting and handling breakpoints.
The Ring programming language version 1.5.2 book - Part 76 of 181Mahmoud Samir Fayed
The document describes the Trace Library in Ring which provides functions for tracing code execution and debugging. It shows examples of using the Trace Library to:
1. Trace all events like function calls and returns across multiple functions and methods.
2. Trace the control flow between functions by logging function entries and exits.
3. Handle errors by passing them to the trace function instead of crashing.
4. Provide an interactive debugger that allows setting breakpoints and inspecting variables when a breakpoint is hit.
The Ring programming language version 1.10 book - Part 17 of 212Mahmoud Samir Fayed
The document describes the new features in Ring 1.10 and Ring 1.5.1. It includes examples of using tracing functions, breakpoints, and an interactive debugger in Ring 1.5. It also provides examples of 3D rendering and textures using OpenGL and Allegro libraries. New syntax features introduced in Ring 1.5 like braces and keywords for packages/classes/functions are demonstrated. The Type Hints library for adding type information to source code is explained. Overall quality improvements and better documentation in Ring 1.5 and 1.5.1 are noted.
The Ring programming language version 1.5.1 book - Part 75 of 180Mahmoud Samir Fayed
The document describes the Trace library in Ring which provides functions for tracing code execution. It defines trace events and data and functions like TraceLib_AllEvents that prints trace information and TraceLib_Debugger that enables breaking at errors for debugging. The library allows setting breakpoints and provides an interactive debugger command line for inspecting variables and executing code while debugging.
Here are the steps to move the frontend out of the Main class and into its own thread:
1. Create a Frontend class that extends AbstractHandler and implements Runnable
2. Move the frontend handling logic from Main into the run() method of Frontend
3. Add a handleCount field to Frontend of type AtomicInteger
4. In the run() method, periodically log the value of handleCount every 5 seconds
5. In the handle() method, increment handleCount using getAndIncrement() after generating the page
6. From Main, instantiate a Frontend object and call start() on its thread to run asynchronously
This will separate the frontend into its own thread of execution. The handleCount field
The document contains 21 code snippets showing examples of various Java programming concepts. The code snippets cover topics such as classes and objects, inheritance, interfaces, exceptions, threads, applets, packages, input/output, and networking.
Jasmine is a JavaScript testing framework that allows developers to write unit tests for their JavaScript code. The document discusses what Jasmine is, its features and structure. It provides examples of how to write tests using Jasmine including describing suites and specs, expectations, spies, asynchronous tests and testing jQuery code. References for learning more about Jasmine are also included.
1. The code sample provided defines a simple Java class called HelloWorld with a main method that prints "Epic Fail".
2. The class contains a single public static void main method that takes an array of String arguments.
3. Within the main method it prints the text "Epic Fail" without any other processing or output.
My talk about Functional Programming with Groovy at Greach
Greach http://greach.es/
the Groovy spanish conf
Date:
04-11-2011
The document discusses JavaScript objects and functions. It explains that JavaScript objects are collections of name-value pairs similar to dictionaries. Functions in JavaScript are objects that support function call operations. The document also covers constructor functions, prototypes, closures, and namespaces in JavaScript.
The document discusses property-based testing and how it can be used to test code more effectively than example-based testing. It introduces the concepts of testing properties like commutativity, associativity, and identity to specify requirements at a deeper level. QuickCheck is presented as a tool that generates random test values to check properties, finding bugs more quickly than testing by hand. JUnit Quickcheck and JSVerify are given as libraries for implementing property tests in Java and JavaScript. Potential applications of property testing like testing SDKs and data processing frameworks are outlined.
The document provides an overview of functional programming in Java. It discusses functional programming concepts like higher-order functions and avoiding side effects. It gives examples of functional-style code in Java for filtering lists and transforming objects. It also discusses how functional programming can be used to implement customizable business logic by passing functions as parameters and looking up functions through a dependency injection container.
Not so long ago Microsoft announced a new language trageting on front-end developers. Everybody's reaction was like: Why?!! Is it just Microsoft darting back to Google?!
So, why a new language? JavaScript has its bad parts. Mostly you can avoid them or workaraund. You can emulate class-based OOP style, modules, scoping and even run-time typing. But that is doomed to be clumsy. That's not in the language design. Google has pointed out these flaws, provided a new language and failed. Will the story of TypeScript be any different?
Laziness, trampolines, monoids and other functional amenities: this is not yo...Codemotion
by Mario Fusco - Lambdas are the main feature introduced with Java 8, but the biggest part of Java developers are still not very familliar with the most common functional idioms and patterns. The purpose of this talk is presenting with practical examples concepts like high-order functions, currying, functions composition, persistent data structures, lazy evaluation, recursion, trampolines and monoids showing how to implement them in Java and how thinking functionally can help us to design and develop more readable, reusable, performant, parallelizable and in a word better, code.
Помните легендарные Java Puzzlers? Да-да, те самые, с Джошом Блохом и Нилом Гафтером? Ну, по которым ещё книжку написали? Так вот, в Groovy всё ещё веселее.
В смысле — задачки ещё более странные, и ответы ещё более поразительные. Этот доклад для вас, Groovy-разработчики, мы покажем вам настоящие, большие и красивые подводные камни! И для вас, Java-разработчики, потому что таких вещей на Java-подобном синтакисе вы точно никогда не видели! И для вас, PHP-разработчики… хотя, нет, не для вас :)
Всем точно будет весело — ваши ведущие Женя и Барух будут зажигать, шутить, спорить, бросаться футболками в публику, и самое главное — заставят вас офигевать от Groovy.
Mixing functional and object oriented approaches to programming in C#Mark Needham
The document discusses mixing functional and object-oriented programming approaches in C#. Some key points:
1) Functional programming concepts like immutable data, recursion and pattern matching can help make code more easy to understand and change.
2) Objects are still important for encapsulation and abstraction.
3) These paradigms can work together, with functional approaches used for smaller pieces of code and objects used at larger scales.
JDD2015: Where Test Doubles can lead you... - Sebastian Malaca PROIDEA
WHERE TEST DOUBLES CAN LEAD YOU...
"With great power comes great responsibility". And Test Double Patterns gives you a great power. Your life is easier, tests lighter and faster.
But someday this power can turn against you.
Each day we are more comfortable with using Test Double Patters. We are creating assumptions. We are mocking services. We are ending with well covered code and tests... that tell us nothing.
That's why it's so important to recognize warning signs. To know the pitfalls that are waiting for us. To know what to do in these situations.
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...julien.ponge
The document discusses new features in Java SE 7 including the Fork/Join framework for parallel programming, language evolutions through Project Coin such as try-with-resources statements, and diamond syntax for generic types which simplifies generic class instance creation. It also covers varargs syntax simplification and restrictions on using diamond syntax with anonymous inner classes.
The document discusses ES6 patterns used in Redux code. It explains how Redux uses functional programming patterns like higher-order functions, pure functions, and immutable data structures. Specifically, it analyzes code from Redux that uses arrow functions, rest/spread syntax, and avoids mutations to create middleware and handle state updates immutably. Reading wild code helps improve the skill of code comprehension and builds intuition about how to apply new patterns.
Giordano Scalzo introduces himself as an iOS developer and provides a swift introduction to the Swift programming language. He demonstrates various Swift features through code examples, including functions, closures, classes, structs, enums, generics, and operator overloading. He also discusses unit testing support in Swift through XCTest and Quick. To conclude, he proposes coding a reverse polish notation calculator to demonstrate applying these Swift concepts.
What's in Kotlin for us - Alexandre Greschon, MyHeritageDroidConTLV
The document discusses Kotlin for Android development. It provides an overview of Kotlin, explaining that it is a programming language created by JetBrains that is now adopted by Google for Android. It highlights some key features of Kotlin like being concise, interoperable with Java, and adding null safety to the type system. The rest of the agenda covers topics like Android Kotlin extensions, functions, classes, and a glimpse at the future of Kotlin.
Kotlin Perfomance on Android / Александр Смирнов (Splyt)Ontico
РИТ++ 2017, AppsConf
Зал Касабланка, 6 июня, 14:00
Тезисы:
http://appsconf.ru/2017/abstracts/2816.html
В докладе рассмотрим цену использования Kotlin в Runtime, обсудим варианты, как улучшить картину мира. Смотреть будем с точки зрения производительности, синхронно углубляясь в особенности Android, а также подумаем, как можно использовать получившийся байткод.
В докладе срыв подкапотных оптимизаций, байткод и цифры, которые покажут, насколько сильно вам смогут помочь все указанные оптимизации.
Is java8 a true functional programming languageSQLI
This document discusses whether Java 8 can be considered a true functional programming language. It begins with an overview of programming paradigms and compares the imperative and functional paradigms. It then outlines key aspects of functional programming including immutability, recursion, functions as first-class citizens, higher-order functions, and laziness. Code examples in Java demonstrate these concepts. The document concludes that while Java 8 incorporates some functional programming features, it does not fully embrace all aspects of functional programming.
This document discusses whether Java 8 can be considered a true functional programming language. It begins with an overview of programming paradigms and compares the imperative and functional paradigms. It then outlines key aspects of functional programming including immutability, recursion, functions as first-class citizens, higher-order functions, and laziness. Code examples in Java demonstrate these concepts. The document concludes that while Java 8 incorporates some functional programming features, it does not fully embrace all aspects of functional programming.
The document discusses various techniques for unit testing concurrent code, including using JUnit, TestNG, and a custom ThreadWeaver framework to test for threading issues in a FlawedList implementation. It also covers using jcstress for concurrency stress testing and notes that jcstress results may vary between runs and depend on processor architecture memory access semantics.
VoxxedDays LU 2016 - Thoughtworks Go - Continuous Deployment made easy and freeyohanbeschi
ThoughtWorks, a company specialized in agile software development which employs people like Martin Fowler or Jez Humble (some would say "Two agile Gurus") and works on products like CruiseControl or Selenium, made their Continuous Delivery (CD) Platform, called Go, free and Open Source. During this talk we'll define what a CD pipeline is, and why Go make our life easier to build these pipelines compared to Continuous Integration servers twisted to become CD orchestrators.
Introduction to the Java bytecode - So@t - 20130924yohanbeschi
This document contains the slides from a presentation on Java bytecode. It begins with an introduction to the speaker and their expertise. It then provides an overview of what topics will and won't be covered in the presentation. The document dives into details about bytecode, the class file format, descriptors, and the inner workings of the Java Virtual Machine (JVM). It explains how bytecode is executed on the JVM stack and frames. The key aspects of running Java code from source to bytecode to execution on the JVM are summarized.
The document discusses an introduction to the Dart programming language presented over 16 slides. It covers key topics like Dart's types system including booleans, strings, numbers, lists and maps. It also discusses Dart language features such as functions, conditionals, loops, classes and abstract classes. Code examples are provided to illustrate different language constructs like functions, operators, typedefs and abstract classes.
Dart - web_ui & Programmatic components - Paris JUG - 20130409yohanbeschi
The document discusses building user interfaces with Dart. It begins by comparing building UIs with JavaScript, Java, and GWT. It then shows how to build a table component programmatically in GWT. Next, it demonstrates how to build the same table in Dart using fewer lines of code. The document proceeds to provide an overview of Dart and its ecosystem. It discusses building object hierarchies and rendering them to the DOM in an "old-fashioned" way using strings. It introduces the idea of reusable components and recursive patterns. It demonstrates implementing a reusable Tree component in Dart using accessors and configurations.
Building Single-Page Web Appplications in dart - Devoxx France 2013yohanbeschi
Yohan Beschi presented on building single-page web applications using the Dart programming language. Dart aims to improve programmer productivity and application scalability compared to other options like JavaScript and Java with Google Web Toolkit (GWT). It provides an abstract class structure, generics, and other features to build user interfaces more concisely. Dart code compiles to JavaScript to run in browsers. The Dart ecosystem includes virtual machines, the Dartium browser, the Dart editor, and pub package manager.
Dart, le nouveau langage Web de Google présenté au public en octobre 2011 a pour objectif de proposer une alternative au JavaScript.
Bien que la version finale ne soit pas encore disponible (pour cela il faudra attendre cet été), Dart est utilisable dès aujourd'hui.
Au cours de cette présentation sont introduits les éléments suivants :
- comment Dart permet de développer des applications clientes aussi bien que serveurs,
- le langage,
- les outils permettant un développement industrialisé et une productivité accrue.
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfSoftware Company
Explore the benefits and features of advanced logistics management software for businesses in Riyadh. This guide delves into the latest technologies, from real-time tracking and route optimization to warehouse management and inventory control, helping businesses streamline their logistics operations and reduce costs. Learn how implementing the right software solution can enhance efficiency, improve customer satisfaction, and provide a competitive edge in the growing logistics sector of Riyadh.
What is Model Context Protocol(MCP) - The new technology for communication bw...Vishnu Singh Chundawat
The MCP (Model Context Protocol) is a framework designed to manage context and interaction within complex systems. This SlideShare presentation will provide a detailed overview of the MCP Model, its applications, and how it plays a crucial role in improving communication and decision-making in distributed systems. We will explore the key concepts behind the protocol, including the importance of context, data management, and how this model enhances system adaptability and responsiveness. Ideal for software developers, system architects, and IT professionals, this presentation will offer valuable insights into how the MCP Model can streamline workflows, improve efficiency, and create more intuitive systems for a wide range of use cases.
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfAbi john
Analyze the growth of meme coins from mere online jokes to potential assets in the digital economy. Explore the community, culture, and utility as they elevate themselves to a new era in cryptocurrency.
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersToradex
Toradex brings robust Linux support to SMARC (Smart Mobility Architecture), ensuring high performance and long-term reliability for embedded applications. Here’s how:
• Optimized Torizon OS & Yocto Support – Toradex provides Torizon OS, a Debian-based easy-to-use platform, and Yocto BSPs for customized Linux images on SMARC modules.
• Seamless Integration with i.MX 8M Plus and i.MX 95 – Toradex SMARC solutions leverage NXP’s i.MX 8 M Plus and i.MX 95 SoCs, delivering power efficiency and AI-ready performance.
• Secure and Reliable – With Secure Boot, over-the-air (OTA) updates, and LTS kernel support, Toradex ensures industrial-grade security and longevity.
• Containerized Workflows for AI & IoT – Support for Docker, ROS, and real-time Linux enables scalable AI, ML, and IoT applications.
• Strong Ecosystem & Developer Support – Toradex offers comprehensive documentation, developer tools, and dedicated support, accelerating time-to-market.
With Toradex’s Linux support for SMARC, developers get a scalable, secure, and high-performance solution for industrial, medical, and AI-driven applications.
Do you have a specific project or application in mind where you're considering SMARC? We can help with Free Compatibility Check and help you with quick time-to-market
For more information: https://www.toradex.com/computer-on-modules/smarc-arm-family
TrsLabs - Fintech Product & Business ConsultingTrs Labs
Hybrid Growth Mandate Model with TrsLabs
Strategic Investments, Inorganic Growth, Business Model Pivoting are critical activities that business don't do/change everyday. In cases like this, it may benefit your business to choose a temporary external consultant.
An unbiased plan driven by clearcut deliverables, market dynamics and without the influence of your internal office equations empower business leaders to make right choices.
Getting things done within a budget within a timeframe is key to Growing Business - No matter whether you are a start-up or a big company
Talk to us & Unlock the competitive advantage
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Impelsys Inc.
Impelsys provided a robust testing solution, leveraging a risk-based and requirement-mapped approach to validate ICU Connect and CritiXpert. A well-defined test suite was developed to assess data communication, clinical data collection, transformation, and visualization across integrated devices.
Dev Dives: Automate and orchestrate your processes with UiPath MaestroUiPathCommunity
This session is designed to equip developers with the skills needed to build mission-critical, end-to-end processes that seamlessly orchestrate agents, people, and robots.
📕 Here's what you can expect:
- Modeling: Build end-to-end processes using BPMN.
- Implementing: Integrate agentic tasks, RPA, APIs, and advanced decisioning into processes.
- Operating: Control process instances with rewind, replay, pause, and stop functions.
- Monitoring: Use dashboards and embedded analytics for real-time insights into process instances.
This webinar is a must-attend for developers looking to enhance their agentic automation skills and orchestrate robust, mission-critical processes.
👨🏫 Speaker:
Andrei Vintila, Principal Product Manager @UiPath
This session streamed live on April 29, 2025, 16:00 CET.
Check out all our upcoming Dev Dives sessions at https://community.uipath.com/dev-dives-automation-developer-2025/.
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell
With expertise in data architecture, performance tracking, and revenue forecasting, Andrew Marnell plays a vital role in aligning business strategies with data insights. Andrew Marnell’s ability to lead cross-functional teams ensures businesses achieve sustainable growth and operational excellence.
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...Alan Dix
Talk at the final event of Data Fusion Dynamics: A Collaborative UK-Saudi Initiative in Cybersecurity and Artificial Intelligence funded by the British Council UK-Saudi Challenge Fund 2024, Cardiff Metropolitan University, 29th April 2025
https://alandix.com/academic/talks/CMet2025-AI-Changes-Everything/
Is AI just another technology, or does it fundamentally change the way we live and think?
Every technology has a direct impact with micro-ethical consequences, some good, some bad. However more profound are the ways in which some technologies reshape the very fabric of society with macro-ethical impacts. The invention of the stirrup revolutionised mounted combat, but as a side effect gave rise to the feudal system, which still shapes politics today. The internal combustion engine offers personal freedom and creates pollution, but has also transformed the nature of urban planning and international trade. When we look at AI the micro-ethical issues, such as bias, are most obvious, but the macro-ethical challenges may be greater.
At a micro-ethical level AI has the potential to deepen social, ethnic and gender bias, issues I have warned about since the early 1990s! It is also being used increasingly on the battlefield. However, it also offers amazing opportunities in health and educations, as the recent Nobel prizes for the developers of AlphaFold illustrate. More radically, the need to encode ethics acts as a mirror to surface essential ethical problems and conflicts.
At the macro-ethical level, by the early 2000s digital technology had already begun to undermine sovereignty (e.g. gambling), market economics (through network effects and emergent monopolies), and the very meaning of money. Modern AI is the child of big data, big computation and ultimately big business, intensifying the inherent tendency of digital technology to concentrate power. AI is already unravelling the fundamentals of the social, political and economic world around us, but this is a world that needs radical reimagining to overcome the global environmental and human challenges that confront us. Our challenge is whether to let the threads fall as they may, or to use them to weave a better future.
Spark is a powerhouse for large datasets, but when it comes to smaller data workloads, its overhead can sometimes slow things down. What if you could achieve high performance and efficiency without the need for Spark?
At S&P Global Commodity Insights, having a complete view of global energy and commodities markets enables customers to make data-driven decisions with confidence and create long-term, sustainable value. 🌍
Explore delta-rs + CDC and how these open-source innovations power lightweight, high-performance data applications beyond Spark! 🚀
4. Comparator<Person> comparator = new Comparator<Person>() {
@Override
public int compare(Person o1, Person o2) {
return o1.firstname.compareTo(o2.firstname);
}
};
9. Comparator<Person> comparator1 =
(o1, o2) -> throw new Exception("Something went wrong");
THE CONTENT OF THE LAMBDA MUST MATCH THE SIGNATURE
OF THE METHOD IMPLEMENTED
30. public interface Postfixable {
public final static int UNARY_MESSAGE_PRIORITY = 1;
public final static int BINARY_MESSAGE_PRIORITY = 2;
// ...
int getPriority();
public default boolean le(Postfixable other) {
return this.getPriority() <= other.getPriority();
}
}
31. public interface Formula {
double calculate(int a);
default double sqrt(int a) {
return Math.sqrt(positive(a));
}
}
Formula formula = (a) -> sqrt( a * 100);
32. public interface Formula {
double calculate(int a);
default double sqrt(int a) {
return Math.sqrt(positive(a));
}
}
Formula formula = (a) -> sqrt( a * 100);
DOES NOT COMPILE
34. public static class MyClass implements MyInterface1, MyInterface2 {
// ...
}
35. public static class MyClass implements MyInterface1, MyInterface2 {
// ...
} DOES NOT COMPILE
36. public static abstract class MyClass
implements MyInterface1, MyInterface2 {
public abstract foo();
}
UN-IMPLEMENTING THE DEFAULT METHOD SOLVES THE PROBLEM
37. public static class MyClass implements MyInterface1, MyInterface2 {
public void foo() {
MyInterface1.super.foo();
MyInterface2.super.foo();
}
}
38. public static class MyClass1 implements MyInterface1 {
public void foo(){
System.out.println("bonjour");
}
}
public static class MyClass2 extends MyClass1 implements MyInterface2 {
}
39. public static class MyClass1 implements MyInterface1 {
public void foo(){
System.out.println("bonjour");
}
}
public static class MyClass2 extends MyClass1 implements MyInterface2 {
}
IN CASE OF AMBIGUITY A CLASS TAKES PRECEDENCE
41. public class Car {
public static Car create(final Supplier<Car> supplier) {
return supplier.get();
}
public static void collide(final Car car) {
System.out.println("Collided " + car.toString());
}
public void repair() {
System.out.println("Repaired " + this.toString());
}
public void follow(final Car another) {
System.out.println("Following the " + another.toString());
}
}
42. final Car car = Car.create(Car::new);
final List<Car> cars = Arrays.asList(car);
43. final Car car = Car.create(Car::new);
final List<Car> cars = Arrays.asList(car);
cars.forEach(Car::collide);
44. final Car car = Car.create(Car::new);
final List<Car> cars = Arrays.asList(car);
cars.forEach(Car::repair);
45. final Car car = Car.create(Car::new);
final List<Car> cars = Arrays.asList(car);
final Car police = Car.create(Car::new);
cars.forEach(police::follow);
46. public static UtfToCodePoint findUtfToCodePoint(final Charset charset) {
switch (charset) {
case UTF8:
case UTF8BOM:
return Converter::utf8ToCodePoint;
case UTF16BE:
return Converter::utf16beToCodePoint;
case UTF16LE:
return Converter::utf16leToCodePoint;
case UTF32BE:
return Converter::utf32beToCodePoint;
case UTF32LE:
return Converter::utf32leToCodePoint;
default:
throw new UnicodeException("Unknown charset!");
}
}
47. public class Person {
final private String firstName;
final private String lastName;
public Person() {}
public Person(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}
public interface PersonFactory {
Person create(String firstName, String lastName);
}
60. public class Collections {
public static <T> void copy(List<? super T> dest, List<? extends T> src) {
for (int i = 0; i < src.size(); i++)
dest.set(i,src.get(i));
}
}
List<A> as = new ArrayList<>();
List<B> bs = new ArrayList<>();
List<C> cs = new ArrayList<>();
Collections.copy(List<A>, List<B>);
Collections.copy(List<A>, List<A>);
Collections.copy(List<A>, List<C>);
Collections.copy(List<B>, List<B>);
Collections.copy(List<B>, List<A>); // KO
Collections.copy(List<B>, List<C>);
Collections.copy(List<C>, List<B>); // KO
Collections.copy(List<C>, List<A>); // KO
Collections.copy(List<C>, List<C>);
public class A {
}
public class B extends A {
}
public class C extends B {
}
61. void forEach(Consumer<? super T> action)
List<Double> temperature = Arrays.asList(20.0, 22.0, 22.5);
temperature.forEach(System.out::println);
62. void sort(Comparator<? super E> c)
List<Double> temperature = Arrays.asList(20.0, 22.0, 22.5);
temperature.sort((a, b) -> a > b ? -1 : 1);
63. boolean removeIf(Predicate<? super E> filter)
List<Double> temperature = Arrays.asList(20.0, 22.0, 22.5);
temperature.removeIf(s -> s > 22);
65. void forEach(BiConsumer<? super K, ? super V> action)
Map<String , Integer> authorBooks = new HashMap<String , Integer>();
authorBooks.put("Robert Ludlum", 27);
authorBooks.put("Clive Cussler", 50);
authorBooks.put("Tom Clancy", 17);
authorBooks.forEach((a, b) -> System.out.println(a + " wrote " + b + " books"));
66. V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction)
Map<String , Integer> authorBooks = new HashMap<String , Integer>();
authorBooks.put("Robert Ludlum", 27);
authorBooks.put("Clive Cussler", 50);
authorBooks.put("Tom Clancy", 17);
authorBooks.compute("Clive Cussler", (a, b) -> b + 1);
// If the compute function returns null then the entry for that key is removed
// from the map. If the key is not present then a new entry is added.
67. V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction)
Map<String , Integer> authorBooks = new HashMap<String , Integer>();
authorBooks.put("Robert Ludlum", 27);
authorBooks.put("Clive Cussler", 50);
authorBooks.put("Tom Clancy", 17);
authorBooks.computeIfAbsent("Agatha Christie", b -> b.length());
// The entry is added only if the computed value is not null.
68. V computeIfPresent(K key,
BiFunction<? super K, ? super V, ? extends V> remappingFunction)
Map<String , Integer> authorBooks = new HashMap<String , Integer>();
authorBooks.put("Robert Ludlum", 27);
authorBooks.put("Clive Cussler", 50);
authorBooks.put("Tom Clancy", 17);
authorBooks.computeIfPresent("Tom Clancy", (a, b) -> b + 1);
// Note that this function also removes an element if the new value computed from
// the passed lambda expression is null.
69. V getOrDefault(Object key, V defaultValue)
Map<String , Integer> authorBooks = new HashMap<String , Integer>();
authorBooks.put("Robert Ludlum", 27);
authorBooks.put("Clive Cussler", 50);
authorBooks.put("Tom Clancy", 17);
authorBooks.getOrDefault("AuthorA", 0)
70. V merge(K key, V value,
BiFunction<? super V, ? super V, ? extends V> remappingFunction)
Map<String , Integer> authorBooks = new HashMap<String , Integer>();
authorBooks.put("Robert Ludlum", 27);
authorBooks.put("Clive Cussler", 50);
authorBooks.put("Tom Clancy", 17);
authorBooks.merge("AuthorB", 1, (a, b) -> a + b);
System.out.println(authorBooks.get("AuthorB")); // 1
authorBooks.merge("AuthorB", 1, (a, b) -> a + b);
System.out.println(authorBooks.get("AuthorB")); // 2
72. boolean remove(Object key, Object value)
V replace(K key, V newValue)
boolean replace(K key, V oldValue, V newValue)
void replaceAll (BiFunction<? super K, ? super V, ? extends V> function)
94. // The result won't be always the same
Set<Integer> seen = Collections.synchronizedSet(new HashSet<>());
stream.parallel().map(e -> {
if (seen.add(e)) return 0; else return e;
}
);
95. // with a stateless lambda expression the results would
always be the same.
IntStream.range(0,5).parallel().map(x -> x * 2).toArray()
// use reduction instead of mutable accumulators
97. int sum = numbers.stream().reduce(0, Integer::sum);
98. int sumOfWeights = widgets.stream()
.reduce(0,
(sum, b) -> sum + b.getWeight())
Integer::sum);
113. <R,A> R collect(Collector<? super T,A,R> collector)
<R> R collect(Supplier<R> supplier,
BiConsumer<R,? super T> accumulator,
BiConsumer<R,R> combiner)
115. public void closure() {
List<Supplier<Integer>> list = new ArrayList<>();
for (int i = 1; i <= 5; i++) {
list.add(() -> i);
}
}
116. public void closure() {
List<Supplier<Integer>> list = new ArrayList<>();
for (int i = 1; i <= 5; i++) {
list.add(() -> i);
}
}
DOES NOT COMPILE
The value of « i » changes along the way
117. public void closure() {
List<Supplier<Integer>> list = new ArrayList<>();
for (int i = 1; i <= 5; i++) {
final int j = i;
list.add(() -> j);
}
list.forEach((e) -> System.out.print(e.get())); // 12345
}
COMPILE
A new « j » variable is created at each iteration
118. public void closure() {
List<Supplier<Integer>> list = new ArrayList<>();
for (int i = 1; i <= 5; i++) {
final int j = i;
list.add(() -> j);
}
list.forEach((e) -> System.out.print(e.get())); // 12345
}
The « final » keyword is not mandatory as the value of « j » is set once and for all
In this example « j » IS EFFECTIVELY FINAL