text:
Best-practice models for "research" code?
I have been a professional software developer for a number of years, I'm also an academic researcher - and my research has involved lots of software development.
I sometimes feel as though my industrial experience has been a hindrance in my research, as the goals of writing software in a research context feel contradictory to the goals in industry.
In industry, code needs to be (ideally): maintainable, bug-free, refactored,  well-documented, rigorously tested - good quality - best practice says that these things are worth the time (I agree).
In academia, the goal is to write as many quality research papers in the shortest possible time. In this context, code is written to run the experiment, and might never be looked at again (we are judged on our papers - not our code). There seems to be no motivation to write tested, maintainable, documented code - I just need to run it and get the result in my paper or whatever ASAP. Consequently, the "academic" code I've written is poor quality - from a software engineering perspective.
The problem is that I either spend too long making (unnecessarily) getting my "research" code to industry-quality, or I publish work based on "bad quality" code, and I feel like a fraud.
My career progression is dependent on me writing "bad" code!?
The "craft" of software development is a huge subject - but where is the best practice for academic research? Nobody writes unit tests for conference paper code!
Does anyone find them in a similar situation?
Does anyone know of formal methodologies for "research" code?

Related: Why do many talented scientists write horrible software?

@Ben You answer your own question (when it comes to quality of code and incentives), don't you?

There's also a related question on SO: How can I write good “research code”?

And (also on SO): Good strategies for developing throwaway code?

I guess my real underlying frustration, is that without a formalizing the approach to "research" code a little - it is difficult to learn from others about the discipline of writing "research code", and the wider craft in this context. There are no blogs, no books, no best practice, no way to learn and improve!

Good code in academia is exactly the same thing as good code in industry. So, essentially, there are the same books, blogs, best practices and places to learn should work. In many places researchers are learning it, start using general-purpose languages and collaborate on code under VCS. But as long as they are getting paid and promoted for papers (even closed-access), not code (even open source), the code will be a tool not a priority (sadly).

@PiotrMigdal Good code does what is required. Not less, but certainly not more. If you are building a throw-away demonstrator for a conference using TDD with 100% test coverage, continuous integration, strict issue tracking and release management, you are over-engineering. Not all code needs to be maintainable, and many research prototypes certainly don't need to be.

There is an ethical issue here. If I present results in a paper, and haven't got full test coverage (who does in this context?), the code is very likely to have bugs - which means the results I'm presenting might be wrong, and I know that they are wrong - yet I still publish the paper. I guess this is part of the unwritten culture. I don't mean claiming to trounce the state-of-the-art, I'm talking about small performance discrepancies, more generally - test coverage is not considered necessary for "good faith" experimentation in CS? I suppose it depends on contribution claimed.

@Ben Yes, it depends on what you claim and what your tests would look like. If you build, say, a machine learning algorithm and you are able to get better classification results on a standard data set than the state of the art, I believe you even if you have not a single unit test (because a bug is very unlikely to classify better than expected).

@xLeitix Not many papers having numerical results link to their code. And for numerical simulations, you don't always claim to do better than expected but e.g. to find that in such-and-such model parameter X is higher than for another model.

@xLeitix - really good point, totally agree. A conclusive bake-off, or showing conclusively that technique X is poor for problem Y - is on softer ground.

@Ben: That definitely depends on the contribution claimed. In many cases of CS research, it's not the prototype that produces results in an experiment, but the user who uses said prototype. Bugs are likely to be present, but I can hardly imagine any situation where they could unfairly influence the result (rather than being clearly registered in the experiment as "task could not be solved for external factors and should not be counted"), less so in a positive way.

(a) If you are following an Agile paradigm, your "industry" code may be much closer to "research" code. Bug-free-ness and documentation are, ahem, not very high priority. (b) Open source research code (I am specifically thinking of R packages on CRAN) at least have to pass some tests, and I have more confidence in the "mainstream" CRAN packages than in some (cough, cough) "industry" code. Bottom line: it's not all black and white.

In quite a few areas, if the code is your actual research (as opposed to proof/calculations for some hypothesis), then it can't really be wrong - the evaluation part of the code is tiny and trivial compared to the rest of it, and can be properly tested;  and if the rest of the code is buggy, well, then you won't get good results; and if it gives measurably good optimization results, then even if some weird and unexpected things in code caused that, then they're features instead of bugs.

In academia, the goal is to write as many quality research papers in the shortest possible time. — [citation needed]

There's a strong motivation to write tested code -- you don't want to get a reputation for writing junk papers because your buggy code gave bogus results!

@xLeitix: There's an important (and in my experience not so seldom) type of "bug" that leads to nice looking spurious results for machine learning algorithms: data leaks between training and test cases. E.g. due to confusion with the indexing

I was referred to a paper on this very topic by a colleague: http://www.plosbiology.org/article/info%3Adoi%2F10.1371%2Fjournal.pbio.1001745

@superbest +1 thats the first required reading for all new members of my group. Has been since the first draft in 2012. Citation: Wilson G, Aruliah DA, Brown CT, Chue Hong NP, Davis M, et al. (2014) Best Practices for Scientific Computing. PLoS Biol 12(1): e1001745. doi:10.1371/journal.pbio.1001745

@David and superbest: you should make it an answer.

"There seems to be no motivation to write tested, maintainable, documented code - I just need to run it and get the result in my paper or whatever ASAP."  There is motiviation—it's that research is supposed to be reproducible.  If you reported that the water evaporates more quickly than it does because you had a hole in your bucket, your findings would not be reproducible.  The same is true of code.  If someone reimplements the algorithms that you describe and gets different results, then at least one of you has broken code, and the result isn't reproducible enough.

The Software Carpentry organisation may be of interest you - their aim is to train scientists on software development good practice (and also to encourage code-as-a-citable-object to improve reproducibility in science) http://software-carpentry.org/

"In academia, the goal is to write as many quality research papers in the shortest possible time." this isn't quote the goal, the goal ought to be to write papers that have the greatest impact on the research field as possible given the resources available.  Writing code that encourages other to use your methods is a valuable way of encouraging others to use your research.  There is no point in writing high quality papers that nobody cites.

If you write good code, and make it available, it increases the chance of other people using it (for comparison, for instance), thus it potentially increases your citation count. And, of course, improves the reproducibility of your work. All good reasons to do it properly....

As a fun counter-example, there are some software research projects that are not only industrial-strength, but are used widely in industry, e.g. LLVM, Scala, Haskell. Of course, in these cases you could argue that the quality of the software was part of the research problem itself.

I think the key to understanding research code for industrial software engineers is to accept that you are typically not building a product. You do not have customers as such. You are building software to prove a point.
As such, the majority of code that you write as a researcher is more akin to the throw-away prototypes and mockups that you (in industry) often write in the early phases of a project. As you are certainly aware, even in industry these mockups have quite different properties than the final software. They primarily need to:

Have exactly the features that you want to show to the customer. Not more, not less. Typically, all the boring standard features for the domain are omitted.
Need to get done quickly. Both you and the customer know that the prototype will be thrown away anyway, so it does not matter whether the code is maintainable.
Need to be easy to extend and adapt, optimally live during the demo.

Essentially the same properties are also useful for most throwaway research code. You do not want to build features that you do not need. You do not want to waste time writing e.g., maintainable code if you know that it will not be maintained. You want to use an environment that reduces the amount of boilerplate code and setup, and which maybe auto-generates a lot of code for you that is "good enough" for your demonstrator (Ruby on Rails and its scaffolding features come to mind).

My career progression is dependent on me writing "bad" code!?

No, it depends on you writing code fit for purpose. Just like in industry. In industry and academia nobody applauds you for software qualities that are not needed. Try to reconsider what the point of the code is that you are writing. If you plan to release your code as open source software and you expect it to be picked up by other people across the world, then go nuts - use all the engineering techniques you have also used in industry to build the best product you can. If your goal is to evaluate this one algorithm or principle for your conference, and then throw away the code, then you can also live happily without writing a single unit test without feeling like a fraud at all.
EDIT: of course this does not mean that it is acceptable to write code where you are unsure whether you have implemented said algorithm correctly. Ensuring that what you have indeed shown what you claim to have shown is mandatory, especially in research code.

For research code, it can be as sloppy and poorly-designed as you want, as long as you aren't going to use it later, release it for the public as open source, or maintain it in the future. But especially for research, I would say that unit tests are probably one of your best friends - because in the event that someone wants to check the validity of the code itself, actually working as intended (even if the research results are valid), then unit tests will be there to back you up. They're also useful for test-driven development, which I believe fits the field of research quite nicely.

Key phrase: "writing code fit for purpose". Excellent answer.

re: "If you plan to release your code as open source [...]". Too often this is decided after building the "prototype" on sand. When such systems get deployed and entrenched (and they do!) they cause as many problems as they solve.

I am a researcher and self-taught developer. I have done substantial projects which were primarily software based. Although my work is far from the most "hardcore" stuff that's out there in terms of complexity and scale, the projects were big enough that naive mistakes (eg. not using version control or poorly documenting code) were very painful. I ended up learning quite a few "best practices" through trial and error.
I have also been on the receiving end of "unmaintanable code passed down to fellow researcher":

