Documenting code for thesis I'm making my degree thesis on applied maths. An important part of the work is the implementation of some algorithms and simulations so code is part of the work. And I mean a lot of code.

I don't have references of works like mine so I'm not sure what to do with the code. Of course, it's not going to be "printed" as part of the thesis. It's supposed to be documented on internet with the link in an appendix I guess, but I don't really know how to deal with it.

I didn't find and answer in other posts.
As Nate Eldredge has already mentioned, you should check your university's thesis guide if there is anything specific about code. If not, contact your thesis/dissertation office to see if they can help out.

I'll now speak from my own experience working at my university. I suggest to students that code be placed in the appendix material. Why? So it doesn't clutter the body.

If you're writing in LaTeX, be sure to read the documentation of any package you use to import your code. If you wish to leave it as a link, be sure to follow your university's instructions on that.