Hans Moleman is the retconned name of an earlier character named "Ralph Melish".
Like many recurring characters, Hans Moleman does not have a fixed occupation, but rather has had a wide variety of careers over the course of the series.