You can only claim you know Spring if you fully understand the Proxy design pattern, and how the framework uses it to do its magic. Join this live-coding session to explore 6 ways of intercepting method calls that you can use to cast your own spells and dramatically simplify your codebase.
Grab a strong coffee and prepare yourself for a whirlwind of live-coding, interwoven with deep theoretical concepts and implementation details that you have to master if you are using the Spring Framework. During this session, Victor will share one of the best parts of his Design Patterns training, applied to Spring. You'll hear about the Decorator pattern plus 2 ways to wire it with Spring, bare-hands interface proxies, concrete classes proxies, @Aspect applied to custom annotations, plus some of the most common standard off-the-shelf Spring aspects. Come and learn from a hands-on practitioner real-world best practices of using Aspects, design hints, under-the-hood implementation details, debugging tips, performance impact of aspects, all in an interactive, entertaining and extremely dynamic session.
- Talk held at JPoint 2019, Moscow
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteVictor Rentea
Clean Code principles have become a cornerstone of professional developer teams worldwide. But frameworks and languages have evolved, and so have the challenges we’re facing today while crafting modern applications. Single-page apps, extremely DRY code, microservices, excessive functional programming, and reactive flows have all taken their toll on our code quality. Hop aboard this roundtrip of the most damaging Code Smells as of 2023 and fill your toolbox with a load of practical tricks you can immediately apply to your day-to-day work. All in an entertaining show spiced with live-coding moments.
Clean Pragmatic Architecture - Avoiding a MonolithVictor Rentea
Talk built based on several of my trainings: http://www.victorrentea.ro/#training
Covers: Clean/Onion/Hexagonal Architecture, Domain Entities, Value Objects, Repository, Extract When it Grows Principle, Dependency Inversion Principle, Clean Code and Design Patterns.
These are the backing slides of the talks given at JPoint 2017 and Devoxx PL 2017: https://www.youtube.com/embed/4-4ahz7zDiQ
Are you using Java8 Lambdas & Streams in your core business logic? Then you might be having this strange feeling that it’s not Java anymore: at times it’s cryptic, barely readable.. This was the topic of the workshop with the same name that I held at VoxxedDays Bucharest 2017. These are the slides backing the that workshop.
As a summary, the materials walk through the functional features of Java8, adding details along the way about how we can keep the code clean as we embrace the Java 8 features.
The entire desktop screencast + voice it's on youtube, here: https://youtu.be/uH9A37k2QkU
The Art of Unit Testing - Towards a Testable DesignVictor Rentea
Slides of the Talk I gave at Devoxx Belgium 2019.
=== Abstract ===
Focusing on the creative work without being terrified of breaking the existing behavior can make software development very addictive! Good automated tests can buy you that!
However, if your tests are not maintainable they may end up slowing you down and causing you painful headaches, compilation errors and spurious failures. To avoid that, your unit tests should be significant; expressive; clean; DRY; non-overlapping; and blazing fast. Writing good tests becomes the toughest challenge for any developer, no matter how battle-hardened: you need to balance risk with test maintenance costs, while looking out for test design smells that call for [risky] refactoring to drive your design towards a set of key principles (included:).
Principles that will end up shaping the way you craft the Production code itself. Because in the end, a good, clean design is more important than coverage%.
But testing gives you the best feedback to get there.
Grab a black coffee and join this snippet from Victor’s Pro Unit Testing #training, to learn about testing priorities, buggy tests, the shared @Before, Mocks vs Stubs and how to reduce them by "purifying" your logic, testing Legacy Code and refactoring @Spy-es out.
All of that in an entertaining, dynamic and memorable session.
Unit Testing like a Pro - The Circle of PurityVictor Rentea
Best practices on designing unit tests, designing testable production code, a glimpse of TDD, using mocks and isolating pure functions for easy testing. Talk distilled from http://victorrentea.ro/#unit-testing
Held at VoxxedDays Bucharest in March 2019.
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideVictor Rentea
Talk given at Devoxx Belgium 2019.
===== Abstract =====
Are you in a mood for a brainstorm? Join this critical review of the major decisions taken in a typical enterprise application architecture and learn to balance pragmatism with your design goals. Find out how to do just-in-time design to keep as many use-cases as simple as possible.
The core purpose of this presentation is to learn to strike a **balance between pragmatism and maintainability** in your design. Without continuous refactoring, a simple design will inevitably degenerate into a Big Ball of Mud, under the assault of the new features and bugfixes.
On the other hand, the very highly-factored code can burden the take-off of the development and end up freezing the mindset in some rigid upfront design.
The end goal of this talk is to challenge you to rethink critically the architecture of your systems and seek ways to simplify it to match your actual needs, with a pragmatic mindset. "Architecture is the art of postponing decisions", said Uncle Bob.
This talk takes this idea further and explains an optimal mindset about designing enterprise applications: Evolving (Continuously Refactoring) a Pragmatic (Simple), Clean (aka Onion) Architecture, aiming to provide Developer Safety™️ and Comfort™️.
It’s the philosophy that Victor distilled over the past 5 years, designing and implementing 9 applications as IBM Lead Architect, and delivering training and advises to many other companies.
You’ll learn how to break data into pieces (Fit Entities, Value Objects, Data Transfer Objects), how to keep the logic simple (Facades, Domain Services, logic extraction patterns, Mappers, AOP), layering to enforce boundaries (keeping DTOs out of your logic, Dependency Inversion Principle), and many more, all in a dynamic, interactive and extremely entertaining session.
Don't Be Mocked by your Mocks - Best Practices using MocksVictor Rentea
Do you ❤️ Mocks? When you write your first unit tests, especially on older codebases, mocking foreign code is key to survival. But as you grow older in the craft, you start piling up hours and days wasted to refactor fragile tests or to fix bugs that those heavy mock-based tests didn't catch. And so you start looking at Mocks differently.
Let's go through the key factors to consider to strike the optimal balance between what needs to be mocked away and what code should be tested in integration. There's sometimes a fine line there, often interwoven with strong emotions:
"Why am I testing this?"
"Argh… these tests take too long"
"Can this ever really break?"
etc...
Among the points that we'll touch on:
- Mocks vs Refactoring
- Mocks vs Reliability
- Fine vs Coarse Mocks
- Reproducibility
- Partial Mocks
- Mocking Statics
- Alternatives to Mocks
Speakers: Victor Rentea
Victor is a Java Champion and Independent Trainer with an impressive experience: thousands of developers in dozens of companies trained in dedicated company sessions. He is the founder of one of the largest developer communities in Romania, Bucharest Software Craftsmanship Community and a top international conference speaker.
To find more about him, join a live masterclass or call him in for a company dedicated training: victorrentea.ro
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteVictor Rentea
Clean Code principles have become a cornerstone of professional developer teams worldwide. But frameworks and languages have evolved, and so have the challenges we’re facing today while crafting modern applications. Single-page apps, extremely DRY code, microservices, excessive functional programming, and reactive flows have all taken their toll on our code quality. Hop aboard this roundtrip of the most damaging Code Smells as of 2023 and fill your toolbox with a load of practical tricks you can immediately apply to your day-to-day work. All in an entertaining show spiced with live-coding moments.
Clean Pragmatic Architecture - Avoiding a MonolithVictor Rentea
Talk built based on several of my trainings: http://www.victorrentea.ro/#training
Covers: Clean/Onion/Hexagonal Architecture, Domain Entities, Value Objects, Repository, Extract When it Grows Principle, Dependency Inversion Principle, Clean Code and Design Patterns.
These are the backing slides of the talks given at JPoint 2017 and Devoxx PL 2017: https://www.youtube.com/embed/4-4ahz7zDiQ
Are you using Java8 Lambdas & Streams in your core business logic? Then you might be having this strange feeling that it’s not Java anymore: at times it’s cryptic, barely readable.. This was the topic of the workshop with the same name that I held at VoxxedDays Bucharest 2017. These are the slides backing the that workshop.
As a summary, the materials walk through the functional features of Java8, adding details along the way about how we can keep the code clean as we embrace the Java 8 features.
The entire desktop screencast + voice it's on youtube, here: https://youtu.be/uH9A37k2QkU
The Art of Unit Testing - Towards a Testable DesignVictor Rentea
Slides of the Talk I gave at Devoxx Belgium 2019.
=== Abstract ===
Focusing on the creative work without being terrified of breaking the existing behavior can make software development very addictive! Good automated tests can buy you that!
However, if your tests are not maintainable they may end up slowing you down and causing you painful headaches, compilation errors and spurious failures. To avoid that, your unit tests should be significant; expressive; clean; DRY; non-overlapping; and blazing fast. Writing good tests becomes the toughest challenge for any developer, no matter how battle-hardened: you need to balance risk with test maintenance costs, while looking out for test design smells that call for [risky] refactoring to drive your design towards a set of key principles (included:).
Principles that will end up shaping the way you craft the Production code itself. Because in the end, a good, clean design is more important than coverage%.
But testing gives you the best feedback to get there.
Grab a black coffee and join this snippet from Victor’s Pro Unit Testing #training, to learn about testing priorities, buggy tests, the shared @Before, Mocks vs Stubs and how to reduce them by "purifying" your logic, testing Legacy Code and refactoring @Spy-es out.
All of that in an entertaining, dynamic and memorable session.
Unit Testing like a Pro - The Circle of PurityVictor Rentea
Best practices on designing unit tests, designing testable production code, a glimpse of TDD, using mocks and isolating pure functions for easy testing. Talk distilled from http://victorrentea.ro/#unit-testing
Held at VoxxedDays Bucharest in March 2019.
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideVictor Rentea
Talk given at Devoxx Belgium 2019.
===== Abstract =====
Are you in a mood for a brainstorm? Join this critical review of the major decisions taken in a typical enterprise application architecture and learn to balance pragmatism with your design goals. Find out how to do just-in-time design to keep as many use-cases as simple as possible.
The core purpose of this presentation is to learn to strike a **balance between pragmatism and maintainability** in your design. Without continuous refactoring, a simple design will inevitably degenerate into a Big Ball of Mud, under the assault of the new features and bugfixes.
On the other hand, the very highly-factored code can burden the take-off of the development and end up freezing the mindset in some rigid upfront design.
The end goal of this talk is to challenge you to rethink critically the architecture of your systems and seek ways to simplify it to match your actual needs, with a pragmatic mindset. "Architecture is the art of postponing decisions", said Uncle Bob.
This talk takes this idea further and explains an optimal mindset about designing enterprise applications: Evolving (Continuously Refactoring) a Pragmatic (Simple), Clean (aka Onion) Architecture, aiming to provide Developer Safety™️ and Comfort™️.
It’s the philosophy that Victor distilled over the past 5 years, designing and implementing 9 applications as IBM Lead Architect, and delivering training and advises to many other companies.
You’ll learn how to break data into pieces (Fit Entities, Value Objects, Data Transfer Objects), how to keep the logic simple (Facades, Domain Services, logic extraction patterns, Mappers, AOP), layering to enforce boundaries (keeping DTOs out of your logic, Dependency Inversion Principle), and many more, all in a dynamic, interactive and extremely entertaining session.
Don't Be Mocked by your Mocks - Best Practices using MocksVictor Rentea
Do you ❤️ Mocks? When you write your first unit tests, especially on older codebases, mocking foreign code is key to survival. But as you grow older in the craft, you start piling up hours and days wasted to refactor fragile tests or to fix bugs that those heavy mock-based tests didn't catch. And so you start looking at Mocks differently.
Let's go through the key factors to consider to strike the optimal balance between what needs to be mocked away and what code should be tested in integration. There's sometimes a fine line there, often interwoven with strong emotions:
"Why am I testing this?"
"Argh… these tests take too long"
"Can this ever really break?"
etc...
Among the points that we'll touch on:
- Mocks vs Refactoring
- Mocks vs Reliability
- Fine vs Coarse Mocks
- Reproducibility
- Partial Mocks
- Mocking Statics
- Alternatives to Mocks
Speakers: Victor Rentea
Victor is a Java Champion and Independent Trainer with an impressive experience: thousands of developers in dozens of companies trained in dedicated company sessions. He is the founder of one of the largest developer communities in Romania, Bucharest Software Craftsmanship Community and a top international conference speaker.
To find more about him, join a live masterclass or call him in for a company dedicated training: victorrentea.ro
Backing slides for the mini-talk requested by the audience about how Spring @Transactional actually works. (Extract from my Spring Framework Training). See www.victorrentea.ro/#spring for more details about the full training
Decades ago, IT started as a single engineering practice, but as time passed by it got increasingly fragmented. Conflicts broke out between testers vs developers vs sysadmins vs DBAs vs many other roles. Recently, developers themselves split into many subspecialties like backend/frontend/iOS/Android/microservices/functions/etc. The overspecialization we face today causes huge communication overhead, a low bus factor, lack of responsibility, blaming, repeated isolated patching and fulminating costs. The software craftsmanship movement is rising in this post-agile world with professionals eager to take control of their careers and continuously learn in the pursuit of mastery. This talk will show you practical ways in which to seed a continuous learning culture in your team or company, and foster the enthusiasm of your developers.
The tests are trying to tell you something@VoxxedBucharest.pptxVictor Rentea
If tests are hard to write, the production design is crappy - goes an old saying. Indeed, writing unit tests gives you one of the most comprehensive, yet brutal, feedback about the design of your production code, but if it comes too late, many developers can’t stand it anymore and they will either stop testing or test more superficially. At the other extreme, others struggle to write contrived, fragile tests full of mocks that end up frustrating more than helping them. This talk reviews the main hints that unit tests provide you, from the most obvious improvements to some of the most subtle design principles.
Slides of the talk held at JEEConf, Kiev and jPrime, Sofia. A personal view on the classic topics from the Uncle Bob's Clean Code bible, with some personal additions and tips&tricks. This topic actually represents the core of the training sessions that I provide as an independent trainer (www.victorrentea.ro)
You will learn why naming is really difficult if done right, why coding and style guidelines are crucial, code structuring, exception handling and why other elements of coding often define the tipping point between success and failure of projects. Following the principles of software craftsmanship will allow you to end up with better maintainability and extensibility of your software and the success of the project in the end. All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation.
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
Functional Patterns with Java8 @Bucharest Java User GroupVictor Rentea
The slides for the presentation I gave at Bucharest Java User Group. This session was the largest Romanian Java community meetup ever organized until now.
How should a professional software developer behave in code? What guidelines should one follow? How should we name our constructs? What about OOP principles? What's their real use?
This classic training module in my training curricula is the cornerstone of my professionalism. These are my conduit guidelines at work. I've held this training > 10 times, including at Voxxed Days Bucharest 2016 and at a Bucharest Java User Group meetup.
Slides for my deep dive session at Devoxx Belgium 2019.
Main concepts:
OOP, Functional Programming, Functions, Feature Envy, Design, Refactoring, Extract Method, Signatures, side effects, pure functions, programming paradigms, emotions
Abstract:
Would you attach your last commit to your CV:
"Sample: how I write code"?
What do others think of your code?
Writing Clean Code: an old topic, but never less important, nor challenging than today!
During the first part of this deep-dive session, we will go through the essential clean code rules, learning to detect code smells, discussing refactoring ideas and alternative designs pros/cons.
Then, after the break, we will apply what we learned in a refactoring live-coding kata, explaining 10 key practical techniques you can immediately apply in your code. By the end of the session, you will have a clear picture of what clean code means and quite a variety of ways at hand to get there.
Along the way, we will also point out the differences between procedural/oop/functional paradigms and whether they are competing or complementary, speak in detail about Extract Method, statefulness, separation by layers of abstractions, OOP, and many more.
Can't wait to share my greatest passion with you: writing professional, expressive code that is a pleasure to work with.
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way.
You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained. This presentation is based on C# and Visual Studio 2012. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture. However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2015-06-25 Bay.NET South Bay, Mountain View, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
This talk is about Nestjs and how it can help you build clean Nodejs backend apps, we will be covering also essential web development and JavaScript must know technologies and tools such as TypeScript and others.
Clean architecture - Protecting the DomainVictor Rentea
The goal of architecture is to simplify the most complex parts of your logic. Any other goal should be secondary to this. The problem is that you can’t always anticipate where the complexity of your application will accumulate, especially when confronted with ever-changing requirements. The only way to keep your code simple is to gradually evolve the architecture without adding useless complexity up front, but always looking out for opportunities to break-down and refactor towards the most simple design that solves the problem. Drawing concepts from the Domain-Driven Development mindset, this talk summarizes the most important lessons learned designing and consulting many real-world projects. Along the way, you’ll hear about Value Objects and Entities, DTOs, Dependency Inversion Principle, Facades, the Onion Architecture and many pragmatic tips and tricks immediately applicable to your day-to-day work.
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...Christopher Frohoff
Object deserialization is an established but poorly understood attack vector in applications that is disturbingly prevalent across many languages, platforms, formats, and libraries.
In January 2015 at AppSec California, Chris Frohoff and Gabe Lawrence gave a talk on this topic, covering deserialization vulnerabilities across platforms, the many forms they take, and places they can be found. It covered, among other things, somewhat novel techniques using classes in commonly used libraries for attacking Java serialization that were subsequently released in the form of the ysoserial tool. Few people noticed until late 2015, when other researchers used these techniques/tools to exploit well known products such as Bamboo, WebLogic, WebSphere, ApacheMQ, and Jenkins, and then services such as PayPal. Since then, the topic has gotten some long-overdue attention and great work is being done by many to improve our understanding and developer awareness on the subject.
This talk will review the details of Java deserialization exploit techniques and mitigations, as well as report on some of the recent (and future) activity in this area.
http://www.meetup.com/Open-Web-Application-Security-Project-San-Diego-OWASP-SD/events/226242635/
Slides from the NestJS MasterClass.
We learned how to build JavaScript server-side applications with NestJS - A progressive NodeJS framework built with TypeScript.
You can find the code on GitHub:
https://github.com/nirkaufman/task-manager
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Theo Jungeblut
Clean Code presentation for the Silicon Valley Code Camp 2011 based on the Clean Code Developer initiative created in Germany by Ralf Westphal & Stefan Lieser. Showing how to improve Code Quality by applying
Best Practices and Design Pattern while utilizing existing tools for better maintainable code.
Big data never stops and neither should your Spark jobs. They should not stop when they see invalid input data. They should not stop when there are bugs in your code. They should not stop because of I/O-related problems. They should not stop because the data is too big. Bulletproof jobs not only keep working but they make it easy to identify and address the common problems encountered in large-scale production Spark processing: from data quality to code quality to operational issues to rising data volumes over time.
In this session you will learn three key principles for bulletproofing your Spark jobs, together with the architecture and system patterns that enable them. The first principle is idempotence. Exemplified by Spark 2.0 Idempotent Append operations, it enables 10x easier failure management. The second principle is row-level structured logging. Exemplified by Spark Records, it enables 100x (yes, one hundred times) faster root cause analysis. The third principle is invariant query structure. It is exemplified by Resilient Partitioned Tables, which allow for flexible management of large scale data over long periods of time, including late arrival handling, reprocessing of existing data to deal with bugs or data quality issues, repartitioning already written data, etc.
These patterns have been successfully used in production at Swoop in the demanding world of petabyte-scale online advertising.
Backing slides for the mini-talk requested by the audience about how Spring @Transactional actually works. (Extract from my Spring Framework Training). See www.victorrentea.ro/#spring for more details about the full training
Decades ago, IT started as a single engineering practice, but as time passed by it got increasingly fragmented. Conflicts broke out between testers vs developers vs sysadmins vs DBAs vs many other roles. Recently, developers themselves split into many subspecialties like backend/frontend/iOS/Android/microservices/functions/etc. The overspecialization we face today causes huge communication overhead, a low bus factor, lack of responsibility, blaming, repeated isolated patching and fulminating costs. The software craftsmanship movement is rising in this post-agile world with professionals eager to take control of their careers and continuously learn in the pursuit of mastery. This talk will show you practical ways in which to seed a continuous learning culture in your team or company, and foster the enthusiasm of your developers.
The tests are trying to tell you something@VoxxedBucharest.pptxVictor Rentea
If tests are hard to write, the production design is crappy - goes an old saying. Indeed, writing unit tests gives you one of the most comprehensive, yet brutal, feedback about the design of your production code, but if it comes too late, many developers can’t stand it anymore and they will either stop testing or test more superficially. At the other extreme, others struggle to write contrived, fragile tests full of mocks that end up frustrating more than helping them. This talk reviews the main hints that unit tests provide you, from the most obvious improvements to some of the most subtle design principles.
Slides of the talk held at JEEConf, Kiev and jPrime, Sofia. A personal view on the classic topics from the Uncle Bob's Clean Code bible, with some personal additions and tips&tricks. This topic actually represents the core of the training sessions that I provide as an independent trainer (www.victorrentea.ro)
You will learn why naming is really difficult if done right, why coding and style guidelines are crucial, code structuring, exception handling and why other elements of coding often define the tipping point between success and failure of projects. Following the principles of software craftsmanship will allow you to end up with better maintainability and extensibility of your software and the success of the project in the end. All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation.
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
Functional Patterns with Java8 @Bucharest Java User GroupVictor Rentea
The slides for the presentation I gave at Bucharest Java User Group. This session was the largest Romanian Java community meetup ever organized until now.
How should a professional software developer behave in code? What guidelines should one follow? How should we name our constructs? What about OOP principles? What's their real use?
This classic training module in my training curricula is the cornerstone of my professionalism. These are my conduit guidelines at work. I've held this training > 10 times, including at Voxxed Days Bucharest 2016 and at a Bucharest Java User Group meetup.
Slides for my deep dive session at Devoxx Belgium 2019.
Main concepts:
OOP, Functional Programming, Functions, Feature Envy, Design, Refactoring, Extract Method, Signatures, side effects, pure functions, programming paradigms, emotions
Abstract:
Would you attach your last commit to your CV:
"Sample: how I write code"?
What do others think of your code?
Writing Clean Code: an old topic, but never less important, nor challenging than today!
During the first part of this deep-dive session, we will go through the essential clean code rules, learning to detect code smells, discussing refactoring ideas and alternative designs pros/cons.
Then, after the break, we will apply what we learned in a refactoring live-coding kata, explaining 10 key practical techniques you can immediately apply in your code. By the end of the session, you will have a clear picture of what clean code means and quite a variety of ways at hand to get there.
Along the way, we will also point out the differences between procedural/oop/functional paradigms and whether they are competing or complementary, speak in detail about Extract Method, statefulness, separation by layers of abstractions, OOP, and many more.
Can't wait to share my greatest passion with you: writing professional, expressive code that is a pleasure to work with.
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way.
You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained. This presentation is based on C# and Visual Studio 2012. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture. However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2015-06-25 Bay.NET South Bay, Mountain View, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
This talk is about Nestjs and how it can help you build clean Nodejs backend apps, we will be covering also essential web development and JavaScript must know technologies and tools such as TypeScript and others.
Clean architecture - Protecting the DomainVictor Rentea
The goal of architecture is to simplify the most complex parts of your logic. Any other goal should be secondary to this. The problem is that you can’t always anticipate where the complexity of your application will accumulate, especially when confronted with ever-changing requirements. The only way to keep your code simple is to gradually evolve the architecture without adding useless complexity up front, but always looking out for opportunities to break-down and refactor towards the most simple design that solves the problem. Drawing concepts from the Domain-Driven Development mindset, this talk summarizes the most important lessons learned designing and consulting many real-world projects. Along the way, you’ll hear about Value Objects and Entities, DTOs, Dependency Inversion Principle, Facades, the Onion Architecture and many pragmatic tips and tricks immediately applicable to your day-to-day work.
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...Christopher Frohoff
Object deserialization is an established but poorly understood attack vector in applications that is disturbingly prevalent across many languages, platforms, formats, and libraries.
In January 2015 at AppSec California, Chris Frohoff and Gabe Lawrence gave a talk on this topic, covering deserialization vulnerabilities across platforms, the many forms they take, and places they can be found. It covered, among other things, somewhat novel techniques using classes in commonly used libraries for attacking Java serialization that were subsequently released in the form of the ysoserial tool. Few people noticed until late 2015, when other researchers used these techniques/tools to exploit well known products such as Bamboo, WebLogic, WebSphere, ApacheMQ, and Jenkins, and then services such as PayPal. Since then, the topic has gotten some long-overdue attention and great work is being done by many to improve our understanding and developer awareness on the subject.
This talk will review the details of Java deserialization exploit techniques and mitigations, as well as report on some of the recent (and future) activity in this area.
http://www.meetup.com/Open-Web-Application-Security-Project-San-Diego-OWASP-SD/events/226242635/
Slides from the NestJS MasterClass.
We learned how to build JavaScript server-side applications with NestJS - A progressive NodeJS framework built with TypeScript.
You can find the code on GitHub:
https://github.com/nirkaufman/task-manager
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Theo Jungeblut
Clean Code presentation for the Silicon Valley Code Camp 2011 based on the Clean Code Developer initiative created in Germany by Ralf Westphal & Stefan Lieser. Showing how to improve Code Quality by applying
Best Practices and Design Pattern while utilizing existing tools for better maintainable code.
Big data never stops and neither should your Spark jobs. They should not stop when they see invalid input data. They should not stop when there are bugs in your code. They should not stop because of I/O-related problems. They should not stop because the data is too big. Bulletproof jobs not only keep working but they make it easy to identify and address the common problems encountered in large-scale production Spark processing: from data quality to code quality to operational issues to rising data volumes over time.
In this session you will learn three key principles for bulletproofing your Spark jobs, together with the architecture and system patterns that enable them. The first principle is idempotence. Exemplified by Spark 2.0 Idempotent Append operations, it enables 10x easier failure management. The second principle is row-level structured logging. Exemplified by Spark Records, it enables 100x (yes, one hundred times) faster root cause analysis. The third principle is invariant query structure. It is exemplified by Resilient Partitioned Tables, which allow for flexible management of large scale data over long periods of time, including late arrival handling, reprocessing of existing data to deal with bugs or data quality issues, repartitioning already written data, etc.
These patterns have been successfully used in production at Swoop in the demanding world of petabyte-scale online advertising.
Neal Ford Emergent Design And Evolutionary ArchitectureThoughtworks
ThoughtWorks Luminary and Conference Presenter Extraordinaire Neal Ford will be presenting:
Emergent Design & Evolutionary Architecture
Most of the software world has realised that Big Design Up Front (BDUF) doesn’t work well in software. But lots of developers struggle with this notion when it applies to architecture and design, surely you can’t start coding, right? You need some level of understanding before you can start work.
This seminar will explore the current thinking about Emergent Design and Evolutionary Architecture, including:
• Proactive approaches with test driven development
• Reactive approaches including both refactoring and composed methods
• Strategies and techniques for allowing design to emerge from projects as they proceed, keeping your code in sync with the problem domain
• Real world examples of these techniques in action
Neal Ford, Software Architect and Meme Wrangler, ThoughtWorks
Neal is an acclaimed international speaker and expert on designing and building of large-scale enterprise applications. Neal has spoken at over 100 conferences worldwide, delivering more than 600 talks. Neal is also the designer and developer of applications, instructional materials, magazine articles, courseware, video/DVD presentations and author and/or editor of 6 books spanning a variety of technologies, including the most recent The Productive Programmer.
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinAlessandro Nadalin
A look at how we try to make our architecture robust, resilient and fun to work with: Namshi is not github or spotify but... ...imitation is the sincerest form of flattery!
The modern web is feature-rich and fast, and Dart gives you a familiar and productive toolchain to scale up your code and apps. Come learn what's new with the Dart project, and how you can use the class-based language, rich built-in libraries, productive editor, package manager, and more. You want more? How about Web Components and a Future-based DOM! You'll see lots of demos, with special attention to the Dart-to-JavaScript compiler.
JavaScript is a scripting language most commonly implemented in browsers that has been used for several decades now to enrich web-based applications. A a dynamically typed language that was rapidly developed for a narrow purpose, JavaScript has many nuances that make it difficult to manage in large enterprise applications. TypeScript was developed as the answer to provide a way to build large JavaScript applications without changing the language itself. TypeScript is a superset of JavaScript that provides mostly development-time features such as auto-completion, type checking, and discovery of interfaces. Learn from Wintellect principal consultant Jeremy Likness about the challenges JavaScript brings to enterprise development and how TypeScript provides an elegant solution through its implementation of types, interfaces, classes, modules and definitions.
Evolving a Clean, Pragmatic Architecture at JBCNConf 2019Victor Rentea
Are you in a mood for a brainstorm? Join this critical review of the major decisions taken in a typical enterprise application architecture and learn to balance pragmatism with your design goals. Find out how to do just-in-time design to keep as much use-cases as simple as possible. The core purpose of this presentation is to learn to strike a **balance between pragmatism and maintainability** in your design. Without continuous refactoring, a simple design will inevitably degenerate into a Big Ball of Mud, under the assault of the new features and bugfixes. On the other hand, very highly-factored code can burden the take-off of the development and end up freezing the mindset in some rigid 'a-priori' design. The end goal of this talk is to challenge you to rethink critically the architecture of your own systems, and seek ways to simplify it to match your actual needs, with a pragmatic mindset. "Architecture is the art of postponing decisions", said Uncle Bob. This talk takes this idea further and explains an optimal mindset about designing enterprise applications: Evolving (Continuously Refactoring) a Pragmatic (Simple), Clean (aka Onion) Architecture, aiming to provide Developer Safety™️ and Comfort™️. It’s the philosophy that Victor distilled over the past 5 years, designing and implementing 9 applications as IBM Lead Architect, and delivering trainings and advises to many other companies. You’ll learn how to break data into pieces (Fit Entities, Value Objects, Data Transfer Objects), how to keep the logic simple (Facades, Domain Services, logic extraction patterns, Mappers, AOP), layering to enforce boundaries (keeping DTOs out of your logic, Dependency Inversion Principle), and many more, all in a dynamic, interactive and extremely entertaining session.
Similar to The Proxy Fairy, and The Magic of Spring Framework (20)
Tracing the root cause of a performance issue requires a lot of patience, experience, and focus. It’s so hard that we sometimes attempt to guess by trying out tentative fixes, but that usually results in frustration, messy code, and a considerable waste of time and money. This talk explains how to correctly zoom in on a performance bottleneck using three levels of profiling: distributed tracing, metrics, and method profiling. After we learn to read the JVM profiler output as a flame graph, we explore a series of bottlenecks typical for backend systems, like connection/thread pool starvation, invisible aspects, blocking code, hot CPU methods, lock contention, and Virtual Thread pinning, and we learn to trace them even if they occur in library code you are not familiar with. Attend this talk and prepare for the performance issues that will eventually hit any successful system.
About authorWith two decades of experience, Victor is a Java Champion working as a trainer for top companies in Europe. Five thousands developers in 120 companies attended his workshops, so he gets to debate every week the challenges that various projects struggle with. In return, Victor summarizes key points from these workshops in conference talks and online meetups for the European Software Crafters, the world’s largest developer community around architecture, refactoring, and testing. Discover how Victor can help you on victorrentea.ro : company training catalog, consultancy and YouTube playlists.
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
The microservices honeymoon is over. When starting a new project or revamping a legacy monolith, teams started looking for alternatives to microservices. The Modular Monolith, or 'Modulith', is an architecture that reaps the benefits of (vertical) functional decoupling without the high costs associated with separate deployments. This talk will delve into the advantages and challenges of this progressive architecture, beginning with exploring the concept of a 'module', its internal structure, public API, and inter-module communication patterns. Supported by spring-modulith, the talk provides practical guidance on addressing the main challenges of a Modultith Architecture: finding and guarding module boundaries, data decoupling, and integration module-testing. You should not miss this talk if you are a software architect or tech lead seeking practical, scalable solutions.
About the author
With two decades of experience, Victor is a Java Champion working as a trainer for top companies in Europe. Five thousands developers in 120 companies attended his workshops, so he gets to debate every week the challenges that various projects struggle with. In return, Victor summarizes key points from these workshops in conference talks and online meetups for the European Software Crafters, the world’s largest developer community around architecture, refactoring, and testing. Discover how Victor can help you on victorrentea.ro : company training catalog, consultancy and YouTube playlists.
The network is reliable, has zero latency, with infinite, free bandwidth... And then you wake up. The plan was to go to microservices to build those reliable, super-scalable systems you saw in the ad. But your systems only communicate over synchronous protocols and the team never had a serious discussion about timeouts, retries, circuit breakers, and bulkhead patterns. If that’s your crude reality, please attend this session!
One of the many challenges of a distributed architecture is preserving the consistency of data across different systems. During this one-hour presentation, we are going to explore a number of strategies for maintaining consistency, going from the most basic options up to an automated recovery mechanism using compensations and reservations - what’s commonly referred to as a “saga” pattern. Our journey will be based on a hypothetical food delivery application on which we will analyze various decisions and their tradeoffs. The discussion will stay at an abstract, architectural level for the most part, with only a few code examples.
In the agenda:
- Idempotency and Retries
- 2 Phase Commit
- Eventual Consistency
- Compensations
- Reservations
- The Saga Pattern
Testing strategies for modern software architectures are evolving. As we transition from monolithic structures to team-sized microservices with crisp APIs aligned to bounded contexts, we encounter more stable testing surfaces. This shift leads many high-performing teams to favor integration tests over fine-grained, brittle unit tests. These integration tests, which are closer to the functional requirements, prove more trustworthy and are more resilient to internal refactoring, though they may come with a higher cost. In a vivid and engaging style, this talk addresses the primary challenges of integration testing in the microservices era: cognitive overload, test isolation, and test execution speed. Join the testing revolution and discover how to enhance your team's testing efficiency and effectiveness.
Ready for a deep dive into the world's most challenging programming paradigm? Reactive programming can simplify asynchronous and event-driven applications, but without a strong understanding, it can lead to frustration, recurring patchwork, missed deadlines, and costly bugs.
In this intensive three-hour session, we'll transition a traditional Spring application to WebFlux, revealing patterns and aanti-patterns when working with repositories, REST APIs, queues, and legacy libraries. You'll gain a clear understanding of often overlooked but critical aspects like subscribe signal, errors, cancellation, and signal loss. As a bonus, we'll debate the future of Reactive vs Virtual Threads, production-ready in Java 21.
This session is crucial for developers already working with reactive programming or those intending to make the leap.
Testing is fundamental in software development. Quality gates demand high coverage levels, pull requests need sufficient tests, leading to teams spending considerable time writing and maintaining them. But are we using our tests to their full potential?
'If code is hard to test, the design can be improved'. Starting from this mantra, this deep-dive session unveils hints to simplify code, break-down complexity, and effectively use functional programming. We'll delve into topics like fixture creep, partial mocks, onion architecture, and pure functions, providing numerous best practices and practical tips for your testing.
Be warned: This session may significantly disrupt your work routine and will likely change how you see testing. Attend at your own risk.
The biggest challenge in performance tuning is identifying the root cause of the bottleneck. Once you find it, the fix often becomes trivial. However, this detective work takes patience, skills, and effort, so we often attempt to guess the cause, by trying out tentative fixes. The result: messy code, waste of time and money, and frustration. During this talk you will learn how to correctly zoom in on the bottleneck using three levels of profiling: distributed tracing with Zipkin, metrics with Micrometer, and profiling with the Java Flight Recorder already built into your JVM. We’ll focus on the latter and learn how to read a flame graph to trace some common issues of backend systems like connection/thread pool starvation, time-consuming aspects, hot methods, and lock contention, even if these occur in library code you did not write.
Slides for my presentation about OAuth, going in depth in the details of the Authorization Code Grant and PKCE, also describing several security threats to OAuth
Throughout the years, the Concentric Architectures (Onion, Hexagonal, Clean-..) have grown into the undisputed leader among backend systems architectures. With the rise of Domain-Driven Design, keeping your Domain ring 'agnostic' to the outside world has become the norm today. But history proved that any 'norm' in software architectures will cause overengineering if applied without criticism.
After a brief recap of these architectures, their pitfalls, and weaknesses, we'll see two alternatives that segregate code not in 'layers' or 'rings' but in vertical slices: Feature Slicing and Modular Monolith.
[Feature Slicing](vertical Slice Architecture) (aka *UseCase) has its own pitfalls and weaknesses, that we'll briefly review. But this will just warm us up for the next style.
Modular Monolith (aka Modulith) is an architecture style that helped many companies break their legacy codebases, and smoothly move to microservices. Most of the techniques discussed here can also come handy when one single microservice grew big and needs to be broken down.
Even more, greenfield projects today opt for this architecture instead of microservices, to avoid paying the high cost of distributability. Imagine cohesive but decoupled modules living in the same code base & deployment, but on which different teams work in harmony, delivering more value much faster than an equivalent microservice ecosystem.🦄
On the agenda:
- patterns to break data structures
- how to protect Domains inside modules
- communication patterns between modules
- breaking cyclic dependencies
Software Craftsmanship @Code Camp Festival 2022.pdfVictor Rentea
Decades ago, IT started as a single engineering practice, but over the years it grew increasingly fragmented. The overspecialization we face today, in the context of a management-first agile transformation leads to a lack of responsibility, blaming games, repeated patching, painful communication overhead, and fulminating costs. The software craftsmanship movement is rising in this post-agile world with professionals that take control of their careers and continuously learn in the pursuit of mastery. But changing mindset requires determined team efforts and communities, especially when working remotely. What techniques and tricks can you use to grow such a culture of learning in your team? Find out from the founder and lead of one of the largest software craftsmanship communities in the world.
This talk is about technical culture and attitude.
Tests are hard to write if the production design is crappy - goes an old saying. Indeed, writing unit tests gives you one of the most comprehensive, yet brutal, feedback about the design of your production code, but if it comes too late, many developers can’t take it and they will either stop testing or test superficially. At the other end, others struggle to write contrieved, fragile tests full of mocks that end up frustrating more than helping them. This talk reviews the main hints that unit tests provide you, from the most obvious improvements to some of the most subtle design principles.
Refactoring blockers and code smells @jNation 2021Victor Rentea
The only way to survive in a codebase is by refactoring continuously. We know that since the Extreme Programming days. But what stops us from doing so today? In this talk, Victor summarizes what he learned discussing Clean Code and Refactoring with hundreds of teams throughout the world. You'll find ideas to tackle a broad spectrum of factors: technical, cultural, psychological, emotional, social, and even political. Using these you might unlock the freedom to refactor for you and your colleagues.
After this roundtrip, the talk briefly overviews several of the most dangerous code smells in the projects today: God Class, Duplicated Code vs Divergent Code, Temporal Coupling, Middle Man, Speculative Generality, Mutable Long-Lived State, Comments, and more. For each of them we’ll discuss a typical workaround, plus several subtleties and variations.
Hibernate and Spring - Unleash the MagicVictor Rentea
The most popular Java Frameworks today: Hibernate and Spring. Both rely on magic to make things *seem* simple to novices, but both also hide dark tenets that only the initiate will discover. This live-coding session will reveal the magic at their integration points, discussing transaction propagation, Spring Data Jpa repositories, audit support, proxies, plus several more aspects interesting for any engineer that wants to know what’s under the hood. Grab a coffee and join an entertaining, dynamic session and ask all your questions to debate together.
Held at J-Spring Jun 2021
Integration testing with spring @JAX MainzVictor Rentea
Our sleep is better with longer-scoped tests. Our life is brighter if we don’t rely heavily on fine-grained tests that break whenever we refactor even the smallest detail. I’m talking about tilting the balance towards more integration than unit testing. And for that, let’s look at the testing features offered by the most used Java Framework today. We’ll see how to write fake test implementations, how to mock an unwanted Spring bean, what a Transactional Test is, and if and how to test your web endpoints. Along the way, we’ll also see Flaky tests, and discuss best practices about integration testing – all in an entertaining live coding session.
Your takeaways from this talk will be a lot of good practices and techniques directly applicable to your day-to-day project.
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021Victor Rentea
You can only claim you know Spring if you fully understand the Proxy design pattern and how the framework uses it to do its magic. Join this live coding session to explore 6 ways of intercepting method calls that you can use to cast your own spells and dramatically simplify your codebase.
Grab a strong coffee and prepare yourself for a whirlwind of **live-coding**, interwoven with **deep theoretical concepts and implementation details** that you need to master if you are using the Spring Framework. We’ll start from a Decorator pattern implementation, proving 2 ways to wire it with Spring, then move to bare-hands interface proxies, concrete classes proxies, @Aspect applied to custom annotations, plus some standard off-the-shelf Spring aspects.
Join this talk and learn real-world best practices to use with Aspects, design hints, under-the-hood implementation details, debugging tips, and performance impact of aspects. All in an interactive, entertaining, and extremely dynamic session.
Pure functions and immutable objects @dev nexus 2021Victor Rentea
aaaaThis presentation focuses on two of the most advanced design tools in your toolbox, whatever the language or framework you might be using. After understanding the basics, we'll see how these concepts can be used in real-world scenarios to simplify those several most complex use-cases in your application. At the end of a mix of slides and live-coding, you'll finally understand the power of these ideas and become prepared to apply them in your day-to-day work.
Along the way, we'll introduce concepts like Side Effects, Idempotency, Referential Transparency, Pure Functions and Deep/Shallow Immutability. Also, we'll talk about the powerful Functional Code / Imperative Shell architecture that you can use for your complex workflows.
Prepare for an entertaining, highly interactive session that will answer all your questions.
Written in Java and spoken in English.
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Victor Rentea
A Pragmatic approach to work with exceptions in Java. Talk recording: https://www.youtube.com/watch?v=LRwCE7GreSM&feature=youtu.be
Discussing checked exceptions, Vavr, Lombok, and JooL library, Spring Framework and many more.
Supporting in-depth article series: https://victorrentea.ro/blog/exception-handling-guide-in-java/
First, what are they? And why they are important? What do they allow us to do, and what problems do they shield us from?
After this talk, you'll inevitably fall in love with pure functions and immutable objects. We'll see how to implement them in Java, in the most geek ways possible, concerned about long-term maintainability of the code. Oh, and we'll also have Lombok and records along the way, plus lots of fun while tasting a bit of "a senior developer's night-life".
Given at jLove Dec 2020
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Modern design is crucial in today's digital environment, and this is especially true for SharePoint intranets. The design of these digital hubs is critical to user engagement and productivity enhancement. They are the cornerstone of internal collaboration and interaction within enterprises.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Strategies for Successful Data Migration Tools.pptxvarshanayak241
Data migration is a complex but essential task for organizations aiming to modernize their IT infrastructure and leverage new technologies. By understanding common challenges and implementing these strategies, businesses can achieve a successful migration with minimal disruption. Data Migration Tool like Ask On Data play a pivotal role in this journey, offering features that streamline the process, ensure data integrity, and maintain security. With the right approach and tools, organizations can turn the challenge of data migration into an opportunity for growth and innovation.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
6. Victor Rentea
14 years of Java
Clean Code Evangelist
VictorRentea.ro
30+ talks, 12 meetups
.NET
Lead Architect
Tech Team Lead and Consultant
Software Craftsman
XP: Pair Programming, Refactoring, TDD
7. VictorRentea.ro @victorrentea victor.rentea@gmail.com
Independent
Technical Trainer & Coach
HibernateSpring Java 8
Architecture, DDDDesign Patterns
Clean Code Unit Testing, TDD
Java Performance and much more…Scala
180+ days1300 devs6 years
VictorRentea.rovictor.rentea@gmail.com
30 companies
Posting daily on
8.
9.
10.
11.
12. ▪Log the arguments passed to m1()
▪The same for m2(), please
▪And for m3,m4,...m30
▪I love it! I want the same
for all methods in this package
copy-paste
A Success Story
?!!...Argh!!... copy-paste ...
You add a log.debug(...) in m1
You copy-paste in m2 and adjust it
Whaat?!!! ... copy-paste in 110 methods.
You feel bad. For 5 minutes.
Next task...
copy-paste
copy-paste
Time passes by
13. ▪BUG: a method
is not logged !!!%@^!
Time passes by
(2 weeks later)
I’ll put this method here...
▪Please change the log format Oh boy! 1, 2, 3, .. 109, Done!
I my job!▪BUG: you missed a spot !!!%@^!
A Success Story
14.
15. ▪Log the arguments passed to m1()
▪The same for m2(), please
▪And for m3,m4,...m30
▪I love it! I want the same
for all methods in this package
copy-paste
A Success Story
?!!...Argh!!... copy-paste ...
You add a log.debug(...) in m1
You copy-paste in m2 and adjust it
Whaat?!!! ... copy-paste in 110 methods.
You feel bad. For 5 minutes.
Next task...
copy-paste
copy-paste
Time passes by
16. copy-pasteNever logic
R
decompose it in smaller methods
and call them as you need
Don’t Repeat Yourself
The Capital Sin in Programming
copy-pastecopy-paste
D Y
17. What if I could magicaly
intercept method calls
and do stuff for each call ?
Aspect-Oriented Programming
Logging
Transactions
Access Control
Audit
...
“Cross-cutting concerns”:
“But I will still need to add one line in each method!
18. placeholder intermediating interactions with an object
•The client wants to work with the Real Subject
•But we trick him to intercept his calls, to do
(1) AOP
(2) Remote calls (RMI, Web Services)
Proxy
«interface»
Subject
someMethod()
RealSubject
someMethod()
Proxy
someMethod()
represents
calls
actually uses
generated
19. do more things in an object’s methods, by composition
• Implement the Subject interface,
execute code before/after/instead calling the real method
➢Can be nested: new Decor1(new Decor2(original));
➢Usually written by hand
Decorator
Proxy«interface»
Subject
someMethod()
RealSubject
someMethod()
Proxy
someMethod()
represents
calls
actually uses
Decorator
delegate
someMethod()
20. •Decorator + Proxy Patterns
•Interface Proxies
•Class Proxies
•In-depth Spring AOP
•Custom Aspects - Best Practices
Contents
21.
22. Every time you don’t understand how Spring does something…
it's a Proxy
@Cacheable
@Transactional
@Aspect
@Async
@Secured
@Validated
Request/Thread scope
…
The Magic of Spring
23. class A {
private B b;
...
}
class BImpl
implements B {
...
}
interface B {
...
}
Interface Proxy
has a
:A
B
:BImpl
implem
call
Static
Runtime
implem
proxy
Created at run-time with
java.lang.reflect.Proxy
24. class A {
private B b;
...
}
interface B {
...
}
Class Proxy
has a
:A
B
:B
call
Static
Runtime
proxy
Concrete classes are proxyied
via bytecode generation
class B {
extends
*
*
25. •A method of a non-Spring bean?
•A final method/class?
• For a class-proxy:
•Field access?
•A private method call?
Can AOP Intercept…
NO!
NO!
NO!
Well…
Actually…
You know…
You can do any of that via:
Bytecode Enhancement
(compile-time hacking)
Or Instrumentation
(classload-time hacking)
NO!
26. •Autowiring yourself ?
•@Autowired ApplicationContext + getBean(T)
•@Autowired ObjectFactory<> + getObject()
•@Lookup method
•AopContext.currentProxy()
Call Yourself via a Proxy
To intercept a local call,
AopContext.currentProxy()
29. - an AOP Alternative -
Functional Programming
"Execute Around" Pattern
transactionTemplate.execute(this::methodInNewTx);
30. I found my code!
The Hamburger Problem
Proxies
What the heck is the rest?!
in front of any class with 1+ methods to intercept
Are you sure you want to know?
stacktrace
31. How can Aspects
(invisible logic)
communicate?
What is shared?
(within an invocation)
ThreadLocal
(invisible data)
32.
33. ThreadLocal Data -- what about @Async calls?
Propagate Thread Data
to worker threads
Hunt me
afterwards
34. •Decorator + Proxy Patterns
•Interface Proxies
•Class Proxies
•In-depth Spring AOP
•Custom Aspects - Best Practices
Contents
35. @annotation(my.proj.Logged)
annotation-based weaving
Designing Custom Aspects - Best Practices
@Around("execution(* *(..)) && @within(my.proj.Facade))")
public Object logAround(ProceedingJoinPoint point) { … }
make them visible
@Facade
public class ExpensiveOps {
@Logged
public Boolean isPrime(int n) {…}
}
36. Designing Custom Aspects - Best Practices
"execution(* com.mycomp.proj.facade.*.*(..))"
instead of
package name
or
class name
"execution(* com.mycomp..*DAO.*(..))"
annotation-based weaving
37. keep them light
Designing Custom Aspects - Best Practices
synchronized
files
database
http
don't intercept insane-rate calls
38. Designing Custom Aspects - Best Practices
I did that!
don't intercept insane-rate calls
alternatives:
Execute-AroundFP
BeanPostProcessor
CPP
40. Average Error (99.9%) Unit
Cache Method 357.7 ± 11.7
us/op
Decorator 355.1 ± 6.0
Interface Proxy 398.7 ± 28.0
Class Proxy 386.9 ± 17.5
Class Proxy / BPP 373.9 ± 36.0
@Cacheable 8109.8 ± 1097.5
Performance
Details? Run it yourself: https://github.com/victorrentea/proxy-fairy-performance
41. Leftover Tricks
Designing Custom Aspects - Best Practices
- Double proxying
- @Aspect @Order
- Sharing the PersistenceContext
- Proxies in ORMs
Hunt me
afterwards
42. Every time you don’t understand how Spring does something…
it's a Proxy
The Magic of Spring
mixins
43. Spring Data
mixins
CustomerRepository
Customer findByName(String name);
@Query("SELECT c FROM Cust... ")
List<Customer> getActiveCustomers();
JpaRepository<E,ID>
List<E> findAll();
E findOne(ID);
void save(E);
void delete(E); ...
CustomerRepositoryCustom
List<Customer> search(CustomerSearch);
CustomerRepositoryImpl
List<Customer> search(CustomerSearch) {
...<implem>...
}
YourBaseRepository<E,ID>
abc customMethod(xyz);
YourBase
RepositoryImpl
<implem>
naming
rules
44. ✓Proxy + Decorator Patterns; wiring
✓Interface & Class Proxy - under the hood
✓Spring AOP - tricks & limitations
✓Custom Aspects - Best Practices
Key Points
45.
46. And have a nice Spring!
Thank You!
I'm available
a proof of seniority
I use both hemispheres
Tough meetings?
Abused estimates?
Purpose of code:--Uncle Bob
1. Maintainable
2. Does its job!
Functional Party
Activist
Stay into
The Light
Trainings, Talks, Goodies Daily Posts
Clean Code
needs strength
and determination
Let's chat!
Thanks for review,
Vladimir Sitnikov
Hunt me
down