• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Ignite
 

Ignite

on

  • 351 views

A short i

A short i

Statistics

Views

Total Views
351
Views on SlideShare
351
Embed Views
0

Actions

Likes
1
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Ignite Ignite Presentation Transcript

    • RUBY-FIED !! By @phoenixwizard Ignite Talks @kuliza
    • RUBY ? What are we talking about ?
    •  
    • PHEELOSOPPHHY Often people, especially computer engineers, focus on the machines. They think, "By doing this, the machine will run faster. By doing this, the machine will run more effectively. By doing this, the machine will something something something." They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves. Principal OF Least Astonishment (POLA) And after two years of C++ programming, it still surprises me. ( Matsumoto said this NOT @phoenixwizard )
    • As of 2010, there are a number of complete or upcoming alternative implementations of Ruby, including YARV, JRuby, Rubinius, IronRuby, MacRuby, and HotRuby.
    • Seeing Everything as an Object “ I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python3.” 5.times { print "We *love* Ruby -- it's outrageous!" }
    • Blocks, a Truly Expressive Feature search_engines = %w[Google Yahoo MSN].map do |engine| "http://www." + engine.downcase + ".com" end
    • Ruby’s Visual Appearance var could be a local variable. @var is an instance variable. $var is a global variable.
      • [1, 2, 3] * 3 == [1, 2, 3, 1, 2, 3, 1, 2, 3] %w{this is a test} * ", " # => "this, is, a, test" h = { :name => "Fred", :age => 77 } h.map { |i| i * "=" } * "n" # => "age=77nname=Fred"
    • &quot;[%s]&quot; % &quot;same old drag&quot; # => &quot;[same old drag]&quot; x = %w{p hello p} &quot;<%s>%s</%s>&quot; % x # => &quot;<p>hello</p>&quot;
    • Use enumerations to cut down repetitive code (DRY) %w{rubygems daemons eventmachine}.each do |x| require x end
    • Use enumerations to cut down repetitive code (DRY) %w{rubygems daemons eventmachine}.each do |x| require x end
    • Rescue blocks don't need to be tied to a 'begin' def x # ... rescue # ... end
    • FRAMEWORKS (OTHER THAN RAILS) LET ME FIRST TALK OF RAILS FOR FEW SECONDS !! THE WEB DEVOLPMENT THAT DOESNT HURT
    •  
    • mERp Like Ruby on Rails, Merb is an MVC framework. Unlike Rails, Merb is ORM-agnostic, JavaScript library agnostic, and template language agnostic, preferring plugins that add in support for a particular feature rather than trying to produce a monolithic library with everything in the core. In fact, this is a guiding principle of the project, which has led to third-party support for the ActiveRecord, DataMapper, and Sequel ORMs.
    • Vintage Vintage is a very small web framework written in Ruby based on the original idea of Merb: Mongrel serving up ERb (Embedded Ruby) templates. The idea has been expanded and now Vintage helps you serve up ERb, HAML, Textile, Markdown, and Markaby templates.
    • Ruby is Productive and Fun For me, the purpose of life is, at least partly, to have joy. Programmers often feel joy when they can concentrate on the creative side of programming, so Ruby is designed to make programmers happy. I consider a programming language as a user interface, so it should follow the principles of user interface. Yukihiro Matsumoto (a.k.a. “Matz”), 2000, emphasis added
    • What are the principles of good user interface? Here are the three principles with supporting quotes by Matz: Principle of Conciseness : “I want computers to be my servants, not my masters. Thus, I’d like to give them orders quickly. A good servant should do a lot of work with a short order.”
    • Principle of Consistency : “... a small set of rules covers the whole Ruby language. Ruby is a relatively simple language, but it’s not too simple. I’ve tried to follow the principle of ‘least surprise.’ Ruby is not too unique, so a programmer with basic knowledge of programming languages can learn it very quickly.” Principle of Flexibility : “Because languages are meant to express thought, a language should not restrict human thought, but should help it. Ruby consists of an unchangeable small core (that is, syntax) and arbitrary extensible class libraries....”