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!

@ARUpinski: but making the code available in usable form (it is not amusing to have to type the appendix of someone's thesis when you know the author has already typed it!) is the ideal way of doing this.
–
Mariano Suárez-Alvarez♦May 14 '11 at 1:48

2

I doubt PDF is the right format for embedding text data (which is often whitespace-aware, has unbreakable long lines and special characters etc.). Actually I doubt PDF is the right format for anything. Maybe this will convince some people who think otherwise: blog.fireeye.com/files/27c3_julia_wolf_omg-wtf-pdf.pdf
–
darij grinbergMay 14 '11 at 13:40

2

The point is not that PDF cannot carry attached files. It is that PDF can carry way too much stuff, and sooner or later the whole format will become obsolete due to its inherent security weaknesses and bad compatibility, and viewers will only show a restricted subset of its functions (this process has already started). Probably attached files won't be one of them.
–
darij grinbergMay 14 '11 at 14:40

5 Answers
5

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?

actually, as long as the code is somewhere, a search engine should be able to find it. so maybe where exactly the code is uploaded does not matter much!
–
SuvritMay 14 '11 at 14:16

The location of the link being somewhat "professional" does matter, and before posting this question I was unaware the arxiv allowed supplementary file posting along with articles. I also enjoyed the idea (from "known google" above) of including it in the tex sourcefile as well.
–
Gwyn WhieldonMay 14 '11 at 20:42

(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.

(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.

Very nice stuff here, but with Wordpress's "security", I would not trust a Wordpress blog to keep my stuff for too long without updating and the related maintenance work on my side. (Unless "my stuff" happens to be comment spam and exploits.)
–
darij grinbergMay 13 '11 at 21:56

I'll just remark that (4) is a fairly cheap option, and you can use it for many other things as well.
–
Jason PolakMay 14 '11 at 16:17

Update: google code is now dead, and in any case github would have been a better suggestion.
–
Samuel CoskeyApr 13 at 0:24

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.''

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.

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.