text:
Can one demand to see code used to generate an article?
An article is published and the results depend heavily on a piece of code that the author wrote themselves.
The author has not shared the code with the community, even though they have been using it possibly for years now.
If I request the source code from the author and they refuse to share it, can I "demand" to see it (for example, making a formal request to one of the journals that published one of the articles)?

Comments are not for extended discussion; this conversation has been moved to chat.

@Gabriel: are you a native English speaker? Notice that to demand has not the meaning demander has in French (or similar verbs of most Latin-related languages)! So look in your dictionnary!

I believe you are asking the wrong question.
You are asking: Can one demand to see code used to generate an article?
To which I would answer: Assuming you're in a country with free speech, you can "demand" the code. Just make sure you do not threaten the author or otherwise break the law with your "demand". However, you are unlikely to be successful in forcing the author to share the code with you. A "demand" for code to me would come off as arrogant and I would ignore or decline a "demand".
I think a better question is: How can I get the code from an article I am interested in looking at or using?
To which I would answer: It depends upon your subfield and why the author will not share her or his code. Some subfields now require/expect authors to share code and data. For example, the American Statistical Association recommends sharing code to create reproducible results. Here are the steps I would follow to get the code from an article I wanted:

I would first try reaching out to the author and asking nicely if she or he would be willing to share their code with you.
If the author declined, I would ask the journal editor if they could get the code to support the conclusions article because you wish to reproduce the article's results. Also, some journals now have open code/open data requirements. Check the policy of the journals the author published in.
If you end up in hostile situation with the author, and you think they are being misleading based upon their findings, I would contact the research integrity and ethics office at the author's university (e.g., Illinois or Rochester).
If you truly suspect scientific misconduct as the reason behind not sharing code, you could take this farther by writing a response article questioning their findings and state that they refused to share code with you. For example, watch how this author investigated a cancer scandal. The end result was prison time for the fraudulent scientist.
If the author's funding agency requires open access to code, you could contact them and request they force the author to share their code. For example, all data and code development funded by the US Government is required to be open.

I would suggest working with the intellectual property office or similar office at your institute if step 1 fails. They can guide you on what options, if any, you have.
Last, you might need to accept that you cannot force someone to share his or her code with you.

@Gabriel  - Or, of course, you could write your own code to try and reproduce a subset of the results. That might be a useful thing to do in and of itself to understand the issues.

Comments are not for extended discussion; this conversation has been moved to chat.

As I pointed out in an earlier comment that was moved to chat, I believe the claim "For example, all data and code development funded by the US Government is required to be open" in item 5 is false. Specifically, the National Science Foundation does not make such a requirement of researchers it gives funding to.

Link to case in #4:   https://www.laboratoryequipment.com/news/2015/11/ex-duke-doctor%E2%80%99s-cancer-research-fraud-ends-5-years-supervision

@DanRomik OMB Memorandum M-13-13 applies to NSF as well as most US funding agencies (expectations include sensitive research such as DOD). The policies and speed of applying the order vary across agencies. The NSF has started moving towards requiring Open Data. Here is the NSF's page outlining their policies. Also, code may or may not be fall under the order depending upon the agencies interpretation of the policy.

The answer to your question is very simple, but it is not the one you are clearly hoping to get: No, you cannot demand (and hope for your demand to be met or to be seen as even remotely appropriate, that is) to see the code the author used, either from the author or the journal where they published.
The reason is also simple to explain. Academics don't make "demands" of each other. The way academia works is that each researcher does their research and releases their work in the way that they think is appropriate, and the community evaluates them and gives them credit for it as it sees fit. Do I think researchers should release their code? Absolutely! I also think journals should make that a condition for any work whose validity depends on the code to be published. But I don't get to decide how journals and other researchers conduct their business.
On the other hand, I do get to decide whether I trust a result described in an article; whether I recommend papers I am asked to referee for publication; who to invite to give a talk at my department or at a conference I'm organizing; who to write a recommendation letter for for their tenure case or job application, etc. And I am also free to express my opinion to others that a result can't be trusted if it can't be verified. That is precisely how things should be, and the result is that people who don't release their code, and their results, will (generally speaking) have a lower level of credibility and lower reputation than those who do.
So, unfortunately you need to accept that you cannot make "demands" or force an author to give you their code when they don't want to. But you can, and should (if you feel that strongly about it), make your voice heard in your research community that you believe releasing the code underlying scientific work is a good practice, should be the norm, and should be a precondition to having the work refereed and/or published. If enough people express such opinions, we will start to see some progress in this increasingly important area.
Edit: here's another way of looking at this issue. Availability of code is just one of many factors that make some research products more useful than others. So I think it may help to frame the question more generally: If an author published a paper that describes their research results, but the description has a flaw that makes it less useful than it might have been otherwise, do I as a reader have a right to demand that the author fix the flaw? For example:

A mathematical proof is presented with "some trivial details left to the reader as an exercise" (the author forgets to mention that filling in those details takes 2-3 weeks of frustrating calculations, at the end of which the diligent reader is still uncertain if the result is true);
A paper is written by an author who doesn't speak English well, to the extent that reading the paper becomes difficult and in certain parts the author's intent seems impossible to decipher.
A physics paper cites certain results from the literature in a vague and imprecise way that makes a mathematically inclined reader wonder which of the claims in the paper are theorems, which are conjectures, which are heuristic derivations not meant to be taken literally, etc. A look at the cited literature does nothing to clear up the confusion.
Etc etc.

The answer in all of those cases is again a resounding no: it is completely inappropriate to demand that authors improve their papers (unless you are a referee, and even then you cannot demand it, you can at most make it a condition for recommending publication). Researchers already have every incentive to want to improve their papers as much as they can; if they don't do so, either they are incapable of it, or they can do it but decided that doing something else is a better use of their time. You as a reader need to have the maturity to accept that some papers you read will be useful and trustworthy, and others will be less useful and less trustworthy, and that the world is not going to bend to your demands and adapt any research study to your vision of what the ideal study looks like. That applies to code as much as to any other aspect of the research.
I'll add that after reading more of your thoughts in the comments you posted, I have to say your entitled tone is off-putting to say the least. The fact that you think authors should make available materials that you decided need to be released, and that if they don't do so that represents some kind of moral outrage, makes me personally think somewhat less of you (and it might make others reach similar conclusions). Since you are posting using your own name, I think this should worry you; hopefully it will also cause you to reflect about your unreasonable approach to this issue.

Although my mind is obviously made up about this issue (this is very clear, we agree that code should absolutely be released), I was hoping to get some good input. This is good input, so thank you!

@Gabriel you're welcome. One more piece of advice: I think you should separate your emotional reaction to the missing code from the logical question of what can be done about it. You seem outraged by the author not releasing their code, and as I said I don't disagree: hiding methods is very suboptimal and hurts scientific research. However, as for what can be done, you write in a comment "I'm not saying it would definitely work" which suggests an extreme level of naivete. Trust me (and others here), making demands will definitely not work, and will be harmful to your own reputation.

Separating the emotional reaction is always good advice in Academia :)

Reproducibility is an important issue, and there is a growing trend to make more raw data available. Many journals actually require the authors to deposit certain kinds of data in public repositories, for example when publishing a paper with an X-ray or NMR structure of a protein, it is very likely that the journal requires the authors to deposit those into the PDB database. There can be an embargo period, but in the end the data has to be public.
I looked at the author guidelines for Nature and Science, and found passages about code in both.
Nature:

An inherent principle of publication is that others should be able to replicate and build upon the authors' published claims. A condition of publication in a Nature journal is that authors are required to make materials, data, code, and associated protocols promptly available to readers without undue qualifications. Any restrictions on the availability of materials or information must be disclosed to the editors at the time of submission. Any restrictions must also be disclosed in the submitted manuscript.
After publication, readers who encounter refusal by the authors to comply with these policies should contact the chief editor of the journal. In cases where editors are unable to resolve a complaint, the journal may refer the matter to the authors' funding institution and/or publish a formal statement of correction, attached online to the publication, stating that readers have been unable to obtain necessary materials to replicate the findings.

Science:

After publication, all data and materials necessary to understand, assess, and extend the conclusions of the manuscript must be available to any reader of Science. All computer codes involved in the creation or analysis of data must also be available to any reader of Science. After publication, all reasonable requests for data or materials must be fulfilled. Any restrictions on the availability of data, codes, or materials, including fees and restrictions on original data obtained from other sources must be disclosed to the editors as must any Material Transfer Agreements (MTAs) pertaining to data or materials used or produced in this research, that place constraints on providing these data or materials.

Your first step should in any case be to ask the author politely for the code. If that fails, you can contact the journal, if they have policies similar to the ones I quoted.

Good to see that top journals are requiring code to be shared up front.

Many journals have similar requirements - as do many granting agencies. However, "code available upon request" seems to be more honored in the breach than in the observance. It probably helps a lot to convey a convincing reason to the code author why it is in their self-interest to provide you with the code! (e.g., potential collaboration, validation against a common issue?)

