Passwords with a mixed letters, numbers and special characters are sometimes hard to remember. Is it alternatively secure to use a small amount of memorable source code as a 'passphrase'?

As example a simple for loop in Go: `fori:=1;i<5;i++{fmt.Println(i)}`

Normal people would only see the cryptic syntax but as a person with a programmig background is this more or less easy to read or memorize.