This document discusses ways that Ruby code can be "weird" compared to other languages. It covers 11 weirdnesses:
1. Parallel variable assignment
2. Method names ending with ? for booleans
3. Everything having a boolean value
4. if/unless statements returning values
5. The unless keyword for negative conditions
6. Iterators like loop and times for loops
7. Iterators for arrays and strings
8. Optional parentheses for method calls
9. Methods being able to take blocks
10. Implicit return of the last expression in a method
11. Resources for learning more about Ruby idioms
It's happened to all of us: we ran away from some conversation or library because it kept on using those "weird" phrases. You know, like "type classes", "semigroups", "monoids", "applicatives". Yikes! They all seem so academic, so pointlessly detached from real-world problems. But then again, given how frequently we run into them in functional programming, are they REALLY irrelevant, or do they have real-world applications? This talk will go beyond giving you raw definitions of these terms, and show you real-world motivations behind the concepts. By attending, you'll be able to keep your skills relevant to an ever-changing industry, confuse your significant other ("You know, honey, a monad is just a monoid in the category of endofunctors!"), and sound extra smart on the next job interview!
It's happened to all of us: we ran away from some conversation or library because it kept on using those "weird" phrases. You know, like "type classes", "semigroups", "monoids", "applicatives". Yikes! They all seem so academic, so pointlessly detached from real-world problems. But then again, given how frequently we run into them in functional programming, are they REALLY irrelevant, or do they have real-world applications? This talk will go beyond giving you raw definitions of these terms, and show you real-world motivations behind the concepts. By attending, you'll be able to keep your skills relevant to an ever-changing industry, confuse your significant other ("You know, honey, a monad is just a monoid in the category of endofunctors!"), and sound extra smart on the next job interview!
Guava est une librairie open source créée et maintenue par les équipes de Google. Inspirée des outils internes du géant, Guava propose de nombreux mécanismes (prog fonctionnelle) pour manipuler les collections, créer des caches customisés, faciliter la gestion de la concurrence et les IOs.
De son coté, Lombok est également un projet Open Source. Lombok et Lombok-pg simplifient
sensiblement l’écriture de code classique (builders, delegates, etc.) et des nombreuses méthodes purement techniques et indispensables (getters, setters, hashCode, equals, etc.) qui polluent nos objets.
Durant cette présentation, après un rapide constat de la verbosité de nos beans, nous feront un tour d’horizon de Lombok et Guava. Nous verrons comment ils nous aident à écrire du code concis et de qualité.
Plan de la présentation :
* Milou est trop lourd (intro) ;
* Lombok (et Lombok-pg) en action ;
* Tour d’horizon de Guava
An Introduction to Groovy for Java DevelopersKostas Saidis
An introduction to Groovy for Java developers with real-life examples that present how Groovy helped us win the 2nd prize in the Open Public Data Hackathon 2014 (http://www.ydmed.gov.gr/hackathon/)
The slides for a lecture about the Ruby programming language. This language was given at FEUP, on a course called "Laboratories of Object-Oriented Programming".
Quick talk given to Asakusa.rb meeting during a vacation Zachary and I took in Tokyo, February 2012.
The message is a simple one—don't let yourself be defined by labels. Instead, be defined by what you _do_.
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi PetangImsamad
Perjalanan Pesaraan
Pada usia 56 tahun
guru
engkau berdiri gagah
sebagai tokoh gemilang
anugerah cemerlang
di harimu.
Guru
dengan lagu sendu lagu syahdu engkau diraikan
mengenang jasa mengenang segala
tercerna pada lukisan. waktu
sebagai pendidik tak kenal erti
jerih dan jemu.
Guru
jasamu dalam ingatan.
tingginya menyapu awan
antara terima kasih dan rasa kehilangan
di atas segala pengorbanan.
Guru
kami iringkan doa
di perjalanan. persaraan sebagai
seorang akademik seorang pendidikan formal
dan
sebagai seorang insan kami juga doakan
semoga Yang Esa jua. melimpahkan
segala kurnia.
Zhifu Ge's talk for the Ottawa Ruby October 2015 meetup. Zhifu walked us through solving a practice problem from Codility, via live coding using Test Driven Development (TDD).
Guava est une librairie open source créée et maintenue par les équipes de Google. Inspirée des outils internes du géant, Guava propose de nombreux mécanismes (prog fonctionnelle) pour manipuler les collections, créer des caches customisés, faciliter la gestion de la concurrence et les IOs.
De son coté, Lombok est également un projet Open Source. Lombok et Lombok-pg simplifient
sensiblement l’écriture de code classique (builders, delegates, etc.) et des nombreuses méthodes purement techniques et indispensables (getters, setters, hashCode, equals, etc.) qui polluent nos objets.
Durant cette présentation, après un rapide constat de la verbosité de nos beans, nous feront un tour d’horizon de Lombok et Guava. Nous verrons comment ils nous aident à écrire du code concis et de qualité.
Plan de la présentation :
* Milou est trop lourd (intro) ;
* Lombok (et Lombok-pg) en action ;
* Tour d’horizon de Guava
An Introduction to Groovy for Java DevelopersKostas Saidis
An introduction to Groovy for Java developers with real-life examples that present how Groovy helped us win the 2nd prize in the Open Public Data Hackathon 2014 (http://www.ydmed.gov.gr/hackathon/)
The slides for a lecture about the Ruby programming language. This language was given at FEUP, on a course called "Laboratories of Object-Oriented Programming".
Quick talk given to Asakusa.rb meeting during a vacation Zachary and I took in Tokyo, February 2012.
The message is a simple one—don't let yourself be defined by labels. Instead, be defined by what you _do_.
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi PetangImsamad
Perjalanan Pesaraan
Pada usia 56 tahun
guru
engkau berdiri gagah
sebagai tokoh gemilang
anugerah cemerlang
di harimu.
Guru
dengan lagu sendu lagu syahdu engkau diraikan
mengenang jasa mengenang segala
tercerna pada lukisan. waktu
sebagai pendidik tak kenal erti
jerih dan jemu.
Guru
jasamu dalam ingatan.
tingginya menyapu awan
antara terima kasih dan rasa kehilangan
di atas segala pengorbanan.
Guru
kami iringkan doa
di perjalanan. persaraan sebagai
seorang akademik seorang pendidikan formal
dan
sebagai seorang insan kami juga doakan
semoga Yang Esa jua. melimpahkan
segala kurnia.
Zhifu Ge's talk for the Ottawa Ruby October 2015 meetup. Zhifu walked us through solving a practice problem from Codility, via live coding using Test Driven Development (TDD).
Project Night Meta - Ruby Tuesday - Pitchottawaruby
Xander Miller's Lightning Talk announcing the launch of a new Ottawa Rails community project: Project Night Meta, a rails app that helps facilitate and organize Developer Meetups. You can sign up to join the basecamp here: http://goo.gl/s4BkPd
The Traveler ...away to organize and document supporting and similar documents to one you are working on. Keeping Traveler's for documents allows you to know how you got where you are and supporting documents. It makes things easier to update.
We <3 .rb
but - still .rb < perfect
This presentation shows some of the ways that this language, engineered for maximum programmer happiness and least surprise, can still have some nasty gotchas.
We <3> true
But - still .rb < perfect # => true
Though Ruby was allegedly "engineered to maximize programmer happiness", in part by adhering to the "principle of least surprise", Ruby still has some surprising and annoying gotchas. This presention contains an Array, er, a bunch of them, from programming-newbie gotchas to ones that still "get" grizzled veteran Rubyists. The talk these are from, approximately 45 minutes, may save you many hours of frustrated head-scratching (and bashing against the desk) later!
Test First Teaching and the path to TDDSarah Allen
Test First Teaching background and methodology for teaching programming using automated test frameworks, how this relates to (and can lead to learning) test-driven development
The things we don't see – stories of Software, Scala and AkkaKonrad Malawski
Opening keynote for Scalapeno, Tel Aviv 2016.
The talk focuses and explains the things we don't often see explicitly and/or don't notice when doing our daily work, yet make up a large part of the ecosystem and maturity of the ecoststem as a whole. We also dive into some of the more confusing bits around using the same word about different things in software
Examples: https://gist.github.com/aditya01933/c6a867e981110885369f06c5a4103644
1. 3 pillars of ruby.
2. Classes and objects.
3. Inheritance - diving deep
4. Meta programming and reflection - diving deep.
5. Power of method missing.
6. Mixins and ducktyping
7. Super - diving deep
8. Yield
9. Closure
10. Block, proc and lambda
11. More meta programming(examples).
12. Ruby open classes.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
3. The Algorithm of
Rapid Ruby Acquisition
1. Learn enough to self-correct
2. Practice at least 20 hours
4. Practice at least 20 hours
codeeval.com
The second step is easy. There are numerous online resources for you to practice. One example of them is codeeval.com
5. Learn enough to self-correct
listen to this talk
The first step, however, is easier. You only have to listen to this talk.
That’s recursion right there
6. Learn enough to self-correct
• Assignment
• Naming
• Control Expressions
• Methods
18. Weirdness #3
everything has a Boolean value
Every expression in Ruby evaluates to an object, and every object has a Boolean value of either true or false? true and false are objects
19. if 0
puts “0 is true”
else
puts “0 is false”
end
what is the output?
20. Only two objects has a false
value, nil and false itself
Every expression in Ruby evaluates to an object, and every object has a Boolean value of either true or false? true and false are objects
22. if(condition1) {
result = x;
} else if(condition2) {
result = y;
} else {
result = z;
}
In Java
if condition1:
result = x
elif condition2:
result = y
else:
result = z
In Python
35. do_something if !condition
negative condition unless
do_something unless condition
this is
Question: which one is better? Choose unless over if with negative condition
40. loop is a method, not a keyword
loop do
do_something
break if condition1
next if condition2
end
Kernel#loop repeatedly executes the block.
We call this kind of ruby methods iterators. They take a block, and execute the block repeatedly.
41. how to do something a certain
number of times?
iterators help you iterate
42. for(int i = 0; i < 10; i++) {
doSomething();
}
In Java
for i in range(10):
do_something()
In Python
58. puts “hello” puts(“hello”)
Omit parentheses when:
Omit parentheses around parameters for methods that are part of an internal DSL (e.g. Rake, Rails, RSpec),
methods that have "keyword" status in Ruby (e.g. attr_reader, puts) and attribute access methods. Use parentheses around the arguments of all other method
invocations.
59. omit parentheses when:
• there are no arguments
• the method is part of internal DSL
• the method has “keyword status”
attr_reader, puts, print
Omit parentheses when:
Omit parentheses around parameters for methods that are part of an internal DSL (e.g. Rake, Rails, RSpec),
methods that have "keyword" status in Ruby (e.g. attr_reader, puts) and attribute access methods. Use parentheses around the arguments of all other method
invocations.
62. In Java
int[] a = {1, 2, 3};
for(int i = 0; i < a.length; i++) {
a[i]++;
}
63. In Python
a = [1, 2, 3]
for i in range(len(a)):
a[i] += 1
64. In Ruby
a = [1, 2, 3]
a = a.map { |i| i + 1 }
Demo
Array#collect = Array#map
Invokes the given block once for each element of self.
change every int to string
70. class SomeControllerTest < ActionController::TestCase
test “should do stuff” do
assert_equal 2, 1 + 1
end
def test_should_do_stuff
assert_equal 2, 1 + 1
end
end
72. the evaluated object of the last
executed expression in a method
is implicitly returned to the caller
Every expression in Ruby evaluates to an object,