## In Defense Of The PhD

Recently there’s been a lively discussion on why do people pursue PhD studies, is it good (for them and for the society), is it optimal (for the society and for the universities), and so on. The whole topic is by no means new, but since The Economist’s recent publication, other people expressed their opinions.

I’m 25, I’m a full-time PhD student, and I’d like to put in my oar now.

First off, while The Economist’s article has a number of valid points, it’s very US- and UK-centric. Even though the author refers to some case-studies outside the Anglo-Saxon world, like Germany, Slovakia or Belgium, some of its arguments do not apply at all to most European countries. For example:

One thing many PhD students have in common is dissatisfaction. Some describe their work as “slave labour”. Seven-day weeks, ten-hour days, low pay and uncertain prospects are widespread. You know you are a graduate student, goes one quip, when your office is better decorated than your home and you have a favourite flavour of instant noodle. “It isn’t graduate school itself that is discouraging,” says one student, who confesses to rather enjoying the hunt for free pizza. “What’s discouraging is realising the end point has been yanked out of reach.”

We all read the PhD Comics and we all hear about how many hours of coursework or admin-duties a typical US grad student has. I don’t know how does it look like in other countries, but in Norway, Denmark, Holland and Belgium this is definitely not the case. At some Dutch universities, even if PhD students want to teach, they can’t do that (e.g. because there’s too many of them, or because they are considered underqualified, or whatever). My contract clearly states that I have to spend 25% of my time on teaching, and that’s exactly what I do. One quarter of my overall work time is not much, yet I still gain valuable teaching experience, so it’s a win-win. I know many of my friends who are PhD-students work as TAs for courses taught by their promoters, and that’s usually also not too much work. Apart from all that, a little bit of teaching looks good in your CV, especially if you want to apply for post-doc or other academic positions after finishing a PhD.

There is an oversupply of PhDs. Although a doctorate is designed as training for a job in academia, the number of PhD positions is unrelated to the number of job openings.

There probably is an oversupply of PhDs in the US and in the UK, fair point, but there isn’t one in Norway, and as far as I know not in any of the Nordic countries. Maybe it’s a peculiar situation here, but then again I hear that there’s too many PhD students in The Netherlands, yet all of my friends who recently graduated managed to get post-doc positions in the same country (yes, in some cases it took a while, but still). So let’s talk about the subject that generates most controversy: money.

But universities have discovered that PhD students are cheap, highly motivated and disposable labour. With more PhD students they can do more research, and in some countries more teaching, with less money. A graduate assistant at Yale might earn $20,000 a year for nine months of teaching. The average pay of full professors in America was$109,000 in 2009—higher than the average for judges and magistrates.

Again: US is not the whole world. I’m not going to quote numbers here, but a PhD student in Norway gets a very decent salary, even compared to industry salaries in technology sector. I’m not saying I earn more than a senior programmer at Google, but the money is more than good enough to rent a nice flat (not shared with anyone), eat out from time to time, travel virtually wherever I want and still being able to save some of my monthly pay. The article fails to understand a basic thing behind PhD students’ motivations, though: we’re not after the money. If we were, we wouldn’t be studying philosophy, logic, theoretical computer science or quantum physics. We’d go for an MBA, law or something similar, only to end up working our asses off for McKinsey, Boston Consulting, E&Y or PWC. That is simply not our goal, and while many PhD candidates like to whine about how little cash they have, they either lie, or they simply shouldn’t be doing a PhD at all.

One OECD study shows that five years after receiving their degrees, more than 60% of PhDs in Slovakia and more than 45% in Belgium, the Czech Republic, Germany and Spain were still on temporary contracts. Many were postdocs. About one-third of Austria’s PhD graduates take jobs unrelated to their degrees. In Germany 13% of all PhD graduates end up in lowly occupations. In the Netherlands the proportion is 21%.

Right, but the OECD study doesn’t show how many people without a PhD are on temporary contracts in Slovakia five years after receiving their degrees, be it bachelor or master’s.

