Type the code in and run it if you must. But go back and write in pen and ink.
It sounds weird. Programming languages have a lot of funky syntax. You’ll find the impulse to either find short-hand or else you will start structuring the program such that you can keep (parts of) it in your head.