The document discusses James' preferences for API design based on his experience working with many APIs. He likes APIs from Ruby's standard library like FileUtils and OpenURI that provide familiar and easy to use functionality. He also likes APIs that take fresh approaches like Pathname and Pstore. James dislikes APIs that are missing features or documentation like some S3 libraries. He strongly dislikes APIs that produce many warnings like Fog.
How to simplify OSGi development using OBR - Peter Kriensmfrancis
Presentation by Peter Kriens at OSGi DevCon 2012 BOF (22 March, 2012)
Video recording of presentation available at http://youtu.be/hemY-6dfPnw
The OSGi Alliance has been working on the OBR specification to describe resources in terms of requirements and capabilities. This talk will explore how this generic model can be applied to OSGi development to significantly simplify and improve the development, build, release and deployment processes. The talk will include a look at practical use cases, a demo or two (time permitting) and insight into the sort of capabilities you could build into your systems in the future.
A beginner's primer on Instagram and Pinterest. The presentation was designed specifically for Social Media 101 at the Nashville Business Incubation Center.
(July 2011) One Less "To-Do:" Perceptions on the Role of Archives and Librari...Carolyn Hank
Event:
Archival Educators Research Institute (AERI)
July 12, 2011, Boston, MA
Abstract:
The neologisms, bloggership and blogademia, have emerged in recent years, reflecting the adoption of blogs as channels for scholarly communication; the former in reference to legal scholarship blogs, or blawgs, and the latter to blogs across disciplines. This presentation reports select findings from a descriptive study of scholars who blog in the areas of history, economics, law, biology, chemistry and physics. The study examined scholars’ attitudes and perceptions of their blogs in relation to the system of scholarly communication, their preferences for digital preservation, and their respective blog publishing behaviors and blog characteristics influencing preservation action. Drawing from 153 questionnaires, 24 interviews, and content analysis of 93 blogs, this presentation will provide a focused analysis of findings related to preservation preferences. Results from the questionnaire portion of the study show that scholars who blog are generally interested in blog preservation with a strong sense of personal responsibility. Most feel their blogs should be preserved for both personal and public access and use into the indefinite, rather than short-term, future. Respondents identify themselves as most responsible for blog preservation. Concerning capability, they perceive blog service providers, hosts, and networks as most capable. National and institutional-based libraries and archives, as well as institutional IT departments, are perceived as least responsible and least capable for preservation of scholars’ respective blogs. During the subsequent interview portion of the study, participants did not dismiss the value of these organizations. If anything, for some, it is exactly this value that contributes to perceptions of libraries and archives’ low responsibility and capability. This presentation will conclude by offering implications from these findings on the potential role, or lack of role, for archives and libraries in the preservation of scholars’ blogs.
How to simplify OSGi development using OBR - Peter Kriensmfrancis
Presentation by Peter Kriens at OSGi DevCon 2012 BOF (22 March, 2012)
Video recording of presentation available at http://youtu.be/hemY-6dfPnw
The OSGi Alliance has been working on the OBR specification to describe resources in terms of requirements and capabilities. This talk will explore how this generic model can be applied to OSGi development to significantly simplify and improve the development, build, release and deployment processes. The talk will include a look at practical use cases, a demo or two (time permitting) and insight into the sort of capabilities you could build into your systems in the future.
A beginner's primer on Instagram and Pinterest. The presentation was designed specifically for Social Media 101 at the Nashville Business Incubation Center.
(July 2011) One Less "To-Do:" Perceptions on the Role of Archives and Librari...Carolyn Hank
Event:
Archival Educators Research Institute (AERI)
July 12, 2011, Boston, MA
Abstract:
The neologisms, bloggership and blogademia, have emerged in recent years, reflecting the adoption of blogs as channels for scholarly communication; the former in reference to legal scholarship blogs, or blawgs, and the latter to blogs across disciplines. This presentation reports select findings from a descriptive study of scholars who blog in the areas of history, economics, law, biology, chemistry and physics. The study examined scholars’ attitudes and perceptions of their blogs in relation to the system of scholarly communication, their preferences for digital preservation, and their respective blog publishing behaviors and blog characteristics influencing preservation action. Drawing from 153 questionnaires, 24 interviews, and content analysis of 93 blogs, this presentation will provide a focused analysis of findings related to preservation preferences. Results from the questionnaire portion of the study show that scholars who blog are generally interested in blog preservation with a strong sense of personal responsibility. Most feel their blogs should be preserved for both personal and public access and use into the indefinite, rather than short-term, future. Respondents identify themselves as most responsible for blog preservation. Concerning capability, they perceive blog service providers, hosts, and networks as most capable. National and institutional-based libraries and archives, as well as institutional IT departments, are perceived as least responsible and least capable for preservation of scholars’ respective blogs. During the subsequent interview portion of the study, participants did not dismiss the value of these organizations. If anything, for some, it is exactly this value that contributes to perceptions of libraries and archives’ low responsibility and capability. This presentation will conclude by offering implications from these findings on the potential role, or lack of role, for archives and libraries in the preservation of scholars’ blogs.
Les réseaux sociaux Pinterest et Instagram utilisent principalement les images. Alors quelle est la différence entre ces deux médias sociaux lorsque vous les utilisez pour promouvoir votre entreprise?
Presentation given January 23, 2013 at ALISE 2013 (Seattle, WA), reporting select findings from the ALISE-funded study, Teaching in the Age of Facebook and Other Social Media: LIS Faculty and Students Friend'ing and Poking in the Social Sphere
5th International Disaster and Risk Conference IDRC 2014 Integrative Risk Management - The role of science, technology & practice 24-28 August 2014 in Davos, Switzerland
Making a presentation on the role of trade unions in China when it comes to sustainable development and climate change, business change and transformation
A whirlwind tour of the modules that any perl hacker, from beginner to experienced, should use and why.
Handout: List of modules in the talk along with many more: https://sites.google.com/site/perlhercynium/TEPHT-List2.pdf?attredirects=0
An introduction to Rex - FLOSS UK DevOps York 2015Andy Beverley
An introduction to Rex automation and orchestration. Presentation given at FLOSS UK DevOps York 2015. Get a general overview of Rex and find out why I like to use it.
My Django Under the Hood 2015 talk, which includes a whistlestop tour of Django File with HTTP, Form & ORM integration, Storage backends, contrib.staticfiles, Form.Media and asset pipelines, including some thoughts on how to integrate arbitrary asset pipelines with Django.
(The export from Keynote is horrible. Previous exports I've done weren't so horrible; I don't know if this is a newer version, or my getting the options wrong. If I figure it out, I'll fix it.)
Alfresco’s highly customizable repository can often seem overwhelming. Learn approaches for adding common customizations requests (Extending Javascript API, Content Modeling, Permission Modeling, packaging, etc.) from current and former Alfresco consulting staff. Learn where we often see the most common errors and participate in open Q&A.
Presented at BSides Wellington (November 23-24th, 2017; Wellington, New Zealand)
Presented (alpha version) at CSides Canberra (November 17th, 2017; Canberra, Australia)
"Playing with shiny tech, and maybe improving my offensive capacity along the way."
https://github.com/0xdevalias/gopherblazer
Django Files — A Short Talk (slides only)James Aylett
My Django Under the Hood 2015 talk, which includes a whistlestop tour of Django File with HTTP, Form & ORM integration, Storage backends, contrib.staticfiles, Form.Media and asset pipelines, including some thoughts on how to integrate arbitrary asset pipelines with Django.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
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/
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
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:
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.
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
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.
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.
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.
16. #!/usr/bin/env ruby -wKU
require "open-uri"
OPENURI
open(__FILE__) do |f|
p f.gets
# >> "#!/usr/bin/env ruby -wKUn"
end
The Web as just another IO open("http://blog.grayproductions.net") do |u|
p u.gets
# >> "<!DOCTYPE HTML PUBLIC …"
p u.content_type
# >> "text/html"
end
39. !!! DEPRECATION WARNING !!!
Hey Champ! I see you're using Ruby 1.8.6! While I applaud you for sticking to
your guns and using The One True Ruby, I have to let you know that we're going
FOG
to stop supporting 1.8.6. I know, it's sad. But, we just don't have time to
support every version of Ruby out there. Whether we like it or not, time moves
forward and so does our software.
On August 1, 2010, we will no longer support Ruby 1.8.6. If nokogiri happens to
Warnings galore work on 1.8.6 after that date, then great! We will hownever, no longer test,
use, or endorse 1.8.6 as a supported platform.
Thanks,
Team Nokogiri
40. (eval):1: warning: method redefined; discarding old reject
(eval):1: warning: method redefined; discarding old select
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/collection.rb:40: warning:
method redefined; discarding old clear
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/collection.rb:55: warning:
method redefined; discarding old inspect
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/aws.rb:95: warning: redefine
image_id
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/terremark/parser.rb:6:
warning: method redefined; discarding old parse
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/aws/s3.rb:7: warning:
instance variable @required not initialized
FOG
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/aws/models/s3/file.rb:20:
warning: method redefined; discarding old body
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/aws/models/s3/file.rb:53:
warning: method redefined; discarding old owner=
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/aws/models/s3/files.rb:80:
warning: method redefined; discarding old directory=
Warnings galore /usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/aws/parsers/s3/
get_bucket_logging.rb:8: warning: method redefined; discarding old reset
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog/aws/parsers/s3/
get_bucket_logging.rb:13: warning: method redefined; discarding old end_element
/usr/local/lib/ruby/gems/1.8/gems/fog-0.1.8/lib/fog.rb:77: warning: instance
variable @mocking not initialized
/usr/local/lib/ruby/gems/1.8/gems/excon-0.0.26/lib/excon/connection.rb:90:
warning: using default DH parameters.
<Fog::AWS::S3::Directories
[
<Fog::AWS::S3::Directory
key="graysoftinc",
creation_date=Wed Jun 09 03:10:07 UTC 2010
>
]
>
41. PERL WHIPS
RUBY IN
ONE AREA
Perl programmers
use warnings!
42. PERL WHIPS
RUBY IN
ONE AREA
Perl programmers
use warnings!
44. #!/usr/bin/env ruby -wKU
FREE
class Name
def initialize(first, last)
@first = first
DEBUGGING @last = last
end
Who hates free bug finding? def full
"#{@firt} #{@last}".strip
end
end
name = Name.new("James", "Gray")
puts name.full
45. #!/usr/bin/env ruby -KU
class Name
def initialize(first, last)
@first = first
FREE @last = last
end
DEBUGGING def first
@firt
end
Who hates free bug finding? end
name = Name.new("James", "Gray")
Thread.new(name.first) do |first|
sleep 3
puts first.capitalize
end
sleep
46. LESS HOOPS
TO JUGGLE
In programming,
that’s always a win
47. LESS HOOPS
TO JUGGLE
In programming,
that’s always a win
49. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
50. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
51. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
52. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
53. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
54. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
55. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
56. RANDOM COMPARISONS
AWS Fog S3 AWS::S3
Not just no, Present,
Docs Good Good
but hell no! but weird
Works Not for me Yes Yes Yes
Streaming With pain Yes No Yes
Logs and
Features Logs Basics only Fancy logs
versions
Thread-safe Don’t do it! Yes No No
Warnings Yes Uh, yeah! Yes Yes, a lot
Command-
Extras No Shell No
line tool
57. DO WE HAVE A WINNER?
None of them feel ribbon worthy to me
58. DO WE HAVE A WINNER?
None of them feel ribbon worthy to me
63. #!/usr/bin/env ruby -wKU
require "rubygems"
THE
require "twitter"
oauth = Twitter::OAuth.new( "consumer token",
"consumer secret" )
TWITTER GEM
oauth.authorize_from_access( "access token",
"access secret" )
client = Twitter::Base.new(oauth)
client.friends_timeline.each do |tweet|
A typical object oriented API p tweet
end
client.user_timeline.each do |tweet|
p tweet
end
client.replies.each do |tweet|
p tweet
end
client.update("Heeeyyyyoooo from Twitter Gem!")
77. #!/usr/bin/env ruby -wKU
require "rubygems"
require "candy"
class Person
include Candy::Piece
end
me = Person.new
me.last_name = "Eley" # New record created and saved to Mongo
me.id # => ObjectID(4bb606f9609c8417cf00004b)
me[:height] = 67 # Or me.height = 67
me.favorites = { composer: "Yoko Kanno",
seafood: "Maryland blue crabs",
scotch: ["Glenmorangie Port Wood Finish",
"Balvenie Single Barrel"]}
me.spouse = Person.piece(first_name: "Anna", eyes: :blue)
me.spouse.eyes # => :blue
me.favorites.scotch[1] # => "Balvenie Single Barrel"
Person.last_name("Smith") # Returns the first Smith
Person.age(21) # Returns the first legal drinker (in the U.S.)
Person(12345) # Returns the person with an _id of 12345
CANDY
A very different approach
78. #!/usr/bin/env ruby -wKU
require "rubygems"
require "candy"
class People
include Candy::Collection
collects :person # Declares the Mongo collection is 'Person'
end # (and so is the Candy::Piece class)
People.last_name('Smith') # Returns an enumeration of all Smiths
People.age(19).sort(:birthdate, :down).limit(10) # We can chain options
People(limit: 47, occupation: :ronin) # Or People.all(params) or People.new(params)
People.each(|p| p.shout = 'Norm!') # Where everybody knows your name...
CANDY
A very different approach
82. THIS ENDS THE TOUR
• It’s
hard to know what’s
good or bad in an API
83. THIS ENDS THE TOUR
• It’s
hard to know what’s
good or bad in an API
• They definitely seem to have
a “feel” to them though
84. THIS ENDS THE TOUR
• It’s
hard to know what’s
good or bad in an API
• They definitely seem to have
a “feel” to them though
• Aim for the natural feel, if
you can find it