×
Effective Ruby编写高质量Ruby代码的48个有效方法-(英文版)

Effective Ruby编写高质量Ruby代码的48个有效方法-(英文版)

1星价 ¥45.5 (7.0折)
2星价¥45.5 定价¥65.0
暂无评论
图文详情
  • ISBN:9787121273063
  • 装帧:暂无
  • 册数:暂无
  • 重量:暂无
  • 开本:16开
  • 页数:211
  • 出版时间:2016-04-01
  • 条形码:9787121273063 ; 978-7-121-27306-3

本书特色

本书是作者peter j. jones近十年ruby开发经验的结晶。他利用48个ruby实战案例,揭示了ruby鲜有人知的特点、难点和习惯用法。每种实践案例都包含了具体的、实用的、组织清晰的指导方针,细致的建议,详细的专业理由,并通过示例代码阐明。本书为ruby开发的每个主要领域都提供了切实可行的建议,从模块到内存,再到元编程。旨在通过全面地介绍ruby编程技术,帮助ruby程序员及爱好者写出更健壮、更高效、更易维护的和运行的代码。适合ruby程序员及爱好者阅读。

内容简介

本书不提倡死板地遵守规则,而是希望通过完整的ruby编程技术讲解,帮助你系统地提高代码质量。主要特性包括:*怎样避免与ruby有时让人出乎意料的特性相关的陷阱*为了成功掌握rails(和其他大型框架)你应该知道的继承等级体系*如何通过一些被误解的方法利用集合完成非常有用的工作*更好地使用异常来提高代码的可靠性*强大的元编程方法(和避免使用的技术)*切实可行的高效测试方案,包括minitest单元测试和spec测试*怎样可靠地管理rubygem依赖*怎样创建基本的ruby内存管理和显示工具*怎样通过理解ruby语言解释器的内部实现来提高代码的执行效率 

目录

序言前言致谢关于作者chapter 1: accustoming yourself to rubyitem 1: understand what ruby considers to be trueitem 2: treat all objects as if they could be nilitem 3: avoid ruby’s cryptic perlismsitem 4: be aware that constants are mutableitem 5: pay attention to run-time warningschapter 2: classes, objects, and modulesitem 6: know how ruby builds inheritance hierarchiesitem 7: be aware of the different behaviors of superitem 8: invoke super when initializing subclassesitem 9: be alert for ruby’s most vexing parseitem 10: prefer struct to hash for structured dataitem 11: create namespaces by nesting code in modulesitem 12: understand the different flavors of equalityitem 13: implement comparison via “<=>” and the comparable moduleitem 14: share private state through protected methodsitem 15: prefer class instance variables to class variableschapter 3: collectionsitem 16: duplicate collections passed as arguments before mutating themitem 17: use the array method to convert nil and scalar objects into arraysitem 18: consider set for efficient element inclusion checkingitem 19: know how to fold collections with reduceitem 20: consider using a default hash valueitem 21: prefer delegation to inheriting from collection classeschapter 4: exceptionsitem 22: prefer custom exceptions to raising stringsitem 23: rescue the most specific exception possibleitem 24: manage resources with blocks and ensureitem 25: exit ensure clauses by flowing off the enditem 26: bound retry attempts, vary their frequency, and keep an audit trailitem 27: prefer throw to raise for jumping out of scopechapter 5: metaprogrammingitem 28: familiarize yourself with module and class hooksitem 29: invoke super from within class hooksitem 30: prefer define_method to method_missingitem 31: know the difference between the variants of evalitem 32: consider alternatives to monkey patchingitem 33: invoke modified methods with alias chainingitem 34: consider supporting differences in proc arityitem 35: think carefully before using module prependingchapter 6: testingitem 36: familiarize yourself with minitest unit testingitem 37: familiarize yourself with minitest spec testingitem 38: simulate determinism with mock objectsitem 39: strive for effectively tested codechapter 7: tools and librariesitem 40: know how to work with ruby documentationitem 41: be aware of irb’s advanced featuresitem 42: manage gem dependencies with bundleritem 43: specify an upper bound for gem dependencieschapter 8: memory management and performanceitem 44: familiarize yourself with ruby’s garbage collectoritem 45: create resource safety nets with finalizersitem 46: be aware of ruby profiling toolsitem 47: avoid object literals in loopsitem 48: consider memoizing expensive computationsepilogueindex
展开全部

作者简介

Peter J. Jones是一个自由软件开发者,还是Devalot.com编程研讨组的高级导师。他从2005年起就开始使用Ruby编程,为几届编程研讨组写过教案并教过学,包括为Ruby初学者准备的11周的课程。

预估到手价 ×

预估到手价是按参与促销活动、以最优惠的购买方案计算出的价格(不含优惠券部分),仅供参考,未必等同于实际到手价。

确定
快速
导航