Pro-LaTeX-tip for today

Pro-LaTeX-tip for today: you can change the size of some big math symbols by putting textstyle or displaystyle in front of them. Example: if you’re using align environment to write a long, case-by-case definition, and you put a sum or prod somewhere in it, LaTeX will render big sigmas and pis, which doesn’t look good.

tumblr_m7z9d7SvQN1qzba13

You can force smaller symbols with textstyle then.

tumblr_m7z9dgGMPp1qzba13

New Violin

I’ve been playing violin since I was 7. I went to music school in my hometown, Skierniewice, and spent six years there, finishing what is called a 1st stage music school in Poland. I did not continue to a 2nd stage school and never became a professionally trained musician, but I’ve spent many years playing in different orchestras, first in Skierniewice, later in Warsaw. I enjoyed improvising jazz with my friends in high school, but that ended when I moved out from Skierniewice. Ever since then my only contact with the instrument was through weekly orchestral rehearsals, some practice in between those, and occasional concerts. And when I moved out from Poland in 2008, I left my violin there and did not play since then.

Having an electric instrument was always a dream. I enjoyed listening to Jean-Luc Ponty’s old albums, I was a big fan of Mat Maneri’s avant-garde free jazz, and of course I loved (and still love) the very best jazz violinist of all time, Stéphane Grappelli. At some point a very good friend of mine (whom I spent many years in a couple of orchestras with) bought herself a Fender electric violin, I even had a chance to play them, but did not think of buying an electric instrument for myself back then.

Why have I stopped playing violin after so many years of practice? I guess the main reason was I did not have much time, and I no longer had an orchestra or any other kind of band I could play with. Also, at some point playing violin became a very frustrating experience. Not necessarily because my technical abilities worsened, I feel I’m more or less at the same level of playing technique as I was a couple of years ago, but because my expectations significantly outgrew what I was able to play. I kept listening to a lot of records, and each time I tried playing a piece, I was so disappointed by how bad my performance is that I simply hid the instrument back in the case and played some CDs instead. ‘I am not a professional musician’, I would tell myself, ‘it’s not my job, I shouldn’t be wasting my time on this.’

Then during one of my visits to Groningen, I met Karolina’s friend Tim. Karolina is a cello player, and Tim sometimes plays oboe. Every second weekend or so, they meet at one’s apartment and play music. (Karolina, Tim, if you’re reading this, please skip this paragraph.) Neither is a professional musician, and, seriously speaking, neither plays good. They’re often out of tune, they miss some bars every now and then, and they make a number of other mistakes. Still, their performances are what I’d call decent, or what my friend Erik would probably call adequate. While listening to them I realized it doesn’t really matter if they don’t play like pros, because playing music together and having live music at home is simply an enormous joy. I also realized I miss that. I wanted to go back in the game, wanted to go back to playing music.

There was a problem with an instrument though. Of course I had my old violin back at my parents’ house in Poland, but the instrument was in bad shape (years of neglect) and it actually never was particularly good. One could say that you don’t really need a great instrument if you’re a crappy musician, and that’s one way of looking at it, but then again a bad instrument doesn’t really help if you’re having difficulties playing harmonics or double stops. And then I also recalled that I always dreamed of having an electric violin. I checked the balance of my savings account, looked at how cheap the euro is, went on to http://thomann.de, ordered a Yamaha SV-200 silent electric violin, a carbon bow, a good rosin, a decent (or adequate) shoulder rest, and a lightweight case, pressed ‘buy’ and waited.

Before I tell you how the whole setup feels and sounds, let my give a few words of justification: why this violin and not other?

  1. First off, a silent violin allows me to practice technically whenever I want. While unplugged from an amplifier the instrument produces a hardly audible sound, unnoticeable to anyone in another room, allowing me to play late at night using headphones.
  2. Secondly, this instrument has a line-out socket, which makes recording multiple parts of a string quartet possible without the need of an expensive microphone (cheap mics + violin = the sound of slaughtering a cat). I always wanted to play Shostakovich’s 1st string quartet, but never had a quartet to play it with. This is no longer a problem.
  3. The SV-200 can sound any way I want. If I’m practicing Wieniawski’s caprices, I can make it sound like an ordinary acoustic violin. If I want to imitate Ponty, it produces a full-blown 70s fusion sound.
  4. And finally, some practical considerations. It seems it’s much more difficult to damage this instrument than an acoustic violin. It’s less fragile and less sensitive to temperature or humidity.

So now, how does it feel? A bit weird. The fingerboard seems to be a tad shorter than on my acoustic violin. The strings (D’Addario Zyex) seem to be easier to press (the difference is not as big as between an acoustic guitar and an electric one, but still), and of course the sound highly depends on the amplifier. The instrument doesn’t feel at all heavier than an acoustic violin, although according to technical specs it is ~100 grams heavier. I haven’t used a Kun shoulder rest before, but it seems to be better than my old Wolf Forte Secondo. The strings I’ll probably need to replace, I don’t like the sound. In fact I plan on buying a set of Dominants and some Pirastro, and compare which one sounds better. Also, I’ve tested recording a couple of minutes into Garage Band, and it sounded pretty good.

But most important of all, I played some parts of The Four Seasons together with Karolina today. We played together for the first time in many years. It was by all measures musically terrible. But it was an awful lot of fun, too.

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.