If an article is published which depends on software which cannot be run the results will be difficult to reproduce. The best case is you implement comparable software and eventually get the same/better results.
The worst case is when the interesting results are the consequence of an undiagnosed error in the code and will never be reproducible. There is no reason to expect the error rate in unreleased software to be better than in peer reviewed or commercially supported software.
Publishing without the code is much like publishing results without showing mathematics, data or methodology. The most reasonable response I know of to this is to disregard the paper.

One problem is: even if the authors are happy to share the code, you may not be able to run it. I know a very successful software that generated dozens of papers, and came as third place in a prestigious competition. It works like the following:

Run a Docker container which maps one folder to the folder of the host machine.
The Docker image is more than 64GB. Nobody in the lab know (have enough effort) to install all the tools from scratch. So they use the Docker image.
Make a new folder for the program to be tested.
Copy some tools/data from the host machine (via the mapping folder), some tools/data from other folder within the Docker container.
The tool itself is a combination of bash scripts and Python. It invokes different tools that were copied and outputs to different folders. Some folders are in the home folder of particular user (the intern who developed this part).
The main script to start the tool has 7 parameters.

The most interesting thing is that: there is no documentation (who has time for that). So even if the authors give you the source code, you will not be able to run it. In this case:

Should you demand the authors to make their software to run in all
machines?
Should you demand the authors to write documentation?
Should you demand the authors to help you to run their tool? Considering how much effort to spend on each request if this is possible.

What is the protocol to share the source code, considering IP, copyright etc? To open source a tool is not easy. My PI intended to open source a tool  built by our group. After several meetings with 4 lawyers of the university over a year, they gave up.

Yes, you share it nonetheless. If you could run it, then someone else should be able to run it too. No one is asking you to act as tech support or to write documentation for the code. I'm not sure what possible reasons lawyers could have given that resulted in you not sharing the code.

@Gabriel "If you could run it, then someone else should be able to run it too". You don't understand the example I gave.

Yes I did. You need to share everything you developed ("The tool itself") and everything else at least describe in detail.

@Gabriel If you understand the example I gave, you know that it doesn't run outside the host machine. Do you want the host machine itself? or you want to fix a 3000-line bash script that move folders back and forth between host machine and Docker container? By "at least describe in details", are you asking for detailed documentation? If you can run whatever source code people can give you, you are definitely a genius.

No, I want a way to be able to reproduce the results you published. Because I know you are not asking the scientific community to trust your results at face value, right? It's your problem if your setup is garbage. You share what you developed, and at least a complete list of the needed accompanying software.

@Gabriel In many cases, you even can't compile the source code. For example, if the software require LLVM 3.0, and you have LLVM 4.0 in your machine, you can't compile and you have no idea why. There are tools that only work in 32 bit architecture, and if you run in a 64 bit architecture, it just crashes and you have no idea why. There are tools that executes other tool A in /usr/bin, and if you install tool A in /usr/local/bin, it just stops silently.

