Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Debugging tools are wonderful when they are stable and available, but the printl

Some beginners fear debugging when it requires modifying code. This is understandable - it is a little like exploratory surgery. But you have to learn to poke at the code and make it jump; you have to learn to experiment on it, and understand that nothing that you temporarily do to it will make it worse. If you feel this fear, seek out a mentor - we lose a lot of good programmers at the delicate onset of their learning to this fear.

Next [How to Debug by Splitting the Problem Space](02-How to Debug by Splitting the Problem Space.md)
Next [How to Debug by Splitting the Problem Space](02-How-to-Debug-by-Splitting-the-Problem-Space.md)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ To a true beginner, the space of all possible errors looks like every line in th

Once you have evenly subdivided the space of all that can go wrong, you must try to decide in which space the error lies. In the simple case where the mystery is: ‘Which single unknown line makes my program crash?’, you can ask yourself: ‘Is the unknown line executed before or after this line that I judge to be executed in the middle of the running program?’ Usually you will not be so lucky as to know that the error exists in a single line, or even a single block. Often the mystery will be more like: ‘Either there is a pointer in that graph that points to the wrong node, or my algorithm that adds up the variables in that graph doesn't work.’ In that case you may have to write a small program to check that the pointers in the graph are all correct in order to decide which part of the subdivided mystery can be eliminated.

Next [How to Remove an Error](03-How to Remove an Error.md)
Next [How to Remove an Error](03-How-to-Remove-an-Error.md)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ In fixing a bug, you want to make the smallest change that fixes the bug. You ma

Sometimes, there are really several bugs that look like one. It is up to you to define the bugs and fix them one at a time. Sometimes it is unclear what the program should do or what the original author intended. In this case, you must exercise your experience and judgment and assign your own meaning to the code. Decide what it should do, and comment it or clarify it in some way and then make the code conform to your meaning. This is an intermediate or advanced skill that is sometimes harder than writing the original function in the first place, but the real world is often messy. You may have to fix a system you cannot rewrite.

Next [How to Debug Using a Log](04-How to Debug Using a Log.md)
Next [How to Debug Using a Log](04-How-to-Debug-Using-a-Log.md)
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ The amount to output into the log is always a compromise between information and

If you have a permanent log, printlining can now be done in terms of the log records, and some of the debugging statements will probably be permanently added to the logging system.

Next [How to Understand Performance Problems](05-How to Understand Performance Problems.md)
Next [How to Understand Performance Problems](05-How-to-Understand-Performance-Problems.md)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ There are many dimensions to the performance of a computer system, and many reso

Contention for shared resources that are synchronized can cause deadlock and starvation. Deadlock is the inability to proceed because of improper synchronization or resource demands. Starvation is the failure to schedule a component properly. If it can be at all anticipated, it is best to have a way of measuring this contention from the start of your project. Even if this contention does not occur, it is very helpful to be able to assert that with confidence.

Next [How to Fix Performance Problems](06-How to Fix Performance Problems.md)
Next [How to Fix Performance Problems](06-How-to-Fix-Performance-Problems.md)
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Often, the bottlenecks in performance will be an example of counting cows by cou

What do you do when you start to run out of low-hanging fruit? Well, you can reach higher, or chop the tree down. You can continue making small improvements or you can seriously redesign a system or a subsystem. (This is a great opportunity to use your skills as a good programmer, not only in the new design but also in convincing your boss that this is a good idea.) However, before you argue for the redesign of a subsystem, you should ask yourself whether or not your proposal will make it five to ten time better.

Next [How to Optimize Loops](07-How to Optimize Loops.md)
Next [How to Optimize Loops](07-How-to-Optimize-Loops.md)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Sometimes you'll encounter loops, or recursive functions, that take a long time

The cost of each of these operations depends on your specific system. On some systems compilers and hardware do these things for you. Clear, efficient code is better than code that requires an understanding of a particular platform.

Next [How to Deal with I/O Expense](08-How to Deal with IO Expense.md)
Next [How to Deal with I/O Expense](08-How-to-Deal-with-IO-Expense.md)
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Representations can often be improved by a factor of two or three from their fir

