It's easy to look at old code and ask how it ever shipped, but the knowledge and experience needed to do better are usually acquired along the way. Don't judge other people — or your past self — too harshly for code written with the skills of the time.