my industrial experience has been a hindrance in my research

No, you have basically come from a civilized environment that solved these problems decades ago into one that is stuck in the stone age in terms of software development hygiene. Scientists still code like it's the 60s. Of course you feel a conflict, but the fault is not with you.

In industry, code needs to be (ideally): maintainable, bug-free, refactored, well-documented, rigorously tested

Let's say the speaker at a scientific conference, while describing the computational part of his research, said one of the following:
"The code I wrote for this research is, admittedly..."

...unmaintainable (and good luck building on my research!)
...full of bugs (and I have no idea if the output is even correct!)
...unreadable spagetti (and I don't even know how it works, let alone if it does so correctly!)
...undocumented (and all the mistakes are obfuscated from reviewers!)
...not tested (so god knows if it does what I say/think it does!)

Do you expect the audience to react with anything but scorn and outrage? If I heard such a thing, I would not believe anything this person published ever again.

In academia, the goal is (...) in the shortest possible time.

Yes, but "no shorter". You don't skip vital control experiments because "controls take time". You can't skimp on code quality for very similar reasons.

There seems to be no motivation to write [good code]

Because this is an endemic problem of academia. Although computers have been used in science for decades, it seems that algorithms have only become an important part of research in the last decade or so (perhaps because of "big data"). When you base your research on code, that code must be good quality. It is not enough to simply crank out some buggy write-only script and call it a day. The software development community has figured all of this out long ago, but academia has not yet caught on - I think the reason is that most scientists do not have a formal background in software development, and there have not been enough huge scandals in research caused by bad programming practice (eg. key results of a high-profile paper turn out to be artifacts caused by bugs).
Consider how, in many disciplines, reviewers will not even ask about the source code of your computation-heavy paper. How can they evaluate, then, the validity of your results? They cannot, and this is a failure of the peer review model as it currently exists.
Sorry to go on a rant, but basically, it's like this: As you know, there are very good reasons for writing quality code, even if no one is watching over your shoulder. In science, currently it so happens that nobody cares if your code is good or not. But this should not be a reason for you to not write good code anyway - the reasons for writing good code in the industry still largely apply to science.
Unfortunately, you may not be rewarded for your extra work. You may even be punished, because as you say, good code takes longer, and others may not see beyond that. Your PI or colleagues may not understand why you are so much slower. The best you can do is explain to them the need for good practices.
Obviously, there are exceptions. For instance, you may not need to worry about portability or backwards compatibility with old versions of the OS for code that is meant to run on a dedicated lab computer (although it is undesirable to write your code such that it only runs in a very exotic environment that other scientists will not be able to easily reconstruct). But by and large, I find that industry practices still apply, and the exceptions can be easily detected by applying a modicum of critical thought. That said, there is also a helpful publication called "Best Practices for Scientific Computing" which examines this matter in detail.
Ultimately, it is an ethical decision you must make. Do you care about doing good science above all else? Follow best practices. Do you want to cut corners that you shouldn't (in an ethical sense), to save time or avoid friction with co-workers? I couldn't recommend you to do this, on principle. But obviously many people do, and perhaps in practice, some scientists are forced to do it - although then again, does being unable to do good science by circumstance excuse bad science?
Also, like I said, I think part of the problem is that there haven't been any big scandals. If you do skimp on code quality, there's a chance it will catch up with you. You might even end up being one those big scandals. Admittedly, the risk is probably small... But, I think you can see my point.

"If I heard such a thing, I would not believe anything this person published ever again" - hence, no one publishes really publishes code.

No formal tests doesn't mean I don't know if it works. Normally, when I write a function, I check it is correct, but don't take the time to write the full unittest structure. This means that I am fairly sure that it will work until I refactor it. Also, throwing several asserts in the code helps with correctness.

@Davidmh You are correct that an untested function is not necessarily incorrect. But I think tests are the proof that it is.

"Consider how, in many disciplines, reviewers will not even ask about the source code of your computation-heavy paper. How can they evaluate, then, the validity of your results? They cannot, and this is a failure of the peer review model as it currently exists."
This is a problem for all academic research -- the researcher advances his career by making a point, and his methods are rarely double-checked (almost never before the next grant or tenure decision). There is huge incentive to cut corners and fill in the gaps with bullshit.

@adam.r But there is a big difference. For benchtop experiments, you are expected to specify in great detail where the reagents were obtained and how the experiments were made, to the point that someone could repeat the experiment by reading your paper. Sure, some reviewers don't do a good job, and as a consequence there are papers with very vague methods sections, but writing up methodology accepted as a responsibility of the reviewer/author. But publishing or reviewing source code is not treated as such a responsibility in many cases.

+1 good, honest answer. Some other answers just say, "accept it and write poor quality code -- it is academia, not industry".

I either spend too long making (unnecessarily) getting my "research"
  code to industry-quality

Don't. Make it as good as possible within the suggested timeframe. Aiming for 100% perfection that will require double the time is not worth it. In this sense, research is exactly like industry.

Consequently, the "academic" code I've written is poor quality

That does not mean all academic code is of low quality. If you check papers on algorithms conferences or parallel processing systems, you will see that the developers have thought even excruciating details, like reordering of data for fewer cache misses, SIMD, GPU programming, SSD storage etc. Usually advanced CS algorithms research is some years ahead in adopting new methods, hardware techniques before any of those techniques actually hit the industry. On the other hand, in more theoretical CS conferences code is mainly a tool and as such, it does not have to be cutting edge. So, the quality is related to the audience of your product code (exactly like industry).

Does anyone know of formal methodologies for "research" code?

I have never heard on any methods especially tailored for research code. Still, you can use the practices from your industry background (when they actually accelerate your process of writing the software). For example a versioning system accelerates development and minimizes errors / losses of data. On the other hand UNIT tests take a lot of time, which you might not have. A informal wiki for bugs, documentation, features might worth the extra time, since it also accelerates writing the actual research paper. Contrarily, a full blown bug database (bugzilla) might not worth the extra time and effort.
So, stick to those industry methods, techniques you know will save you time on the long run and will improve your software but without taking all of your time. Finding a middle ground is always the best solution.

On the other hand, in more theoretical CS conferences code is mainly a tool — More accurately, in more theoretical CS conferences, code doesn't exist at all.

"On the other hand UNIT tests take a lot of time, which you might not have." Not necessarily. In addition, time spent on formulating unit tests often helps with design (enforces modularity, creates a partial design spec), cuts down on time spent debugging, and can be used to help substantiate that research outputs are accurate. It may not be necessary to unit test everything, but for cases where it is not unduly difficult to unit test, the benefits are worth the investment.

@JeffE: Do you mean that computer code is not used, or simply that it is not discussed at conferences? I find the former implausible; for instance, someone studying geometric complexity theory might well use computer code to compute Littlewood-Richardson coefficients and other invariants related to representation theory.

I mean code is not even written, much less used.  In 20+ years as a theoretical computer scientist, I have only written only one paper that required any code whatsoever. (Some of my colleagues think I should be ashamed by that clam, but I'm not.)

Oh. Computer science, huh? How about psychologist writing SAS code? How about sociologists writing SPSS code (which is not even called code, it is referred to as "syntax" in SPSS)? How many papers in these conference would have good code? How many psychologists / sociologists would have but a single course in computer science? How many of them would know about revision control, let alone unit tests? This is Academia website, not computer science website. Please be more inclusive in your thinking.

tl;dr Some parts of industry "best practices" fit in well, and other parts are inefficient in a research environment. Keep what works well in this environment.

I'm a experimental particle physicist and we write a lot of code and much of it is big projects written by many, dispersed programmers.
Some part of the usual industry tool kit we use enthusiastically

Version control
Bug tracking
Automated build and test systems

Other part are either slower to catch on or not as highly prized, including

A formal Process (with a capital 'P') with regular planning meetings and release checklist and so on. These appear as projects get bigger (usually in response to a total break-down in quality control or long release lags). That is, we use them when we need them.

Documentation generation systems are pretty common but only lightly used until the project gets big when people who are forced to decode some bits often contribute a little more documentation.

Unit testing is sparse and usually concentrated on the lower layers of the systems, but regression testing is more common.

Most projects have coding standards, but they are generally loosely specified and weakly enforced.

Other things simple don't show up much.

Feature planning is pretty hard when you don't know what clever ideas a grad student will have next week to solve a problem that you haven't even noticed yet.

It used to be true that strict check-in control got in the way of spreading experimental code segments around, and we'd simply freeze new development check-ins occasionally to get out a blessed release (a situation that rendered HEAD/trunk/whatever a "use at your own risk" proposition). With the rise of distributed version control there is starting to be a stronger commitment to check-in controls for the official trunk.

Refactoring usually only happens when both a new person starts working with some old code and they feel they need changes or extensions. That which is not broken is left well enough alone.

From your question I suspect that you are doing your coding either single-handed or in a small group. In that setting the details change, but the tone remains the same. Simply keep the parts of your industry practice that work, and dispense with or delay the parts that have the worst cost/benefit ratio in terms of time/results.
Leave off the heavy refactoring until you know from evidence that a particular part of your code will be reused. Similarly, be content with rough documentation unless and until the code is shown to have a on-going life. And so on.

Re: Formal review. One thing I notice is that in many groups, the researcher who is developing the software has much more experience and knowledge than the PI - so it is difficult for the PI to effectively monitor progress; whereas in the industry, there is always a senior programmer who has the appropriate skillset.

Well, in a particle physics setting there are senior coding physicists with both the necessary skillsets. Admittedly there are usually only a few on each project, but they can be found.

The main characteristic of research code (more so than typical programs) is that it is harder to plan. Research by definition reaches into the unknown, and this also translates in program structures. As a researcher you often don't have the time to refactor when your research slithers into a different direction that should translate into a different software structure.
In typical software engineering you (should) have a fairly good idea of the final functionality before writing a single line of code. In research, this is often not the case. Programming for research purposes is mainly about rapid prototyping, which is typically done differently than programming for long term use (e.g. little to no unit tests, use of different languages, ...). The main mantra is to get results fast, not optimal from a software engineering perspective.
Finally, proper software engineering is a fine art that is very hard to master. Even in industry settings, ugly software is abundant (when written by professionals!). The average researcher has no formal training in software writing.

My career progression is dependent on me writing "bad" code!?

As a researcher, you are not paid to develop software (unfortunately). As an idealist I like to believe that this will change over time, but for now funding sources only care about papers.

The "craft" of software development is a huge subject - but where is the best practice for academic research? Nobody writes unit tests for conference paper code!

Unit tests serve two main purposes: (i) assert that code is working correctly  and (ii) find and debug problems fast, particularly after structural changes and refactoring (long term benefit for large infrastructures). As research software is typically fairly small, the first advantage is the only one that is really relevant. It seems that this advantage is either too small or is being underestimated (again, recall that most researchers are not software engineers).

Does anyone find them in a similar situation? Does anyone know of formal methodologies for "research" code?

If you want to change the world, start with yourself. I personally make a point of providing software along with a manuscript whenever it is reasonable. I also consistently ask for code as a reviewer, though this seems uncommon.

This seems like an answer to Why do many talented scientists write horrible software?, not to the current question on best practices.

@ff524 work in progress :)

Rather than talking about differences with industry software development (which I have no experience with), I'd like to talk about things you should do in academia. I will be assuming that your code is not there for its own sake but attaches to some scientific statement such as "E. coli shares the foo-genome with humans" or "Algorithm A outperforms algorithm B in scenario Z".

Best Effort
While your goal is not productive use with revenue attached to it, you should have a reasonable amount of certainty that your code does what you claim and can be understood (peer reviewed!) by interested parties. That is, write clear code, comment and document. And (unit-)test.
If nothing else, remember that you may have to revisit your own code some time later. You build a protoype but your next one may reuse parts of it. Or you want students to extend upon it.
Accessibility
In order to support scientific evalutation of your work (falsifiability, reproducability) other researchers have to have to be able to compile and execute your programs.
Therefore, you should provide sources, build files/instructions and whatever input data you used in your work. Keep in mind that someone may want to build your program years after initial publishing, so make sure that the sources are still around then and the build process/instructions are reasonably robust against time (mention library versions). UI is not too important but "best effort" applies here, too.
Consider putting your code on Github or a similar platform (e.g. your own). That way, you can publish updates and collect bugs easily. See also here and here.
Licensing
You should say something about what others (in particular fellow researchers) may or may not do with your code. You can use any license (I'd argue it should allow at least the liberties of GPL). The CRAPL might be worth a look.
Fair Evaluation
If your algorithm/code is the artifact you propose (as superior) you have to compare it to existing solutions. Make sure to use comparable input, rerun the experiment for the alternatives and follow basic experimental best practice (check out McGeoch's work, for instance). Make sure your comparison includes the accepted standard(s) of your field if there are any; if your approach yields different results, you have to explain why (that's okay/correct/better).

Accessibility is probably the most crucial item. Research code needs to be shared. I think this can't be stressed enough, and it's one of the major problems in all of computational science. Other than, say, physics, we have to opportunity to easily share and reproduce (most) experimental setup -- we have to make use of that.
Personally, I don't see why any article that founds its claims on computations that reviewers (and other parties) can not reproduce has any right to be published.

One reminder for all theory types:

Beware of bugs in the above code; I have only proved it correct, not tried it.
Donald E. Knuth

"Best effort" meant that if you don't have programming expertise to speak of, don't do it. Hire a person to do it.

I hope you aren't seriously recommending the CRAPL license, which is a farce. Example: "By reading this sentence, You have agreed to the terms and conditions of this License." If licenses worked that way we'd all be in deep trouble!

@wjl: I think it's worth a look, as I've stated. It contains some interesting thoughts, imho.

This is the only answer that talked about reproducibility. Isn't that supposed to be cornerstone of science? If your code does not work, or cannot be used otherwise, your so-called "research" is not reproducible, and should not have been published in first place.

I think your problem is in seeing quality as binary.
Whether in industry or academia we need to make choices as to particular quality goals. An ‘industrial’ piece of software might be safety critical and demand the highest achievable level of quality, or it might be an internally used development tool.
Quality goals might be:

Uptime

Probably not a concern for you

Robustness

Will you need to run with a lot of different data sets, or is it a one off?

Re-usability

Will the processing be incorporated into the next problem you work on?

Ability to verify

Does it work the way is it is supposed to? What would it mean if you published and this was not true?

Ability to validate

Does it produce the right answer? [ Hopefully, this does matter. ]
Another way of checking the correctness of the answer might mean it does not matter if the logic getting there is wrong.

Needs to be maintainable by

Self
Other expert
Some random undergraduate
Or definitely is throw away.

Suitable to be made public for use by others to check or re-use your work
Etc.

Having articulated your quality goals, your development and build system should be sufficient to meet those goals and no more. Note that this might vary from project to project.

If I could add a short version of the more accurate answers above, I would say:

Academia -> prototypes.
Industry -> products.

Products and prototypes must not be considered with the same standards.
Prototypes can have shorter documentation and may require some effort to be deployed. They can also be usable on a single operative system with very specific requirements, such as the ones where the code was initially developed.
Nonetheless, good quality prototypes should be tested, version-controlled, have a stable branch, and must have no out of date documentation. Otherwise they are just bad quality prototypes.
---- Edit

My career progression is dependent on me writing "bad" code!?

Leaving academia reminded me that exists something else than the paper-oriented working method, to which PhD students are trained (and whose outcomes have often a number of readers smaller than the number of co-authors).
It may not be the case in every academic environment, although in my experience research with scientific criteria is made in the private sector.
Also, this is not only a problem related to coding!
Some researchers working in wet labs have told me they have the exact same issue. Performing wet lab experiments documenting the full procedure, calibrating the tools to the highest standard, assessing the chemical composition of the material bought by third parties is consistent over time, making every step completely reproducible by another researcher... these basic practices resulted in a too slow academic paper production.

I was directed to this question by a chap in answer to my request for clarification "Why they were using a float type as a key to hash". Now to me this did not seem like a good idea. After a bit of back and forth, the questioner directed me here as their reason for doing it.
That was interesting as is the question itself.
Are you persuaded to write bad code in order to fulfill certain academic goals? Yes, even in CS courses I might add. At least bad in terms of comprehensibility. However as we are all too horribly aware, we have been 'persuaded' to write equally bad code in the commercial environment, or our lords and masters have been persuaded to have poor code written for them....
Leaving aside trivial implementations of algorithms. For instance should you use i and j as loop variables in a bubble sort algorithm, or indeed should you use a bubble sort at all. My response to your question, would be another one. How do do good software engineering principles help you achieve your goals?
Could, say good naming, SOLID principles, coherence and coupling et al get you to your goal more efficiently? My answer would be almost certainly. They are designed to do that in any non-trivial piece of software. It's what they are for, they were created in order to achieve software that could be changed at less cost. It doesn't matter that you aren't (or at least cannot foresee) a version two, the implementation isn't springing full blown from your mind, so it will be changing.
If you aren't sure what code you need to write, then something like TDD would also help given you have a ready made unit testing environment. Even without that "luxury" writing testable code is going to.
You have a huge advantage over your fellows who don't have a software engineering background, you should be able to get that irritating binary bit of the exercise out of the way quicker, get to the meat of your goal with less effort and then be able to expend more effort on the real goal.
I once had a discussion with an academically qualified type who told me re-factoring was just software aesthetes messing about and that I should have written the software correctly in the first place. Needless to say my respect for this individual dropped a notch or two, which was unfortunate for him as he hadn't earned that much in the first place.
So in summation I would say the sensible option would be to use good software engineering practices in all your efforts.
Just to be  clear though it is not good software engineering practice to write good code that you do not need...
To paraphrase Gandalf, "Keep it simple, keep it safe"
As for should you use a float as a key to hash to save time. If you know without any doubt as you choose that design compromise that the problems with doing so will not cause you an issue, then perhaps. But the amount of effort required to evade that compromise is fairly trivial and you just spent time asking how to get round an issue with using a float as a key. I rest my case
In any environment commercial or academic, choosing to lower quality, is both a benefit and a cost, examine both....

I have a problem with the premise of the question:

In academia, the goal is to write as many quality research papers in the shortest possible time.
There seems to be no motivation to write tested, maintainable, documented code - I just need to run it and get the result in my paper or whatever ASAP

I'm currently dealing with a large codebase written by people who apparently thought so, too. Before that I got used to a different standard of academic coding - one where code is simple, elegant, modern, well-tested and well-maintained over many years.
And I believe the people that will have an impact in this information age are not necessarily the ones with the most scientific credit, but the ones who can actually make something from their nice scientific ideas.
If however in your domain the cool things you can make don't depend at all on the code you write (e.g. just some boring data filtering), then you really don't need to bother with its quality.


text:
Submit an extended version of a computer science conference paper to a non-CS journal
I know that CS journals usually accept extended version of a conference paper with some, say 10%, new contents. But is it still true for non-CS journals?

Why on earth would you submit a CS paper to a non-CS journal?

It might a paper whose topic is bordering on, say, discrete mathematics. I have colleagues in the maths department that publish in both mathematics and computer science outlets.

@HansHüttel That is certainly a possibility, but I find it curious submitting a paper to a CS conference and then submitting an extended version to a non-CS journal.

Is there any legal restrictions that you signed as part of your submission and acceptance to the conference?

@FrankFYC No....

Then you ask the journal you'd like to submit your paper. They would be best to give you a thumbs up or down.

I think it would be a better strategy to submit the extended version to a CS journal and a different approach of the problem with a different point of view (not just 10% extension) to the non-CS journal.
For the reader of the non-CS journal having a non-CS way of expressing the problem/solution would be more beneficial. For the reader that sees both submissions there will not be a feeling of simply trying to get more publications with the same paper (not meaning to be rude or anything!).

Most journals expect at least 30% difference from any previous published version of your work. Some CS journals do not require such a change, or do not enforce it. In other journals this requirement may be strictly enforced or less strictly — this depends on the editor and the specific journal.

source: Stack Exchange

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

sort: votes


text:
Do we actually need more PhDs?
A few months ago I attended a panel discussion on non-academic future careers for physics PhDs. The panel was made up of two senior physicists, a science communicator and freelance journalist, and a CEO of a finance corporation with a degree in physics. At some point I raised the question of whether the PhD program is functioning properly, and maybe we should do something about the PhD program before lecturing senior graduate students in theoretical physics on the importance of acquiring skills suitable for non-academic careers to get a job after grad school. To be more concrete, I referred to a Nature article that I had come across a few years earlier. The two physicist panelists blatantly dodged my question. The CEO, who I suppose had received his degree in early 2000s, added a comment along the lines that it is better to have more highly educated people in the society rather than fewer.
Are advisers hiring more graduate students to get more research done and compete better in getting grants, or there is an actual need for more PhDs, at least in natural sciences?

Are advisers hiring more graduate students to get more research done and compete better in getting grants, or there is an actual need for more PhDs - are we assuming those are the only two options?

What does it even mean to say that "there is a need for more PhDs"?  Does it mean "are there jobs for them"?  Does it mean "will the world be a better place with them"?  And should one base one's own decision to pursue a PhD or not on whether "there is a need"?

A very much related question: Who should pursue a PhD?

@DavidKetcheson did you intend for your comment to be rhetorical?  I.e. are you trying to imply that "there is a need for more PhDs" has NO meaning, or were you actually looking for clarification here from the OP?

I was pointing out that the question is not well defined, and may mean very different things to different people.

We can make the same conversation for BSc or MSc degrees. There are probably many unemployed people with BSc degrees, as well. We cannot suggest that people should not go for higher education, because there are actually fewer jobs than university graduates.
Your question seems to neglect an important, yet simple truth. That sometimes, certain people want to go for a higher degree, regardless of their job outcome. Education (PHD included) is more than filling resumes or getting a better job but a fulfillment in itself. In this sense, it is the same as learning to play the guitar. Does the world need a new guitar player? No it does not. But you do not learn the guitar to benefit society. You learn the guitar to benefit your soul.
If the few lucky PHD holders manage to get the job they wanted that is fine. If they did not, at least they tried. Life is not linear and you cannot predict by your actions on what job you will land, even if you do everything perfectly. But at least, you must be provided with a chance to try. In that sense, it is better than there are actually more PHDs available than the available jobs for PHD holders. More people have access to an even higher education and that is (as aeismail said) a benefit in itself.
So to directly answer your question: Do we need more PHDs? No, we don't. Would the world be a better place if you or I get a PHD? No, it won't. Would we get the job we want with a PHD? Probably not. But that does not mean that I must not have the right to do a PHD and try my chances.

I wish someone in my department would have said this when I was in school.  Particularly the parts about jobs and PHDs.

I don't think anyone argues that specific people should be prevented from going for a Ph.D.  But, for example, undergraduate advisors could consider whether they are honestly informing their students about the pros and cons of graduate school, including the job market on the other end, or suggesting that they consider other options.   I suspect this would ultimately decrease the supply of PhDs. I think when many students tell their professors they are considering grad school, the response is "Great, I'll write you a letter", rather than "Have you considered issues X,Y,Z?"

"We cannot suggest that people should not go for higher education, because there are actually fewer jobs than university graduates" - Why? That's an assertion which flies in the face of basic economics concepts.

+1 for "But you do not learn the guitar to benefit society. You learn the guitar to benefit your soul." ...that is a beautiful phrase.

I've discussed this topic with my advisor on several occasions. His rather logical viewpoint was that if there were a serious glut of PhD's in a given field, you would see this because there would be a spike in the unemployment rate of PhD's in those fields. At least in the natural sciences and engineering, there does not seem to be any evidence that PhD graduates aren't finding jobs.
Certainly there is a glut of PhD's if the only possible destination were to remain in academia. However, especially for PhD's in so-called STEM fields, there are many other career options that do not involve staying in academia.

This is certainly applicable in the US, where science and engineering PhDs have unemployment rates well below the national average for their age group.

The logic is faulty.  Those jobs are not all "hire a PhD or go unfilled".  Lesser education may be perfectly suitable to fill the position, but normally a higher educated candidate is favored even when the additional skill set is not required.  More PhD's may have no issue finding jobs, but that does not equate to them being needed.

I'd like to point out this Forbes article on the fallacy of the purported shortage in the STEM fields.

Some of the claims in that article are worthwhile, but the article does not talk about PhD's, except to lump them in the general set of STEM workers.

@Brian: If employers are willing to pay a premium to have a PhD in a position, that suggests the PhDs do offer value and are not excess, even if they may not precisely be needed.

One can also question whether the PhD work itself has value, or whether the PhD qualification merely serves to the employer as a proof of a great intellect. If the latter, then there might be a more efficient way to signal the same thing, in which case we could still say we don't need more PhDs. Employers using a side-effect of the academic system (the letters after the name) when the main product (the thesis and the skills learned on the PhD programme) is utterly irrelevant to them, doesn't specifically constitute a need for PhDs, it constitutes a need for indicators of great intellect :-)

... and of course the same issue can apply to degrees below doctorates: to what extent is education worth something to the employer, vs. serving as a rather expensive signal to distinguish applicants? Evidence that employers favour better-educated applicants doesn't separate these factors.

In the middle ages, if you wanted to do scientific research, you had to pay yourself the career, meaning no salary, just living on your savings, which meant only the wealthiest could afford to dedicate their life to scientific research.
That's why there were so few inventions and discoveries.
In the renaissance, people become aware that there was 1,000 years of dark ages, and that science had been forgotten. They studied old classics and were able to re-create science. It was continued refinement of ideas by carefully testing them. But only the wealthier could afford.
At the same time the ideas of the illustration were born. Men should be free. Ideas should be free. People should be free to express their ideas. Science advanced so much in 200 years that vapor machines were invented. Then the american revolution happened. Ten years later the French revolution happened.
It was thought at the time that democracies could not exist, because Plato wrote in "Res Publicae - The Republic" that democracies would convert into demagogic governments, which meant that governments would invent enemies in order to keep in power and destroy democracy. Because of that several european countries wanted to re-conquer the americas. Americans decided to:

Educate their people for free.
Have everyone have guns.

The result is that the USA has more than 200 years, but the education system is failing. The main reason is that sometime in the past it was decided to follow the "no child left behind" policy, which meant no selection in the public system, so the students are mingled, good and bad, and of course the good have no incentive to study, since the tests are dumbed down for the stupid.
Do we need more PhDs?
If that were the case, then PhDs would make a lot of money, at least following the economic theory. The only problem is that it is very hard to make money on science, and even if you do, it takes several decades of research, so it is a very expensive and very risky investment. No rational investor would invest in science. Only if the result of the research is already proven and you just need to produce the thing, sure, some investor would be interested. We can't call that science though.
So I guess the answer is no. If you pursue a PhD is not for the money, but because you are interested in learning more about a subject. If you study computer science, maybe you go work for Google, Yahoo, Netflix, Facebook, Twitter and the like, and recover your investment of time and money, but otherwise it is a rather risky investment.

[citation needed]

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

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


text:
Changing from 100% research to 20% teaching and 80% research: Seems like a raw deal, would you do it?
I'm a named researcher (but basically a Postdoc) on a funded project in the UK which pays my salary. I've got a good CV and currently do 4 hours of teaching per year.
The principal investigator (PI) has asked if I would take over their teaching, marking and project students in exchange for renaming my contract to 80% research and 20% teaching. The increased estimated total workload would be 140h, mostly before Christmas. Seems like a raw deal as I get nothing apart from CV experience, in return. What would you do?
The PI said they would use the money saved on my contract to pay for someone else to do something unrelated to my work (but still on the project). It's not clear to me what 20% of the project I wouldn't be involved in anymore and I think I would be expected to do it all anyway.
I asked for a salary increase: No. I asked for a lectureship: No.
My choices:

I'm thinking about asking for a funded PhD student if I get a fellowship in return for doing the teaching.
Do the teaching as a "favour" but don't change the contract.

What's my leverage and what are the pros and cons?

This seems too specific to your individual situation to answer here. Good, answerable questions can be generalized to other situations.

What happens if you say no?

@AustinHenley Good question. I don't know. Is there a reason to say no?

More work - more money = oh hell no.

As I understand it, after you've been hired, the person who hired you wants to change your contract in a way that would be more advantageous for them.  Well, they can ask, but...the whole point of a contract is so that you (and your employer) can be held to the parameters you agreed upon.
I must say that although I've been in academia for my entire adult life, I still find myself baffled by some people's academic cultural expectations.  You are considering taking on what you view as 140 hours of additional work in the remainder of the calendar year.  That's almost a month of full-time work.  It is absolutely absurd to me to do that amount (or anywhere near that amount) of work "as a favour."  Are you not a highly trained professional?  Don't highly trained professionals (in particular!) get paid for their work?  Again, even as a lifelong academic, I've always thought so.
On the other hand, most academics I know are at a lot less than 100% research.  It sounds like you currently have a temporary, "soft money" academic job.  Do you want a permanent academic job?  If so, that will probably involve some teaching.  (Right?  This is probably field dependent.)  In that case, getting teaching experience is not just a CV-stuffer: it is actually valuable for your future.  Getting used to a balance of research and teaching is of some value, at least in my neck of the academic woods, where most tenure track faculty eventually teach at least 1-2 courses per semester while maintaining their research activities.
But back on the first hand: if you are currently at 100% research and are happy with that, then I understand how you are viewing this as time away from your research and are not thrilled.  If that's how you feel, then that's how you feel, and I think you should just say no, explaining that you are really excited about doing what you are doing and would like to continue with it.  You gave your PI some chances to come up with something in exchange, so it's not as though you will come off as completely unwilling to help.  Being unwilling to take over someone else's work in exchange for nothing is really not a character flaw.
Finally, I don't quite understand the financial aspects of the situation.  Why would you teaching the class generate funds that are not generated by the PI teaching the class?  Maybe I'm missing something here.

Sounds to me like the PI wants to take unpaid leave and needs to find someone to cover the teaching.

Hmmm it's 16h teaching this semester starting next week. Prep, marking and projects make up the rest. I'm not keen on it, but not because I couldn't do it, but because the way I've been asked. Everyone knows that the workload involved in teaching is severely under inflated. If I had been offered a gesture, I would probably have said yes.

As for the money released by me doing the teaching. The school would pay me 20% of my salary so freeing up the money on the project which could be used to contract another researchers time.

@HCAI but the money they are paying you has to come from someplace. Either the PI is taking a pay cut or there is extra teaching in the department and the PI is doing off topic teaching and giving you the on topic teaching.

@StrongBad I see what you mean. The school is going to pay for my teaching but where it comes from I don't know. I doubt the pi is taking a pay cut.

The first thing to realize is that this is not additional workload, or at least should not be. It is a change in allocation of 20% of your time (about 400 hours). Now one issue with that change is your estimate that 140 of those hours will be before the end of the year. Given limited marking and project student supervision during that period, that could translate into 100 hours of teaching over 10 weeks  which is something like a 3-0 teaching load in the US. It is not fair to dump that on anyone, especially a new teacher, the week before teaching starts. It is unreasonable to think you would get any research done during that period.
If the 140 hours is only 10 hours of teaching, 30 hours of prep, and a bunch of low prep student supervision and marking, that is very different.
I asked about contracts once when I was in a similar, but different, situation. Does a contract matter
As for leverage and pros and cons, it depends what you want. Maybe it will lead to a back door faculty position. Maybe it will get your contract renewed.

Yes it's as per your second paragraph. What sort of back door do you think it means here?

@HCAI you would be on an R&T contract. Presumably they could keep renewing your contract for 3 (maybe 5, I don't remember the details of UK labor law) years and you would become permanent faculty without them running a search. But unless they are saying something to that effect, I wouldn't count on it. Even if they say it, I am not sure I would count on it, but it might be worth 16 hours of lecturing.

A week before teaching starts? How do you figure?

Hmmm I've been a postdoc for 5 years so already have a permanent contract subject to funding. I'm not sure this means anything in real terms though?

@AzorAhai the OP doesn't say when the teaching would start, but it doesn't sound like they will get much prep time.

@stro Oh, I thought maybe i missed a deleted comment

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


text:
How to retrieve total number of co-authors a researcher has published with?
I understand that Google Scholar offers this service, but it has limitations and does not offer the correct number of co-authors. Are there any other websites or tools to retrieve the total count of co-authors?

Pen and paper? Or do you need and automated process for many authors?

In what field ?

Does this answer your question? Is there a quick way to search for a given researcher's past collaborators/co-authors?

the question could use clarification. Different databases have different levels of coverage so the answer to "correct number of co-authors" could be difficult to answer for some authors with many citations.

A very similar question was previously discussed here. I suggest you use the bibliographic database Scopus by Elsevier, which is an established reference (at least where I live). To update the answer by user "gerrit" (Scopus has changed a bit in the last 8 years), search for the name of the author of interest and click on "Co-Authors":
This will give you the complete list:
Note: Scopus is a paid service by Elsevier, so the free version you can access without registering is quite limited. Ask the support at your university library to check whether you have access to the paid version.

To add to this answer, Web of Science is another database that is often used and you may have access to through your institution.

@realkevlar good point. For this, go to https://www.webofscience.com/wos/author/search, search by name and surname, then you find the list of co-authors at the bottom of the right-side column


text:
Framing the competition involved with academic awards (academic CV)
I am currently applying to PhD programs in Canada, and one of the schools that I am applying to has asked applicants to use a template CV.
As part of the "Awards" section, the template asks applicants to highlight the "competition" involved with each award. I was very aggressive in applying to awards this year and managed to win 6 in about 10 months. However, after contacting the award administrators, I found out that some of the awards I won hardly had any competition. For instance, one of my awards valued at $6,000 has a 97% success rate; another valued at $500 to develop a trainee-led teaching initiative had only 4 applicants, each of which got the award.
I wondered if there is an interesting way of framing the awards I won this year without them coming off as worthless. Any advice would be sincerely appreciated!


text:
Extent of "unscientific" or wrong papers in research mathematics
Kevin Buzzard's slides (PDF version) at a recent conference have really unsettled me.
In it, he mentions several examples in what one would imagine as very rigorous areas (e.g., algebraic geometry) were the top journals like Annals and Inventiones have published and never retracted papers which are now known to be wrong. He also mentions papers relying on unpublished results taken on trust that those who announced them indeed have a proof.
He writes about his own work:

[...] maybe some of my work in the p-adic Langlands philosophy relies on stuff that is wrong. Or maybe, perhaps less drastically, on stuff which is actually correct, but for which humanity does not actually have a complete proof. If our research is not reproducible, is it science? If my work in pure mathematics is neither useful nor 100 percent guaranteed to be correct, it is surely a waste of time.

He says that as a result, he switched to formalizing proofs completely, with e.g. Lean, which guarantees correctness, and thus reusability forever.
Just how widespread is the issue? Are most areas safe, or contaminated? For example, is there some way to track the not-retracted-but-wrong papers?

"Unscientific" is not the same as wrong.

How could one possibly get to '100 percent guaranteed to be correct' without publishing things along the way? If you don't see what others are thinking and doing, and vice versa, you never get anywhere.

@Azor Ahai : yes, he mentions both issues, and both are within the scope of my question. I've now modified the title accordingly.

I have a huge amount of respect for Buzzard as a mathematician and a lot of interest in his ongoing programme/mission to formalize stuff in Lean, but I do think that those slides are deliberately polemical and, dare I say it, extrapolating from certain areas.

It's interesting you mention algebraic geometry as an area that "one would imagine as very rigorous" when my own subjective impression is that other areas like anaysis have more of a culture of spelling out what alg-geom/alg-NT people might semi-tongue-in-cheek dismiss as tedious cranking out of details

That said, I actually broadly agree with Buzzard's sense of urgency that "experts know this claim in that Annals paper is incorrect but it's OK because this other paper fixes it" is not a state of affairs we should be happy with. And also, my own area (functional analysis) is not pristine and immune from such things from time to time

So has the Lean tool been shown to be 100 percent guaranteed correct in and of itself? Sounds like a chicken and egg situation.

This question would be a better fit on mathoverflow, where I’m guessing you’ll get a variety of extremely well-informed and thoughtful answers by well-known mathematicians (possibly including Buzzard himself). I suggest migrating it. (+1 anyway, very interesting question and slides.)

@DanRomik Well, Massimo's answer links to what is close to the same question on MO already.

@Kimball then it’s either a duplicate or near-duplicate. Either way, it’s more on-topic there IMO.

@JonCuster No, but it's not a chicken and egg problem.  It reduces verifying many complicated proofs to one simpler proof.  See the FAQ about independent verifications of Lean: https://github.com/leanprover/lean/blob/master/doc/faq.md

@JonCuster This question addresses your "chicken and egg" problem.

@DanRomik: I disagree with the idea that MO is a better place to ask. Most questions there are precise questions about a single mathematical statement, and this type of question is in my experience likely to be closed there with the suggestion to post to Academia SE. I do not see how this question classifies as off-topic here, because it seems covered by the "on topic" list from the Help Centre, and the "topics to avoid" definitely do not apply to this question.

I would say this is a common, but not fatal, issue.  I think most mathematicians are aware of several papers in their field with serious errors/gaps without retractions/errata, and over time at least the wrong papers which are important get discovered.  (e.g., see this MO post for temporary counterexamples---there aren't too many that went unnoticed for too long).  There are also some grey areas where most people aren't sure if they can trust certain papers or not, and in certain areas/topics it's more of an issue than others.
The culture in mathematics is that retractions are typically for academic dishonesty, and incorrect papers either get corrected (or at least have their flaws exposed) in other papers or with errata.
What to do:

for an individual paper, check its review on MathSciNet, and check papers that reference that paper: if many people use it freely, it's probably okay, but if someone later found an issue they will often mention it in another paper.  if the paper has a corrigendum, it will be linked in MathSciNet.
if you start reading the paper and for this or other reasons become suspicious, talk to experts---usually if a paper is important and there is a serious issue, experts become aware of the situation relatively quickly
check if the author has errata/comments on their webpage
some authors are more reliable than others, and they get a reputation for it; this is something you typically learn over time from your own research and talking to experts.
don't panic: if you happen to use a result that was wrong and don't realize it (or publish a paper yourself with a major error), that's okay.  it happens from time to time and you can't check everything.  you might discover the error later or someone might point it out.  in any case, you are often able to then write another paper correcting the situation.
don't contribute to the problem: put errata for your own papers on your website and if there is a major error not corrected in a later paper, publish a corrigendum
(optional) keep track of known issues in a personal notebook along with their resolution.  i do this because there are quite a number of papers in my area with errors/gaps and i have a bad memory.  i contemplated making this public and letting other people contribute to this list, but i haven't so far mainly because i'm not sure i want to put in the effort to update it and make sure it is fair to all parties involved.  however i have shared this list with some people individually.

Thank you for the very interesting answer!

As for your great list: what about creating a common website then? Something like math-errata.org where users' identity are checked and then they can update their own list. Since zentralblatt will become open access, it might even be something they'd consider hosting https://www.fiz-karlsruhe.de/en/nachricht/zbmath-open-informationen-fuer-die-mathematik-werden-frei-zugaenglich The only point would be to protect against defamation of papers which are correct (feud between people).

@Archie Well, it would be a lot of work to set this up and maintain it, especially if you want to moderate it for abuse/disputes.  And MathSciNet already has a lot of this info through linked errata and linked reviews that many times point out when one paper corrects another.

I eventually update small errors that I’ve found or had pointed out in my old papers on the Arxiv.  That’s another place you might look, and I find it more useful than having the paper and an errata in different locations.

"if there is a major error not corrected in a later paper, publish a corrigendum" the problem is, in the specific case mentioned, this did not happen. Also: not everyone has a MathSciNet subscription.

Journals don't retract scientific papers because they are now known to be wrong. If this were the case, they would have to retract a zillion papers from the past because, well, science evolves: new findings disprove old ones, old mistakes get corrected, and new ones are introduced.
And this happens in mathematics too.
This answer on MathOverflow makes a reference to the paper Errors and Corrections in Mathematics Literature which analyses the number of published corrections in mathematics literature, divided by field. The fraction of errata is less than 1%, but indeed this doesn't count all the undiscovered mistakes and those discovered which will never receive an errata.

A somewhat related answer of mine: https://academia.stackexchange.com/a/48228/20058

Yes, thanks, but I'm asking how widespread the issue is in mathematics. I thought it would be marginal, and in particular top journals would never publish something incorrect : that means both the author and the referee(s) didn't catch the flaw.

@Archie Have a look at the answer of mine linked above where I discuss a few examples, even though not from maths: but why do you think maths should be any different? Certain proofs are complex, difficult to follow and mathematicians are humans too (this is a strong assumption indeed :-) ): mistakes can slip. The point is that in a paper there is more than the conclusions ;-)

@BenLinowitz I am just curious, which paper are you referring to?

The line "new findings disprove old ones" does not apply to mathematics (with the exception of mathematical mistakes and (very rarely) changes in the foundations of mathematics).

Just how widespread is the issue?

This is not the be an exact answer to the question but a mention of some related famous anectodes and a mention of a research field dealing with the issue. This write-up by Voevodsky gives several examples of wrong proofs being belief to be true for many years. He eventually "pioneers" a research field called univalent foundations which aims to create a computer asisted proof checker (or create proofs that can be checked by computers).

The article by Voevodsky is interesting, but maybe this should be a comment?

@Kimball I was suspecting the same. I thought I would have more to say but then realised the article itself was good enough. If a mod or another senior member susgests it I will turn it into a comment.


text:
Can the "and" word be replaced by the ampersand, "&", in citations with IEEE style?
Can the "and" word be replaced by the ampersand "&" in citations with IEEE style?
I have searched for an answer to this question online but I did not find anything so far.

Do you mean if the word "and" appears in the title, or as a separation between authors?

I guess the name of the article cannot be changed in the citation because that gets typed within double quotation marks. Therefore my question has to do with any part of the citation different from the name of the article.

Why do you care?

Where else besides title and author listing could this be?  (1) The journal name?  I do often see journal names abbreviated. (2) The volume number?  As in vol. 3&4.  (3) The page numbering?  As in 34-67 & 102-130.

Thanks @GEdgar, that is exactly what I meant when I said "any part of the citation different from the name of the article".

Do you want to save a few lines, or why would it matter how you format the references?

IEEE is based on the Chicago Manual of Style.
It seems that the Chicago Style prefers to use the word and rather than ampersands (&) in journal titles. See here for a remark regarding journal titles:

Since there is no easy way to check whether an author’s choices are random or scrupulous, conventionally editors have chosen one style or the other to impose throughout. Chicago prefers and. Even now that it’s possible to check online, we think it’s more expedient to choose one style and be consistent, given the amount of research it would entail to check the style of and in every title

Under the heading "Permissible changes to quoted title" (chapter 8.174), the manual even allows users to replace a given ampersand (&) to an and (rather than vice versa):

When a title is quoted, its original spelling [...], hyphenation, and punctuation should be preserved. [...] As a matter of editorial discretion, an ampersand (&) may be changed to and, or, more rarely, a numeral may be spelled out.

Thanks a lot for your detailed answer!


text:
Acknowledgements chapter of master's thesis
Hi due to the pandemic and my supervisor not using skype or zoom etc, I ended up writing my master's dissertation by myself. I had 2 meetings with him and we exchanged about 6-7 emails in total. I'd like to put him in the acknowledgements and thank him for his help and support. However, it really sounds fake because I just didn't reach out for much help and support. In any case, when I reached out, he was very helpful and I'm very grateful for this.
I'm just a bit worried how it sounds thanking for something that didn't happen, but I could be overthinking this. I've also thanked a couple of other lecturers because I really enjoyed their courses and they helped me learn a lot.
How do I acknowledge my supervisor in this situation?

May be related: https://academia.stackexchange.com/q/93865/68109

What is your question?

@avid How do I approach the situation and acknowledge my supervisor?

You say that "he was helpful and I'm very grateful for this." So thank him for his help; you don't need to say that there was a huge amount of help.

Don't overthink it. Acknowledgements in a thesis don't matter for anything.

"This project was completed under the supervision of Prof X, and I gratefully acknowledge his support."

It doesn't sound phony to thank him for support and for his help and encouragement. His help might have been technical, perhaps, or setting a direction, or even giving you a lot of latitude to work independently. Perhaps not all of those things, but likely some of them.
Some supervisors lean over you constantly. That might have been worse.
Don't overthink it. It is just a small politeness.


text:
Are Scantron Sheets under Copyright? Or are there non-proprietary alternatives?
Could my institution get into legal hot water if we were to make copies of blank Scantron sheets? If so, are there good free alternatives for machine readable bubble sheets?

You should ask your institution's lawyers.  If you go ahead and do it, and then Scantron sues you for billions of dollars, saying "But someone on the Internet said it would be okay!" is not going to save your job.

On another note, have you actually tried photocopying one as a test and trying it in your scanner? You'll probably need rather heavy paper (or the machine may jam). And for all I know there is some kind of magic ink on the official forms. It's hard to imagine that Scantron won't have taken technical steps to prevent people using third party or copied forms, since they make money selling them.

@NateEldredge In my limited experience, in these cases the only answer that comes from university lawyers is "no". The primary imperative is CYA.

Yes, there are some open source alternatives. Scantron's software and hardware is proprietary.

This doesn't really answer the question of whether the actual sheet of scantron paper may be copied. And as I understand it, the request for open alternatives was for the sheets themselves, not the software and hardware for reading them.

Well, this is my not-a-lawyer guess: I suspect that photocopying their paper would be illegal. But if you buy their paper from a store, you could probably use open source software to process it. Perhaps there are some terms and conditions somewhere that have a definite answer.

"And as I understand it, the request for open alternatives was for the sheets themselves" - Yes, that is correct. We already have the hardware - if there are open source / libre sheets that could go with the hardware that would be a good alternative.

@Rajano my link has free software to create the forms and scan them -- eg Udai OMR. Hardware and paper are the easy bits. Software is the tricky / expensive bit.

The scantron forms and similar forms are not subect to copyright. US Copyright Office Title 37: Patents, Trademarks, and Copyrights §202.1 Material not subject to copyright. (c) Blank forms, such as time cards, graph paper, account books, diaries, bank checks, scorecards, address books, report forms, order forms and the like, which are designed for recording information and do not in themselves convey information.
So to answer your question, no. As long as the school or university doesn't photocopy the actual scantron sheets from Scantron. inc. But it's not illegal for them to create their own version of the scantron sheets that can be readable by the official Scantron machine itself.
Plus, there are numerous companies, not even associated with Scantron. inc. in any sort, That sell scantron compatible sheets for cheaper prices than the 'official' scantron sheet. Amazon and eBay are full of them. So, yeah...

If, as a blank form, it is not subject to copyright, why would it still be an infringement to directly photocopy it, rather than making a compatible version from scratch?


text:
I need a reference letter but I've been out of school for 3 years
Ok I need some advise on my situation. I obtained my BSc in Mathematics and Physics in Spring 2011, but I've been working in a programming position since then, in actuarial business. I want to apply to Financial Mathematics, but I need two reference letters. I was not a very good student back then, I skipped a lot of classes, didn't take care much, yet I've done ok in terms of grades. Anyway, the point is, I rarely spoke to my profs, so I'm not certain how I could ever be endorsed. I'm doing very well at the job, but I believe reference letters from academia are much more valuable than those coming from the industry.
Also, I think it's worth mentioning that I applied in the past, but got refused. Still, my personal situation has much positively evolved since then. I'm just not sure how can convey it.
Thanks for any comments/advise !

In your case it sounds like the strong letters you want from your former instructors are just not going to happen.  None of your professors from 2011 or before can speak to your recent good work in a mathematically relevant branch of industry.  They can only try to remember what kind of student you were back then, and it doesn't sound great.
In your case I would go with letters from people in industry who have skills and qualifications that would be respected by those in Financial Mathematics.  If possible, all but at most one of your letters should come from someone with an advanced degree, and you should make sure that they know you well enough to convey the positive arc of your trajectory in recent years.
You should also take any relevant standardized tests especially seriously: you certainly want a great score on the MATH part of the GRE.  I'm not sure whether the GRE math subject exam is required or applicable for master's programs in financial mathematics: I guess it would be at some programs but not others.  I think that either way it would be good to take some practice versions of this exam, and if you can see that you'll do well (over the 50th percentile is now a good performance from an American student) then you should consider taking it even if it's not required.
You may also have to face the reality that you'll be admitted to a lesser quality program because of your "checkered academic past".  If you're really serious about graduate school, you can spend one or two years in a lesser program, really light up the place, and then transfer into a better program.
Good luck.


text:
Would it be okay to provide a template when asking reference?
I am applying for grad school this year and I am considering sending an email to ask a professor to write me a reference. He had previously agreed to write me a letter because I took one of his advanced courses.
I am not sure if it'd be okay for me to offer to provide a template to him for the letter. The reason I want to do this is I will be applying for a PhD in a different, though quite related, field, and I want to make sure that he knows what the advisory committee will be specifically looking for in his letter, and make sure that his letter corresponds well with my statement of purpose.
Is this an acceptable practice between professors and students? Or would they consider it offending since he is supposed to provide his independent opinion? And if it is okay, how can I offer it in an appropriate way?

Personally, I would be somewhat offended if a student gave me a template for a letter, and I wouldn't use it.  (Unless I had asked for one, which personally I would not.)
However, it is perfectly appropriate to say, "I believe that the committee will probably be interested in my ability to dangle participles and reticulate splines; it would help if your letter could address this."  It is also fine to include a list or resume of your other activities that he may not be aware of, but leave it up to him how to use this list.
It's quite possible that your professor has written letters for students in this different field before and already knows what is expected.  Also, for letters which are submitted online, the writer normally gets a message from the requesting institution explaining what issues should be addressed.

Thank you Nate! I guess I should also include my SoP so he knows well what I intend to convey to the adcom.

No and yes. I would talk to him and ask what he wants. If he wants a template, then you should provide one. If he wants a bulleted list, give him that. If he wants a draft letter, go with that. Giving him unsolicited information would be frowned upon.

Thank you! I will ask him and see if he needs these things :)