A third technique that is sometimes possible is to improve the locality of reference by pushing the computation closer to the data. For instance, if you are reading some data from a database and computing something simple from it, such as a summation, try to get the database server to do it for you. This is highly dependent on the kind of system you're working with, but you should explore it.

Next [How to Manage Memory](09-How to Manage Memory.md)
Next [How to Manage Memory](09-How-to-Manage-Memory.md)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ An important case occurs when you can define an upper bound on the number of obj

Sometimes you have to explicitly free allocated space so it can be reallocated rather than rely on garbage collection. Then you must apply careful intelligence to each chunk of allocated memory and design a way for it to be deallocated at the appropriate time. The method may differ for each kind of object you create. You must make sure that every execution of a memory allocating operation is matched by a memory deallocating operation eventually. This is so difficult that programmers often simply implement a rudimentary form or garbage collection, such as reference counting, to do this for them.

Next [How to Deal with Intermittent Bugs](10-How to Deal with Intermittent Bugs.md)
Next [How to Deal with Intermittent Bugs](10-How-to-Deal-with-Intermittent-Bugs.md)
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ This illustrates some risk associated with third-party software. We were using a

The stripper performed well except on some long and unusual kinds of texts. On these texts, the code was quadratic or worse. This means that the processing time was proportional to the square of the length of the text. Had these texts occurred commonly, we would have found the bug right away. If they had never occurred at all, we would never have had a problem. As it happens, it took us weeks to finally understand and resolve the problem.

Next [How to Learn Design Skills](11-How to Learn Design Skills.md)
Next [How to Learn Design Skills](11-How-to-Learn-Design-Skills.md)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Then you must do it yourself. Start with a small project. When you are finally d

It is natural and helpful to develop your own style, but remember that design is an art, not a science. People who write books on the subject have a vested interest in making it seem scientific. Don't become dogmatic about particular design styles.

Next [How to Conduct Experiments](12-How to Conduct Experiments.md)
Next [How to Conduct Experiments](12-How-to-Conduct-Experiments.md)
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ First, try to be very clear about your hypothesis, or the assertion that you are

You will often find yourself having to design a series of experiments, each of which is based on the knowledge gained from the last experiment. Therefore, you should design your experiments to provide the most information possible. Unfortunately, this is in tension with keeping each experiment simple - you will have to develop this judgement through experience.

Next [Team Skills - Why Estimation is Important](../Team-Skills/01-Why Estimation is Important.md)
Next [Team Skills - Why Estimation is Important](../Team-Skills/01-Why-Estimation-is-Important.md)
46 changes: 23 additions & 23 deletions 1-Beginner/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# 1. Beginner

