Skip to Content
程序员的38堂成长课
book

程序员的38堂成长课

by Pete Goodliffe
January 2022
Beginner to intermediate
314 pages
6h 55m
Chinese
Posts & Telecom Press
Content preview from 程序员的38堂成长课
6
2
保持外观整洁
外表是靠不住的。
——伊索
没有人喜欢使用乱七八糟的代码,没有人喜欢格式参差不齐、五花八门的代码,也没有人
喜欢命名不知所云的代码。这样的代码既惹人厌,也不能创造价值,简直就是程序员的
炼狱。
我们关注好的代码,也就自然而然地关心代码的美观度。代码是否易于使用,最直接的决
定性因素就是它的美观度。每一本关于编程的书都会有一章讲述代码的编写规范,本书也
不例外。
程序员对编码规范极度重视,对它的讨论总是能演变成无休止的争吵。关于编码规范的争
吵通常包含如下部分:哪个编辑器最好用
1
、用
Tab
还是空格缩进、大括号的位置、每行代
码的最大长度以及各种大小写问题。大家各有所好,各不相让。
优秀的程序员深知编码规范的重要性,但是他们不会让自己陷入无意义的争吵。对于编码
规范,我们都得成熟点儿。
要诀
不要为了编码规范争吵,对于编码规范要有正确的态度。
1
我个人认为,
Vim
是最好用的编辑器。
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
Python应用开发指南

Python应用开发指南

Posts & Telecom Press, Ninad Sathaye
解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787115577948