I am a gardener. I am a computer programmer.
You would use a sentence like this to explain what you do for a living. There are many gardeners in the world, and you happen to be one of them.
I am the gardener.
You wouldn't use this to say what you do for a living. Changing the article from a to the makes this gardener special for some reason. There are a few situations where this might be appropriate, such as:
- You are talking about the staff at a certain mansion. Bob is a butler, Helen is the maid, Rob is the chauffeur, and you are the gardener.
RULE: Use the when you assume there is just one of something in that place.
- You are out in the yard working. A police officer walks by, and asks, "Who are you?" You might respond by saying, "I am the gardener." By using the instead of a, you are implying, "I am the gardener who works on these grounds."
RULE: Use the to refer to people or objects that are unique.
Similarly, for:
I am the computer programmer.
Most likely, you wouldn't say that unless you were the only programmer employed by the company, and it was obvious that the context of the question was talking about that particular company.
In other words, let's assume you work for the Acme Corporation, and you are the company's only programmer. If you were at a social gathering, and someone asked you, "What do you do for a living?" you would answer:
I am a computer programmer.
However, if someone was getting a tour of the Acme Headquarters, and they asked you, "What do you do here?" then you could answer:
I am the computer programmer.
By using "the" instead of "a", the person asking the question will be able to discern that Acme only has one computer programmer on staff. If there were more than one, you might say: "I am a programmer," or, "I am one of the programmers."