What's the difference between どうして and どうやって?


I've read on Stack Exchange that どうやって can be used to mean "what did you do in
order to x"

> どうやってお医者になったか? — What did you do in order to become a doctor?

This definition makes a lot of sense to me, but can どうして be used in the same
way?

Also, I've heard some people say that どうやって can mean "By what **means** did
you x", exactly like 何で.

Does this mean that the following is valid?

> どうやって作文を書いたか — What did you **use** to write your essay?

* * *

Also, besides どうして being able to mean "why", what is the difference between
どうやって and どうして?




I think that どうやって is a method, whereas [何]{なに}で is asking for "by means of
what?". So, for your example

> どうやって作文を書いたんですか

asks for the whole process for you to be able to have written your essay. E.g.
what sources did you read? What parts are you quoting? How are you organizing
your references? etc.

> 何で作文を書いたの?

should be answered "by hand" or "I typeset it in LaTeX" or something similar.
(Remember, で is sometimes called "instrumental marker".)

> どうして作文を書いたんですか

in this case feels just like asking for the "why" and not for the "how". どうして
can mean how, but is not expecting a particularly practical answer, for
example

> どうしてそんなことができるの?  
>  How can you do that?

in the sense of

> How come you can do that?  
>  Why can you do that?

To summarize,

  * どうやって asks for an instructive explanation (やる "to do")
  * 何で asks for a means (で instrumental marker)
  * どうして asks for a reason (that may be rooted in an action)




I think that どうやって is a method, whereas [何]{なに}で is asking for "by means of
what?". So, for your example

> どうやって作文を書いたんですか

asks for the whole process for you to be able to have written your essay. E.g.
what sources did you read? What parts are you quoting? How are you organizing
your references? etc.

> 何で作文を書いたの?

should be answered "by hand" or "I typeset it in LaTeX" or something similar.
(Remember, で is sometimes called "instrumental marker".)

> どうして作文を書いたんですか

in this case feels just like asking for the "why" and not for the "how". どうして
can mean how, but is not expecting a particularly practical answer, for
example

> どうしてそんなことができるの?  
>  How can you do that?

in the sense of

> How come you can do that?  
>  Why can you do that?

To summarize,

  * どうやって asks for an instructive explanation (やる "to do")
  * 何で asks for a means (で instrumental marker)
  * どうして asks for a reason (that may be rooted in an action)

