As programmers, we've all seen source code that's so ugly and buggy it makes our brain ache. And let's be honest, we've all written code like that. With this book, you'll learn to write code that's easy to read and understand. You'll have more fun and your coworkers will love you.
The Art of Coding focuses on the nuts and bolts of programming, with simple and practical techniqu...
As programmers, we've all seen source code that's so ugly and buggy it makes our brain ache. And let's be honest, we've all written code like that. With this book, you'll learn to write code that's easy to read and understand. You'll have more fun and your coworkers will love you.
The Art of Coding focuses on the nuts and bolts of programming, with simple and practical techniques you can use every time you sit down to write code. You'll find tips throughout the book, with easy-to-digest code examples, helpful illustrations, and cartoons for fun.
* Learn to pick variable names that are "dense with information"
* Organize your loops and conditionals so they're easy to understand
* Make your comments short and sweet
* Recognize when your code is doing too many things at once
* Write tests that are concise, but thorough
* Master the art of breaking hard problems into many smaller ones
作者简介
· · · · · ·
Dustin Boswell
Although raised in the circus, Dustin Boswell realized early on that he was better at computers than at acrobatics. Dustin received his B.S. from CalTech, where he got hooked on Computer Science, and then went to UC San Diego for his Master's Degree. He worked at Google for five years, on a variety of projects including web crawling infrastructure. Dustin is now ...
Although raised in the circus, Dustin Boswell realized early on that he was better at computers than at acrobatics. Dustin received his B.S. from CalTech, where he got hooked on Computer Science, and then went to UC San Diego for his Master's Degree. He worked at Google for five years, on a variety of projects including web crawling infrastructure. Dustin is now an internet startup junkie who spends his free time hiking the Santa Monica mountains and being a new dad.
Trevor Foucher has been shipping software projects for over 10 years, including Windows 2000 and OneCare at Microsoft, and Webmaster Tools at Google. He's been an individual contributor, manager, and tech lead. His goal is to make code more readable and reliable.
目录
· · · · · ·
Dustin Boswell turned to computer programming at a very early age. After receiving his master's degree he joined Google, where he spends his working hours on web crawling and AdSense Ads.
Trevor Foucher has been shipping software projects for over 10 years, including Windows 2000 and OneCare at Microsoft, and Webmaster Tools at Google. He's been an individual contributor, manager, and tech lead. His goal is to make code more readable and reliable.
Dustin Boswell turned to computer programming at a very early age. After receiving his master's degree he joined Google, where he spends his working hours on web crawling and AdSense Ads.
Trevor Foucher has been shipping software projects for over 10 years, including Windows 2000 and OneCare at Microsoft, and Webmaster Tools at Google. He's been an individual contributor, manager, and tech lead. His goal is to make code more readable and reliable.
· · · · · · (收起)
Names like i, j, iter, and it are commonly used as indices and loop iterators. Even though these names are generic, they’re understood to mean “I am an iterator.” (In fact, if you used one of these names for some other purpose, it would be confusing—so don’t do that!)
But sometimes there are better iterator names than i, j, and k. For instance, the following loops find which users belong to which clubs: (查看原文)
《The art of readable code》笔记 25 November 2012 前言 入职新公司,接收前任留下的code,觉得有些凌乱,于是乘势带着学习的心态又把整个代码重写了遍。期间又把去年读过的这本书拿过来重读了一遍,这本书举的例子是作者平时的一些总结,作为顶尖互联网公司(Google)的工程师...
(展开)
0 有用 netcasper 2011-12-07 15:09:51
终于知道什么叫“专注于细节”了!
0 有用 皮皮兔 2013-04-17 01:14:01
插图很赞,排版也好,可惜内容无甚新意
0 有用 forgetthisuser 2013-03-28 13:29:35
我去写代码了。
0 有用 丸子(^.^)v 2012-03-20 14:15:04
一晚上一边整 iphone 一边聊QQ群 一边获取的成果= = 读囵不求甚解……
0 有用 Maverick@Walden 2012-03-16 00:20:17
简洁、明了。不仅告诉你怎么做,还告诉你为什么要这么做。一个原则:你的代码应该尽可能容易理解。
0 有用 芒可猫 2022-06-14 16:04:27
@2017-03-02 23:24:02
0 有用 Rick 2022-04-19 12:38:01
所有内容以前在各种地方看到过了, nothing new
0 有用 maggie_xmj 2021-02-21 12:03:08
命名备注这些经常在写代码里被忽略的东西确实很重要。以前总以为代码行数少就很自豪,工作了发现代码写的让人看懂让自己在之后看懂更重要。这书很好读对很多基本的概念解释地不错。同事写的必须给个满星👍
0 有用 RogerZQ 2020-06-01 08:24:59
这本书标注了六七年终于这星期抽空看掉了,每天一到两小时30页,一周看完。需要编程经验,不适合新手。最后的推荐阅读书目很有意思,基本是软件工程必读著作,还主动把自己和 Clean Code 对比了一下。看完这个 Clean Code 基本不用看 - Clean Code 使用的是 Java 所以多出来的部分是 error handling 和 cocurrency 的东西。而本书针对的是泛化的编程语... 这本书标注了六七年终于这星期抽空看掉了,每天一到两小时30页,一周看完。需要编程经验,不适合新手。最后的推荐阅读书目很有意思,基本是软件工程必读著作,还主动把自己和 Clean Code 对比了一下。看完这个 Clean Code 基本不用看 - Clean Code 使用的是 Java 所以多出来的部分是 error handling 和 cocurrency 的东西。而本书针对的是泛化的编程语言,例子里用得最多的是 C++,其次是 JavaScript 和 Python。 (展开)
0 有用 combinatorx 2020-03-02 16:01:26
Uncle Bob 的经典之作