您的位置:首页 > 其它

How to be a Programmer: A Short, Comprehensive, and Personal Summary

2012-12-25 15:30 211 查看
URL : http://samizdat.mines.edu/howto/HowToBeAProgrammer.html

Chapter 1 Introduction

The excellent books: The Pragmatic Programmer, Code Complete, Rapid Development, Extreme Programming Explained, The essays of Paul Graham and Eric Raymond

Terms:

the term boss to refer to whomever gives you projects to do;

the words business, company, and tribe, synonymously except that business connotes moneymaking, company connotes the modern workplace and tribe is generally the people you share loyalty with.

Chapter 2 Beginner

Learn to Debug

Debugging is the cornerstone of being a programmer. The first meaning of the verb to debug is to remove errors, but the meaning that really matters is to see into the execution of a programm by examing it. A programmer that cannot debug effectively is blind.

The common ways of looking into the ‘innards’ of an executing program can be categorized as:

. Using a debugging tool,

. Printting --- Making a temporary modification to the program, typically adding lines that print information out, and

. logging ---- Creating a permanent window into the programs execution in the form of a log.

How to Debug by Splitting the Problem Space

If there is a single key to debugging is to use the divide and conquer technique on the mystery.

How to Remove an Error

Attempt to employ the scientific method of changing one thing and only one thing at a time.

How to Debug Using a Log

Logging is the practice of writing a system so that it produces a sequence of informative records, called a log. Absolute beginners must understand and use logs because their knowledge of the programming is limited; system architects must understand and use logs because of the complexity of the system. logs offer three basic advantages:

. Logs can provide useful information about bugs that are hard to reproduce

. logs can provide statistics and data relevant to performance, such as the time passing between statements.

. When configurable, logs allow general information to be captured in order to debug unanticipated specific problems without having to modify and/or redeploy the code just to deal with those specific problems.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: