I found terminology "ad hoc" used here and there in programming field. What does it exactly mean in programming?
wiki says "for this purpose"
"Ad hoc" is a Latin phrase which can apply to anything, not just programming specifically. It basically means, more or less, something that was made up on the fly just to deal with a particular situation, as opposed to some systematic approach to solving problems.
Regarding programming specifically, it's probably similar to what Joel Spolsky recently called "Duct tape Programming"