The document discusses James Edward Gray II's contributions to Ruby programming and his trip to RubyKaigi2009 in Japan. It then covers several topics related to Ruby modules, including using modules to group constants, modules acting as both namespaces and mixins, extending objects with modules instead of inheritance, and using modules to label and modify objects. The key ideas are that mastering Ruby's method lookup is worthwhile, modules are great for limiting the scope of code, and modules can customize individual objects.
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.
PHPID online Learning #6 Migration from procedural to OOPAchmad Mardiansyah
In this presentation, we will be talking about a migration of PHP development model from Procedural to OOP (Object Oriented Programming). This slide is a part of PHP ID (PHP Indonesia) Online Learning #6
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.
PHPID online Learning #6 Migration from procedural to OOPAchmad Mardiansyah
In this presentation, we will be talking about a migration of PHP development model from Procedural to OOP (Object Oriented Programming). This slide is a part of PHP ID (PHP Indonesia) Online Learning #6
This note describes the core language constructs of JavaScript.
- JS variable declarations and hoisting
- JS function declarations and hoisting
- JS objects
- JS strings, arrays, numbers
- JS control flow and loop statements
This is the slide for what I shared in JS Group meetup, 2014, Taiwan. It covers what JavaScript could do for making the program more "functional", the benefits, price and the limitation.
History of Free and Open Source Software. From the university lab to the enterprise. New Zealand Computer Society Innovation Conference.
Thanks to Evonne Cheung for her awesome graphics!
This note describes the core language constructs of JavaScript.
- JS variable declarations and hoisting
- JS function declarations and hoisting
- JS objects
- JS strings, arrays, numbers
- JS control flow and loop statements
This is the slide for what I shared in JS Group meetup, 2014, Taiwan. It covers what JavaScript could do for making the program more "functional", the benefits, price and the limitation.
History of Free and Open Source Software. From the university lab to the enterprise. New Zealand Computer Society Innovation Conference.
Thanks to Evonne Cheung for her awesome graphics!
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Rajmahendra Hegde
For the long time, we have used various build tools to package applications for new software releases or applying patches to existing applications etc. dependency management, version controlling, scalability, flexibility, single-multiple projects sup portability are some of the key areas that drove the selection of a build tool, This session focuses on Gradle as a successful build tool and looks into all the above areas and uses Groovy as a DSL. We will also look into how easy it is to use Gradle as compared to other open source build tools.
Photos: https://plus.google.com/u/0/photos/105295086916869617504/albums/5739617166453582993
Gradle build tool that rocks with DSL By Rajmahendra Hegde at JavaOne Hyderabad, India on 4th May 2012
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/
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
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.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
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:
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.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
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!
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.
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.
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.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
4. JAMES EDWARD
GRAY II
Created the Ruby Quiz and wrote that book
Built FasterCSV (now CSV), HighLine (with Greg), Elif, and
some other scarier experiments
5. JAMES EDWARD
GRAY II
Created the Ruby Quiz and wrote that book
Built FasterCSV (now CSV), HighLine (with Greg), Elif, and
some other scarier experiments
Documented some of Ruby
6. JAMES EDWARD
GRAY II
Created the Ruby Quiz and wrote that book
Built FasterCSV (now CSV), HighLine (with Greg), Elif, and
some other scarier experiments
Documented some of Ruby
http://blog.grayproductions.net/
7. JAMES EDWARD
GRAY II
Created the Ruby Quiz and wrote that book
Built FasterCSV (now CSV), HighLine (with Greg), Elif, and
some other scarier experiments
Documented some of Ruby
http://blog.grayproductions.net/
http://twitter.com/JEG2
14. RUBYKAIGI2009
See how the Japanese do
conferences
The translation time
allows you to think more
Meet nice Rubyists from
Japan and other places
15. RUBYKAIGI2009
See how the Japanese do
conferences
The translation time
allows you to think more
Meet nice Rubyists from
Japan and other places
See Japan!
31. module Mixin
def shared_method
puts "Called!"
end
end
class Whatever
include Mixin
end
Whatever.new.shared_method
A TRIVIAL MIXIN
I’m sure most of us know this
32. module Mixin
def shared_method
puts "Called!"
end
end
class Whatever
Called!
include Mixin
end
Whatever.new.shared_method
A TRIVIAL MIXIN
I’m sure most of us know this
33.
34.
35.
36.
37.
38. class A
def call
puts "A"
end
end
%w[B C D].each do |name|
eval <<-END_RUBY
module #{name}
def call
puts "#{name}"
super
end
end
END_RUBY
end
class E < A
include B
include C
include D
def call
puts "E"
super
end
end
E.new.call
39. E
class A
def call
puts "A"
end
end
D
%w[B C D].each do |name|
eval <<-END_RUBY
module #{name}
def call
puts "#{name}"
super
C
end
end
END_RUBY
end
B
class E < A
include B
include C
include D
def call
puts "E"
A
super
end
end
E.new.call
41. [E, D, C, B, A, Object, Kernel, BasicObject]
INHERITANCE
p E.ancestors
42.
43.
44.
45.
46.
47. class A
def call
puts "A"
end
end
%w[B C D].each do |name|
eval <<-END_RUBY
module #{name}
def call
puts "#{name}"
super
end
end
END_RUBY
end
a = A.new
a.extend(B)
a.extend(C)
a.extend(D)
a.call
48. D
class A
def call
puts "A"
end
end
C
%w[B C D].each do |name|
eval <<-END_RUBY
module #{name}
def call
puts "#{name}"
super
B
end
end
END_RUBY
end
A
a = A.new
a.extend(B)
a.extend(C)
a.extend(D)
a.call
50. [D, C, B, A, Object, Kernel, BasicObject]
INVISIBLE CLASS
class << a; p ancestors end
51. The (invisible) “singleton class” is here
[D, C, B, A, Object, Kernel, BasicObject]
INVISIBLE CLASS
class << a; p ancestors end
52.
53. class A
def call
puts "A"
end
end
%w[B C D].each do |name|
eval <<-END_RUBY
module #{name}
def call
puts "#{name}"
super
end
end
END_RUBY
end
a = A.new
a.extend(B)
a.extend(C)
a.extend(D)
class << a
def call
puts "Invisible"
super
end
end
a.call
54. class A
def call
puts "A"
end
Invisible
end
%w[B C D].each do |name|
eval <<-END_RUBY
D
module #{name}
def call
puts "#{name}"
super
C
end
end
END_RUBY
end
B
a = A.new
a.extend(B)
a.extend(C)
a.extend(D)
A
class << a
def call
puts "Invisible"
super
end
end
a.call
61. class Logger
# ...
# Logging severity.
module Severity
DEBUG = 0
INFO = 1
WARN = 2
ERROR = 3
FATAL = 4
UNKNOWN = 5
end
include Severity
# ...
end
GROUP CONSTANTS
Group constants/classes and even mix them in
62. class Logger module JSON
# ...
# Logging severity. class Array
module Severity
DEBUG = 0
# ...
INFO = 1 end
WARN = 2
ERROR = 3 class Object
FATAL = 4
UNKNOWN = 5
# ...
end end
include Severity
# ... # ...
end end
GROUP CONSTANTS
Group constants/classes and even mix them in
68. module MoreMath
def self.dist(x1, y1, x2, y2)
Math.sqrt( (x2 - x1) ** 2 +
(y2 - y1) ** 2 )
end
end
DUAL INTERFACE
Some modules are both a namespace and a mixin
69. module MoreMath module MoreMath
def self.dist(x1, y1, x2, y2) extend Math
def self.dist( x1, y1,
Math.sqrt( (x2 - x1) ** 2 + x2, y2 )
(y2 - y1) ** 2 ) sqrt( (x2 - x1) ** 2 +
(y2 - y1) ** 2 )
end end
end
end
DUAL INTERFACE
Some modules are both a namespace and a mixin
71. module MiniLogger
extend self
def logger
$stdout
end
def log(message)
logger.puts "%s: %s" %
[ Time.now.strftime("%D %H:%M:%S"),
message ]
end
end
if __FILE__ == $PROGRAM_NAME
MiniLogger.log "Called as a module method and " +
"written to $stdout."
end
MIXIN YOURSELF
Better than Ruby’s module_function()
72. module MiniLogger require "mini_logger"
extend self
def logger class Whatever
$stdout include MiniLogger
end def logger
def log(message) @logger ||=
open("whatever.log", "w")
logger.puts "%s: %s" %
end
[ Time.now.strftime("%D %H:%M:%S"),
def initialize
message ]
log "Called as an " +
end "instance method " +
end "and written to " +
"a file."
if __FILE__ == $PROGRAM_NAME end
MiniLogger.log "Called as a module method and " + end
"written to $stdout."
end Whatever.new
MIXIN YOURSELF
Better than Ruby’s module_function()
78. module Errors
class BaseError < RuntimeError; end
def self.const_missing(error_name)
if error_name.to_s =~ /wErrorz/
const_set(error_name, Class.new(BaseError))
else
super
end
end
end
p Errors::SaveError
LIMITED MAGIC
Summon new error types as needed
85. require "ostruct"
# These extra methods are mixed into the OpenStruct stored in Config.
module Configured
# This method loads configuration settings from a plain Ruby file.
def update_from_config_file(path = config_file)
eval <<-END_UPDATE
config = self
#{File.read(path)}
config
END_UPDATE
end
# ...
end
# This constant holds all global configuration, see Configured for details.
Config = OpenStruct.new.extend(Configured)
LESS MAGIC
RDoc and I can both read it now
91. module DoubleMixin
module ClassMethods
# ...
end
module InstanceMethods
# ...
end
def self.included(receiver)
receiver.extend(ClassMethods)
receiver.send(:include, InstanceMethods)
end
end
WITH CLASS METHODS
A classic pattern made popular by Rails
97. module DRb
# ...
module DRbUndumped
def _dump(dummy) # :nodoc:
raise TypeError, 'can't dump'
end
end
# ...
class DRbMessage
# ...
def dump(obj, error=false) # :nodoc:
obj = make_proxy(obj, error) if obj.kind_of? DRbUndumped
# ...
end
# ...
end
# ...
end
LABELING OBJECTS
You can use a do-nothing module as a type
99. p "ruby".strip!.
capitalize!
# NoMethodError:
# undefined method
# `capitalize!' for
# nil:NilClass
OBJECT EDITING
Using hooks to edit objects
100. module SafelyChainable
def self.extended(singleton)
singleton.methods.grep(/w!z/).
each do |bang|
p "ruby".strip!. singleton.instance_eval <<-END_RUBY
def #{bang}
capitalize!
super
self
# NoMethodError:
end
# undefined method END_RUBY
# `capitalize!' for end
# nil:NilClass end
end
p "ruby".extend(SafelyChainable).
strip!.capitalize!
OBJECT EDITING
Using hooks to edit objects
105. SUMMARY
Master Ruby’s method
lookup; it’s worth the effort
Modules are a terrific at
limiting the scope of magic
Remember, modules can
modify individual objects
106. SUMMARY
Master Ruby’s method
lookup; it’s worth the effort
Modules are a terrific at
limiting the scope of magic
Remember, modules can
modify individual objects
Try replacing some
inheritance with extend()