A major thing the article fails to understand is that most PhD students pursue an academic career for two reasons: because it’s their passion, and because they don’t seem to be able/willing to do anything else. Take a philosophy graduate for example, with a master’s thesis on German, late 18th century idealism. This person has two choices: either he goes for a lowly occupation, as the OECD study puts it, or enroll in a PhD program. Statistics suggests that our poor philosopher might still end up working for the man, somewhere in a call center selling insurance to people who don’t want to buy it, but going for a PhD is still better, because he can have 3-4 years of joyful academic life and then try his luck getting a tenure track job after a couple of years. Even if he fails, at least he tried.

PhD students/graduates are usually lousy at finding jobs outside the universities not because they have a PhD degree, but because they’re different. Normal people don’t study philosophy, and if they’re into computer science, they don’t care whether P≠NP — they just learn Java, Objective-C, Python or whatever else they find useful for becoming a successful software engineer.

And then finally, there’s one last thing everyone seems not to understand: once you finish your PhD, get done with the damn post-doc contract, and become a tenure-track researcher, you’re in the best job there is. You’re doing what you love, you have most of the time a flexible schedule, you supervise master’s and/or PhD students, you go to conferences all over the world. You write papers others comment on, and at some point you might even write a book (or co-author one). How amazingly cool is that? Oh you’re saying I’m a dreamer, and that simply never happens? Well what about those thousands of internet start-up companies? They waste their time as well, trying to become another Facebook or another Google. Yet they still do it, because it’s their dream to pursue.

And so is academic career ours.

Discussion on HackerNews.

## Continuous list enumeration throughout the document with LaTeX

Karolina asked me today to create a macro for having a continuous list enumeration throughout the whole document, i.e.

This is the first list:

1. Item;
2. Another item;

And here goes the second list:

3. Third item;
4. And yet another item.

You can obtain an effect like that by using LaTeX counters and a custom definition of your own enumerate environment. First, we need to \usepackage{enumerate}, and then define the following counter and an environment in the preamble:

\newcounter{enumi_saved}
\newenvironment{myenumerate}
{ \begin{enumerate}\setcounter{enumi}{\value{enumi_saved}}}
{\setcounter{enumi_saved}{\value{enumi}}\end{enumerate}}

After that, you can use myenumerate and you’ll have a continuous enumeration in the whole document.

Oh and some credits: I wouldn’t come up with a solution if I haven’t read this post, and this website. Huge thanks to the authors for their tips!

update: There’s a much simpler solution, thanks Jakub.

Here’s a pro-tip on enabling auto-fill-mode for all org-mode files that I couldn’t find anywhere online. Add this to your $HOME/.emacs file: (add-hook 'org-mode-hook 'turn-on-auto-fill) And auto-fill will be enabled anytime you’re editing an org-file. ## Emacs as the Ultimate LaTeX Editor Everyone knows, that GNU Emacs is THE Best Programmer’s Editor. Not everyone knows, though, that when you combine it with AUCTeX macros, it also becomes THE Best Editor for LaTeX. The biggest problem with Emacs is that it’s not a particularly intuitive piece of software, to say the least, hence many users flee after their first encounter with it. Emacs has its complicated keyboard shortcuts, enormous documentation and config files written in a Lisp dialect (called Emacs lisp), so at first it might seem very unpleasant using it. However, once tamed, it becomes your best friend. I’d like to present some tips that customize Emacs making it a perfect and very sophisticated editor for LaTeX. Most of these ideas are taken from various config files, howtos and other resources found on the web. Some of them are mine, but I can no longer tell which. First things first: you need to get Emacs and AUCTeX, and get it running. Every major linux distro comes with both Emacs and AUCTeX available via package systems. In Ubuntu, you just type sudo apt-get install emacs23 auctex and you’re laughing. Emacs is also available for Windows, and AUCTeX website has instructions on how to set it up with Windows systems. Mac users have a choice of setting up either Carbon Emacs (a version closer to original GNU Emacs) or Aquamacs (an Emacs variant supporting tabs and other nice tweaks; preferred Emacs package by all Mac users I know, Karolina included). Full comparison of Mac Emacs variants is available here, so you can make your own choice. Both Carbon Emacs and Aquamacs come with AUCTeX bundled, so there’s no need to download additional packages. After running Emacs and loading a TeX file (C-x C-f file_name.tex), AUCTeX should load itself automatically. If it doesn’t happen, you can invoke it with M-x tex-mode, or you can put the following into your $HOME/.emacs file:

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-save-query nil)
;(setq TeX-PDF-mode t)


