That goes for any enclosure or container. When I built mine I had to stuff foam insulation in any possible gap or crevice.
Marine silicone works great for that too.

Something that I've had to frequently stress to new reptile keepers in my area is NOT keeping a snake, or anything, in an enclosure that is obviously too small for the creature. A friend of mine was keeping a full grown bearded dragon in a 10 gallon -.- I couldn't look at her in there so I gave him my old dresser-made-beardie-home. The lizard cost at least 4x more than the 10g, never mind it being longer than the tank.

Many people probably have different opinions or rules for this subject. For garters, I use length as a guide. I like to give atleast a foot of length more to the enclosure than the snake when possible. I more often than not have to compensate with width or height, usually width. If you can give a square floor, ie/ 2'x2', the snakes aren't confined to the option of one way and back again. My puget's are a huge fan of flying across their enclosure in random directions. When they were in a tank with a floor length 3 times the width, they were constantly smacking their heads off the walls trying to go forward or backwards instead of left or right. Using tanks that are impractically long compared to the width may not be a Don't, but it definitely keeps you watching your snakes be themselves more often if you equalize the length x width of the floor. I find my snakes are more energetic and interactive with me and each other if they have a larger horizontal distance to cross. Issues like space and finance obviously play a factor in this as well.