Was the template expressly provided by the advisory committee? In this case, you should of course forward it to your prospective references.
Otherwise, if it is just something you thought up, chances are that an experienced reference writer will do a better job by himself (he is probably more aware of what the committee is looking for in an applicant.)
This should not stop you from sending him all the relevant info: detailed CV, statement of purpose, transcripts etc.

I will prefer to give template. For higher research oriented studies the reference letter must contain the related information, and each institution has its own taste, so to create more chances of getting admission you need to give the template to the one who is referencing.


text:
Student and advisor applying to same job - conflict of interest with recommendation letter
I'm currently a Ph.D. student. I'm applying for a post-Ph.D. faculty job, and so is one of my two Ph.D. co-advisors. I think we have a good relationship, and I am thrilled they are applying, and truly hope they get the job. I think this is mutual.
They recently decided to apply. Prior to their decision, they agreed to review my application and be listed as a reference.
Now that we are both applying, they have agreed to review my application, but only after they have finished with theirs, to keep them independent. Furthermore, they suggested they should not be a letter writer, but then said they would remain as a reference if I want, since I don't have that many others to choose from (being somewhat earlier in my career, having collaborated with others a bit less).
I've asked the Search Committee head if they are OK with me listing them as a reference. If my advisor and I agree to do it, does the committee have a problem with it? Their reply will guide my answer.
But I seek advice here too. Is it OK to keep the advisor as the reference? I trust them to write a good letter, even in the unlikely event that we are both selected, or I alone am selected. Is this unwise?

