I think the rule of thumb with regard to h comes down to the hardness of the sound. A hard 'h' should be preceded by 'a', e.g. a hard rock and a soft 'h' should be preceded by 'an', e.g. an hour.
I find 'u' a bit confusing. I think the rule is long/short - if short, it has a 'vowel sound' and should use 'an', e.g. an unbelievable event, but the longer 'you'-sound as in 'university' or 'useless' should use 'a'.
I find that I use 'an' for most cases of words beginning with 'u'. Maybe seepage from my first language which also treats 'w' and 'y' as vowels.