Linking to Code in a Paper I'm planning on including in my thesis (and the papers that I'd like to publish out of it) links to Macaulay 2 packages and code which verify a few results and implement an new algorithm.
The complication that's arising is that I'll be leaving graduate school shortly - and my mathematics webpage through the department isn't likely to outlast my stay as a grad student by very long.
This seems like it would be a fairly common problem, but I've been having trouble finding a way of permanently linking to code in a way that will survive changing departments.  I looked into link shortening services (tinyurl, bit.ly, etc.) and data hosting, but haven't found anything that would either allow a change of endpoint of the link (when I move pages) or allowed free and easy access to the files (and wouldn't delete the files containing the code if there was inactivity for over a month.)
Have any of you run into this problem before and found an effective solution?  I'd appreciate any suggestions!
 A: I have encountered this problem before, and I have solved it by publishing the code on arXiv together with the e-print (as "ancillary files", not as "data sets"), as Darij already suggested in a comment. Everything went smooth, and the code is still there. I have put a remark in my thesis and in the published version of the paper saying "the code of function X can be downloaded from arXiv, together with the e-print version of the material of this paper/chapter \cite{eprint}."
I don't know what will happen if arXiv closes, but the same can be said of Wordpress and Google (do you think it is highly unlikely that Google Code Hosting will ever close? Well, I wouldn't bet on it: Geocities was huge ten years ago, and is now gone). I trust arXiv more, since it is an academical, non-for-profit service. There are so many e-prints there, and links to them in the literature, that finding a replacement will be high priority for many researchers in case something bad happens.
Not to mention that I find a link to an academical source as arXiv more "professional" than one to a commercial source like Google or Wordpress. How many authors give a gmail address as a contact address in a paper, for instance?
A: (1) Assuming you don't mind making the code open source, you can host it on code.google.com, which is Google's free, open source project hosting service.  You get a static link to your code, and you can even make and document changes, add files, and even collaborate with the community if you wish.
Examples:
http://code.google.com/p/ucsd-thesis/
http://code.google.com/p/pmtk3/

(2) Another idea would be to sign up for a free blog (say at wordpress.com).  In your thesis, say the files are "available" at your-name.wordpress.com.  Then post a link to the files on the front page of the site (you can choose to use a static front page instead of a blog).  You can then update this link as you move from school to school.  Also, wordpress itself offers 3GB of file storage.

(3) You could upload the files to Google Docs (or paste the text of the files into a Google Doc), make it public, and link to these files.

(4) Lastly, you can of course pay to create and host a .com web site.  This would be yours forever.
A: Like Poloni, I put the code in the arXiv.  However, I place in the .tex sourcefile, right after ''\end{document}''.  Then, on the comments section of the submission I'll write something along the lines of ''magma/sage code included at the end of sourcefile.''
A: If the code is in ASCII, you can use a tool like UNIX's shar (Shell Archive) which essentially concatenates the files with special headers so that it can be unwrapped into separate files.  Then you can include an appendix which contains an explanatory note as well as this archive.  Good script packages include a README file which describes the code and the requirements for running it.
If the code is not in ASCII, there are alternatives (such as MIME-encoding) which allow you to render the above.  What might be most useful, especially if you want to keep track of who uses it, is to include some contact information.  Then people can request it from you (or from your email autoresponder) for as long as you want to support such a service.
Gerhard "Ask Me About System Design" Paseman, 2011.05.13
A: Recently I had a similar problem, because I wanted to use some code for illustration of a paper.  I have found some table with comparison of different sites in Wikipedia.
Yet, finally I decided, that such approach may be not very convenient for scientific paper and  upload packed archive to Windows Live SkyDrive.
