《Confident Ruby》电子书下载

Confident Rubytxt,chm,pdf,epub,mobi下载
作者:Avdi Grimm
副标题: 32 Patterns for Joyful Coding
出版年: 2013-10-22
页数: 282
定价: USD 35.00
装帧: PDF/EPUB
ISBN: 9787564229993

内容简介 · · · · · ·

For many programmers, discovering Ruby is a revelation. They are overjoyed by how elegantly and succinctly they can state problems in the language. But then the real world creeps in, and that joy gradually wanes as the code becomes cluttered with distracting edge case scenarios, error handling, and checks for nil.

Confident Ruby is a guide to recapturing the joy of writing Ruby...




作者简介 · · · · · ·

Avdi Grimm has been hacking Ruby code for over 10 years, and is still loving it. He is chief aeronaut at ShipRise, head chef at RubyTapas.com, and a co-host of the Ruby Rogues podcast. He lives in southern Pennsylvania with his wife and five children.




目录 · · · · · ·

Introduction
- Ruby meets the real world
- Confident code
- A good story, poorly told
- Code as narrative
- The four parts of a method
· · · · · ·()
Introduction
- Ruby meets the real world
- Confident code
- A good story, poorly told
- Code as narrative
- The four parts of a method
- 3.times { rejoice! }
- Collecting Input
Sending a strong message
- Conditionally call conversion methods
- Define your own conversion protocols
- Define conversions to user-defined types
- Use built-in conversion functions
- Use the Array() conversion function to array-ify inputs
- Define conversion functions
- Replace “string typing” with classes
- Wrap collaborators in Adapters
- Use transparent adapters to gradually introduce abstraction
- Reject unworkable values with preconditions
- Use #fetch to assert the presence of Hash keys
- Document assumptions with assertions
- Handle special cases with a Guard Clause
- Represent special cases as objects
- Represent do-nothing cases as null objects
- Substitute a benign value for =nil=
- Use #fetch for defaults
- Use symbols as placeholder objects
- Bundle arguments into parameter objects
- Yield a parameter builder object
- Receive policies instead of data
Delivering Output
- Write total functions
- Call back instead of returning
- Represent failure with a benign value
- Represent failure with a special case object
- Return a status object
- Yield a status object
- Signal early termination with =throw=
Handling Failure
- Prefer top-level rescue clause
- Use checked methods for risky operations
- Use bouncer methods
Refactoring for Confidence
- MetricFu
- Stringer
- Parting Words
· · · · · · ()

下载地址

发布者:乐涵熙

文件说明:zip / 解压密码:electro-lviv.com

迅雷下载:您需要先后,才能查看

网盘下载:您需要先后,才能查看

关于内容:内容自于互联网,如果发现有违规内容请联系管理员删除!

作者: 乐涵熙

乐涵熙

该用户很懒,还没有介绍自己。

18 条评论

发表评论

  1. C媚儿MC媚儿M说道:
    1#

    值得买

  2. 说道:
    2#

    已经快没心情看了,凑合看吧.

  3. 温香抱满怀2017温香抱满怀2017说道:
    3#

  4. 你是会闪光的星你是会闪光的星说道:
    4#

    好的话也推荐别人看

  5. 显示更多