What have you eaten today?

Correct
Present perfect. An action in an unfinished time period (today).	A window was broken and the door was open. Someone broke in.

Wrong
Someone had broken in.
A completed action that happened before another in the past.	You look tired. What did you do?

Wrong
What have you been doing?
Present perfect continuous – we are interested in the action that caused a present result, but not whether it was complete.	I’ve learned English since kindergarten.

Wrong
I've been learning English since kindergarten.
I've learned suggests it is complete – there's no more to learn. (Note - study in the same sentence could take either simple or continuous.)	
Mark and Tina have dated for six months.

Wrong
Mark and Tina have been dating for six months.
The focus is on duration / repetition, not completion.	Before my son was born I’d never been thinking I’d enjoy being a mother.

Wrong
...I'd never thought I'd enjoy…
Think is a stative verb here.	She's been making cakes all morning. 

Correct
The focus in on repetition and duration.	What have you been doing at work this morning?

Possible
The continuous tense puts the focus on the action.
What have you done at work this morning? is also possible.
but now you want to know what you have completed.	
Careful where you put your feet. I’ve broken a bowl and there’s glass everywhere.

Correct
The focus is on completion.	We’ve been going to the same dim sum restaurant on Sundays since I was a child.

Correct
The focus is on repetition and duration.	I was exhausted. I was working since 7 a.m.

Wrong
I was exhausted. I had been working since 7 a.m.
The action in the second sentence is explanatory and happened before the situation in the first sentence.	I had gone to the shops before I came to the lesson.

Wrong
I went to the shops before I came to the lesson.
Times in clauses linked by before and after are usually clear with the past simple tense.	
By the time I woke up, my sister already left for work so I couldn’t tell her the news.

Wrong
…my sister had already left…
She left before I woke up. But because we do not mention these in chronological order, past perfect is necessary.	I’ve been making over twenty calls today.

Wrong
I've made over twenty calls today.
When we mention a number of things completed, we need present perfect simple.	Put the verbs in the correct tenses
Oh no! The photocopier (break down) again. That’s the third time today. I (tell) them to get a new one for ages but they don’t listen.

Oh no! The photocopier has broken down  again. That’s the third time today. I've been telling  them to get a new one for ages but they don’t listen.	By the time the waiter took our order, we had been waiting half an hour.

Correct
With by the time, the second clause is usually in the past perfect when referring to the past. The first clause could also be in the past simple. The past perfect suggests completion – i.e. it took a long time to take the order.	
How many hours had you worked last week?

Wrong
How many hours did you work last week?	 They’ve got married since 1975 and lived in the same house since then.

Wrong
(Common error) They have been married since 1975…
They got married in 1975 and are married now. With present perfect + for/since, we start with a present situation and extend it back into the past	Her eyes were red and it was clear she had cried.

Wrong
…it was clear she had been crying.
Past perfect continuous – we are interested in the action that caused a present result, but not whether it was complete.	Where had you worked before you had started this job?

Wrong
Where did you work before you started this job?
Times in clauses linked by before and after are usually clear with the past simple tense.	
How do you think everyday life will improve by the time you are seventy?

Wrong
How do you think everyday life will have improved by the time you are seventy?
Time clauses beginning with by nearly always take a perfect tense and emphasize completion.	I’d like to know which job you think you will have done in five years’ time.

Wrong
… which job you think you will be doing in five years’ time.
We're asking about something in progress at a fixed point in the future.	How do you think your English will have improved by the end of this course?

Correct
Time clauses beginning with by nearly always take a perfect tense and emphasize completion.	Which places had you visited by the time you were18?

Correct
Time clauses beginning with by nearly always take a perfect tense and emphasize completion.	
This time next year I will have worked here for 10 years.

Possible
Or, I will have been working here. With the verbs work (be employed) and live (in a place)
there usually isn't much difference between simple and continuous tenses.	By the time the emergency services arrived the boat had sunk and half the passengers had drowned.

Correct
With by the time, the second clause is usually in the past perfect when referring to the past.	I drew the curtains and looked out of the window. It had been raining and the road was still wet.

Correct
Past perfect continuous – we are interested in a previous action that caused a past result, but not whether it was complete.	The kitchen was a mess. Someone had cooked and hadn’t cleaned up afterwards.

Wrong
Someone had been cooking…
Past perfect continuous – we are interested in a previous action that caused a past result, but not whether it was complete.