Ruby/Rails for Python developers, Vitaly Kushner

Get Started. It's Free
or sign up with your email address
Ruby/Rails for Python developers, Vitaly Kushner by Mind Map: Ruby/Rails for Python developers, Vitaly Kushner

1. stuff that doesn't look like code

2. Title

2.1. Ruby Magic

2.1.1. why is it awesome contrary to Python common thinking

3. About

3.1. Founder of Astrails

3.2. Started working with Rails in 2005

3.3. History

3.3.1. started with Python

3.3.2. then due to common language in SysAdmin, moved to Perl

3.3.3. found it better than Python - does the job, & fas to write tho can't understand later

3.3.4. fond of dynamic languages

3.3.5. searched for companies working in Lisp, couldn't find 1 in israel

3.3.6. then decided to move to the web

3.3.7. heard about Ruby had a look & didn't like

3.3.8. then, saw the webcast "blog in 5 minutes" decided can't ignore this, must study

3.3.9. since then, in love with the language/technology

4. Magic

4.1. doesn't agree with

4.1.1. explicit is better than implicit if so, write in Java Java requires IDE, while dynamic languages can be edited in Notepad without a problem

5. Programming Languages

5.1. Lisp at the top

5.2. Python & Ruby very similar

5.2.1. Ruby is a step ahead of Python

5.3. Erlang better for concurrenct computation

5.4. mentions

5.4.1. Paul Graham's concept of Blah language paradox

5.5. indentation

5.5.1. likes Python's

5.5.2. thinks it created antagonism that hurted adoption

6. Python virtues critique

6.1. Beautiful is better than ugly

6.1.1. Ruby emphasizes more Elegance syntax that reduces clutter makes it closer to natural language

6.2. Explicit is better than implicit

6.2.1. thinks it's wrong "implicit is better than explicit"

6.3. ..

6.4. There should be 1 & preferrably only 1 way to do it

6.4.1. Ruby like Perl prefers having many ways

6.4.2. Rails tho says there's a recommended way & it's difficult to do it otherwise

7. Elegance

7.1. close to english as much as possible

8. Monkey patching

8.1. Unlike Python, Ruby allows & encourages it

8.1.1. e.g. 3.megabytes => 3145728 [audience critique] hard to trace where is it implemented hard to maintain 10.monthes.from_now 5.minutes.ago.utc

8.2. enables creating beautiful DSL's

8.2.1. useful for readable unit-testing Untitled

9. Blocks

9.1. like lambda but supporting also statements

9.2. enables creating DSL's that non-programmers can understand & even modify

9.3. e.g.

9.3.1. Untitled

9.3.2. x_times(10, lambda {|x| puts x}) or using shortcut x_times(10) {|x| puts x}

9.4. useful for nested blocks

9.4.1. looks more like configuration file

9.5. enables functionality similar to macro's e,g, in Lisp

9.5.1. thos less effective - lousy performance

10. DSL's

10.1. not requiring paranthesis, makes the code much less cluttered, & similar to very readable configuration file

10.2. example

10.2.1. code of Astrails-safe looks like config file indeed very readable

10.2.2. Untitled

11. Method missing

11.1. If method not found, an event occurs that you can implement

11.2. e.g.

11.2.1. User:find_by_company("Astrails")

11.2.2.'timeframe' => '10d')

11.3. works by levels

11.4. used daily, to extend objects with methods

11.4.1. creates very readable code

11.5. exists in Python too

11.5.1. taken from SmallTalk

12. gem

12.1. just works

12.2. e.g.

12.2.1. sudo gem install astrails-safe

12.3. repos

12.3.1. Rubyforge 8K gems

12.3.2. GutHub 7K gems

12.3.3. GemCutter same

12.4. if you're looking for something, someone probably did it

12.5. Python has more libraries

12.5.1. due to legacy

13. Q&A

13.1. What else is written in Ruby besides Rails

13.1.1. Puppet

13.1.2. Micro frameworks Sinatra

13.1.3. Rake like make but in Ruby

13.1.4. Capistrano like fabric

13.1.5. build tools for Java