- Personal Skills
- [Learn to Debug](Personal-Skills/01-Learn To Debug.md)
- [How to Debug by Splitting the Problem Space](Personal-Skills/02-How to Debug by Splitting the Problem Space.md)
- [How to Remove an Error](Personal-Skills/03-How to Remove an Error.md)
- [How to Debug Using a Log](Personal-Skills/04-How to Debug Using a Log.md)
- [How to Understand Performance Problems](Personal-Skills/05-How to Understand Performance Problems.md)
- [How to Fix Performance Problems](Personal-Skills/06-How to Fix Performance Problems.md)
- [How to Optimize Loops](Personal-Skills/07-How to Optimize Loops.md)
- [How to Deal with I/O Expense](Personal-Skills/08-How to Deal with IO Expense.md)
- [How to Manage Memory](Personal-Skills/09-How to Manage Memory.md)
- [How to Deal with Intermittent Bugs](Personal-Skills/10-How to Deal with Intermittent Bugs.md)
- [How to Learn Design Skills](Personal-Skills/11-How to Learn Design Skills.md)
- [How to Conduct Experiments](Personal-Skills/12-How to Conduct Experiments.md)
- [Learn to Debug](Personal-Skills/01-Learn-To-Debug.md)
- [How to Debug by Splitting the Problem Space](Personal-Skills/02-How-to-Debug-by-Splitting-the-Problem-Space.md)
- [How to Remove an Error](Personal-Skills/03-How-to-Remove-an-Error.md)
- [How to Debug Using a Log](Personal-Skills/04-How-to-Debug-Using-a-Log.md)
- [How to Understand Performance Problems](Personal-Skills/05-How-to-Understand-Performance-Problems.md)
- [How to Fix Performance Problems](Personal-Skills/06-How-to-Fix-Performance-Problems.md)
- [How to Optimize Loops](Personal-Skills/07-How-to-Optimize-Loops.md)
- [How to Deal with I/O Expense](Personal-Skills/08-How-to-Deal-with-IO-Expense.md)
- [How to Manage Memory](Personal-Skills/09-How-to-Manage-Memory.md)
- [How to Deal with Intermittent Bugs](Personal-Skills/10-How-to-Deal-with-Intermittent-Bugs.md)
- [How to Learn Design Skills](Personal-Skills/11-How-to-Learn-Design-Skills.md)
- [How to Conduct Experiments](Personal-Skills/12-How-to-Conduct-Experiments.md)
- Team Skills
- [Why Estimation is Important](Team-Skills/01-Why Estimation is Important.md)
- [How to Estimate Programming Time](Team-Skills/02-How to Estimate Programming Time.md)
- [How to Find Out Information](Team-Skills/03-How to Find Out Information.md)
- [How to Utilize People as Information Sources](Team-Skills/04-How to Utilize People as Information Sources.md)
- [How to Document Wisely](Team-Skills/05-How to Document Wisely.md)
- [How to Work with Poor Code](Team-Skills/06-How to Work with Poor Code.md)
- [How to Use Source Code Control](Team-Skills/07-How to Use Source Code Control.md)
- [How to Unit Test](Team-Skills/08-How to Unit Test.md)
- [Take Breaks when Stumped](Team-Skills/09-Take Breaks when Stumped.md)
- [How to Recognize When to Go Home](Team-Skills/10-How to Recognize When to Go Home.md)
- [How to Deal with Difficult People](Team-Skills/11-How to Deal with Difficult People.md)
- [Why Estimation is Important](Team-Skills/01-Why-Estimation-is-Important.md)
- [How to Estimate Programming Time](Team-Skills/02-How-to-Estimate-Programming-Time.md)
- [How to Find Out Information](Team-Skills/03-How-to-Find-Out-Information.md)
- [How to Utilize People as Information Sources](Team-Skills/04-How-to-Utilize-People-as-Information-Sources.md)
- [How to Document Wisely](Team-Skills/05-How-to-Document-Wisely.md)
- [How to Work with Poor Code](Team-Skills/06-How-to-Work-with-Poor-Code.md)
- [How to Use Source Code Control](Team-Skills/07-How-to-Use-Source-Code-Control.md)
- [How to Unit Test](Team-Skills/08-How-to-Unit-Test.md)
- [Take Breaks when Stumped](Team-Skills/09-Take-Breaks-when-Stumped.md)
- [How to Recognize When to Go Home](Team-Skills/10-How-to-Recognize-When-to-Go-Home.md)
- [How to Deal with Difficult People](Team-Skills/11-How-to-Deal-with-Difficult-People.md)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ really means:

This common interpretation problem requires that you explicitly discuss what the estimate means with your boss or customer as if they were a simpleton. Restate your assumptions, no matter how obvious they seem to you.

Next [How to Estimate Programming Time](02-How to Estimate Programming Time.md)
Next [How to Estimate Programming Time](02-How-to-Estimate-Programming-Time.md)
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ If there are big risks that cannot be evaluated, it is your duty to state so for

If you can convince your company to use *Extreme Programming*, you will only have to estimate relatively small things, and this is both more fun and more productive.

Next [How to Find Out Information](03-How to Find Out Information.md)
Next [How to Find Out Information](03-How-to-Find-Out-Information.md)
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ If you want to know *how likely it is* that a faster algorithm for a particular

If you want to make a *personal decision that only you can make* like whether or not you should start a business, try putting into writing a list of arguments for and against the idea. If that fails, consider divination. Suppose you have studied the idea from all angles, have done all your homework, and worked out all the consequences and pros and cons in your mind, and yet still remain indecisive. You now must follow your heart and tell your brain to shut up. The multitude of available divination techniques are very useful for determining your own semi-conscious desires, as they each present a complete ambiguous and random pattern that your own subconscious will assign meaning to.

