This presentation explains parameterized tests, theory tests, and generative testing. It also explains single mode faults and double mode faults and shows how to reduce the number of test cases when there's an combinatorial explosion. Lot's of JUnit examples.
Presentation given for the SweNug user group. Based on the contents of my book "Developer Testing". Covers a variety of test related stuff: defining testability, test techniques, anti-testability constructs, duplication, test-driven development.
The document discusses topics related to just-in-time (JIT) compilation in the Java Virtual Machine (JVM). It explains that the JIT compiler is triggered when methods are invoked many times based on invocation and back-edge counters, compiling frequently used code to machine code for improved performance. It also discusses why ahead-of-time compilation is not well-suited for Java due to its dynamic nature, and what can cause compiled code to be deoptimized, such as class initialization failures, null pointer exceptions, and unstable control flow.
This talk is a look into some of the surprising performance cases in Java -- with the goal of illustrating a few simple truths about the nature of compilers.
JVM Mechanics: Understanding the JIT's TricksDoug Hawkins
In this talk, we'll walkthrough how the JIT optimizes a piece Java code step-by-step. In doing so, you'll learn some of the amazing feats of optimization that JVMs can perform, but also some surprisingly simple things that prevent your code from running fast.
Software is eating the world. The rate at which we produce new software is astounding. Understanding and preventing potential issues is a growing concern.
Building software security teams is much different than building IT security teams. It requires different backgrounds and focus. Software security groups without an emphasis on software fail.
Join Aaron as he talks about the right way to build and run a software security group. You will walk away with a concrete list of actions that you can take back to your job and start working on right away.
Taking the boilerplate out of your tests with SourceryVincent Pradeilles
Code generation has always been something of a controversial topic, with many engineers not liking the idea of a codebase that relies too much on this topic. Yet, when used appropriately, this tool is a great help to minimise boilerplate code.
In many iOS projects, the testing targets are definitely places that tend to be cluttered with boilerplate and duplicated code.
Sourcery is a code-generation tool for Swift that, when applied appropriately, can dramatically reduce the amount of boilerplate.
In this talk I’m going to show you how it can be leveraged for quick win, such as making sure that your dependencies are correctly registered and injected. But also to create building blocks for more involved tests scenarios, such as mocks that keep track of how many times methods get called, along with the provided arguments. And, of course, if your app uses an architecture that relies on a set of well defined components (like base classes of ViewControllers, ViewModels, Providers, etc. with pre-defined methods), Sourcery can definitely be applied to generate a testing suite that will assert that those components behave as expected.
This document presents 8 Java puzzles to demonstrate common programming pitfalls. The puzzles cover issues like static methods overriding instead of overloading, violating the equals and hashCode contracts for objects, abrupt returns in finally blocks, integer overflows when subtracting large numbers, operator overloading with characters, ambiguous constructor overloading, implicit type promotions between primitives, and comparing values of different types. For each puzzle, it provides the expected output and an explanation of what is happening, along with suggestions for how to fix the problem code. The overall goals are to have fun while learning about quirks in Java programming and how to avoid common mistakes.
The Ring programming language version 1.2 book - Part 79 of 84Mahmoud Samir Fayed
The document discusses extending Ring by adding new classes and functions. It can be done by writing C/C++ code and compiling it into a DLL that can be loaded from Ring using LoadLib(). Functions defined in the DLL can then be called from Ring. Alternatively, RingQt classes can be extended by defining new classes that inherit from existing Qt classes. A code generator written in Ring is also presented that can automatically generate wrapper code to interface with external C/C++ libraries from Ring.
Example of using Kotlin lang features for writing DSL for Spark-Cassandra connector. Comparison Kotlin lang DSL features with similar features in others JVM languages (Scala, Groovy).
This document contains code examples demonstrating basic Java concepts like classes, objects, methods, constructors, static variables, and more. The examples show how to define Box classes with width, length and height attributes to calculate and print the volume. Later examples demonstrate method overloading, the use of this keyword, call by value vs reference, and default values of attributes. Constructors are used to initialize object attribute values.
1. Rxjs provides a better way of handling asynchronous code through observables which are streams of values over time. Observables allow for cancellable, retryable operations and easy composition of different asynchronous sources.
2. Common Rxjs operators like map, filter, and flatMap allow transforming and combining observable streams. Operators make observables quite powerful for tasks like async logic, event handling, and API requests.
3. In Angular, observables are used extensively for tasks like HTTP requests, routing, and component communication. Key aspects are using async pipes for subscriptions and unsubscribing during lifecycle hooks. Rxjs greatly simplifies many common asynchronous patterns in Angular applications.
Slides for the Reactive 3D Game Engine presented at ScalaDays 2014.
Shows the demo of the 3D engine, followed by the description of the reactive 3D game engine - how reactive dependencies between input, time and game logic are expressed, how to deal with GC issues, how to model game state using Reactive Collections.
sizeof(Object): how much memory objects take on JVMs and when this may matterDawid Weiss
The object header contains metadata such as the identity hash, mark, and klass. Hexdumping the memory of a simple object before and after getting the identity hash shows the hash being written to the header. On 64-bit JVMs, the header is 8 bytes, containing unused space, hash, and mark fields. On 32-bit JVMs, the header is 4 bytes, with the hash overwriting unused space after being set.
This document provides an overview of Spock, a testing framework for Java and Groovy. It describes how to include Spock tests in a project, run Spock tests, debug Spock tests, view test coverage, and integrate Spock tests with Sonar. It also explains Spock specifications, feature methods, blocks like setup, when/then, expect, and cleanup. It demonstrates how to write conditions, handle exceptions, create helper methods, mocks, stubs, and spies in Spock tests.
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)James Clause
The document discusses advanced dynamic analysis techniques for leak detection. It describes how dynamic taint analysis works by assigning taint marks, propagating those marks, and checking the marks. This allows detecting where memory was allocated but not freed. The document outlines an implementation of leak detection as a Valgrind tool that intercepts memory functions and instruments instructions. It summarizes the current status of handling different languages and platforms. Future work ideas include improving the leakpoint tool and collaborating with Apple on new analysis techniques based on the experiences gained.
The document discusses Titanium and ways to improve the development experience through tools like TiShadow and Cornwall. TiShadow acts as a proxy for the Titanium SDK, allowing developers to code on any device by bundling, rewriting, and sending code to devices. Cornwall allows executing native Titanium code from the web by passing functions and data between the web and native contexts. These tools help developers code in Titanium on any device and more easily pass data and functions between the web and native worlds.
The Ring programming language version 1.5.3 book - Part 10 of 184Mahmoud Samir Fayed
This document summarizes the key features and changes in Ring 1.5.3, including:
- The trace library allows tracing function calls and opening an interactive debugger. An example uses a breakpoint.
- The type hints library allows adding type information to improve code editors and static analysis. It supports user-defined types.
- Overall the documentation and quality of Ring 1.5 has improved based on real-world usage.
JEEConf 2017 - Having fun with JavassistAnton Arhipov
Javassist makes Java bytecode manipulation simple. At ZeroTurnaround we use Javassist a lot to implement the integrations for our tools.
In this talk we will go through the examples of how Javassist can be applied to alter the applications behavior and do all kind of fun stuff with it.
Why is it interesting? Because while trying to do unusual things in Java, you learn much more about the language and the platform itself and learning about Javassist will actually make you a better Java developer!
This document discusses various optimizations and improvements made to Java streams in recent versions. It provides examples of counting large streams, converting streams to arrays, collecting to lists, sorting, skipping elements, and using streams in parallel pipelines. It also covers characteristics of streams like SIZED, ORDERED, DISTINCT, and how operations like distinct(), skip(), and concat() perform in parallel scenarios. Overall it analyzes the performance of core stream operations and how their implementations have evolved.
This document discusses ways to optimize Clojure code for performance. It shows examples of using primitive types, avoiding reflection, leveraging immutability, and minimizing comparisons and type checks. The author advocates understanding how Clojure code compiles and runs, and creating domain-specific abstractions when Clojure's general solutions are too pessimistic. Overall, the document explores techniques for writing Clojure programs that are predictably fast by avoiding overhead and making assumptions explicit.
The Ring programming language version 1.5.4 book - Part 10 of 185Mahmoud Samir Fayed
This document summarizes the key features and changes in Ring 1.5.2, including updates to the documentation, Ring Notepad, Form Designer, and sample applications. It provides code examples demonstrating new capabilities in the trace library, type hints library, OpenGL graphics, and event handling.
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chinjaxconf
JavaFX 2 is the next version of a revolutionary rich client platform for developing immersive desktop applications. One of the new features in JavaFX 2 is a set of pure Java APIs that can be used from any JVM language, opening up tremendous possibilities. This presentation demonstrates the potential of using JavaFX 2 together with alternative languages such as Groovy, Clojure, and Scala. It also will showcase the successor to JavaFX Script, Visage, a DSL with features specifically targeted at helping create clean UIs.
Down to Stack Traces, up from Heap DumpsAndrei Pangin
Глубже стек-трейсов, шире хип-дампов
Stack trace и heap dump - не просто инструменты отладки; это потайные дверцы к самым недрам виртуальной Java машины. Доклад будет посвящён малоизвестным особенностям JDK, так или иначе связанным с обоходом хипа и стеками потоков.
Мы разберём:
- как снимать дампы в продакшне без побочных эффектов;
- как работают утилиты jmap и jstack изнутри, и в чём хитрость forced режима;
- почему все профилировщики врут, и как с этим бороться;
- познакомимся с новым Stack-Walking API в Java 9;
- научимся сканировать Heap средствами JVMTI;
- узнаем о недокументированных функциях Хотспота и других интересных штуках.
BDD - Behavior Driven Development Webapps mit Groovy Spock und GebChristian Baranowski
The document discusses Behavior Driven Development (BDD) using Groovy, Spock and Geb. It provides an overview of BDD and defines the given-when-then structure. It then demonstrates various Groovy and Spock features for writing BDD tests including classes, methods, collections, closures, assertions and mock objects. Spock allows writing tests in a readable and expressive manner with support for parameterization and different test lifecycle methods.
JavaScript Advanced - Useful methods to power up your codeLaurence Svekis ✔
Get this Course
https://www.udemy.com/javascript-course-plus/?couponCode=SLIDESHARE
Useful methods and JavaScript code snippets power up your code and make even more happen with it.
This course is perfect for anyone who has fundamental JavaScript experience and wants to move to the next level. Use and apply more advanced code, and do more with JavaScript.
Everything you need to learn more about JavaScript
Source code is included
60+ page Downloadable PDF guide with resources and code snippets
3 Challenges to get you coding try the code
demonstrating useful JavaScript methods that can power up your code and make even more happen with it.
Course lessons will cover
JavaScript Number Methods
JavaScript String Methods
JavaScript Math - including math random
DOMContentLoaded - DOM ready when the document has loaded.
JavaScript Date - Date methods and how to get set and use date.
JavaScript parse and stringify - strings to objects back to strings
JavaScript LocalStorage - store variables in the user browser
JavaScript getBoundingClientRect() - get the dimensions of an element
JavaScript Timers setTimeout() setInterval() requestAnimationFrame() - Run code when you want too
encodeURIComponent - encoding made easy
Regex - so powerful use it to get values from your string
prototype - extend JavaScript objects with customized powers
Try and catch - perfect for error and testing
Fetch xHR requests - bring content in from servers
and more
No libraries, no shortcuts just learning JavaScript making it DYNAMIC and INTERACTIVE web application.
Step by step learning with all steps included.
This document presents 8 Java puzzles to demonstrate common programming pitfalls. The puzzles cover issues like static methods overriding instead of overloading, violating the equals and hashCode contracts for objects, abrupt returns in finally blocks, integer overflows when subtracting large numbers, operator overloading with characters, ambiguous constructor overloading, implicit type promotions between primitives, and comparing values of different types. For each puzzle, it provides the expected output and an explanation of what is happening, along with suggestions for how to fix the problem code. The overall goals are to have fun while learning about quirks in Java programming and how to avoid common mistakes.
The Ring programming language version 1.2 book - Part 79 of 84Mahmoud Samir Fayed
The document discusses extending Ring by adding new classes and functions. It can be done by writing C/C++ code and compiling it into a DLL that can be loaded from Ring using LoadLib(). Functions defined in the DLL can then be called from Ring. Alternatively, RingQt classes can be extended by defining new classes that inherit from existing Qt classes. A code generator written in Ring is also presented that can automatically generate wrapper code to interface with external C/C++ libraries from Ring.
Example of using Kotlin lang features for writing DSL for Spark-Cassandra connector. Comparison Kotlin lang DSL features with similar features in others JVM languages (Scala, Groovy).
This document contains code examples demonstrating basic Java concepts like classes, objects, methods, constructors, static variables, and more. The examples show how to define Box classes with width, length and height attributes to calculate and print the volume. Later examples demonstrate method overloading, the use of this keyword, call by value vs reference, and default values of attributes. Constructors are used to initialize object attribute values.
1. Rxjs provides a better way of handling asynchronous code through observables which are streams of values over time. Observables allow for cancellable, retryable operations and easy composition of different asynchronous sources.
2. Common Rxjs operators like map, filter, and flatMap allow transforming and combining observable streams. Operators make observables quite powerful for tasks like async logic, event handling, and API requests.
3. In Angular, observables are used extensively for tasks like HTTP requests, routing, and component communication. Key aspects are using async pipes for subscriptions and unsubscribing during lifecycle hooks. Rxjs greatly simplifies many common asynchronous patterns in Angular applications.
Slides for the Reactive 3D Game Engine presented at ScalaDays 2014.
Shows the demo of the 3D engine, followed by the description of the reactive 3D game engine - how reactive dependencies between input, time and game logic are expressed, how to deal with GC issues, how to model game state using Reactive Collections.
sizeof(Object): how much memory objects take on JVMs and when this may matterDawid Weiss
The object header contains metadata such as the identity hash, mark, and klass. Hexdumping the memory of a simple object before and after getting the identity hash shows the hash being written to the header. On 64-bit JVMs, the header is 8 bytes, containing unused space, hash, and mark fields. On 32-bit JVMs, the header is 4 bytes, with the hash overwriting unused space after being set.
This document provides an overview of Spock, a testing framework for Java and Groovy. It describes how to include Spock tests in a project, run Spock tests, debug Spock tests, view test coverage, and integrate Spock tests with Sonar. It also explains Spock specifications, feature methods, blocks like setup, when/then, expect, and cleanup. It demonstrates how to write conditions, handle exceptions, create helper methods, mocks, stubs, and spies in Spock tests.
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)James Clause
The document discusses advanced dynamic analysis techniques for leak detection. It describes how dynamic taint analysis works by assigning taint marks, propagating those marks, and checking the marks. This allows detecting where memory was allocated but not freed. The document outlines an implementation of leak detection as a Valgrind tool that intercepts memory functions and instruments instructions. It summarizes the current status of handling different languages and platforms. Future work ideas include improving the leakpoint tool and collaborating with Apple on new analysis techniques based on the experiences gained.
The document discusses Titanium and ways to improve the development experience through tools like TiShadow and Cornwall. TiShadow acts as a proxy for the Titanium SDK, allowing developers to code on any device by bundling, rewriting, and sending code to devices. Cornwall allows executing native Titanium code from the web by passing functions and data between the web and native contexts. These tools help developers code in Titanium on any device and more easily pass data and functions between the web and native worlds.
The Ring programming language version 1.5.3 book - Part 10 of 184Mahmoud Samir Fayed
This document summarizes the key features and changes in Ring 1.5.3, including:
- The trace library allows tracing function calls and opening an interactive debugger. An example uses a breakpoint.
- The type hints library allows adding type information to improve code editors and static analysis. It supports user-defined types.
- Overall the documentation and quality of Ring 1.5 has improved based on real-world usage.
JEEConf 2017 - Having fun with JavassistAnton Arhipov
Javassist makes Java bytecode manipulation simple. At ZeroTurnaround we use Javassist a lot to implement the integrations for our tools.
In this talk we will go through the examples of how Javassist can be applied to alter the applications behavior and do all kind of fun stuff with it.
Why is it interesting? Because while trying to do unusual things in Java, you learn much more about the language and the platform itself and learning about Javassist will actually make you a better Java developer!
This document discusses various optimizations and improvements made to Java streams in recent versions. It provides examples of counting large streams, converting streams to arrays, collecting to lists, sorting, skipping elements, and using streams in parallel pipelines. It also covers characteristics of streams like SIZED, ORDERED, DISTINCT, and how operations like distinct(), skip(), and concat() perform in parallel scenarios. Overall it analyzes the performance of core stream operations and how their implementations have evolved.
This document discusses ways to optimize Clojure code for performance. It shows examples of using primitive types, avoiding reflection, leveraging immutability, and minimizing comparisons and type checks. The author advocates understanding how Clojure code compiles and runs, and creating domain-specific abstractions when Clojure's general solutions are too pessimistic. Overall, the document explores techniques for writing Clojure programs that are predictably fast by avoiding overhead and making assumptions explicit.
The Ring programming language version 1.5.4 book - Part 10 of 185Mahmoud Samir Fayed
This document summarizes the key features and changes in Ring 1.5.2, including updates to the documentation, Ring Notepad, Form Designer, and sample applications. It provides code examples demonstrating new capabilities in the trace library, type hints library, OpenGL graphics, and event handling.
Hacking JavaFX with Groovy, Clojure, Scala, and Visage: Stephen Chinjaxconf
JavaFX 2 is the next version of a revolutionary rich client platform for developing immersive desktop applications. One of the new features in JavaFX 2 is a set of pure Java APIs that can be used from any JVM language, opening up tremendous possibilities. This presentation demonstrates the potential of using JavaFX 2 together with alternative languages such as Groovy, Clojure, and Scala. It also will showcase the successor to JavaFX Script, Visage, a DSL with features specifically targeted at helping create clean UIs.
Down to Stack Traces, up from Heap DumpsAndrei Pangin
Глубже стек-трейсов, шире хип-дампов
Stack trace и heap dump - не просто инструменты отладки; это потайные дверцы к самым недрам виртуальной Java машины. Доклад будет посвящён малоизвестным особенностям JDK, так или иначе связанным с обоходом хипа и стеками потоков.
Мы разберём:
- как снимать дампы в продакшне без побочных эффектов;
- как работают утилиты jmap и jstack изнутри, и в чём хитрость forced режима;
- почему все профилировщики врут, и как с этим бороться;
- познакомимся с новым Stack-Walking API в Java 9;
- научимся сканировать Heap средствами JVMTI;
- узнаем о недокументированных функциях Хотспота и других интересных штуках.
BDD - Behavior Driven Development Webapps mit Groovy Spock und GebChristian Baranowski
The document discusses Behavior Driven Development (BDD) using Groovy, Spock and Geb. It provides an overview of BDD and defines the given-when-then structure. It then demonstrates various Groovy and Spock features for writing BDD tests including classes, methods, collections, closures, assertions and mock objects. Spock allows writing tests in a readable and expressive manner with support for parameterization and different test lifecycle methods.
JavaScript Advanced - Useful methods to power up your codeLaurence Svekis ✔
Get this Course
https://www.udemy.com/javascript-course-plus/?couponCode=SLIDESHARE
Useful methods and JavaScript code snippets power up your code and make even more happen with it.
This course is perfect for anyone who has fundamental JavaScript experience and wants to move to the next level. Use and apply more advanced code, and do more with JavaScript.
Everything you need to learn more about JavaScript
Source code is included
60+ page Downloadable PDF guide with resources and code snippets
3 Challenges to get you coding try the code
demonstrating useful JavaScript methods that can power up your code and make even more happen with it.
Course lessons will cover
JavaScript Number Methods
JavaScript String Methods
JavaScript Math - including math random
DOMContentLoaded - DOM ready when the document has loaded.
JavaScript Date - Date methods and how to get set and use date.
JavaScript parse and stringify - strings to objects back to strings
JavaScript LocalStorage - store variables in the user browser
JavaScript getBoundingClientRect() - get the dimensions of an element
JavaScript Timers setTimeout() setInterval() requestAnimationFrame() - Run code when you want too
encodeURIComponent - encoding made easy
Regex - so powerful use it to get values from your string
prototype - extend JavaScript objects with customized powers
Try and catch - perfect for error and testing
Fetch xHR requests - bring content in from servers
and more
No libraries, no shortcuts just learning JavaScript making it DYNAMIC and INTERACTIVE web application.
Step by step learning with all steps included.
The document provides an overview of making games using JavaScript, HTML, and the DOM. It discusses JavaScript and HTML5 as languages well-suited for game development due to features like fast iteration, treating scripts as data, and allowing different game types. It covers key concepts like the DOM tree, rendering to a <canvas> element, using the 2D context to draw, implementing a main loop with setInterval(), drawing sprites and images, handling user input, and creating basic animations and games with concepts like sprites, matrices, vectors, bullets, and zombies.
Fullstack Conference - Proxies before proxies: The hidden gems of Javascript...Tim Chaplin
Tired of console.logging your way through applications? Want a way to slice through your application without adding complexity? AOP has been the answer to these questions for object oriented languages, such as Java and C#, but is not available in Javascript. ScarletJS(https://github.com/scarletjs/scarlet) is a project that tackles AOP using a clean, fluent, performant interface.
The ScarletJS project provides Javascript developers a different way of thinking about traditional javascript problems. The project is still growing and looking into the future of what ES6 proxies will open up to the Javascript community.
The talk will highlight the problems that javascript developers face with logging application behavior, security, and more. It will discuss the benefits of identifying a cross cutting concern, and programming using aspects. The talk will highlight how thinking about a project and cross cutting concerns can lead to cleaner more SOLID code. It will also discuss the future of ES6 proxies and the benefits that they will bring.
Emerging Languages: A Tour of the HorizonAlex Payne
A tour of a number of new programming languages, organized by the job they're best suited for. Presented at Philadelphia Emerging Technology for the Enterprise 2012.
The Ring programming language version 1.10 book - Part 22 of 212Mahmoud Samir Fayed
This document describes how to build Ring from source code on Microsoft Windows. It outlines the steps to clone the Ring source code repository, generate code for Ring extensions, and build the Ring compiler, virtual machine, Ring2EXE tool, and various Ring extensions like RingConsoleColors, RingInternet, RingCurl, RingPM, RingODBC, RingMySQL, RingSQLite, RingPostgreSQL, RingOpenSSL, RingMurmurHash, RingAllegro, RingZip, RingLibuv, RingFreeGLUT, and RingOpenGL using batch scripts. The process involves changing directories, running gencode.bat to generate source code for some extensions, and running buildvc.bat scripts to compile the code using Visual
This document provides an overview of Spock, a testing framework for Java and Groovy. It describes how to include Spock tests in a project, run Spock tests, debug Spock tests, view test coverage, and integrate Spock tests with Sonar. It also explains Spock specifications, feature methods, blocks like setup, when/then, expect, and cleanup. It demonstrates how to write conditions, handle exceptions, create helper methods, mocks, stubs, and spies in Spock tests.
Here are some suggestions to improve the test method name:
- shouldReturnNullWhenQueryReturnsNull
- shouldPassNullFromDaoWhenQueryReturnsNull
Using "should" makes the intent clearer - we expect the method to return null under certain conditions. Describing those conditions ("when query returns null") in the name provides more context than a generic "testQuery".
Overall, test method names should clearly communicate what is being tested and under what conditions we expect the test to pass or fail. This helps readers understand the purpose and focus of each test.
The document provides an overview of Groovy and Java code examples for performing common tasks like printing "Hello World", reading files, making web requests, using strings, importing packages, and using Swing/SwingBuilder for GUIs. It also shows examples of using Groovy with Java libraries for Excel files, Ant, and JSON. Additional sections cover parallel processing with GPars, contract programming with GContracts, method chaining, Grails basics, and Gaelyk controllers and views.
This document summarizes a presentation about the Unity game development platform. It introduces Unity as a game engine that integrates tools for creating 3D and 2D content across platforms. It describes Unity's main components, including the game engine, editor tools, asset store, and support for multiple platforms. It provides screenshots explaining Unity's interface and gives examples of creating a simple space shooter game in Unity, including importing assets, scripting enemy behavior, using prefabs, and adding collisions and a game over scene.
Groovy is a dynamic language for the Java platform that provides features inspired by languages like Python, Ruby and Smalltalk. It allows Java developers to use these features with a syntax that is very similar to Java. Groovy code can be compiled to Java bytecode and integrated with Java applications and libraries. It supports features like closures, metaprogramming, builders and templates to improve developer productivity.
Tricks to Making a Realtime SurfaceView Actually Perform in Realtime - Maarte...DroidConTLV
SurfaceViews allow drawing to a separate thread to achieve realtime performance. Key aspects include:
- Driving the SurfaceView with a thread that locks and draws to the canvas in a loop.
- Using input buffering and object pooling to efficiently process touch/key events from the main thread.
- Employing various timing and drawing techniques like fixed scaling to optimize for performance. Managing the SurfaceView lifecycle to ensure the drawing thread starts and stops appropriately.
2014 yılının sonunda sonlandırılması beklenen HTML standardının 5. sürümü çoktandır tarayıcılar tarafından destekleniyor. HTML5 ile gelen Canvas, Websockets ve diğer özelliklerle nasıl daha canlı, daha Flash uygulamalarına benzer, web uygulamaları geliştirebileceğimizi inceledik.
This document discusses the Lift web framework for Scala. It begins by highlighting how Lift offers innovative approaches to web development compared to other frameworks. It then discusses why another web framework was needed and how Lift borrows ideas from other frameworks while also introducing its own novel concepts. Several key features of Lift are then summarized, including templates, sitemaps, Comet, persistence, AJAX support, and user management. Code examples are provided to demonstrate templates, snippets, binding, menus, CRUD functionality, and AJAX calls.
The document provides instructions for building a basic space shooter game using JavaScript and canvas. It demonstrates how to load assets like images, handle input events from keyboard keys to control player movement, create enemy objects that move across the screen, detect collisions between lasers and enemies, and add game states to track lives and score. The game loop redraws the game objects on an interval to animate their movement. Event handling is implemented through an event emitter to avoid messy code. The final sections provide a demo of the moving game elements and lasers firing, along with tips for continuing to learn game development.
1. The document discusses good and bad practices for writing unit tests. It emphasizes that tests should verify the expected behavior, fail clearly when something goes wrong, and use mocks and isolation to focus on the code being tested.
2. Some examples of bad tests shown include tests that don't make assertions or assertions that don't provide useful information on failure. Real objects are also used instead of mocks, obscuring the test.
3. Good practices include using mocks to isolate the code being tested, making sure tests fail clearly when something goes wrong, and focusing tests on expected behavior through clear assertions. Automated testing, fixing broken tests, and mastering testing tools are also emphasized.
This document provides step-by-step instructions for cloning and building a Flappy Bird clone using Swift. It begins with setting up the project structure and basic gameplay elements like the background, ground and bird. It then adds parallax scrolling, bird animation and physics. Pipes and collision detection are implemented along with scoring. The document details many Swift concepts like classes, protocols and physics bodies to recreate the classic mobile game.
Kotlin coroutine - the next step for RxJava developer?Artur Latoszewski
Kotlin is a language that is rapidly gaining popularity, among others thanks to cooperation with Java. On the other hand, RxJava has brought us many solutions to problems related to asynchronous code. If everything is so cool, do we need anything else in the Kotlin world? Is Kotlin Coroutine a competition for RxJava?
This document discusses the Japan Grails/Groovy User Group (JGGUG). It mentions a speaker named T. Yamamoto and covers topics discussed at JGGUG meetings including Grails, Groovy, Gradle, plugins, and Maven.
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.
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPathCommunity
Join this UiPath Community Berlin meetup to explore the Orchestrator API, Swagger interface, and the Test Manager API. Learn how to leverage these tools to streamline automation, enhance testing, and integrate more efficiently with UiPath. Perfect for developers, testers, and automation enthusiasts!
📕 Agenda
Welcome & Introductions
Orchestrator API Overview
Exploring the Swagger Interface
Test Manager API Highlights
Streamlining Automation & Testing with APIs (Demo)
Q&A and Open Discussion
Perfect for developers, testers, and automation enthusiasts!
👉 Join our UiPath Community Berlin chapter: https://community.uipath.com/berlin/
This session streamed live on April 29, 2025, 18:00 CET.
Check out all our upcoming UiPath Community sessions at https://community.uipath.com/events/.
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveScyllaDB
Want to learn practical tips for designing systems that can scale efficiently without compromising speed?
Join us for a workshop where we’ll address these challenges head-on and explore how to architect low-latency systems using Rust. During this free interactive workshop oriented for developers, engineers, and architects, we’ll cover how Rust’s unique language features and the Tokio async runtime enable high-performance application development.
As you explore key principles of designing low-latency systems with Rust, you will learn how to:
- Create and compile a real-world app with Rust
- Connect the application to ScyllaDB (NoSQL data store)
- Negotiate tradeoffs related to data modeling and querying
- Manage and monitor the database for consistently low latencies
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungenpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-und-verwaltung-von-multiuser-umgebungen/
HCL Nomad Web wird als die nächste Generation des HCL Notes-Clients gefeiert und bietet zahlreiche Vorteile, wie die Beseitigung des Bedarfs an Paketierung, Verteilung und Installation. Nomad Web-Client-Updates werden “automatisch” im Hintergrund installiert, was den administrativen Aufwand im Vergleich zu traditionellen HCL Notes-Clients erheblich reduziert. Allerdings stellt die Fehlerbehebung in Nomad Web im Vergleich zum Notes-Client einzigartige Herausforderungen dar.
Begleiten Sie Christoph und Marc, während sie demonstrieren, wie der Fehlerbehebungsprozess in HCL Nomad Web vereinfacht werden kann, um eine reibungslose und effiziente Benutzererfahrung zu gewährleisten.
In diesem Webinar werden wir effektive Strategien zur Diagnose und Lösung häufiger Probleme in HCL Nomad Web untersuchen, einschließlich
- Zugriff auf die Konsole
- Auffinden und Interpretieren von Protokolldateien
- Zugriff auf den Datenordner im Cache des Browsers (unter Verwendung von OPFS)
- Verständnis der Unterschiede zwischen Einzel- und Mehrbenutzerszenarien
- Nutzung der Client Clocking-Funktion
Big Data Analytics Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
Quantum Computing Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
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! 🚀
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Aqusag Technologies
In late April 2025, a significant portion of Europe, particularly Spain, Portugal, and parts of southern France, experienced widespread, rolling power outages that continue to affect millions of residents, businesses, and infrastructure systems.
AI and Data Privacy in 2025: Global TrendsInData Labs
In this infographic, we explore how businesses can implement effective governance frameworks to address AI data privacy. Understanding it is crucial for developing effective strategies that ensure compliance, safeguard customer trust, and leverage AI responsibly. Equip yourself with insights that can drive informed decision-making and position your organization for success in the future of data privacy.
This infographic contains:
-AI and data privacy: Key findings
-Statistics on AI data privacy in the today’s world
-Tips on how to overcome data privacy challenges
-Benefits of AI data security investments.
Keep up-to-date on how AI is reshaping privacy standards and what this entails for both individuals and organizations.
3. ▪ Developer (2000→) Java, Perl, C, C++, Groovy, C#, PHP,
Visual Basic, Assembler
▪ Trainer – TDD, Unit testing, Clean Code, WebDriver,
Specification by Example
▪ Developer mentor
▪ Author
▪ Scrum Master
▪ Professional coach
Alexander Tarlinder
https://www.crisp.se/konsulter/alexander-tarlinder
alexander_tar
[email protected]
4. After This Talk You’ll…
• Know the basics of 2D platformers
• Have seen many features of Spock
• Have developed a sense of game testing
challenges
5. 2D Platformers These Days
• Are made using engines!
• Are made up of
– Maps
– Sprites
– Entities & Components
– Game loops/update
methods
Out of Scope Today
Real physics
Performance
Animation
Scripting
7. Sprites & Collisions
▪ Hard to automate
▪ Require visual aids
▪ The owning entity
does the physics
Testing Challenges
8. Entity Hierarchy
Entity
x, y, width, height, (imageId)
update()
BlockBase
bump()
MovingEntity
velocity, direction
PlayerGoomba
9. Game Loop And Update Method
WHILE (game runs)
{
Process input
Update
Render scene
}
React to input
Do AI
Do physics
▪ Run at 60 FPS
▪ Requires player input
Testing Challenges
10. The Component Pattern –
Motivation
player.update() {
Process movement
Resolve collisions with the world
Resolve collisions with enemies
Check life
…
Move camera
Pick an image to draw
}
11. Assembling with Components
Player Goomba Flying turtle
Input
Keyboard X
AI X X
Physics
Walking X X
Jumping X
Flying X
CD walls X X X
CD enemies X
CD bullets X X
Graphics
Draw X X X
Particle effects X
12. • 60 FPS
• No graphics
• State and world setup (aka “test data”)
My Initial Fears
14. Basic Spock Test Structure
def "A vanilla Spock test uses given/when/then"() {
given:
def greeting = "Hello"
when:
def message = greeting + ", world!"
then:
message == "Hello, world!"
}
Proper test name
GWT
Noise-free assertion
15. A First Test
@Subject
def physicsComponent = new PhysicsComponent()
def "A Goomba placed in mid-air will start falling"() {
given: "An empty level and a Goomba floating in mid-air"
def emptyLevel = new Level(10, 10, [])
def fallingGoomba = new Goomba(0, 0, null)
when: "Time is advanced by two frames"
2.times { physicsComponent.update(fallingGoomba, emptyLevel) }
then: "The Goomba has started falling in the second frame"
fallingGoomba.getVerticalVelocity() >
PhysicsComponent.BASE_VERTICAL_VELOCITY
fallingGoomba.getY() == PhysicsComponent.BASE_VERTICAL_VELOCITY
}
16. You Can Stack when/then
def "A Goomba placed in mid-air will start falling"() {
given: "An empty level and a Goomba floating in mid-air"
def emptyLevel = new Level(10, 10, [])
def fallingGoomba = new Goomba(0, 0, null)
when:
physicsComponent.update(fallingGoomba, emptyLevel)
then:
fallingGoomba.getVerticalVelocity() ==
PhysicsComponent.BASE_VERTICAL_VELOCITY
fallingGoomba.getY() == 0
when:
physicsComponent.update(fallingGoomba, emptyLevel)
then:
fallingGoomba.getVerticalVelocity() >
PhysicsComponent.BASE_VERTICAL_VELOCITY
fallingGoomba.getY() == PhysicsComponent.BASE_VERTICAL_VELOCITY
}
Twice
17. You Can Add ands Everywhere
def "A Goomba placed in mid-air will start falling #3"() {
given: "An empty level"
def emptyLevel = new Level(10, 10, [])
and: "A Goomba floating in mid-air"
def fallingGoomba = new Goomba(0, 0, null)
when: "The time is adanced by one frame"
physicsComponent.update(fallingGoomba, emptyLevel)
and: "The time is advanced by another frame"
physicsComponent.update(fallingGoomba, emptyLevel)
then: "The Goomba has started accelerating"
fallingGoomba.getVerticalVelocity() >
PhysicsComponent.BASE_VERTICAL_VELOCITY
and: "It has fallen some distance"
fallingGoomba.getY() > old(fallingGoomba.getY())
}
You’ve seen this, but forget that you did
And
19. More Features
def "A Goomba placed in mid-air will start falling #4"() {
given:
def emptyLevel = new Level(10, 10, [])
def fallingGoomba = new Goomba(0, 0, null)
when:
5.times { physicsComponent.update(fallingGoomba, emptyLevel) }
then:
with(fallingGoomba) {
expect getVerticalVelocity(),
greaterThan(PhysicsComponent.BASE_VERTICAL_VELOCITY)
expect getY(),
greaterThan(PhysicsComponent.BASE_VERTICAL_VELOCITY)
}
}
With
block
Hamcrest matchers
20. Parameterized tests
def "Examine every single frame in an animation"() {
given:
def testedAnimation = new Animation()
testedAnimation.add("one", 1).add("two", 2).add("three", 3);
when:
ticks.times {testedAnimation.advance()}
then:
testedAnimation.getCurrentImageId() == expectedId
where:
ticks || expectedId
0 || "one"
1 || "two"
2 || "two"
3 || "three"
4 || "three"
5 || "three"
6 || "one"
}
This can be any type of
expression
Optional
21. Data pipes
def "Examine every single frame in an animation"() {
given:
def testedAnimation = new Animation()
testedAnimation.add("one", 1).add("two", 2).add("three", 3);
when:
ticks.times {testedAnimation.advance()}
then:
testedAnimation.getCurrentImageId() == expectedId
where:
ticks << (0..6)
expectedId << ["one", ["two"].multiply(2),
["three"].multiply(3), "one"].flatten()}
22. Stubs
def "Level dimensions are acquired from the TMX loader" () {
final levelWidth = 20;
final levelHeight = 10;
given:
def tmxLoaderStub = Stub(SimpleTmxLoader)
tmxLoaderStub.getLevel() >> new int[levelHeight][levelWidth]
tmxLoaderStub.getMapHeight() >> levelHeight
tmxLoaderStub.getMapWidth() >> levelWidth
when:
def level = new LevelBuilder(tmxLoaderStub).buildLevel()
then:
level.heightInBlocks == levelHeight
level.widthInBlocks == levelWidth
}
23. Mocks
def "Three components are called during a Goomba's update"() {
given:
def aiComponentMock = Mock(AIComponent)
def keyboardInputComponentMock = Mock(KeyboardInputComponent)
def cameraComponentMock = Mock(CameraComponent)
def goomba = new Goomba(0, 0, new GameContext(new Level(10, 10, [])))
.withInputComponent(keyboardInputComponentMock)
.withAIComponent(aiComponentMock)
.withCameraComponent(cameraComponentMock)
when:
goomba.update()
then:
1 * aiComponentMock.update(goomba)
(1.._) * keyboardInputComponentMock.update(_ as MovingEntity)
(_..1) * cameraComponentMock.update(_)
}
This can get creative, like:
3 * _.update(*_)
or even:
3 * _./^u.*/(*_)
24. Some Annotations
• @Subject
• @Shared
• @Unroll("Advance #ticks and expect #expectedId")
• @Stepwise
• @IgnoreIf({ System.getenv("ENV").contains("ci") })
• @Timeout(value = 100, unit = TimeUnit.MILLISECONDS)
• @Title("One-line title of a specification")
• @Narrative("""Longer multi-line
description.""")
25. Using Visual Aids
def "A player standing still on a block won't move anywhere"() {
given: "A simple level with some ground"
def level = new StringLevelBuilder().buildLevel((String[]) [
" ",
" ",
"III"].toArray())
def gameContext = new GameContext(level)
and: "The player standing on top of it"
final int startX = BlockBase.BLOCK_SIZE;
final int startY = BlockBase.BLOCK_SIZE + 1
def player = new Player(startX, startY, gameContext, new NullInputComponent())
gameContext.addEntity(player)
def viewPort = new NullViewPort()
gameContext.setViewPort(viewPort)
when: "Time is advanced"
10.times { player.update(); viewPort.update(); }
then: "The player hasn't moved"
player.getX() == startX
player.getY() == startY
}
The level is made
visible in the test
26. def "A player standing still on a block won't move anywhere with visual aids"() {
given: "A simple level with some ground"
def level = new StringLevelBuilder().buildLevel((String[]) [
" ",
" ",
"III"].toArray())
def gameContext = new GameContext(level)
and: "The player standing on top of it"
final int startX = BlockBase.BLOCK_SIZE;
final int startY = BlockBase.BLOCK_SIZE + 1
def player = new Player(startX, startY, gameContext, new NullInputComponent())
gameContext.addEntity(player)
def viewPort = new SwingViewPort(gameContext)
gameContext.setViewPort(viewPort)
when: "Time is advanced"
10.times { slomo { player.update(); viewPort.update(); } }
then: "The player hasn't moved"
player.getX() == startX
player.getY() == startY
}
A real view port
Slow down!
27. Conclusions
• How was Spock useful?
– Test names and GWT labels really helped
– Groovy reduced the bloat
– Features for parameterized tests useful for some tests whereas mocking and
stubbing remained unutilized in this case
• Game testing
– The world is the test data - so make sure you can generate it easily
– Conciseness is crucial - because of all the math expressions
– One frame at the time - turned out to be a viable strategy for handling 60 FPS in
unit tests
– Games are huge state machines - virtually no stubbing and mocking in the core code
– The Component pattern - is more or less a must for testability
– Use visual aids - and write the unit tests so that they can run with real viewports
– Off-by-one errors - will torment you
– Test-driving is hard - because of the floating point math (the API can be teased out,
but knowing exactly where a player should be after falling and sliding for 15
frames is better determined by using an actual viewport)