All of 元から, 初めから, 最初から, 端から refer to "the beginning", which all imply it is a beginning of something that is already there. For example, when you talk about a botched marriage using "最初から結婚しなければよかった", you are talking about a marriage that has already happened; it has a beginning.
On the other hand, when you are just about to suggest to your friend about how to start writing the computer application, the application code is not yet there. There is no beginning to refer to. Even in English, we would use "writing from scratch", not "writing from beginning". It would be a different case if you need to rewrite code that already exists. In that case, the code already has "a beginning", thus you can use "rewriting the code from the beginning".
So, how do we say "writing from scratch" in Japanese? One expression you can use is "一から" or even "ゼロから".