We use the present perfect in two cases: First,when the action happened in the past but we don't know
exactly when,or let's say when the action exactly happened is not important.What is important is the action
Here,we use words like: before,already,just,never,yet
Example: I have visited Algiers before
The action of visiting Algiers is more important than when I visited it.I visited Algiers in the past
but when in the past? We don't know.Maybe yesterday,maybe last week,maybe last year,maybe
Second,we can use the present perfect when the action started in the past and continues in the present
Here,we use the two connectors: since and for
Example: I haven't seen my friend since last year
I haven't seen my friend for a year
.................................................. .................................................. .............................................
When we have two successive ( one after another ) actions in the past,we put the verb of the
action that happened first in the past perfect and the verb of the action that happened next
in the past simple
Example: After she had written the letter,she posted it
So,the action of writing happened before the action of posting.So,we put the verb write in the past
perfect and the verb post in the past simple