Next [How to Utilize People as Information Sources](04-How to Utilize People as Information Sources.md)
Next [How to Utilize People as Information Sources](04-How-to-Utilize-People-as-Information-Sources.md)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ A strange example of this is the summer intern. A summer intern in a highly tech

You should ask people for a little bit of their wisdom and judgement whenever you honestly believe they have something to say. This flatters them and you will learn something and teach them something. A good programmer does not often need the advice of a Vice President of Sales, but if you ever do, you be sure to ask for it. I once asked to listen in on a few sales calls to better understand the job of our sales staff. This took no more than 30 minutes but I think that small effort made an impression on the sales force.

Next [How to Document Wisely](05-How to Document Wisely.md)
Next [How to Document Wisely](05-How-to-Document-Wisely.md)
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ This does not make it easier on the responsible programmer. How does one write s
- Thinking about the reader and spending some of your precious time to make it easier on her; and
- Not ever using a function name like `foo`,`bar`, or `doIt`!

Next [How to Work with Poor Code](06-How to Work with Poor Code.md)
Next [How to Work with Poor Code](06-How-to-Work-with-Poor-Code.md)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ In any estimate that you make for work against code you didn't write, the qualit

It is important to remember that abstraction and encapsulation, two of a programmer's best tools, are particularly applicable to lousy code. You may not be able to redesign a large block of code, but if you can add a certain amount of abstraction to it you can obtain some of the benefits of a good design without reworking the whole mess. In particular, you can try to wall off the parts that are particularly bad so that they may be redesigned independently.

Next [How to Use Source Code Control](07-How to Use Source Code Control.md)
Next [How to Use Source Code Control](07-How-to-Use-Source-Code-Control.md)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ I was late to appreciate the benefits of source code control systems but now I w

A good technique for using a source code control system is to stay within a few days of being up-to-date at all time. Code that can't be finished in a few days is checked in, but in a way that it is inactive and will not be called, and therefore not create any problems for anybody else. Committing a mistake that slows down your team-mates is a serious error; it is often taboo.

Next [How to Unit Test](08-How to Unit Test.md)
Next [How to Unit Test](08-How-to-Unit-Test.md)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Use assertion checking and test drivers whenever possible. This not only catches

The Extreme Programming developers are writing extensively on unit testing effectively; I can do no better than to recommend their writings.

Next [Take Breaks when Stumped](09-Take Breaks when Stumped.md)
Next [Take Breaks when Stumped](09-Take-Breaks-when-Stumped.md)
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

When stumped, take a break. I sometimes meditate for 15 minutes when stumped and the problem magically unravels when I come back to it. A night's sleep sometimes does the same thing on a larger scale. It's possible that temporarily switching to any other activity may work.

Next [How to Recognize When to Go Home](10-How to Recognize When to Go Home.md)
Next [How to Recognize When to Go Home](10-How-to-Recognize-When-to-Go-Home.md)
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Most programmers are good programmers, and good programmers want to get a lot do

Since I have children, I try to spend evenings with them sometimes. The rhythm that works best for me is to work a very long day, sleep in the office or near the office (I have a long commute from home to work) then go home early enough the next day to spend time with my children before they go to bed. I am not comfortable with this, but it is the best compromise I have been able to work out. Go home if you have a contagious disease. You should go home if you are thinking suicidal thoughts. You should take a break or go home if you think homicidal thoughts for more than a few seconds. You should send someone home if they show serious mental malfunctioning or signs of mental illness beyond mild depression. If you are tempted to be dishonest or deceptive in a way that you normally are not due to fatigue, you should take a break. Don't use cocaine or amphetamines to combat fatigue. Don't abuse caffeine.

Next [How to Deal with Difficult People](11-How to Deal with Difficult People.md)
Next [How to Deal with Difficult People](11-How-to-Deal-with-Difficult-People.md)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Difficult people do change and improve. I've seen it with my own eyes, but it is

One of the challenges that every programmer but especially leaders face is keeping the difficult person fully engaged. They are more prone to duck work and resist passively than others.

Next [Intermediate skills](../../2-Intermediate)
Next [Intermediate skills](../../2-Intermediate/README.md)
Loading