{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

编程格调

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

编程格调

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

本书是编程风格方面的奠基之作,40年以来经久不衰,价值依旧,值得读者深入阅读和参考阅读。
本书作者具有很高的知名度和权威度,是斯坦福大学的著名教授,也是计算机方面的著名科学家。
作者四十年前在本书中给出的70多条较佳实践和规则,大多数在今天仍然适用。一方面,很多程序员通过遵循这些最佳实践和规则编写出可靠而稳定的程序;另一方面,一些调试人员甚至将本书作为调试程序的参考书和检查表。
本书译者是文津图书奖获奖图书的译者。
Content Description

本书是编程惯用法和规则的实践指南。全书从表达、控制结构、程序结构、输入和输出、常见错误、效率和测试工具、文档等多个角度,概括了程序设计中若干的最佳实践或规则,并通过代码示例加以分析和阐释。
本书两位作者都是程序设计领域的大师级任务。他们四十年前在本书中给出的70多条最佳实践和规则,大多数在今天仍然适用。
本书堪称计算机专业人士和程序员的必读的经典之作,适合于不同层级的程序员和计算机相关专业的学生参考阅读。
Author Description

作者简介
Brian W. Kernighan,全球知名、德高望重的计算机先驱,在程序设计方法论和软件工程方面做了大量开创性的工作。他曾长期在贝尔实验室工作,现在普林斯顿大学计算机科学系任教。他著有数本经典教材,包括与Dennis Ritchie合著的传世之作The C Programming Language、与Rob Pike合著的The Practice of Programming,以及最近出版的科普图书D is for Digital等。他还是AWK编程语言的发明者,这种语言广泛地应用在UNIX/Linux应用中。“K&R C”和“AWK”中的“K”都代表Kernighan。

P.J. Plauger,全球知名的计算机科学家、C/ C++技术专家以及技术图书作者,更是数个标准C/C++程序库的作者。他曾经在贝尔实验室工作,现在任美国Dinkumware公司总裁。他曾经担任 C/C++ Users Journal高级编辑,也是The Standard C Library、Standard C : A Reference 和The Standard Template Library等图书的作者。

译者简介

高博,1983年生,毕业于上海交通大学。目前在互联网金融创业公司任首席产品官兼首席质量官,在信息科学和工程领域有近15年实践和研究经验。酷爱读书和写作,业余研究兴趣涉猎广泛。译著包括图灵奖作者高德纳的《研究之美》和布鲁克斯的《设计原本》,以及Jolt大奖作品《元素模式》等,出版翻译作品计近百万字。
新浪微博:但以理_高博
微信公众号:高博的世界

徐章宁,1984年生,就读于上海交通大学,硕士毕业后就职于EMC中国卓越研发集团,现任EMC公司高级系统管理工程师,从事软件运维工作多年,钟爱开源软件。对各类知识有广泛兴趣,平日喜爱参与问答网站讨论,热爱读书摄影和写作。
Comments

本书堪称计算机专业人士和程序员必读的经典之作。全书从表达、控制结构、程序结构、输入和输出、常见错误、效率和测试工具、文档等多个角度,概括了程序设计中的最佳实践或规则,并通过代码示例加以分析和阐释。

作者四十年前在本书中给出的70多条最佳实践和规则,大多数在今天仍然适用。一方面,很多程序员通过遵循这些最佳实践和规则编写出可靠而稳定的程序;另一方面,一些调试人员甚至将本书作为调试程序的参考书和检查表。

正因为如此,本书的价值没有因为时间的推移而消磨,相反得到了更多的验证和凸显。时至今日,本书仍然被奉为程序员必读的经典之作。

本书中包含的一些重要的规则(我们称之为“格调建议”)如下:
撰写简洁的程序——不要耍小聪明
代码要清晰,不要为了“效率”牺牲可读性
使用语言好的特性,避免使用不好的特性
先用容易理解的伪语言编写代码,然后再翻译成你需要使用的语言
分块编写和测试大的程序
校验输入的合法性和合理性
在边界值上测试程序
先做对,再做快
保持简单性,反而会更快
不要过度注释
Catalogue

第1章绪论 1
撰写简洁的程序—不要耍小聪明 2
第2章表达 13
简单并且直接地表达你要说的意思 14
使用库函数 14
避免使用临时变量 16
代码要清晰,不要为了“效率”牺牲可读性 16
让机器干脏活 17
用函数调用替代重复的表达式 18
加括号来避免歧义 21
选择不会被混淆的变量名 21
避免使用Fortran的算术IF 23
避免不必要的分支 25
使用语言好的特性,避免使用不好的特性 25
不要使用条件分支来代替一个逻辑表达式 26
用“电话测试”来检查可读性 29
第3章控制结构 39
使用DO-END和缩进来界定语句组 40
用IF-ELSE强调两个操作中只有一个被执行 42
用DO和DO-WHILE来强调循环的存在 45
确保你的程序是自顶向下阅读的 46
使用IF…ELSE IF…ELSE IF…ELSE 来实现多路分支 47
使用基本的控制流结构 48
先用容易理解的伪语言编写代码,然后再翻译成 你需要使用的语言 52
避免使用THEN-IF和空ELSE 55
避免使用ELSE GOTO和ELSE RETURN 56
判断要尽可能紧挨着与之相关的操作 58
使用数组来避免重复的控制流 61
选择可以简化程序的数据表示方法 63
不要止步于第一遍的代码草稿 66
第4章程序结构 71
模块化,使用子例程 74
让模块之间的耦合变得可见 75
每一个模块都应该做好一件事 76
确保每一个模块都隐藏好一些东西 78
以数据为导向来构建程序的结构 80
不要修补烂代码——重写它 84
分块编写和测试大的程序 91
对于递归定义的数据结构使用递归过程 91
第5章输入和输出 97
校验输入的合法性和合理性 100
保证输入数据不会违背程序的限制 101
利用文件结束符号或结束标志来终止输入, 不要让用户去计数 102
识别出非法输入数据,如果可能则纠正之 103
使用统一的形式处理文件结束条件 105
让输入数据易于准备,并让输出数据意义不言自明 108
使用统一的输入格式 110
让输入数据易于校对 111
尽可能选择自由格式输入 112
使用含义自明的输入,指定默认值,将以上二者都输出 112
将输入与输出局限在子例程中 116
第6章常见错误 119
确保所有的变量在使用之前都被初始化 120
不要停留在一个bug上 122
使用调试编译器 124
用DATA语句或INITIAL属性初始化常量, 用可执行语句初始化变量 125
小心“差一”错误 126
要注意对不等式进行正确的分支 126
避免循环有多个出口 128
确保你的代码巧妙地“不做事情” 131
在边界值上测试程序 135
预防性编程 136
10.0乘以0.1不等于1.0 137
不要比较浮点数是否相等 139
第7章效率和测试工具 145
先做对,再做快 147
在提高程序运行速度时,要保持其正确性 149
先把程序改得更简洁,再提高其运行速度 150
不要为了“效率”上的蝇头小利而牺牲程序的简洁性 151
让编译器执行平凡优化 151
不要勉强地复用代码,应该进行改编 152
保证特殊情况真的有特殊性 155
保持简单性,反而会更快 157
不要为了提高速度而画蛇添足—去寻找更好的算法 159
在程序中放置测试语句,“增效”之前先执行测算 161
第8章文档 165
确保注释和代码一致 167
不要用注释复述代码做的事情, 每个注释都要有实际意义 167
不要注释糟糕的代码——重写它 169
使用含有意义的变量名 170
使用含有意义的语句标签 171
程序的格式要有助于读者的理解 171
用缩进来体现程序的逻辑结构 172
记录你的数据规划 175
不要过度注释 176
结束语 180

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book