This is a terrible situation. Huge conflict of interest. It was correct of the other party to express a disinclination to be your letter write. You should have agreed to that... but I am quite surprised that a PhD advisor would be so selfish as to apply to a job in competition with their own student. Something is not right here... either the advisor is over-qualified, or you are under-qualified, for this job. I would have thought that the fact you were applying would cause your advisor to not apply, even if they otherwise would have done so...

Yeah, this is definitely troubling.  I wouldn't go so far as to say an advisor should never apply to the same job as a student.  (If it's a high-level job the student wants to apply for but is highly unlikely to get, then it might be OK, and it could be understandable if the advisor has just been turned down for tenure and deperately needs a job.)  However, it should never happen under ordinary circumstances.  Unless one of you is an absolutely perfect fit, I'd bet the search committee will decide not to hire either of you, and that they will think your advisor was wrong to apply.

One thing to consider is how much you trust your advisor.  For example, the "I'll review your application only after I finish mine" condition feels weird to me.  Maybe I'm overly suspicious, but it could be an underhanded way of ensuring that the advisor applies first (since whoever applies second may look like they are the one causing trouble by applying to the same job as the first applicant).

@paulgarrett  I'm a bit under-qualified, but applying anyway. I'm an over-achieving Ph.D. student so I have a (slim) chance, even if I haven't done a post-doc yet. The advisor was junior tenure track at my university, left for personal reasons, remained co-advisor, and is now applying for this job. I don't think  is being selfish, since  was on tenure track, and this is the first tenure track position to open in their new city. It is copacetic to me and I don't think I'm being naive about it.

