How to explain our web development code?

Whether I have to explain the code ( making the explanation video ) while typing or after completion of the project ???
If I explain while typing …then it will became a 1 hour video

You can explain the code after completion.