This document provides an introduction to the Ruby programming language from Brian Hogan. It discusses Hogan's background as a designer who grew to love programming after learning Ruby. It provides overviews of common Ruby concepts like objects, variables, classes and testing. It also demonstrates examples of Ruby code and highlights libraries like Haml, Sass, Sinatra and Cucumber. The overall message is that Ruby can make developers productive and happy. Resources are included for trying Ruby online.
Facebook Black book 3 - make money online everydayEdward806784
This is the 3rd and final edition to our blackbook marketing
manuals. As usual this is no frills and no nonsense, straight to the
point book on how to accomplish and execute a variety of original
cutting edge methods.
We believe this one is the most powerful we have created due to
a few concepts that we have connected through our ongoing
testing and discovery.
The data we have tapped into is immense and when hooked into
the available functions of Facebook can be utilized in some really
unique and interesting ways.
Without further ado, we present our latest work, if you have
any questions please direct them through pm.
WordPress is NOT just a blog anymore!
For the seasoned WordPress developer or anyone coding in PHP, CSS, and jQuery, we will look at how you can take your theme to the next level. I will explain how theme architecture works, how to extend this architecture with custom template files, and how to create custom functions. I will also walk through the some interested CSS frameworks, like 960grid, implementing intermediate to advanced jQuery features, and how to customize the back end. Finally I will briefly discuss how to take your theme mobile using WPTouch and WPMobile.
Writing Clean, Standards Compliant, Testable Code for WordPressShawn Hooper
This talk, delivered at WordCamp Toronto 2016, explains the WordPress Coding Standards for HTML, CSS, PHP and JavaScript, and discusses best practices for writing code that is easy to read, test, and extend.
Presentation on various definitions for JSON including JSON-RPC, JSPON, JSON Schema, JSONP and tools for working these definitions including Persevere client and server..
An indepth dive into using Behat/Mink/Selenium for BDD testing.
* http://behat.org
* http://mink.behat.org/
* http://docs.seleniumhq.org/
In this talk I'll cover:
* why and when to use Behat (and when not)
* Installation and configuration of Behat and Mink
* Building Behat Contexts
* Avoiding data deadlocks and "test user account" syndrome
* Introduction to Selenium and testing JavaScript
* Best practises for writing tests (what to avoid, what to aspire for, writing stories like you mean it, how to get your product owners to write them)
* Common gotchas
Intro talks never let you learn about the things that make a language truly cool. In this talk we'll discover how advanced features of Ruby help us write cleaner more modular code.
If you've ever looked into how to create Gems, you've probably seen a bunch of ways to do that. Project generators like Hoe, Jeweler, and the like offer some nice ways to get started, but they may often be overkill for many projects. If you're just starting out, why not learn to do it from scratch?
In this talk, we'll create our own gem from scratch, using only things that are provided by Ruby, its standard library, and RubyGems to craft a simple gem.
You'll learn how to set up a project, how to write and run tests, how to use Rake to quickly build the gem, and even how to create a gem that installs an executable command-line program.
Introduction to the Python programming language (version 2.x)
Ambient intelligence: technology and design
http://bit.ly/polito-ami
Politecnico di Torino, 2015
The founder of ctrleff demonstrates his methodology of web development that has evolved through the years to find the perfect balance between speed and scalability.
Facebook Black book 3 - make money online everydayEdward806784
This is the 3rd and final edition to our blackbook marketing
manuals. As usual this is no frills and no nonsense, straight to the
point book on how to accomplish and execute a variety of original
cutting edge methods.
We believe this one is the most powerful we have created due to
a few concepts that we have connected through our ongoing
testing and discovery.
The data we have tapped into is immense and when hooked into
the available functions of Facebook can be utilized in some really
unique and interesting ways.
Without further ado, we present our latest work, if you have
any questions please direct them through pm.
WordPress is NOT just a blog anymore!
For the seasoned WordPress developer or anyone coding in PHP, CSS, and jQuery, we will look at how you can take your theme to the next level. I will explain how theme architecture works, how to extend this architecture with custom template files, and how to create custom functions. I will also walk through the some interested CSS frameworks, like 960grid, implementing intermediate to advanced jQuery features, and how to customize the back end. Finally I will briefly discuss how to take your theme mobile using WPTouch and WPMobile.
Writing Clean, Standards Compliant, Testable Code for WordPressShawn Hooper
This talk, delivered at WordCamp Toronto 2016, explains the WordPress Coding Standards for HTML, CSS, PHP and JavaScript, and discusses best practices for writing code that is easy to read, test, and extend.
Presentation on various definitions for JSON including JSON-RPC, JSPON, JSON Schema, JSONP and tools for working these definitions including Persevere client and server..
An indepth dive into using Behat/Mink/Selenium for BDD testing.
* http://behat.org
* http://mink.behat.org/
* http://docs.seleniumhq.org/
In this talk I'll cover:
* why and when to use Behat (and when not)
* Installation and configuration of Behat and Mink
* Building Behat Contexts
* Avoiding data deadlocks and "test user account" syndrome
* Introduction to Selenium and testing JavaScript
* Best practises for writing tests (what to avoid, what to aspire for, writing stories like you mean it, how to get your product owners to write them)
* Common gotchas
Intro talks never let you learn about the things that make a language truly cool. In this talk we'll discover how advanced features of Ruby help us write cleaner more modular code.
If you've ever looked into how to create Gems, you've probably seen a bunch of ways to do that. Project generators like Hoe, Jeweler, and the like offer some nice ways to get started, but they may often be overkill for many projects. If you're just starting out, why not learn to do it from scratch?
In this talk, we'll create our own gem from scratch, using only things that are provided by Ruby, its standard library, and RubyGems to craft a simple gem.
You'll learn how to set up a project, how to write and run tests, how to use Rake to quickly build the gem, and even how to create a gem that installs an executable command-line program.
Introduction to the Python programming language (version 2.x)
Ambient intelligence: technology and design
http://bit.ly/polito-ami
Politecnico di Torino, 2015
The founder of ctrleff demonstrates his methodology of web development that has evolved through the years to find the perfect balance between speed and scalability.
Creating and Deploying Static Sites with HugoBrian Hogan
Most web sites don’t have data that changes, so why power them with a database and take the performance hit? In this talk we’ll explore static site generation using Hugo, an open-source static site generator. You’ll learn how to make a master layout for all pages, and how to use Markdown to create your content pages quickly.
Then we’ll explore how to deploy the site we made to production. We’ll automate the entire process. When you’re done, you’ll be able to build and deploy static web sites quickly with minimal tooling.
Automating the Cloud with Terraform, and AnsibleBrian Hogan
Need a web server? So did I. But setting everything up by hand is tedious. In this talk, you'll see how to build a load-balanced web server using Ansible, Terraform, and DigitalOcean, a cloud provider aimed at developers. First, you'll see how to build out the servers and load balancer, and then you'll see how to use Ansible Playbooks to install and upload the web site. When we're done, you'll have scripts you can run to set up your own environment.
Create Development and Production Environments with VagrantBrian Hogan
Need a Linux box to test a Wordpress site or a Windows VM to test a web site on IE 10? Creating a virtual machine to test or deploy your software doesn’t have to be a manual process. Bring one up in seconds with Vagrant, software for creating and managing virtual machines. With Vagrant, you can bring up a new virtual machine with the software you need, share directories, copy files, and configure networking using a friendly DSL. You can even use shell scripts or more powerful provisioning tools to set up your software and install your apps. Whether you need a Windows machine for testing an app, or a full-blown production environment for your apps, Vagrant has you covered.
In this talk you’ll learn to script the creation of multiple local virtual machines. Then you’ll use the same strategy to provision production servers in the cloud.
I work with Vagrant, Terraform, Docker, and other provisioning systems daily and am excited to show others how to bring this into their own workflows.
Docker is an amazing tool, but unless you work with it every day, you're probably left with a ton of questions. What's a container? What's an image? What's the difference between Docker, Machine, Compose, and Swarm? Why the heck should I care? Well, Docker makes it easier than ever to deploy and scale your applications and services. In addition, it lets you simulate your production environment on your local machine without heavy virtual machines. In this talk, we'll explore the basics of Docker, create a custom image for a web application, create a group of containers, and look at how you can put your apps into production on various cloud providers. At the end of the talk, you'll have the knowledge you need to put this to use with your own applications.
Come explore Elm, a functional programming language for making web things. Elm aims to solve some of the same problems that Ember, React, and Angular 2 solve, but in a radically different way. Strong and static typing ensures that data you pass around in your apps really is what you think it is. A simple and tried-and-true architecture makes it easy to understand, and great tooling makes it fun to use.
Web Development With Ruby - From Simple To ComplexBrian Hogan
Beyond the massive hype of Ruby on Rails, there's an amazing world of frameworks, DSLs, and libraries that make the Ruby language a compelling choice when working on the web. In this talk, you'll get a chance to see how to use Ruby to quickly build a static web site, create complex stylesheets with ease, build a simple web service, crete a simple Websocket server, and test your existing applications. Finally, you'll see a few of the ways Rails really can make developing complex applications easier, from advanced database querying to rendering views in multiple formats.
Stop Reinventing The Wheel - The Ruby Standard LibraryBrian Hogan
My talk from Ruby Hoedown MMX. We talked about the Ruby standard library and how sometimes we reinvent things when we have perfectly good tools waiting for us to use them.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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.
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!
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
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.
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.
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.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
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.
9. So what can kinds of
things can you do with
Ruby?
twitter: bphogan
email: brianhogan at napcs.com
10. Shoes.app do
para "Item name"
@name = edit_line
button "Add to list" do
@names.append do
para @name.text
end
@name.text = ""
end
button("Clear the list") {@names.clear}
@names = stack :width=>"100%", :height=>"90%"
end
twitter: bphogan
email: brianhogan at napcs.com
11. require 'sinatra'
require 'pathname'
get "/" do
dir = "./files/"
@links = Dir[dir+"*"].map { |file|
file_link(file)
}.join
erb :index
end
helpers do
def file_link(file)
filename = Pathname.new(file).basename
"<li><a href='#{file}' target='_self'>#{filename}</a></li>"
end
end
use_in_file_templates!
__END__
@@ index
<html>
<head>
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<style type="text/css" media="screen">@import "/stylesheets/iui.css";</style>
<script type="application/x-javascript" src="/javascripts/iui.js"></script>
</head>
<body>
<div class="toolbar">
<h1 id="pageTitle"></h1>
</div>
<ul id="home" title="Your files, sir." selected="true">
<%= @links %>
</ul>
</body>
</html>
twitter: bphogan
email: brianhogan at napcs.com
32. Methods (functions) are simple too.
# if start date + 6 months is > today
def on_probation?(start_date)
(start_date >> 6) > Date.today
end
33. Classes are easy too.
class Person
@started_on = Date.today
@name = ""
def started_on=(date)
@started_on = date
end
def started_on
@started_on
end
end
34. Class instance variables are private
class Person
@started_on = Date.today
Expose them through
@name = ""
accessor methods that
def started_on=(date)
@started_on = date resemble C# and VB
end
Property members.
def started_on
@started_on
end person = Person.new
person.age = 32
def name=(name) person.name = "Brian"
@name = name
end
person.age
=> 32
def name person.name
@name
=> "Brian"
end
end
35. Let Ruby write code for you!
class Person
@started_on = Date.today
@name = ""
def started_on=(date)
class Person
@started_on = date
end attr_accessor :name
attr_accessor :started_on
def started_on
@started_on end
end
def name=(name)
@name = name
end
def name
@name
end
end
36. Ruby is a loaded gun.
twitter: bphogan
email: brianhogan at napcs.com
37. So, write good tests.
twitter: bphogan
email: brianhogan at napcs.com
62. 8. Favor modules over
inheritance
twitter: bphogan
email: brianhogan at napcs.com
63. module SharedValidations
def self.included(base)
base.validates_presence_of :name
base.validates_uniqueness_of :name
end
end
class Project class Task
include SharedValidations include SharedValidations
end end
64. Do not use type,
use behaviors.
twitter: bphogan
email: brianhogan at napcs.com
66. module Doctor module Ninja
def treat_patient def attack
puts "All better!" puts "You’re dead!"
end end
end end
module Musician
def play_guitar
puts "meedily-meedily-meedily-meeeeeeeeee!"
end
end
67. person = Person.new
person.extend Ninja "You're dead!"
person.attack
person.extend Doctor
"All better!"
person.treat_patient
person.extend Musician "meedily-meedily-
person.play_guitar meedily-meeeeeeeeee!"
70. 10. Write code that
writes code.
twitter: bphogan
email: brianhogan at napcs.com
71. class User
ROLES = ["admin", "superadmin", "user", "moderator"]
ROLES.each do |role|
class_eval <<-EOF
def #{role}?
self.roles.include?("#{role}")
end
EOF
end
end
user = User.new
user.admin?
user.moderator?
83. Feature: creating a new page in the wiki
As an average anonymous user
I want to create a page about Ruby
So that I can tell everyone how awesome it is.
Scenario: Creating a new page and editing its content
Given I go to "/ruby"
Then I should see "Edit this page"
When I click "Edit this page"
And I fill in "body" with "Ruby is the best programming language in the whole world!"
And I press "Save"
Then I should see "Ruby is the best programming language in the whole world!"
twitter: bphogan
email: brianhogan at napcs.com
84. Testing the Wiki with
Webrat and Cucumber
twitter: bphogan
email: brianhogan at napcs.com
85. Ruby will make you
productive.
twitter: bphogan
email: brianhogan at napcs.com
87. Resources:
Try Ruby in your browser! http://tryruby.sophrinix.com/
Try SASS online: http://sass-lang.com/try.html
Try HAML online: http://haml-lang.com/try.html
http://staticmatic.rubyforge.org/
Sinatra: http://www.sinatrarb.com/
Sinatra Wiki source: http://github.com/napcs/sinatriki
Cucumber: http://cukes.info/
WATIR: http://watir.com/
twitter: bphogan
email: brianhogan at napcs.com
88. Questions?
Twitter: bphogan
brianhogan at napcs.com
twitter: bphogan
email: brianhogan at napcs.com
Editor's Notes
Hi everyone. I&#x2019;m Brian. I do Ruby and Rails training and consulting.
Maybe you do... but it can be even more fun.
I hated programming. I did some when I was a kid, but it wasn&#x2019;t what I wanted to do. I liked the web. And I started building sites in 1995 for small businesses.
so I started learning to program in ASP and eventually PHP. Even did some Java and some Oracle DBA stuff in there.
I was getting burned out, spending hours fighting with the languages while writing the same kind of applications over again.
A consultant who was working with me on a Java project introduced me to Rails
and now, four years later,
I get to work on fun projects, work with amazing people, I&#x2019;m excited about what I do, and I even got to write some books.
I want to get you excited about this language. I want to you to ask me any questions you have, and I want you to run home and start coding! So the best way to do that is to show you what you can do.
We can make a desktop application that works on Windows, Mac, and Linux using Shoes.
We can make a very simple iPhone-enabled website with Sinatra. This one serves files to you in around 50 lines of code.
We can use Sass to generate stylesheets for our applications. We can use variables for our colors and widths!
Use Rails. Rails is a great framework for building web applications. And despite what you&#x2019;ve heard, it scales exceptionally well, as long as you know how to scale a web application and you&#x2019;ve written good code.
Use Rails to kickstart a CMS.
Highly dynamic, high level, 100% object oriented, 100% open source, and really easy to learn.
Ruby was created by Yukihiro Matsumoto (Matz) in 1993. It&#x2019;s built on C, and has many implementations, including JRuby, which runs on the JVM, and IronRuby, which runs on the .Net platform.
&#x201C;How you feel is more important than what you do. &#x201C;
The entire language is designed for programmer productivity and fun.
Principle of Least Surprise - This means The language should behave in a way that is not confusing to experienced developers. It doesn&#x2019;t mean that it works like your current favorite language! But as you get used to Ruby, you&#x2019;ll find that you ramp up quickly.
Ruby achieves this through a consistant API. You won&#x2019;t find yourself guessing too much what methods are available to you.
It also helps that the syntax is simple. There are no unnecessary semicolons or curly braces. The interpreter knows when lines end.
We have numbers, strings, multiplication, addition, subtraction, and division, just like everyone else.
The square brackets denote an array.
This is the hash symbol, or the hash rocket. Whenever you see this, you&#x2019;re dealing with a hash.
When you see these, you&#x2019;re looking at Symbols. They represent names and some strings. They conserve memory, as repeating a symbol in your code uses the same memory reference, whereas repeating a string creates a new object on each use.
Unless is an alias for &#x201C;if not&#x201D;. Subtle, but sometimes much more readable.
You can append these suffixes to statements to prevent them from firing. This is a great space saver and it&#x2019;s easy to read
The two arrows (>>) is actually a method on the Date object that adds months. So here, we&#x2019;re adding six months to the start date and comparing it to today
Notice here that the input parameter is assumed to be a date. There&#x2019;s no type checking here.
The = is part of the method name. And Ruby&#x2019;s interpreter doesn&#x2019;t mind you putting a space in front of it to make it easier to read!
Making getters and setters is so common that Ruby can do it for you.
It assumes you are an intelligent person who wants to get things done. It will not try to protect you from your own stupidity.
In fact,
Test All The Effing Time! Let&#x2019;s go through adding our &#x201C;on_probation?&#x201D; method to our Person class. A person is on probation for the first six months of employment.
Here we have two tests, one using a person hired today, and another using a person last year.
Did we miss any cases?
Everything is an object in Ruby. There are no primitive types. Strings, integers, floats, everything. Even Nil, True, and False!
Everything. Even 0 and -1.
I&#x2019;m not here to tell you that dynamically typed languages are better than statically typed languages. I prefer dynamic typing. I am more productive with it. And most of the claims against it are false.
We don&#x2019;t need to specify a &#x201C;return&#x201D; keyword.
In this example, if the status is not closed, this method will return false. In Rails, if a before_save method returns false, the record won&#x2019;t save to the database.
There are methods on arrays and hashes to iterate over the elements stored within.
Blocks let you pass code as a parameter, so that the code may be run within the method. If you&#x2019;ve used closures or anonymous functions, you already understand this. But this is how Ruby developers work every day.
We can create modules of code that we can mix in to our classes.
In this example, we&#x2019;re using modules to replace inheritence. However, since classes are objects, we can also apply modules to instances of objects at runtime.
If it walks like a duck, and talks like a duck, it&#x2019;s a duck. Even if it&#x2019;s not.
Declare modules that encapsulate behavior. Here we have a doctor, a ninja, and a musician.
We can then mix in the behaviors to the instance of the class. Its type doesn&#x2019;t really matter. We can ask the instance if it has the methods we want and we can call them.
Reflection is built into the core language. It&#x2019;s not a tacked on library, and it&#x2019;s meant to be used to improve your code.
We can ask our model all sorts of questions, and even actually send messages dynamically.
We can loop over an array and generate methods on the object.
Sinatra is a simple web framework that basically maps incoming requests to backend code that produces responses.
That little bit of code gets us a working web application that handles requests.
We write stories using plain text, that describes what we want to do.