and you could simplify this, too, by using an easy-to-remember hash algorithm that gives you a string like this, dependant of the service (or service domain), e.g. if this is your Facebook password:
"Facebook" → pick every fourth letter, append index of first "e" → "ek4" prepend this to $basePassword → "ek4Ykwctam$?"
But, don’t use this exact algorith, of course And probably don’t use this method. IANASecurityexpert!