I think, a lot of confusion might arise depending on the context of such sentences, because you also need to know WHY you use perfective or imperfective for a particular statement.
The core difference is that "writing" is often perceived as an action leading to a natural result of something being written. Do "walking", "swimming", "carrying" have any natural result? They don't—at least, there are many important situations where they do not seem to. On the other hand, such activities may have a beginning and an ending, which serves as a suitable "limitation" that a perfective verb needs.
If the action has a particular result, of course, use a perfective that states the desired outcome. The major problem is, you have to choose aspect even when it is not that easy to find a measurable result.
regular action / name of action
Use imperfective verbs. For verbs of motion, use imperfective multidirectional verbs. If one repeated link of a repeated trip is specifically decribed, one-way verb can also be used.
- Я часто писал письма.
- Я часто плавал.
- Я не умею писать/плавать.
action in progress; simultaneous actions
Use imperfectives. For verbs of motion, use one-way verb for motion with a goal and multi-directional verb for a complicated motion that is not directed anywhere in particular:
- Я пишу письмо.
- Я писал письмо, поэтому не заметил, как она пришла. = I was writing a letter, that's why I didn't notice her coming.
- Я шёл домой. = I was going home.
- Я ходил по офису. = I was walking around the office.
- Я плавал в озере. = I was swimming in the lake.
- Я плыл к лесу. = I was swimming towards the forest.
sequence of actions in the past
Use perfectives. If your action reaches some "result", you should obviously use the perfective you need. However, some activities ("sleep", "have a walk") do not have any particular result. Russian often has по-prefixed perfective verbs for them, so that you can describe "doing that action for some time" and arrange them in a sequence:
по-prefixed perfectives formed from one-way verbs of motion mean the onset of an action.
по-prefixed perfectives formed from multidirectional verbs of motion mean doing action for some time. Note that "походить" is not the default "walking around" verb—you may use it, but you can use "погулять" just as well.
- Я вчера написал письмо.
- Я вчера поплавал, а потом приготовил обед.
- Мы погуляли до вечера и пошли домой. →note, that "пошли", being formed from a one-way verb, means just going back ("heading") home after a walk. And not walking for some time.
- Ты уже побегала?
- Мама вчера уехала в Петербург. → a result of action is "departing", hence the more specific "у-" prefix.
- Куда поехал директор? = Where did the director go? → again, note how one-way perfective is different
reference to a fact
Now, rather than recalling "stories" from the past you make a random reference to a past action. It is important that it happened at all, but the exact moment is irrelevant to your message.
Use imperfective verbs. For verbs of motion, use multidirectional verbs.
- Ты когда-нибудь писал статьи? = Have you ever written acrticles?
- Я там уже плавал. = I already swam there. (i.e. I'm familiar with that experience)
- Я ещё не бегал. = I haven't run yet.
Note that imperfective verbs may have a logical consequence that overlaps with the "result":
- Он уже читал эту книгу. = He already read that book.
It is easier with verbs of motion. At least, after visiting some place you always have to return "home", so you'd want a multidirectional verb. With other verbs it remains an important point of confusion for learners.
"What did you do yesterday?"
This is pretty obvious, but still: use imperfectives and multidirectional verbs (for round trips or aimless motion) to describe actions that "fill" some time frame in question. This is the case when you answer the questions about what you were busy with.
- Я вчера бегал.
- Я вчера писал письма.
- Я вчера плавал в реке.
- Я вчера ходил в кино.
- Я вчера только спал и ел.