Linking to Code in a Paper - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-19T00:48:37Z http://mathoverflow.net/feeds/question/64919 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/64919/linking-to-code-in-a-paper Linking to Code in a Paper Gwyn Whieldon 2011-05-13T19:00:50Z 2011-05-14T16:01:41Z <p>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.</p> <p>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.</p> <p>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.)</p> <p>Have any of you run into this problem before and found an effective solution? I'd appreciate any suggestions!</p> http://mathoverflow.net/questions/64919/linking-to-code-in-a-paper/64937#64937 Answer by Samuel Coskey for Linking to Code in a Paper Samuel Coskey 2011-05-13T21:16:14Z 2011-05-13T21:16:14Z <p>(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.</p> <p>Examples:</p> <p><a href="http://code.google.com/p/ucsd-thesis/" rel="nofollow">http://code.google.com/p/ucsd-thesis/</a></p> <p><a href="http://code.google.com/p/pmtk3/" rel="nofollow">http://code.google.com/p/pmtk3/</a></p> <hr> <p>(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.</p> <hr> <p>(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.</p> <hr> <p>(4) Lastly, you can of course pay to create and host a .com web site. This would be yours forever.</p> http://mathoverflow.net/questions/64919/linking-to-code-in-a-paper/64948#64948 Answer by Federico Poloni for Linking to Code in a Paper Federico Poloni 2011-05-13T23:10:52Z 2011-05-13T23:10:52Z <p>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}."</p> <p>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.</p> <p>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?</p> http://mathoverflow.net/questions/64919/linking-to-code-in-a-paper/64962#64962 Answer by Gerhard Paseman for Linking to Code in a Paper Gerhard Paseman 2011-05-14T05:20:19Z 2011-05-14T05:20:19Z <p>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.</p> <p>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.</p> <p>Gerhard "Ask Me About System Design" Paseman, 2011.05.13</p> http://mathoverflow.net/questions/64919/linking-to-code-in-a-paper/64981#64981 Answer by Alex 'qubeat' for Linking to Code in a Paper Alex 'qubeat' 2011-05-14T13:05:04Z 2011-05-14T15:13:28Z <p>Recently I had a similar problem, because I wanted to use some code for illustration of a paper. I have found some table with <a href="http://en.wikipedia.org/wiki/Comparison_of_open_source_software_hosting_facilities" rel="nofollow">comparison of different sites in Wikipedia</a>. Yet, finally I decided, that such approach may be not very convenient for scientific paper and upload packed archive to Windows Live SkyDrive.</p> http://mathoverflow.net/questions/64919/linking-to-code-in-a-paper/64985#64985 Answer by known google for Linking to Code in a Paper known google 2011-05-14T13:28:29Z 2011-05-14T13:28:29Z <p>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.''</p>