@AnonymousMathematician I think the timing comment shows they care. They want to make sure I have no influence on their application. We'll both submit just a few days before the due date, so while HR might see an order, I doubt anyone on the search committee will know who applied in what order just a few days apart.

@JobApplicant: It's still an awkward situation, but your comments make it sound less problematic than it could have been.

Especially now we know the position you are applying for is a tenure track position. The advisor would be a fool not to apply.

I hope this doesn't sound too blunt, but I think your chances of getting this position are rather limited. I would imagine your advisor is more qualified, than you, with a better research record. Even the fact that you don't have too many referees to choose from makes me think you are not competitive for this position. I think your advisor is being nice but in fact he/she thinks he is a better candidate. Just go ahead and apply but as someone said someone is either over/under qualified.

It is helpful that you and your advisor have been in contact and have honest communication about this subject. It's commendable, and doesn't happen nearly often enough.
That said,, for this particular job, if you want to have any realistic chance of getting this particular job, you really need to have someone else replace this particular co-advisor. Otherwise, a rather confused hiring panel may take a look at both applications, wonder what the heck is going on, and throw out both applications.
However, for any job in which you're not in direct conflict, I think it would probably be OK to have your co-advisor as a letter of reference.

I would personally try and find a different reference. There just too much potential for conflict. The situation is somewhat comparable to borrowing a lot of money from family. Your former advisor is working in the same field, so you will be meeting fo the years to come. If this turns out badly, it will remain a nuisance for a very long. Short answer: just prevent the potential conflict of interest and find a new reference.