It is not your job to play tech support (which doesn't mean you get to purposely write obscure code to get around others from using it). If someone asks for your code and doesn't even know the difference between 32 and 64-bit, it's their problem, not yours.

@Gabriel What is obscure code? it's not somebody false if you can't understand their code.

No it is not. I said purposely obscure. As in purposely writing entangled impossible to run code so others can't possibly use it.

@Gabriel: I believe nobody has this intention, because the authors themselves are the first to suffer from it. My point is many (academic) software are just very difficult to run, in particular when they are written by researchers, not industrial engineers. And you can't just demand them to write good programs, good documentation for you to be able to replicate their results etc.

I'm asking none of that. Simply some good faith when writing code that others could need to use later on, and being able to at least see the source code that was used to obtain published results.

@Gabriel Good faith doesn't guarantee anything. Some researchers are simply bad engineers, and produced bad code, horrible set up. You can't just demand them to write code that others could use.

I don't. I demand them to make available, hence auditable, the code they used to publish any kind of research. A very reasonable request.

I'm not discussing that. But if you are planning on using any of that code for research, you should definitely think of producing code that can be shared. Academia is not an industry. I should be able to reproduce what you do. It's the very foundation of science.

I'm actually pretty sure that sharing some particular codes used to obtain certain results is illegal, depending on the method used. Not always the code will be fully developed by the author her/himself. Sometimes people use external libraries which provide numerical methods for evaluating inputs.
I'm keeping it short with some examples from experiences of my own:
At the university I work in, we are provided with some libraries which are paid, and, in a couple occasions, in order to execute some of my codes efficiently, I had to recur to those libraries. There were situations where I used RK4 method ready-to-use subroutines to solve certain problems (eg. RK4 from Numerical Recipes), subroutines which I'd not have the time nor patience to develop my own, given it's not the focus of my research. Could I write a similar code for the purpose? Of course. Would it be pleasant and/or useful? Not at all. Other people have already developed much faster and more precise algorithms, and those were sold to us by them, by a considerable amount of money.
This example was probably somewhat silly, given that RK4 is such a group of simple methods, but there are much more sophisticated subroutines which would require special dedication and knowledge, making it highly unlikely that someone from another field would waste their time learning how or even have the ability to program such thing.
Edit: I think I probably didn't make myself clear at saying some people use libraries bought by the University inside the code, because it might sound like we just call one or another subroutine in one or another line of the code. That's not how it works. Calling subroutines and calculating external functions require a lot of time, which, most of the time, are "copied and pasted" inside the scopes of the author's code, and modified according to the author's own purpose. There is rarely an explicit library import and subroutine call, simply.
As pointed out below in the comments, it isn't really that simple to just let your code available for the public and don't  worry about any legal issues.

You can certainly share your code calling the libraries. If then one wishes to reproduce your results can install, buying if necessary, whatever libraries are needed.

Sure, but we are also free to copy modify those libraries inside our own code's scopes, since the original code is exposed to us, and I think in this specific occasion, a sue from the seller would fit.

Nobody is asking you to do anything illegal. If you wrote your code around a closed source library, share your code as Massimo said. If you modified the library, share your modifications.

I think this is worth more than -4. Certainly it calls attention to the fact that code sharing can require a significant investment of time. (Double-checking legality, stripping out libraries that can't be redistributed, describing the modifications to a library, etc.)

Yes, publishing research requires a significant investment of time. That's not a valid reason to ask the community to trust your results without providing a way to revise them.

Well, one publishes a detailed paper describing the theoretical model used, expliciting almost every step taken, except that authors don't explicitly show their code, which is a way for anyone who really understood the theoretical model to reproduce the results themselves. I don't think the way articles are published nowadays ask for good faith of readers. If someone fails to reproduce the results, I think they don't understand the theoretical background at all. And, if they do and the results don't match, they should publish a letter showing the correct results by themselves.

No, that's not correct. The theoretical model is not always sufficient to reproduce the results. Furthermore it is your job to make sure your results are as easily revised as possible. There is simply no excuse for hiding an important part of what allowed your research to be published.


text:
How to increase the chance for PhD admission while I am working?
I graduated as MSc. of Software Engineering in 2017, and then I started my career in the industry as "software tester".
I am going to apply for the Graduate School of Decision Sciences in 2 years. The graduates of computer science are qualified to apply for this program, but there are 2 main issues which I am concerned about:

I am not sure if my grades are good enough for admission (My average is almost C)
There will be a 4 years gap between my master and the PhD.

I am wondering, how can I increase my chance to get the PhD admission?
One solution could be to contact a professor on the university and work on a paper, but I am not sure if it works well, or even they answer my email.
My question is:
How to increase the chance for a PhD admission while I am working?

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Should I explain how I identified a relevant supervisor in my SOP?
I spent time reading a professor's papers, and I developed an idea about how to expand the professor's work. I told the professor this and got the professor's approval. Now the next job is to persuade the admission committee (adcom).
Should I tell the adcom about how I found the professor while writing my SOP (statement of purpose)? I don't see a problem with it. I would be happy if a stranger told me how they found me. So I wrote about it the first time I contacted the professor. However, the adcom is not the professor, and I'm not sure if they care or not. I think that they only care about the benefit that I will bring to the department, as well as the approval of the professor. How I reach them is not important.
But I don't have any reason to remove that part, right? At best, it will show how hard I worked to reach them. At worst, there will be nothing to lose.
My draft is as follows:

I have read some of the most recent and commonly cited papers of Professor X, starting with Paper 1 written in 2014. Among the introduced methods, I found the Method the most interesting prompting further study. I then focused on Paper 2, written with Y. Its introduction on Quanta Magazine gave me a great insight into the Method. However, there are known limitations that Prof X is keen to discern. For example, when the system undergoes rapid changes the method breaks down, the reason for this remains unclear.
My hypothesis is that the changing of the system might suggest that... (this paragraph is for showing my idea to expand the work)

A minor question: should I include this in the email to professors too? Why or why not?

What is the adcom?

Should I tell them how I find the professor in my SOP? — "Usually I just go to his office, but sometimes I look in the local coffee shop, too"?  (Also, you mean "Its introduction", not "It is introduction".)

@Davidmh admission committee. I thought adcom is a common word in academia.

@JeffE thanks for the correction. Not really sure what you mean, but I think you mean no. Does the coffee shop have any relation to my question?

Always use the full spelled out version of a word once before using acronyms (took me a while to figure out SOP=statement of purpose). Also  what position are you applying for, a PhD student, a postdoc?

@WetLabStudent oh, isn't the SOP a more common known term? I apply for a PhD student

@Ooker it is more common, but not universal. In Europe each university gives it a different name, like "cover letter", "personal letter", or even "research plan" when they share form with applications for professorships (I think this was Louvain, and it was explained in the instructions).

@Ooker, lesson for the future: never assume an acronym is common-knowledge. Always define it at least once. Two to five extra words will annoy no one, but leaving out such a definition can absolutely infuriate someone who doesn't know or remember it. I have even seen reviewers reject papers, without reading past the intro, due to undefined acronyms. Do not leave an acronym undefined ... ever! (there are cases where you can get away with it, but it doesn't mean you should do it).

At least in my dialect of English, the phrase "how I find the professor" usually means "how I locate the professor".  It could also mean something closer to "how I discovered the professor('s work)" or "what I think of the professor", but neither of those fits your example.

I still don't understand what you mean by that you "find" a professor; and what exactly happened that you describe as getting "approval" to research a particular topic or direction...the latter in particular makes me worry about the tenor and possible implications of the question.

@JeffE how about using search instead? Or even google?

@gnometorule find means finding him and his work on the internet. See my comment answers to JeffE. The approval means that I have contacted him, and he said that I can join his lab, if I pass the adcom

Please let us know the country or at least the continent.  In the US, you apply to the institution, and then to the professor, but my impression from what I've read on this site is that in Europe it's generally the other way around.

@aparente001 i'm applying to the US

In that case I think you should speak about your interests a bit more generally.  Also, find someone to check your English writing (grammar, etc.) before you send your essay.

@aparente001 i have mentioned it in the paragraph before it. And no worry, I have a British friend who is willing to help me proofread

I don't know if adding this information is a good idea, but I think your current text is not.
In the draft, as it stands, you are just pointing out highlights, that proofs that you have skimmed through two papers. You are not showing any hard work because you don't even need to understand the papers to say that the method is interesting and to quote limitations they themselves described. I am not saying you haven't worked hard, or that you don't understand the paper, but just that it doesn't show all that. So, it risks backfiring at you because it sounds sort of pretentious.
If you want to show deep understanding, you would need to "cook" some new knowledge, like relating several papers, or relating their work to other people's. Mind that it will be read by people not familiar with the paper, and they may not know what is your own work, and what is just regurgitating.
One tip I can give you is to try to give it a focus from some other field you are an expert in. For example, sketch out how you would like to introduce a different mathematical modelling technique (like, instead of solving a single differential equation, you model your system as a network of interacting differential equations, where the topology comes from blablabla). This will give them a reason to hire you specifically: you are not just another mini Prof. X, but someone that would be bringing in new knowledge to the group.
Just make sure you run this through your local expert, to make sure you aren't saying anything silly, or that has actually been done before.
If after doing this you believe you are adding new useful information that would make you look better in the face of the admission committee, include it; otherwise, don't.

Thanks for your answer. I have already thought about linking the work to other people's, and I have written in in the SOP, right after the draft. In that case, would this still sounds pretentious?

+1 for "You are not showing any hard work because you don't even need to understand the papers to say that the method is interesting and to quote limitations they themselves described."

@Ooker Probably no. One thing is saying "look, I skim this paper, I know a lot of stuff", and another is saying something thoughtful and intelligent to show that you know a lot of stuff. In that case, don't even add the summary of the papers.

Is it good to use the names of the paper as an example? My edited version is: "Regarding on my understanding on some of his most recent and commonly cited papers, such as Paper 1 and Paper 2, the method is [describe it]. It is very anologuous to the research conducted by Y Lab in Y's school, though the object of this lab is A, not B. There are known limitations that Prof X is keen to discern. For example,..."

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

authors: one two鸠占鹊巢_二女一杯的原版鬼话连篇

authors: 免费日本高清无砖码区2022-无跳转入口

authors: 吊带连衣裙穿什么文胸无忧无虑_唯品会吊带连衣裙图片旗鼓相当

authors: 四库虎紧急入口2022绿巨人--高清完整版

authors: 孙允珠黑色蕾丝吊带连衣裙得陇望蜀_吊带连衣裙怎么搭配待字闺中

authors: 思瑞红色开裆连衣裙三人成虎_思瑞姐女人味十足连衣裙一网打尽

authors: 思瑞连衣裙九死一生_思瑞吊带长裙视频在线播放丧心病狂

authors: 拉肚子蹲厕所学校女视频_拉肚子蹲厕所学校女视频-高清播放

authors: 玥儿玥er红色吊带连衣裙兔死狐悲_思瑞裙子名扬四海

authors: 美女身穿包臀吊带连衣裙锱铢必较_思瑞吊带裙江山如画


text:
How can I do solid, publishable research without having a postdoc position?

I just earned a Ph.D in Mathematics, but there are no available postdoc opportunities for me. What should I do?

After four years, I have finally limped and hobbled to a Mathematics Ph.D while working full time at other places - and at the ripe age of 40 at that. It is my second attempt at earning a Ph.D, as my first attempt ended in failure due to poor life choices a decade ago.
Now that I am finished with my Ph.D, I have discovered that I am more interested in research in general than I thought I would be. I am a realist - I probably have a middle of the pack dissertation at a school representing the middle of the pack in my discipline. However, as my writing developed, I found myself not really wanting to stop, and perhaps even do research in areas not related to my discipline.
Applying to a postdoctoral position is the most logical route; however, my family is here in our midwestern city to stay, my alma mater is the only reachable university with postdoc opportunities, and I permanently burned bridges when I left the program the first time. On top of this, I am currently employed full-time at a private nonprofit nursing and pre-med company, and although the choices of courses to teach are far more limited than they were even when I taught at community college, my current employer is wonderful.
To be very specific, given my history above, my Asperger's syndrome and my advancing age, I want to understand the best way to publish independently.

Most journals list the requirements and steps for submission on their webpages.

You do have the degree, you could start consulting. Just make sure it does not make your current employer angry by breaking some non-competing clause. Or maybe start consulting for the same firm where you are already employed. In case you can convince them you have some algorithm ideas that you think would be useful for them. As long as you have not burned bridges you are probably in a quite good spot.

This is a good question but there may not be a good answer. Students who graduate from strong programs with multiple publications and strong letters of recommendation still have almost no choice about where they have to go to pursue a postdoc, and the same problem arises 2-3 years later for tenure-track positions (if they manage to get one). It does not sound like your family is OK with the amount of uncertainty that pursuing this path would require.
For example, even if you were the strongest student graduating from Harvard, to pursue the postdoc-then-tenure-track course you and your wife would need to be OK with (1) moving next year (2) to a location you don't get to choose, then (3) moving three years later (4) to a permanent location you don't get to choose. (If you're lucky, you might get to decide between a couple options, but none might be where you'd want to live.) Hopefully you get tenure there, otherwise you'd (5) have to move again after six or seven years.
My experience is with research positions, and the situation does become somewhat different as you move towards teaching-focused positions like small liberal arts colleges, or community colleges. But it still sounds like staying in your current position may be orders of magnitude better for you and your family than any other option.
One thing that stands out about your post is that although it's clearly and cogently written, it is vague about the key point of what you are looking for. Do you want a job where you teach stronger students? or more advanced classes? A job that affords you time for research? or which evaluates you on it? Or do you just want to do research and publish? I would suggest taking the time to think about what exactly your goals are; hopefully some of them can be achieved without changing positions.

As for publishing: the academic publishing industry in mathematics is not so hard to deal with. The difficult part is finding a problem to work on and proving a theorem! Once you do that, given that you have a PhD in math you should be able to look at papers on the arXiv to see the style in which math papers are written.

/ Do you want a job where you teach stronger students? or more advanced classes? A job that affords you time for research? or which evaluates you on it? Or do you just want to do research and publish? //
This one I am sure about. I love to teach, and I would love to teach higher level courses like calc3, DiffEq, linear and abstract algebra, and the like - at my former CuCollege I taught the calc 2-3 sequence every year and taught DE's for a few semesters. My current employer - though excellent to work for- leaves me merely a Stats facilitator along with freshman algebra and gen studies.

I would like to publish, btw, but definitely not under the "publish or perish" scheme (which, if I am not abusing terminology too much, is the criteria for  Europe's D.Sci option). I can always just co-author or publish on my own, but I've not been taught the ins and outs of how the general process goes.

'Publish or perish' isn't a 'scheme', it's life as an academic at nearly any research-focused institution. If you are paid to do much research, not getting published puts you are risk of no longer being paid.

Jessica - apologies; I meant "scheme" in the old sense of "rubric" here, not as a pejorative meant as a substitute for "scam." Of course, I wouldn't have my Ph.D now if it weren't for this type of job!

I have no idea what you mean by "Europe's D.Sci option". I am pretty sure there is no thing that could be called "D.Sci" on which Europe has agreed. In fact all countries in Europe have their own system for becoming a doctor and, in general, there are immense differences between them.

Thank you, Dirk - I appreciate your clarification of my misconception.

I strongly agree with everything in Tom Church's answer, and want to add to it a little bit.
The market for postdoctoral and tenure-track jobs is, I'm sorry to say, extraordinarily difficult. In your own words, you "limped and hobbled" your way to a Ph.D. Unfortunately, even people who sail over the bar often have difficulties finding academic jobs.
One piece of advice I would give to you is to attend conferences. There are plenty of conferences in a variety of mathematical disciplines, held all over the US and in many other places. These are almost always free to attend, assuming you can afford the travel costs. (And occasionally the conference organizers have grant funding to pay for those too.) At some, you can hear hour-long talks given by leading reseachers. Others have slots for 20-minute "contributed talks", and you can present your thesis research and listen to other talks given by junior researchers. Some conferences combine these formats.
These are advertised on the web, so a bunch of Googling ought to turn up some conferences you might be interested in.
The mechanics of publishing per se are actually simple. Once you've written a paper that is good enough to publish, you might e-mail a copy of your paper to someone whose work you cited and ask their advice on what venue to publish in. What is vastly more difficult is learning to write good papers. I second Tom Church's advice to browse the arXiv and read papers in your area of mathematical interest.
Finally, I hope this is not rude, but -- count your blessings. You say that you "currently work for an incredible employer and a great college". Not even all Ph.D.s who do find academic employment would say this about their employers. I would recommend looking for opportunities in your existing institution to expand the scope of what you teach. (Especially since, as you say, moving to a different city is not an option.) Perhaps get a sense of what there might be student demand for, and then speak with your chair or dean? You might not get to teach analysis or abstract algebra, but you might be able to expand the scope of what you're doing a little bit.
Good luck!

Congratulations on finishing!
"The only school nearby that has postdocs will not hire me."  Putting this together with your partner's unwillingness to relocate, if you want to do original research, you'll have to do it outside a postdoc.  That is not necessarily a roadblock.
You can work on your own with the help of a mentor, and you can collaborate.  You can do both of these things remotely, in principle, with perhaps some visits.

Your advisor may be able to help you find a mentor.
Read papers you find interesting and start corresponding with authors.
Go to conferences and make connections.

On the topic of teaching higher level courses, you can apply to teach at other schools without a postdoc and without publications.  There's no guarantee you'll be hired, but your chances are better if you:

have outstanding references and student evaluations from your current employer
are willing to work as an adjunct, at least at the beginning
can show a commitment to community outreach, as well as to diversity
are willing to teach any course the department throws at you

Here's a fun idea: sometimes there is a group of adventurous high school students who want a math club and need an outside advisor willing to work with them on more advanced math topics than what they might see in their high school classes.  If you decide to work with such a group, it would probably be on a volunteer basis.

Depending on your desire to teach vs. do research you could look for a position in industry at a company which would allow you do research.  Depending on the company there may or may not be restrictions on publishing.  Many companies are quite supportive of publishing and conference participation.
It doesn't sound like your reputation concern has to do with the actual quality of your work. That is all a commercial company is going to be concerned with.
You might be surprised by the marketability of a Mathematics PhD in certain industries.  I would start with large engineering and technology companies.

Yes, one of the last things my advisor mentioned was actually to keep going in school and get actuarial exams passed, especially since I live in [Midwest city with many insurance companies]. If I passed quals in Linear Algebra, Abstract Algebra, Real Analysis and Complex Analysis. Given that I had coded what we thought was a new routine for finite field compressive sensing (sadly, Das and Vishwanath, who I have since personally contacted, developed a similar scheme in parallel with us over the past few years), and have also taken some stats courses, applied may be an option for me!

Maybe you are looking at the problem from the wrong end?
As long as you don't have produced exceptional research during your phd (think Einstein in the patent office), graduated from a famous university, and are well connected and politically savvy, you can forget about a typical academic career.
I don't know the actual numbers, but we are probably talking about 10% of phd students getting a postdoc position and then 10% of the postdocs getting a faculty position, it is probably even less.
So better think about your strength! You have been working full-time, and honestly, I think this is a great plus. By design, people in academia tend to be pretty much disconnected from the 'real world', to the extend that it makes them difficult to employ. So ask yourself, what do you have that the usual graduate doesn't have?
Another plus I see for you is that you have done a phd at the age of 40, and this while working somewhere else. You've shown strong dedication and commitment. I salute you for this! I am younger than you, and I don't think I would have the nerve to go through my phd again.
While dedication and commitment won't get you into a faculty position in a big research university, there are other places where someone with your experience could have an advantage. I am thinking about community colleges, adult education or similar. You will have much more street cred than a younger graduate.
You said that you made some bad life choices. Getting your phd you have clearly demonstrated that you could overcome them by yourself (and a phd in mathematics is no small achievement, everyone knows that).
Whatever choices you made then, you now have an experience that other people don't have. Let's say (and I am just making up worst-case stuff, just to show that even something really bad could give you a valuable experience. I am in no way suggesting you had anything do to with drugs).
Let's say you were heavily into drugs, smuggling, and spent 10 years in prison. Sounds really bad, but on the other hand, there will be very few people with that background and a deep understanding of mathematics. That could make you predestined for a job doing statistics in a related field. 10 years down the line, I could see you as a director of a health-related NGO doing research.
Now as far as research goes, doing a phd only touches the surface of what doing research really means. Research is an extremely hard field, many researchers will never find anything important in their lives and their only contribution will be a bunch of papers that no one actually read.
To be a successful researcher, you'll need to be a politician, a manager, a marketing specialist, a grant-writing specialist, a diversity specialist (grant applications are judged not only on their scientific merit, but frequently on adherence to the political agenda dujour). If you are not 100% confident that you can meet all of these requirements, or don't have an independent source of income if your plans fail, I would not risk it (personal opinion).
On the other hand, a lot of research gets done in non-university settings. You have to understand that there is some kind of firewall between academia and the real world. Academics look down on industry, because they think that they are the smartest and best, and industry looks down on academia, because they are so out of touch with reality.
Also, lives in industry and academia diverge, the academics don't want to be seen with the dumb industrialists, and the industrialists are embarrassed if the academics see their big houses and expensive cars. So just take into account that a lot of people in your academic circles will not be aware of many options outside of academia, even though many jobs will be just as challenging and interesting, maybe even more so.
Mathematics plays a big role in many fields now, you just need to find the right place. Be careful mentioning the word research when you look for a job, better say something along the lines of 'you would like to use your knowledge of mathematics and your job experience to improve product quality' or similar.
There are lots of research opportunities in quality control, signal processing, coding theory, electronic design automation (companies like Mentor Graphics), algorithms, machine learning. In many of these fields, most of the leading edge research is actually done outside of academia. Many of these companies will also allow you to work remotely. If publishing is important for you, a lot of companies will not have an issue with that (as long as it doesn't interfere with your main work), they might even like the publicity it gives them.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Advisor retirement while finishing doctorate on limited time constraint
I am a doctorate student in mathematics, having returned to finish my Ph.D after a long absence. Four years after my initial departure, I returned after gaining maturity in the working world and rekindling a personal interest in higher-level math, and to become competitive for work nearer to home.
Since I was restarting with a long-tarnished reputation, but since my advisor was very forgiving and gracious, I was allowed to conditionally resume my degree under extremely stringent conditions, which I met - I passed tough qualifiers and I completed my coursework in a short frame of time on my own dime while maintaining full-time work.
Following completing my qual and degree program requirements, I began to focus strongly on my research in order to complete the dissertation. I recently passed my preliminary oral exam for my dissertation in May, spent the first half of the summer reviewing additional papers for my writing, and commenced writing my dissertation formally in July with hopes on a December graduation.
The trouble began anew when my advisor retired suddenly in August. Although I had been updating him on my progress and asking him for advice while writing, finding time to meet with him became problematic, as he started to become absent and increasingly difficult to reach and schedule with. However, his "hands off" approach had me still writing, and I had a substantial amount of work to review and share with him, and he agreed to meet with me yesterday.
That meeting yesterday was when disaster happened. I noticed that he had become very temperamental; he was highly critical of what little he let me present to him, and overtly stated that he was not going to waste his time and read what I had written. The solutions that I was able to present to him were dismissed out of hand without any further explanation, and his first statement was to tell me to trash everything I had written and start from scratch (even though he didn't read it or hear anything but a small portion of it).
As the (heated) four hour conversation progressed, he jumped from clear and reasonable critique to complete incoherency, which I found unusual and hard to incorporate moving forward.
When the conversation concluded, I realized that he had in mind a different dissertation problem for me to solve, one that wasn't even covered in my preliminary exam in May.
He stated that I had until the end of the weekend to clean up my writing, make it presentable, and incorporate the new problem he presented, adding three extra tasks to boot (one of which he had never required me to research before). I am to send the writing to my committee at the end of the weekend and have them evaluate its status.
I mentioned that while my work has substance and progress, it was not complete and organized (that's why I visited him in person), and that my final oral exam was supposed to be the point of my committee's evaluation, not when the writing is still in media res. Without his confidence, my committee will not grant scheduling my final oral, and will likely not take the time to read what I send until they hear the word from my advisor anyway. He didn't care.
In short, this unexpected, sudden, and strange conflict with my advisor has suddenly put my graduation in heavy jeopardy with respect to the stringent deadlines imposed by the Grad College for December graduation (due to my long absence), has put new my job at risk (since obtaining a Ph.D was part of the hiring requirements for contract renewal next year), invalidates three years of hard work to rebuild my formerly tarnished status after my long absence, wastes the tens of thousands of dollars I paid out of pocket to do this, and permanently ends my twenty-year dream of obtaining a Ph.D.
Thank you for listening and for offering whatever advice you offer. I am at the end of my rope and feel powerless, worthless, and hopeless.

Have you discussed this with any of the other committee members? Given your advisor's retirement, would it be possible for one of them to step in as advisor?

Holy wall of text, Batman! I think you should consider shortening the question down a lot. We don't need your entire background, just the facts needed to figure out what your question is.

That was my first thought, but the person closest to my work has the choice to serve in that role, and if he does choose to serve in that role, he will probably tweak the standards for my dissertation enough to push me past my final required defense date. And nobody on my committee will likely take on an advisor role if he is still there serving, since advisors are given extreme deference here. But it is a possibility.

Ric, I'll shorten it and then explain anything further if needed. Editing now.

Advisor retired suddenly; was hard to reach; is behaving unusually; spoke incoherently.  Have you considered the possibility that he is suffering a medical problem, possibly involving cognitive impairment?  This is a potentially sensitive subject, but if he retired suddenly, it's quite possible that others in the department were aware of the issue.  I think bringing up the issue with your committee, and raising this specific concern, is called for.  In this case your feelings of worthlessness, etc, are certainly unwarranted.

Nate, yes, there is quite a bit of self-doubt involved after the heavy criticism. There is no known health condition with my advisor himself, but there is conjecture (just conjecture) that the sudden retirement is intimately personal, which I will not explain out of respect for his privacy. I do not blame him personally for this, but with time running out, and no positive feedback coming in on my writing, I am feeling out to sea. I will have to carefully figure out a way to bring this up to my committee, who have reason to be critical of me in light of my character during my previous stay.

Well, I think you better do it quick.

The most promising strategy is to work with at least one committee member other than your advisor. The first choice may be the one that is a potential advisor, but you really need someone who is both approachable and good at academic politics.
Anyone like that is going to be very busy, and you need most of the meeting to be about them advising you and thinking of ways to improve the situation. You must strip your wall of text down to a few key points:

You are on a tight academic deadline, because credits will disappear if you do not graduate this year, and you will not be able to finish your PhD if you cannot meet the deadline.
Finishing the PhD is personally and financially important to you.
You proceeded with the research presented at your preliminary oral exam, which you thought had been approved.
You have been having trouble getting feedback from your advisor.
At your recent meeting, you had trouble communicating with him, and he seemed to be requiring a change in research line that would make completing the PhD impossible.

Two topics to not discuss: Your prior performance, and the advisor's personal issues. The professors should be dealing with the person you are now. What matters is your current difficulty with your advisor, not the reasons behind it.

Agreed. I am to talk with the new graduate committee head in my department next week; by pure luck, this person is on my own program of study committee. He agreed to look at everything objectively when I produce the edited paper this week and have the whole committee chip in thoughts, and then he will present a full picture to me about my timeline for current progress and whether (as a result) my graduation would still be on time.

I am sorry to hear that you are feeling stressed. As a fellow math PhD, let me try to say a few things that will put your mind somewhat at ease.
My advisor (who is the most considerate, caring, and brilliant person that I could have hoped for) was also very hands-off, and when I had solved my first problem and excitedly went to him to try to get him to understand the main idea behind the proof, he did not understand a word of what I was saying. I graduated from something like a top 5 private university in math, so we're talking about a brilliant mathematician here. He sent me off, telling me that I needed to write up everything before he could check whether I have done everything correctly (he might also have said that he did not want to waste time on what little I had written).
The next week, I actually wrote out everything in a more coherent way, and he spent maybe an hour criticizing the first few pages, then sent me off again, telling me to make all the corrections that he suggested, then to apply the same standards to the rest of the paper. Looking back, even the slightest change of a single word can make a notation incoherent. Now that I have matured considerably from the graduate student that I was, I am no longer sure if my advisor actually didn't understand, or if he sent me away because it was an educational opportunity.
Finally, a few weeks later, after painstakingly fixing everything so that my advisor couldn't criticize me on minor points, I just sent it to him via email. A few weeks later, he sent me a corrected copy back and told me that the solution was nice and that it was a lot more subtle than what he had in mind!
What your advisor is doing reminds me a lot of what my advisor did to me. If he gave you a specific deadline and he is willing to meet with you again, it is most likely an issue on your exposition (and don't feel bad; most graduate students really need to work on how to clearly write things). And believe me, if you are staring at a poorly written piece of mathematics for hours, you really get cranky.
And the fact that he gave you a very short amount of time to incorporate a new problem into your thesis makes me suspect that the problem is well within your reaches. No reasonable advisor will demand that a student solve a completely new problem in a week!
So I think that your first course of action should be to calm down, and carefully evaluate what you have written. Just do your best in cleaning up everything and presenting your advisor with a new copy. Think about the new problem that your advisor suggested as well, and see if it is easily solvable with what you know already.
Once you have calmed down, I would send an email to your advisor, asking if he thinks that you can still graduate by December, and whether if there is anything that you can do to make that happen. Just calmly and politely lay out your concerns in an email, and suggest that you could meet to talk about it.
That is step one. You need to make sure that your advisor isn't just saying these things so that you can learn something from these interactions.
If your advisor continues to be difficult, I would talk to the chair of graduate studies in your department. Especially because your advisor has retired, I would think that you need an active advisor (even if it's just on paper) in the department, so it should be relatively easy to find someone who is willing to proofread your thesis and help you graduate.
Finally, I just want to add that you want to try to maintain a good relationship with your advisor regardless, because your advisor's letter counts the most when you look for academic positions. You did not say whether you want an academic position, but it is something to keep in mind. Because we don't have a lab culture, I do think that most mathematicians are reasonable when it comes to dealing with graduate students, so instead of reacting quickly against the hurtful comments, try to see if your advisor had a point (even though it seems that at the best scenario, he conveyed that badly).

These were some of my thoughts, as well. There have been some breakdowns in understandings, and the conversation this past week was indeed heated, but no animosity seems to have continued, and it looks like my work will be given a chance to be read. It seems, more than anything, that my major prof may be too tied up in very personal issues to recall everything we're doing on the spot and the goals we set forth in the preliminary, and I think everyone, me included, is coming to realize this fact.

My first instinct would be to go to a trusted third party who is responsible for providing guidance or even mediating disputes between students and their advisors. If no such person exists, then try to find one.
In my department the director of the graduate program also serves as a confidential and neutral third party to whom advisors and students can approach about exactly these kinds of issues. He is sworn to confidentiality (will not inform your advisor of the discussion) unless you specifically request that he mediate between you. If your department has no such designated person then you could try requesting a meeting with a reasonable proxy such as the chair or graduate program director. If none of these people are willing or able to serve in this role, it might be worthwhile to go to the dean of graduate studies, but this would be an option of last resort, as it would look bad for you, your advisor, your chair, and your department.
Going outside of your advisor to another trusted committee member could be a solution, be be warned that you do not want your committee to feel like they have to pick sides between you and your advisor.

Talking to the dean of the Graduate College was actually part of the resolution I had today, because that person is both intimately familiar with my case and has the final say on extending overage courses. I only mentioned a "possible extenuating circumstance outside my control" to him, making sure to not go into details (and complementing that my department was working on them, too) but that I needed assurance that if I was forced to graduate in Spring, the extension could go until then. He gladly gave me that assurance, so that improved everything dramatically.


text:
I wrote the whole paper, but did only a very small part of the research. PhD student wants to be first author, but didn't write. Is this okay?
I'm an undergraduate who recently was involved in writing a paper where I did most, if not all, of the work writing the manuscript. The PhD student basically "dumped" his project into my lap after a year of sitting on the results, and asked me to write it. I wasn't really involved in the project, except for a few small things in the beginning.
I'm currently listed as third author on the paper; the second author is completely out of the picture, and has not contributed at all to the paper (the PhD student has at least provided some edits). Should I argue that because I wrote the paper, despite not doing all of the research that the second author did, that I should be listed as second author?
As the deadline grew nearer, I found myself picking up more and more of the responsibility of the paper. I was initially happy to be third author, but when I found myself writing the entire paper, I think that my contributions are a lot greater than I had initially anticipated.
However, I've never been involved in writing a paper before, so I don't know what the etiquette is for these types of scenarios. Should the second author be listed on the paper at all, or should we swap places in authorship? I don't think that the second author will even read the paper before it's published anyways. Should I talk to the PhD student that I think I should get more recognition for the work I've done on this paper, because I feel like I honestly should be first author considering that if I didn't write this paper, it never would have been written, or should I just be happy where I am?
I'm not really sure what to do! Any advice would be immensely helpful.

I guess your mentor is under external pressure to put that other guy on place two. Anyway, unless the journal has some editorial space under the paper where they say who did what (rare), it doesn't make much difference: Everybody assumes that the first name did the scientific work, last name is his boss, and everyone else was involved in some way.

What did you actually do? Did you take a data dump and really for the first time analysed it, compared the results to literature values, and drew the conclusions? Or did that PhD provide you with the results and conclusion, a stucture for the paper, and an extensive literature list?

In my field (physics), the actual writing of the paper is a fairly small fraction of the total work related to the research (<10%). Perhaps the second author played a large role in the original crafting of the experiment/research program (~30%), the PhD student did most of the work to execute it (60%), and you did most of the work to write it up (~10%)? In this scenario the authorship list makes a fair amount of sense in terms of time.

Unfortunately, the time to decide these kinds of issues is well in advance of publication, and preferably in advance of doing the work and writing the paper!
The answer to your question is "it depends". Authorship on academic papers isn't so much about writing text, but about scholarship. Writing text is a part of that, but scholarship is much bigger than simply writing up results. In the guidelines I link below, scholarship is defined as:
Scholarship: Contributes significantly to the conception, design, execution, and/or analysis and interpretation of data.
If your primary contribution is mainly writing the paper, then I would tend to think that you would not be the primary author. If you have substantial contributions above and beyond writing the text of the paper, for example if you were primarily responsible for designing the investigation, or primarily responsible executing the investigation, these put you on much stronger ground to claim primary authorship.
Beyond that, there are special considerations for lead authorship. Though all authors are responsible for verifying the accuracy and integrity of the work, the lead author is the person who is primarily responsible for this. They are the one responsible for obtaining publication approval from all co-authors for publication, and then responsible for certifying the accuracy and integrity to the publisher / journal / conference / etc. Practically, the lead author is the corresponding author who interacts with journal / conference editors and reviewers. They are also typically the person who is responsible for defending the work publicly if it is to be presented at a conference.
The person primarily responsible for conducting investigations and experiments is typically the lead author for these reasons. They are the person who is most able to certify the accuracy and integrity of the work. They're also the person most familiar with the actual investigation that is being written up, and most able to discuss the details.
I have a few practical suggestions for you:
1) Most schools have specific authorship guidelines that can help with these kinds of decisions, for example:
http://research.wustl.edu/PoliciesGuidelines/Pages/AuthorshipPolicy.aspx
2) Relevant publishers, professional organizations, journals, conferences, etc. may have their own authorship policies.
Again, if your primary contribution has been writing the paper, that would not seem to indicate to me that you would be the lead author. Unfortunately, in your situation, it sounds like this graduate student has been somewhat exploitative. It makes sense to involve undergraduates in the writing process for many reasons, but it's unreasonable for you to write the entire thing. The primary scholar on a project (the lead author) should be the one responsible for drafting most of the text.

"the time to decide these kinds of issues is well in advance of publication, and preferably in advance of doing the work and writing the paper" - that sounds like a good plan, but it should probably be handled in an adaptive way (by deciding about rules for author ordering rather than a concrete order): Over time, I have come to realize that it usually becomes clear who has written most of the paper only after finishing writing.

"Writing text is a part of that, but scholarship is much bigger than simply writing up results." - true, although it should also be noted that writing text can be quite a bit bigger than writing up results (when it comes to presentation, connection of different parts of design rationales, highlighting the important parts, conveying the appropriate amount of background knowledge, picking the most suitable references for the way a particular argument ends up being worded in the text, etc.).

"Beyond that, there are special considerations for lead authorship." - lastly, while that is indeed the convention, most of that paragraph can probably be ignored in the OP's case. For instance, I have repeatedly supervised Bachelor theses that ended up as papers mainly authored by the Bachelor students (who were thus primary authors), but still I took over all the organizational chores and the coorespondance with the conference chairs in my paid university worktime rather than having an undergrad student without any experience in these matters deal with such issues in their spare time. ...

... (And, just to add: Even if enthusiastic avout paper-writing, undergrad students typically have no interest in attending a conference in my experience.)

I happened to stumble over this post only now, so I'm late to the party, but let me add an important point.
I fully agree with @David's comment "the time to decide these kinds of issues is well in advance of publication, and preferably in advance of doing the work and writing the paper!" and @O. R. Mapper's point that these things sometimes change anyway.
But one thing you didn't say is whether this paper is for a conference (as is common in, say, CS) or directly to a journal (as is common in many other fields).  If going to a conference, you also have to decide early who will present the work.  I ran into an issue once or twice when that question proved contentious later on.
As for the case here, I agree that it is really weird for the person who did the technical work to drop it on the questioner essentially to ghost-write.  IMHO writing the paper is at least as important as doing the work and the author should be first or second in the list -- perhaps by alphabetical order.


text:
Asking part of the salary in advance while starting a postdoc at a US university
I'm not a US national, moving to the US from a foreign country to start a new postdoc at a US university. Considering the initial expenses (especially the deposit for the rent, which is three times the monthly rent), it'd help me if I could get part of the salary in advance.
My question is: would this be really a strange request to ask the department about it? Has anyone done it before with a positive result?

Don't know about the US but it's definitely possible elsewhere so asking sounds reasonable. Also, you don't risk much by talking to HR about this, worse case they say no and nothing else happens.

@Joe Strazzere: yes, I'd be employed by the university, and not from an external grant. My salary will come from a grant of one of their faculty.

My university would give you a moving allowance that could be used to cover first and last months' rent plus security deposit on an apartment or rental house. You might start with asking what kind of moving allowance or support they offer and whether upfront rental costs like these are covered. This is not considered an advance on salary at my university, but is part of the cost of hiring. The university simply pays it to get good people to come work there.

Thank you! I asked about the reimbursement of the flight expenses, but the answer turned out to be negative. I wonder whether it's so because the source of my salary is the individual grant of a professor there.
By 'moving allowance', did you mean flight expense + initial upfront rental costs as you wrote, or only the later? I do wonder in my case (the source of the salary being individual grant and not the univ.,) whether moving allowance is provided in this case? Is it still part of the hiring process, as you wrote, in this particular case?

@ScienceMan, I meant a whole host of things. Shipping your stuff, flights, etc. The list of allowable expenses will vary by university. We also pay to bring people in and put them up in hotels for interviews. I'd be disappointed if they did not do that. Kinda shabby. It shouldn't depend on the source of funds in my experience, though US federal grant dollars probably can't be spent on non-salary stuff for personnel. In the end, they should be able to pay it out of overhead. That's what we do.

@BillBarth Not strictly relevant but my experience in the UK is that British universities will pay interview expenses for everybody but only pay relocation expenses for permanent staff (i.e., not for postdocs).

@BillBarth: thanks. From what you wrote, it'd be somewhat strange if the university in question (a top-tier and very well-known university) doesn't pay any moving allowance at all. However, from David Richerby's comment, it could be the case, like the UK universities.

I doubt you'll be successful with this request, but it can't hurt to ask.
Once you are in the U.S., grab your proof of employment letter and head straight to the nearest credit union.  (That's a bank that serves its member-clients instead of trying to squeeze as much profit as possible from its customers.)  With that proof of employment, they will give you a loan with a pretty good interest rate.  Within six months you will have it paid off, and you will have started to build up a credit rating, which will stand you in very good stead if you ever want to buy a house in the U.S.
If you don't have cash reserves to help you get set up when you arrive in the U.S., ask the department to ask around if there's anyone who can put you up for a week after you arrive.  That will allow you to get that bank loan and also visit the possible housing situations you are considering, in person.
If nothing turns up through the department, you might give couchsurfing.com a try.

Thank you for your answer. I might both ask the department about any available moving costs, and also consider the option of getting loan from a credit union. A quick related question but not relevant to this site: I did my doctorate in the US, and I had a debit card all the time and also for a while a credit card from that bank. I deactivated the credit card while leaving the US. Does the above automatically mean I have a non-zero credit history? In case of yes, the deposit would not be as high as having no credit history. Hence I ask. Many thanks!

Getting a credit card and paying off the balance promptly each month is a very good way of establishing a positive credit history.  Another good way is to get a signature loan and pay it off according to schedule (or faster, either way is fine).  By the way I believe there are ways of checking your own credit history.

Yes, this would be perceived as a strange request and will very likely be turned down, and may even be frowned upon by certain people. You have identified a strange blind spot in the U.S. academic employment system -- U.S. universities do not really have a good understanding of some of the issues facing foreign scholars. I also think this ties in to cultural factors such as the strong U.S. belief in self-reliance and personal responsibility, and a negative bias towards people of modest means. Asking one's employer for an advance is generally seen as a somewhat negative thing that only very poor or desperate people would do.
Let me offer a personal anecdote that could add some context. Some years ago I had a similar experience to you when I arrived in the U.S. as a postdoc. Like you, in my first few weeks I had to spend a nontrivial amount of money on a rent deposit and other necessary expenses, all with no financial assistance from my university. Things got worse when my first paycheck arrived and I discovered that they had entered my salary incorrectly in the system so the amount was lower than I expected. I asked for this to be corrected and was told that it will be and that the change will be reflected in the next paycheck, one month hence. Another upsetting thing was that I was asked by my department to pay $50 as a deposit for my office key, a key to the computer lab and a building entry card. As it happened, I had enough savings so all of this did not pose a great difficulty for me, but I knew this might not be true of all postdocs, and was very annoyed by the principle that I had traveled from halfway around the world to contribute my work and talent to the university and was being treated with such thoughtlessness and lack of consideration, to the extent that instead of them paying me for my efforts we were starting off with the money flowing in the opposite direction!
When I mentioned these complaints to the professor I was working with, he immediately offered to give me a loan (which as I said was not necessary in my case). He then chuckled and recalled with nostalgia how when he was a young postdoc, moving to the U.S. from another country as a postdoc, he found himself short of cash for precisely the same reason. His own research mentor happily gave him a loan to tide him over until he started getting paid. So, he understood the problem very well. However, he did not appear concerned by this approach and thought it was very natural that this cycle of personal loans should continue as a solution to the problem...
I should also add that part of the reason for my annoyance was a completely opposite experiece I had a couple of years before, when I arrived in France to work as a postdoc on a French government grant. On the day of my arrival I was given an envelope with 500 French francs in cash, and had prearranged housing with rent being deducted directly from my paycheck and no deposit necessary. Needless to say I appreciated very much this thoughtful attitude on the part of my French hosts. Life in the U.S. has many wonderful aspects to it, as you'll soon find out, but on this particular issue the comparison to France is not especially flattering.

Thank you for sharing your own experience! I agree with you that in France, where the salary of an assistant professor is quite low even compared to the US postdocs, they still do things to help you (receiving 500 francs upon your arrival) or used to do so; As I write, I've done two one year postdocs at two French universities, but this never happened. However, they've non-trivial unemployment benefits even for non-EU citizens, unlike the US.

@ScienceMan - We've got an apples and oranges comparison going on here.  In France, when you rent a flat or a house, the kitchen is completely bare.  In the U.S., you find a stove, a refrigerator, and cupboards.

@aparente001: From my living in three different places in France (including French big cities), my experience regarding the kitchen furnishing has been entirely different. As for the other part, may be a direct comparison isn't possible, I agree.

@ScienceMan - I'm jealous.  Those first couple of weeks in France with a ten-month-old and boxes in place of kitchen cupboards and countertop were tough.

I think my case might be slightly different than yours, although quite common in France, because I rented my place from a landlord, not from a company. The sofa in the living room was bought by the people who used to live there, but yes, the kitchen was equipped with microwave, oven, dishwasher, fridge, cupboards for keeping stuffs. And it's all in Paris!


text:
How can a researcher improve his contribution to society?
As an academic researcher in a theoretical field at a public institution, I am sensitive to the social value of my work (my own contribution to society). I do some teaching, whose contribution to society is easy to identify, but not much. Try to increase that aspect of my job, I have listed some things I can do (some of which I already do, some of which I don’t):

Engage in collaborations with industrial partners (favoring transfer of knowledge to practical applications).
Orientate one’s research goals to match an area of societal importance (green gas reduction, nuclear waste storage, you name it).
Communicate science to a wide public, whether it is my own research or the knowledge of my field in general (popular science). This includes writing articles in magazines, writing a blog, developing educational software, …
Get involved in education science: contribute to my national society of physics and chemistry teachers, for example. Offer some software for high-school and university teachers to demonstrate concepts.
Register as an expert with the nearest court of law.

What other suggestions do you have to improve one’s social value? (Or should I stop worrying and love the bomb?) I mean, in the short term. I know that I (and my colleagues) contribute to the advancement of mankind in the very long term, but sometimes it doesn't help feel useful.

Related, over on Math.SE - Can I use my powers for good?

You can have a huge impact through education, both of students and of the wider public.  Don't forget informal channels, such as mentoring young faculty, postdocs, or undergrads (especially those hoping aiming for grad school).  When ignorance and misconception are replaced by knowledge and understanding, society wins.  Help make that happen.

Have you considered contributing to political life? I refer not to upholding one political view or another, but rather to ensuring that there is informed scientific input on major issues when they are being debated in political circles.
I do not know in which country you live, but I am aware that there are far too many "first-world" countries in which the policy and decision makers are poorly informed at best, willfully ignorant - seemingly - at worst.
One of the best descriptions of a university that I have come across is that it should - must - act as the "critic and conscience of society". In my view this would include taking part in ensuring those that lead us are well informed.
One way this could be done is by taking an interest in the advisory process used in how policy is formed in your country. See if you can offer your specialist views via your professional association.
A related activity is to take part in advising courts when they are considering issues based on scientific topics. This would include contributing to amicus curiae briefs, for instance. This goes beyond acting as an expert witness in court. An amicus curiae brief presents a reasoned argument using a balanced analysis of facts, reaching a conclusion. A court expert, in contrast, offers answers on specific questions from the court.

I marked that answer as accepted. All answers highlighted very interesting (and very different) viewpoints on my question, but this one actually raised an issue I had failed to consider entirely. Thanks Nicholas, thanks everyone!

On a different note from some of the other answers, try to take to heart that basic research is directly useful to society. Almost all modern pharmacology is based on decades of fundamental biochemistry and biology research. Materials science is based on years of basic chemistry and physics research. Basic math research fuels advances in all types of engineering, from signal processing to computational work to structural engineering. There are many other examples for other fields of research; please edit this answer or put them in the comments.
In short, don't underestimate your current value to society.

I think it's important to frame things as eykanal suggests when communicating with the general public.  I.e., the message should be "basic research is of great value to society in the long run, and here are some other things I do that have shorter-term impact", rather than "here are some things I do to make up for the fact that my research sounds abstract and useless".

I don't think its about underestimating one's value, rather about the direct impact of one's research. A 'normal' basic researcher may not invent something that has a direct impact on the society at large (exceptions do exist). But years of continual (follow-up) effort by a lot of people makes sense to the research carried out; as eykanal points out. I think, in that light, OP wanted to know what social impact do/can a researcher make in his society and the term 'contribution' is not limited to field of research. As noted in Q it is a thought of a researcher from a theoretical field.

No, it's not about the direct impact of one's research.  It's about the impact of one's research.

@JeffE - I think it's purely a psychological desire to have a visible positive impact. Indirect effects are much harder to quantify, and therefore justify internally (and externally, if that's your thing).

Instead of thinking increasing my own social value (reputation), I think the other way round. The society is supporting me in carrying out the research (in theoretical field), in innumerable dimensions; from the public transport systems to research grants. I think of the ways that I can, at least in part, repay the tax-payers of my nation.
Some of the activities that I do, that I think, will be useful to the society include,

helping fellow research scholars in other fields or disciplines in areas where I have expertise. It can vary from a simple installation of a software or help in filling a grant application to active discussion in improving their research  or interpreting their results (that helps me too, indirectly).
popularize the field among school/college students and common people, so that better ignited minds take up the field for their career.
actively participate in various professional and amateur associations/societies/forums related to my field or where I can make some contributions.
provide support to enthusiastic people who wish to take up a career in the field or a related field, by helping them in a project or connecting them with a better experienced person. As a researcher, sometimes I have better contacts.
provide administrative assistance  to the needy persons in my institution where I have better exposure/access, like filing an application form or submitting various fees etc.

In short, the various activities that I involve myself in, improves my social value, as far as I have experienced. The more I try to give, the more I get in return.
If you are active in the society and if they feel you are really worth, the society reaches you for help or assistance and they value your suggestions.

Maybe I chose the wrong term… by “social value”, I mean “what I give to society” or “what I am worth for the society as a whole”. Not my “social status” or anything like that… Can you suggest a way to express that better? (I'll then edit the question for clarity.)

How about How can a researcher improve contributions to his/her society? ?

Great question. I agree with the earlier post that basic research is important but one also has to come to an understanding of what level of feedback you need for the impact of your actions. For some, totally unapplied, ethereal math modelling might be their best way to contribute to the world, others need to feel like they are doing something every day that has a direct impact.
I studied complexity theory for my PhD (modelling army ant swarming) and this directly informs my thinking in how I understand the world. But as I finished my degree I felt like I needed my daily work to have a more immediate and direct impact on the world and so I completely switched fields. Now I build gigapixel timelapse cameras for capturing long term environmental change. I chose this because people process information visually and so we should show them environmental change in compelling ways. Army ants and complexity theory are cool but I could spend my whole academic career modeling ants and in 30 years there would be no rainforests left for ants to live in. But sometimes even now I feel like I'm tilting at windmills. As an ecologist I think we are at a tipping point in human history because if humans don't transition to sustainability in the next few decades the lives of a lot of the population will be a whole lot worse than they might be otherwise. I often wonder if I should drop everything and become a full time activist... When do things become so dire you drop what you are doing and run to put out the fire instead of making beautiful movies of people who are on fire? But then again you have to go with what you are good at and so on.
Overall though I agree the best thing to do is to educate the public and find ways to make your skills useful to others. At this point, at least in America bringing thoughtful science understanding of any sort to the wider public is an immeasurable and essential contribution given the sorry state of the American understanding of reality.
But we all should be asking ourselves fairly regularly if there is more we could do. Things don't change until enough people are pushing in the same direction that we can overcome the inertia of existing power structures (I learned that studying complexity theory ;).

Although communicating science to a broader audience is important, using scientific principles to solve the basic problems of the community may be even more important and rewarding. A chilean innovation center designed and built a water sanitation system. This system has been installed in poor neighborhoods where the access to purified water did not exist. Here you can see a video with english subtitles.
Obviously, the extent to which you can undertake a similar initiative depends on your specialties. Even though being a researcher you may be overqualified, a more attainable initiative would be to teach high school teachers or the community. For instance, a chilean NGO teach classes for micro-entrepreneurs. The instructors are usually university students that volunteer in the organization. The students are owners of small business (e.g., local grocery). The courses include a wide range of topics, such as concepts related to taxation and some ideas about economics and marketing.
You can have even a greater impact if you distribute contents designed by you on the internet. Similar to what you suggest, you can design an e-learning course and post it on the web.


text:
Software for extracting data from a graph without having to click on every single point?
There are many times when I am faced with the task of extracting data from a published graph (usually a bitmap image in an paper). For example, a scatter plot from which I would like to get a list of individual (x, y) coordinates for the points.
One option is to ask the contact author for raw data. Most will do it, sometimes in nice ASCII format, sometimes in Excel files, sometimes in formats that I cannot open (chemists are fond of software like Origin or Igor Pro). Some authors never reply, or ask questions like “what do you want to do with it?”. In all cases, it takes time. Sometime, it's not even possible (I can hardly email the author of a 1936 paper!).
The other option is to extract the data. I currently use g3data to do that, but for large scatter plots having to click on every single point is tedious. Thus, I am looking for a data extraction software that could recognize individual points automagically, and possibly filter them by point color or symbol used. Is that even something that exists? What other tools can you recommend to work around this issue?
I don't think it'd be appropriate to have extra requirements on the software, so I'm happy with free or commercial solutions, running on any OS. Of course, if given the choice, I'd prefer open source software running on Linux and Mac OS.

The problem with extracting the data from a printed graph is that the process will introduce errors. Then what can you really say about the data you have?

@DaveClarke Yes, the process introduces some uncertainty, but if the graph resolution is good, the uncertainty can be low. Also, sometimes there is no choice: I recently digitized data from a 1936 paper, I can hardly imagine emailing the author :)

An option you didn't mention in the question is to reproduce the experiment yourself. While in some cases it is a time-waste you'd like to avoid, depending on the nature of the experiment, it may be an interesting solution.

@T.Verron in very specific cases, it might be possible. In most cases, I might not have the time, funding, people or equipment available. In most cases, I am trying to get experimental data to compare with my own theoretical results…

This has been asked on the stats forum, see Software needed to scrape data from graph.

@AndyW thanks for the link… all solutions given in that thread are “click-click-click-click-click”-based, I was wondering if a more automated solution exists

Check out the mathematica site perhaps, you will want in that case image recognition. See for an example, http://mathematica.stackexchange.com/q/11819/963. Other software (especially Matlab) has similar image processing capabilities. These exist to a certain extent in some image/vector editing software as well (e.g. InkScapes convert raster to lines).

Edge detection in image processing is not easy; it gets harder if you have anything besides black and white. So the main difficulty is not in the "conversion to tabular" but the "finding the data points" part of the problem; you may have better luck asking on dsp.stackexchange.com

@F'x The first link provided by AndyW has this answer, which lists some software with auto-point detection. The author says that the auto detection is inconsistent, but the mileage may vary for you. (I have never tried any of them).

Look at graph grabber...
I have not used it, but I know people who have. It looks pretty promising.

A colleague suggested I use GraphClick, a Mac OS software that includes (according to its website):

Automatic detection of curves (solid, dotted or dashed), symbols, bar charts, or perimeters of areas
Frame-by-frame digitization of QuickTime movies

The later is something I had not thought about, but might actually be useful for some teaching needs (analysis of motion from a video). My first experiences are good: the software is easy to use, includes a nice magnification UI, and automatic curve detection works fine if the graph is “clean”.

And here's a list of other possible software from this answer on Cross Validated (link thanks to @AndyW and @Paresh):

Engauge Digitizer (free software, GPL license) auto point / line recognition. Available in Ubuntu repository (engauge-digitizer)
Get Data (shareware, free trial version, $30 for personal license) has zoom window, auto point / line recognition
DigitizeIt (shareware, free trial version, $49 for personal license) auto point / line recognition

GraphClick was amazing software!  Worked really well.  Unfortunately it had problems on some Retina based mac's, and is now dead as it's 32bit and all modern OsX is 64bit only.  Parallels or VMware can run/emulate older OsX versions that run 32bit.  Hopefully anyone attempting this isn't bitten by the zoom/retina bug.

Here is a very good online tool: http://arohatgi.info/WebPlotDigitizer/app/

There's a now famous/infamous blog by a professor at Berkeley where he and his lab carefully read and dissect papers in bioinformatics. I saw him mention this tool. If this guy uses it, it's probably quality. https://liorpachter.wordpress.com/2014/02/

The link in the answer is dead, here's the new one: https://automeris.io/WebPlotDigitizer/

Automeris.io has become old and is glitchy. PlotDigitizer is what I often used nowadays, plus it looks more professional than Automeris.io.

We had a very similar problem at my old job: we had to scour a huge literature database containing literally thousands of papers for any data showing the solubility behavior of different species. A lot of this data was from the 1950s through 1970's, and was data we could not reproduce for a very large number of reasons (time and now safety regulations being chief among these).
The colleague who was responsible for collecting all of this data used a package called Data Thief to remove the data from graphs. It seemed to work well, but is also (from what I recall) commercial software (or rather shareware, but still technically not free). It is cross-platform and written in Java, so perhaps satisfies a decent amount of your criteria.

I used DataThief years ago. From what I remember, it is not fully automated. You start by loading a digital image and identifying the axes, some tick marks, the axis limits and the scale (i.e., linear/log/polar). This lets it handle bad scans (e.g., rotation and warping). Once it knows the bounding box of the plot, you then tell it what to extract (curves, points, errorbars, etc.).
It is written in JAVA so should run on most OS's. I believe it is free as in beer (and it might be open source).

This program only works for continuous series plotted as lines. Cool, though.

I pulled datathief out and used it today on a series of dotted lines.  You just need to extend the tracer leg over the the length of a dot

Worth noting: it's shareware, with a registration fee (as of May 2017) of €23,65, and some features only available in the registered version. And as @WilliamGunn mentioned, it doesn't seem to be able to detect points, only lines.

ScanIt does well. It is free of charge, albeit not open source; runs on Windows. It can automatically recognize points, and even distinguish between different symbols used as points:

Welcome to the site. Link-only answers are discouraged here. Can you give us some idea of what ScanIt is capable of doing, some benefits and drawbacks, etc?

@Fomite: This is not a link-only answer (see here). Nontheless, it’s still a bad answer that can and should be improved by addressing your questions.

@Wrzlprmft It's close enough to a link-only answer that I'm perfectly comfortable asking the poster for more information.

Here I describe how it is possible to recover data from vector graph in a PDF file with maximum exactness and even estimate introduced recovery error. I show how it can be done in Mathematica but the method shown is very basic and simple enough to be easily implemented in other systems.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/