(all the code snippets from this post are available as a Github Gist)

The options above will make sure, that AUCTeX macros are loaded every time a TeX file is opened. The last option, ;(setq TeX-PDF-mode t), is commented (all lines beginning with ; are a comment in Emacs Lisp), but you can uncomment it if you want to have PDFLaTeX mode enabled by default for all documents.

AUCTeX has a number of nice features, the two I use most often are:

• automatic formatting of a section: C-c C-q C-s;
• section preview: C-c C-p C-s; (see the screenshot on the right)

Preview function is very nice, because you can see the commands that are behind preview images, edit the code, apply preview again and see the results — no need to parse the whole file too often, and most importantly no need to switch to a PDF/PS viewer to see if your math formula/xypic tree is formatted correctly. Trust me, this saves a lot of time.

(update 27.12.2012: there’s another way of previewing LaTeX symbols inside an Emacs buffer, take a look here)

AUCTeX has many many more features, and you can always consult its documentation if you want to learn more. It’s a little bit overwhelming, but learning it is a very good investment, especially if you work with TeX a lot. But there are more packages that provide features which make your life easier.

Flymake is one of those packages. It enables Emacs to check the syntax of your TeX file on-the-fly. To turn it on, put the following code in your $HOME/.emacs: (require 'flymake) (defun flymake-get-tex-args (file-name) (list "pdflatex" (list "-file-line-error" "-draftmode" "-interaction=nonstopmode" file-name))) (add-hook 'LaTeX-mode-hook 'flymake-mode)  Beware, though — flymake consumes quite a lot of CPU power, especially when used with large files (and paradoxically large files make it most useful). On the other hand, spell-checking while you type isn’t so cpu consuming, and you can turn it on with: (setq ispell-program-name "aspell") ; could be ispell as well, depending on your preferences (setq ispell-dictionary "english") ; this can obviously be set to any language your spell-checking program supports (add-hook 'LaTeX-mode-hook 'flyspell-mode) (add-hook 'LaTeX-mode-hook 'flyspell-buffer)  Another nice package is the Outline Mode. It allows the user to hide some parts of the text file, which makes working with large files much easier. To enable it, put the following in $HOME/.emacs:

(defun turn-on-outline-minor-mode ()
(outline-minor-mode 1))

(setq outline-minor-mode-prefix "\C-c \C-o") ; Or something else


Now you can fold sections, subsections, chapters, or the whole document. To hide all the contents of your current section, use C-c C-o C-l. You can apply it to a chapter, subsection, etc. You can also move to a next unit of your document with C-c C-o C-n, or to a previous one with C-c C-o C-p. If you’re lost and want to see the whole document again, use C-c C-o C-a.

Folding and unfolding parts of the text might be confusing, though, but there’s another way to navigate through a big TeX file, and you can use Reftex mode for it. Reftex is a mode that helps with managing references (full documentation), but it can also be used to create a table of contents for a TeX file and to navigate using it. Here is my configuration for Reftex from my .emacs file:

(require 'tex-site)
(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase Mode" t)
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode

(setq LaTeX-eqnarray-label "eq"
LaTeX-equation-label "eq"
LaTeX-figure-label "fig"
LaTeX-table-label "tab"
LaTeX-myChapter-label "chap"
TeX-auto-save t
TeX-newline-function 'reindent-then-newline-and-indent
TeX-parse-self t
TeX-style-path
'("style/" "auto/"
"/usr/share/emacs21/site-lisp/auctex/style/"
"/var/lib/auctex/emacs21/"
"/usr/local/share/emacs/site-lisp/auctex/style/")
LaTeX-section-hook

C-c =