text:
Can my supervisor prevent me from publishing by affecting reviewers opinion?
Lately, and after long time of work in my PhD, I was able to get a result that is brand new, very strong and important. My supervisor though seems jealous and wants me not to publish before finishing my PhD. But I sense he wants to scoop me once I leave. The time is short and I haven't enough time to work in lab that will guarantee a paper. I insist on publishing though, can he contact any of the journal editors and affect their opinion?
I can't take the risk, so what should I do to avoid this?

Is there some reason why you wouldn't expect to publish together with your supervisor as a co-author?  Or at least put the material into your thesis, where it's date-stamped and clearly associated with your name?

What's your field? Usually an advisor is added as a co-author to papers resulted directly from a PhD. If this is the case, why would he jeopardize his chances to getting some publications?

Obligatory "it isn't automatic that advisors are coauthors on mathematics graduate students' papers" comment. So, it really would be helpful to specify what field you're in.

The reason is because it is a new result that he seems a bit jealous of me getting it. I am working in biofuel and deforestation, so mainly biology.
He won't say not to publish but I know he might do everything to stop it or at least to slower it till he does some work based on mine and publish.
He ofcourse want to publish , but I guess he wants to be first name that publish this work. Simply, to be a first author and not second.

Either your advisor is planning on scooping your result, or your distrust your advisor so much that you think they're planning to scoop your result even then they aren't.  How did you and your advisor develop such a horribly dysfunctional relationship?

