The document discusses the pros and cons of using Ruby's method_missing method. It outlines four common pitfalls when using method_missing: 1) the Ghost House pitfall where methods are not actually defined, 2) the Liar Object pitfall where respond_to? returns incorrectly, 3) the Fake Ghost pitfall where methods are redefined incorrectly, and 4) the Snail Ghost pitfall which can cause stack overflow errors. In general, the document recommends avoiding method_missing when possible and instead using define_method to define delegated methods explicitly to avoid these pitfalls.
Ruby Refinements: the Worst Feature You Ever Lovedpaoloperrotta
Are Ruby's Refinements the best idea since blocks and modules, or a terrible mistake? Decide for yourself. (Includes presenter's notes right on the slides. If you want a version without the notes, for presenting it yourself - just mail me at paolo.nusco.perrotta on Gmail).
Presented at 8th Light University London (13th May 2016)
Do this, do that. Coding from assembler to shell scripting, from the mainstream languages of the last century to the mainstream languages now, is dominated by an imperative style. From how we teach variables — they vary, right? — to how we talk about databases, we are constantly looking at state as a thing to be changed and programming languages are structured in terms of the mechanics of change — assignment, loops and how code can be threaded (cautiously) with concurrency.
Functional programming, mark-up languages, schemas, persistent data structures and more are all based around a more declarative approach to code, where instead of reasoning in terms of who does what to whom and what the consequences are, relationships and uses are described, and the flow of execution follows from how functions, data and other structures are composed. This talk will look at the differences between imperative and declarative approaches, offering lessons, habits and techniques that are applicable from requirements through to code and tests in mainstream languages.
Python is an interpreted, high-level, and general-purpose programming language.
It is an easy to learn general-purpose programing language.
It is a platform-independent programing language, which means it can be used on any machine and in any operating system.
It has a simple syntax
Python is a case sensitive language.
It is an interrupted language.
It is free to use and even free for commercial products.
learn how to program with python
from scratch to be an expert
use the link in the first slide to get the full course
here is the link if you want : https://oke.io/JdxdUl
the link of the documentation : https://oke.io/J6DeY3
link to download python : https://oke.io/BENgRLR2
Ruby Refinements: the Worst Feature You Ever Lovedpaoloperrotta
Are Ruby's Refinements the best idea since blocks and modules, or a terrible mistake? Decide for yourself. (Includes presenter's notes right on the slides. If you want a version without the notes, for presenting it yourself - just mail me at paolo.nusco.perrotta on Gmail).
Presented at 8th Light University London (13th May 2016)
Do this, do that. Coding from assembler to shell scripting, from the mainstream languages of the last century to the mainstream languages now, is dominated by an imperative style. From how we teach variables — they vary, right? — to how we talk about databases, we are constantly looking at state as a thing to be changed and programming languages are structured in terms of the mechanics of change — assignment, loops and how code can be threaded (cautiously) with concurrency.
Functional programming, mark-up languages, schemas, persistent data structures and more are all based around a more declarative approach to code, where instead of reasoning in terms of who does what to whom and what the consequences are, relationships and uses are described, and the flow of execution follows from how functions, data and other structures are composed. This talk will look at the differences between imperative and declarative approaches, offering lessons, habits and techniques that are applicable from requirements through to code and tests in mainstream languages.
Python is an interpreted, high-level, and general-purpose programming language.
It is an easy to learn general-purpose programing language.
It is a platform-independent programing language, which means it can be used on any machine and in any operating system.
It has a simple syntax
Python is a case sensitive language.
It is an interrupted language.
It is free to use and even free for commercial products.
learn how to program with python
from scratch to be an expert
use the link in the first slide to get the full course
here is the link if you want : https://oke.io/JdxdUl
the link of the documentation : https://oke.io/J6DeY3
link to download python : https://oke.io/BENgRLR2
Keynote presented at European Testing Conference (9th February 2017)
What happens when things break? What happens when software fails? We regard it as a normal and personal inconvenience when apps crash or servers become unavailable, but what are the implications beyond the individual user? Is software reliability simply a business decision or does it have economic, social and cultural consequences? What are the moral and practical implications for software developers? And when we talk of ‘systems’, are we part of the ‘system’? What about the bugs on our side of the keyboard? In this talk we will explore examples of failures in software and its application, and how they affect us at different scales, from user to society.
Lucio Floretta - TensorFlow and Deep Learning without a PhD - Codemotion Mila...Codemotion
With TensorFlow, deep machine learning transitions from an area of research to mainstream software engineering. In this session, we'll work together to construct and train a neural network that recognises handwritten digits. Along the way, we'll discover some of the "tricks of the trade" used in neural network design, and finally, we'll bring the recognition accuracy of our model above 99%.
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Codemotion
Dopo 20 anni Java inizia a sentire il peso degli anni e la sua sintassi non evolve come vorremmo, ma la JVM resta sempre un ambiente affidabile ed è già in produzione presso moltissime aziende. Negli ultimi anni sono usciti molti linguaggi basati sulla JVM, ma non tutti hanno avuto il successo sperato. Kotlin ha conquistato Android e, ora, grazie a una sintassi intuitiva e grandi aziende che lo supportano potrebbe essere molto utilizzato anche nelle applicazioni web. Durante il talk vedremo le basi del linguaggio e come sviluppare una applicazione web pronta ad andare in produzione.
Fog City Ruby - Triple Equals Black Magic with speaker notesBrandon Weaver
This is the same talk, except with all my speaker notes. I use speaker notes post-talk as a way to explain and "tutorialize" a presentation, so enjoy!
The presentation I did at Fog City Ruby over how === works and some of the things you can do with it.
Want more? Try these articles where I explain some of it:
* https://medium.com/@baweaver/for-want-of-pattern-matching-in-ruby-the-creation-of-qo-c3b267109b25
* https://medium.com/@baweaver/for-want-of-pattern-matching-in-ruby-the-creation-of-qo-c3b267109b25
Class 12 Computer Science, Chapter 4 - Using Python Libraries. Self learning Presentation in the form of Teacher - Student conversation.
Size 20.1 MB ppt format is also available at the same site Size 5.4 MB
Keynote presented at European Testing Conference (9th February 2017)
What happens when things break? What happens when software fails? We regard it as a normal and personal inconvenience when apps crash or servers become unavailable, but what are the implications beyond the individual user? Is software reliability simply a business decision or does it have economic, social and cultural consequences? What are the moral and practical implications for software developers? And when we talk of ‘systems’, are we part of the ‘system’? What about the bugs on our side of the keyboard? In this talk we will explore examples of failures in software and its application, and how they affect us at different scales, from user to society.
Lucio Floretta - TensorFlow and Deep Learning without a PhD - Codemotion Mila...Codemotion
With TensorFlow, deep machine learning transitions from an area of research to mainstream software engineering. In this session, we'll work together to construct and train a neural network that recognises handwritten digits. Along the way, we'll discover some of the "tricks of the trade" used in neural network design, and finally, we'll bring the recognition accuracy of our model above 99%.
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Codemotion
Dopo 20 anni Java inizia a sentire il peso degli anni e la sua sintassi non evolve come vorremmo, ma la JVM resta sempre un ambiente affidabile ed è già in produzione presso moltissime aziende. Negli ultimi anni sono usciti molti linguaggi basati sulla JVM, ma non tutti hanno avuto il successo sperato. Kotlin ha conquistato Android e, ora, grazie a una sintassi intuitiva e grandi aziende che lo supportano potrebbe essere molto utilizzato anche nelle applicazioni web. Durante il talk vedremo le basi del linguaggio e come sviluppare una applicazione web pronta ad andare in produzione.
Fog City Ruby - Triple Equals Black Magic with speaker notesBrandon Weaver
This is the same talk, except with all my speaker notes. I use speaker notes post-talk as a way to explain and "tutorialize" a presentation, so enjoy!
The presentation I did at Fog City Ruby over how === works and some of the things you can do with it.
Want more? Try these articles where I explain some of it:
* https://medium.com/@baweaver/for-want-of-pattern-matching-in-ruby-the-creation-of-qo-c3b267109b25
* https://medium.com/@baweaver/for-want-of-pattern-matching-in-ruby-the-creation-of-qo-c3b267109b25
Class 12 Computer Science, Chapter 4 - Using Python Libraries. Self learning Presentation in the form of Teacher - Student conversation.
Size 20.1 MB ppt format is also available at the same site Size 5.4 MB
Can't Miss Features of PHP 5.3 and 5.4Jeff Carouth
If you're like me you remember the days of PHP3 and PHP4; you remember when PHP5 was released, and how it was touted to change to your life. It's still changing and there are some features of PHP 5.3 and new ones coming with PHP 5.4 that will improve your code readability and reusability. Let's look at some touted features such as closures, namespaces, and traits, as well as some features being discussed for future releases.
Помните легендарные Java Puzzlers? Да-да, те самые, с Джошом Блохом и Нилом Гафтером? Ну, по которым ещё книжку написали? Так вот, в Groovy всё ещё веселее.
В смысле — задачки ещё более странные, и ответы ещё более поразительные. Этот доклад для вас, Groovy-разработчики, мы покажем вам настоящие, большие и красивые подводные камни! И для вас, Java-разработчики, потому что таких вещей на Java-подобном синтакисе вы точно никогда не видели! И для вас, PHP-разработчики… хотя, нет, не для вас :)
Всем точно будет весело — ваши ведущие Женя и Барух будут зажигать, шутить, спорить, бросаться футболками в публику, и самое главное — заставят вас офигевать от Groovy.
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.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
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.
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.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
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.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
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.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
6. class NilClass
# ...
def method_missing(method, *args, &block)
if klass = METHOD_CLASS_MAP[method]
raise_nil_warning_for klass, method, caller
else
super
end
end
end
8. class InfoDesk
def flights
# ...
end
def trains
# ...
end
def hotels
# ...
end
# ...
end
9. class Sign
def initialize
@desk = InfoDesk.new
end
def flights
return “Out for lunch” if Clock.lunch_time?
@desk.flights
end
def trains
return “Out for lunch” if Clock.lunch_time?
@desk.local_transports
end
def hotels
return “Out for lunch” if Clock.lunch_time?
@desk.local_transports
end
# ...
end
10.
11.
12. class Sign
def initialize
@desk = InfoDesk.new
end
def method_missing(name, *args)
return “Out for lunch” if Clock.lunch_time?
@desk.send(name, *args)
end
end
# At 12:30...
Sign.new.flights # => “Out for lunch”
14. class Sign
def initialize
@desk = InfoDesk.new
end
InfoDesk.public_instance_methods.each do |m|
define_method(m) do
return “Out for lunch” if Clock.lunch_time?
@desk.send(m)
end
end
end
17. class Sign
def initialize
@desk = InfoDesk.new
end
def method_missing(name, *args)
return “Out for lunch” if Clock.lunch_time?
@desk.send(name, *args)
end
end
19. class Sign
def initialize
@desk = InfoDesk.new
end
def is_it_lunch_time_yet?
Clock.lunch_time?
end
def method_missing(name, *args)
return “Out for lunch” if is_it_lunchtime_yet?
@desk.send(name, *args)
end
end
# At 12:30...
Sign.new.flights # => ?
20. class Sign
def initialize
@desk = InfoDesk.new
end
def is_it_lunch_time_yet?
Clock.lunch_time?
end
def method_missing(name, *args)
return “Out for lunch” if is_it_lunchtime_yet?
@desk.send(name, *args)
end
end
# At 12:30...
Sign.new.flights # => ?
21. class Sign
def initialize
@desk = InfoDesk.new
end
def is_it_lunch_time_yet?
Clock.lunch_time?
end
def method_missing(name, *args)
return “Out for lunch” if is_it_lunchtime_yet?
@desk.send(name, *args)
end
end
# At 12:30...
Sign.new.flights # => SystemStackError: stack level too deep
23. class Sign
def initialize
@desk = InfoDesk.new
end
def method_missing(name, *args)
return super unless @desk.respond_to? name
return “Out for lunch” if Clock.lunch_time?
@desk.send(name, *args)
end
end
27. class Sign
def initialize
@desk = ::InfoDesk.new
end
def method_missing(name, *args)
return super unless @desk.respond_to? name
return “Out for lunch” if Clock.lunch_time?
@desk.send(name, *args)
end
def respond_to?(method)
@desk.respond_to?(method) || super
end
end
Sign.new.respond_to? :flights # => true
34. class Sign
instance_methods.each do |m|
undef_method m unless m.to_s =~ /^__|object_id/
end
def initialize
@desk = InfoDesk.new
end
def method_missing(name, *args)
return super unless @desk.respond_to? name
return "Out for lunch" if Clock.lunch_time?
@desk.send(name, *args)
end
def respond_to?(method)
@desk.respond_to? method || super
end
end
Sign.new.display # => InfoDesk#display() called
35. class Sign < BasicObject
def initialize
@desk = ::InfoDesk.new
end
def method_missing(name, *args)
return super unless @desk.respond_to? name
return “Out for lunch” if ::Clock.lunch_time?
@desk.send(name, *args)
end
def respond_to?(method)
@desk.respond_to? method || super
end
end
Sign.new.display # => InfoDesk#display() called
36. we have a problem
(this is getting old already)
39. class Sign < BasicObject
def initialize
@desk = ::InfoDesk.new
end
def method_missing(name, *args)
return super unless @desk.respond_to? name
singleton_class.send :define_method, name do
return “Out for lunch” if ::Clock.lunch_time?
@desk.send name
end
send name
end
def respond_to?(method)
@desk.respond_to? method || super
end
end
# At 12:30...
Sign.new.flights # => ?
40. class Sign < BasicObject
def initialize
@desk = ::InfoDesk.new
end
def method_missing(name, *args)
return super unless @desk.respond_to? name
singleton_class.send :define_method, name do
return “Out for lunch” if ::Clock.lunch_time?
@desk.send name
end
send name
end
def respond_to?(method)
@desk.respond_to? method || super
end
end
# At 12:30...
Sign.new.flights # => SystemStackError: stack level too deep
41. class Sign < BasicObject
def initialize
@desk = ::InfoDesk.new
end
def method_missing(name, *args)
return super unless @desk.respond_to? name
singleton_class.send :define_method, name do
return “Out for lunch” if ::Clock.lunch_time?
@desk.send name
end
send name
end
def respond_to?(method)
@desk.respond_to? method || super
end
end
# At 12:30...
Sign.new.flights # => SystemStackError: stack level too deep
42.
43.
44. should I use method_missing()
to remove duplication in
my code?
I&#x2019;m assuming you know what m_m() is, but I&#x2019;m also going to show a basic example\n
- question at RubyKaigi\n- blog post on RubyLearning\n- disclaimer: this is about using method_missing() even when there are alternate techniques\n- there are cases where there is no alternative\n
\n
\n
(accessors, writing a DSL - think hard before you do this!)\nnot just for cutesy\n
example: whiny nils\n
\n
\n
\n
\n
\n
\n
ghost methods\n
\n
ghost methods\n
my own experiment\n
back to our original solution\nlet&#x2019;s do some refactoring\n
\n
\n
\n
\n
- any method you can call is a ghost\n - fix: always select the methods you're using\n\n\n
- fix: always remember to call super\n\n
\n
\n
no respond_to?\n(also, breaks the IDE and searches)\n\n
- fix: always implement respond_to?)\n- limitations of fix (methods(), etc)\n\n
\n
\n
\n
\n
\n
- fix: inherit from a Blank Slate\n\n
the &#x201C;scary&#x201D; solution\nwhich methods should I remove exactly?\n
\n
\n
\n
\n
- fix: (Reincarnation) lazily define methods with define_method() in method_missing()\n\n\n
...but it doesn&#x2019;t work!\n
why it breaks\nwhat a mess! the experiment is over...\n