What is the best way to list code snippets in a undergraduate thesis? For some reason I am having difficulty figuring out a good way to list code snippets in my undergrad thesis. My project is on development of some software and I've thought about doing this.

Algorithm 1 - description of what the code does

But then I realize algorithm really isn't the right word. I've thought about using the word procedure but then again I don't know if declared classes count as procedures. Can someone offer some advice?
Listing is another word that gets used sometimes. It sounds a bit unnatural to me though; maybe it is in wide use just because it is used in a certain Latex package.