:) There is no place here really for opening that subject. But you are truly right, it is horrible and it got worst once I got this result :) let's say, he has issues! which I got to know later, I used to explain in a way that excluded the bad truth about him. So am trying to be positive as only few months left for me to finish my PhD, but also I will try to get the most of them. Jakebeal's suggestion is great, perhaps to do all the work i can to include in my thesis, and this will give me some time to finish writing up, viva. Then make a nice paper out of this work no matter what he plans to.

In a biology / bio-engineering discipline, the authorship standards almost certainly dictate that you must have your supervisor as a co-author.
As such, worrying about contacting journal editors is beside the point: you can't ethically publish without your supervisor's permission---not because they're your supervisor, but because they're your co-author.
The biology focus also may help explain your supervisor's reluctance to publish, as it's (unfortunately) common for biologists to spend years building up a "perfect publication" with no incremental publications in order to try to get into a "glamour" journal like Nature or Science.
Given this context, I would recommend simply including the work you've done in your Ph.D. thesis (which does not preclude glamour publication).  That will make it very clear that you have done the work, such that your name must remain attached to it.  Beyond that point, I would recommend not worrying about the author order either: in biology, it is typical to put the student first and the supervisor last; since "last author" is also a significant and prominent position, I would expect that your supervisor is unlikely to have a problem with you being first.
Finally, I would recommend that you have a clear discussion with your supervisor about the criteria for publication.  Not "when will we publish?" because the answer to that will probably be "when it's ready," but "what else needs to be done before we publish?"  Get that agreement clearly worked out between you, then confirm it afterward via email to create a timestamped written record, and then you can also feel it is less likely that publication can be delayed by shifting goalposts.

