is this tough to do on my own? or should i have a mechanic check it out?

i've had my check engine light running for about the past 4 years. the dealership told me it was computer error. after the alternator was replaced, the check engine light was off for less than 4 hours, literally.