can he contact any of the journal editors and affect their opinion?

To answer your direct question first: this is very unlikely. If he doesn't know the journal that you are planning on submitting to (and if you choose to go ahead as a single author there is no reason he would) then there are just too many possible editors out there. He would have much to lose in terms of reputation if he were to contact dozens of editors and warn them against accepting a paper that he doesn't even know has been submitted to them. Even if he does know which editor is handling your paper, unless that editor is a mate of his and has questionable ethics, they are likely to judge the paper on its merits rather than be swayed by a third party butting in.

But I sense he wants to scoop me once I leave.

If he were to do this, surely it would be very easy to prove that this was your work? Even before it is included in your thesis, don't you have lab notes etc. that show you have been working on this topic? If he tried to publish it without your name on the paper, you would have a strong case to demonstrate his misconduct.
Finally, is it possible that you have exaggerated the issues in your head? Much of your question is based on "My supervisor seems...", "I sense...", "I guess...". Have you actually talked to your supervisor about these things? I think that by far the best outcome, for both of you, would be to publish a joint paper. Do you know for sure that he will not accept that option? Or perhaps there is a good reason that he thinks you should delay publication. I would suggest addressing these questions first before jumping to conclusions.

The thing is not him publishing my work, it's him publishing work based on mine before I do myself. I know he can't just go publish my own work but he will simply probably add me as a second author or so.
Since I am trapped with final months in my PhD I barely have time to work in lab for completing some work that should be enough to publish.
If I will put his name on the paper as a co-author, I will have to tell him which journal is it going to be. Unless there is another way out of it that I don't know.

Yup, unfortunately, it is based on sense. But I know his character and i know that he is the kind of person that could do this, he is not the best supervisor and I am stuck with him anyways. Besides, he will ofcourse never say directly he will publish.
These conclusions are  based on personal experiences with him and not emotional or overthinking by me.
So for now I try to finish peacefully, but I guess it can't be peaceful when you get a result!

A submitted paper must have the permission of all listed authors. It is not possible for your supervisor to add you as an author without your direct permission. And it is not possible for him to publish your work without adding you as an author. If he does either of these things, you have every right to complain to the journal and have the paper withdrawn.

Seems tempting to let him do that and make it a problem :)
But really, it's about who will be the first author, and he is planning to.
So I am searching a way ot keep my right as a first author until i finish writing up my thesis.


text:
What is the proper way to ask for an unpublished paper?
I want to get access to a paper which hasn't been published by the scholar and I decide to write an email to him. What is a proper way to ask ?
My intention is to help myself formulate the scope of my next paper in the same  field.

You can always ask, but be prepared for a "no".

Certainly depends on your relationship to the scholar and how you learned about the particular unpublished paper. You may consider adding details to your question to get the most useful answer.

How did you know about an unpublished paper?

Just ask politely, and with the expectation that you may be reasonably refused.
Researchers vary greatly in their relationship to unpublished manuscripts. The spectrum ranges broadly, from some who are very happy to share anything they consider "not embarrassing," to others are extremely protective. Then there are many who will be just plain unresponsive for any number of reasons.
I would thus suggest that in your email, you say something along the lines of the following:

Where you heard about the unpublished work, and why you think it will be useful to know specifically about this unpublished work and not other recently published material.
That you would be very grateful if they are willing to share, but understand that they may not wish do to so.
That you would also be happy to receive pointers to published work that can provide approximately the same benefits.

Importantly, remember that no researcher has a moral obligation to share work that is not ready for publication.  The scientific community generally holds that work should be shared in a timely fashion only once it is reasonably ready for publication.  You can argue about how to draw that line, but if a researcher really thinks their work isn't yet solid enough to disseminate or submit, then they're usually right.  In that case, you probably wouldn't really want to build off of it yet anyway, since it is likely to change in the near future.

If your hope is to help yourself formulate your scope of your next paper in the field,  you might not need to read their unpublished manuscript for this. I will assume that you've already read the other recent papers in the field, and the relevant review papers in the field, and this information you need really doesn't exist in published work.
That said, I'd reflect on if you really need to see their paper, of if a conversation with them could help you instead. Some scientists will find suddenly asking to read a manuscript off-putting and think you might be trying to scoop them of their follow-up paper, especially if you don't already have a relationship with them. Sending them an email (or even making a phone-call) asking if they might be interested in discussing their work with you over the phone or on Skype, might give you the opportunity to ask questions about the scope of the field, and help you build a professional relationship with that person.
Additionally, you can always suggest that as your first-choice, and follow up with "I understand that your time is very valuable..." and politely suggest that perhaps you could read their manuscript instead if they would prefer.