Skip to content

Theory Life-Hacks

April 28, 2016

LifeHacker is a website dedicated to tricks, especially technology related, to make people more efficient or productive. The signal to noise ratio in that website is not particularly high, but I think it is a good idea to share tricks that can save time and effort. In particular, are there tools or tricks that made a difference in your life as a theorist?

Here are some of the tools I use. This is obviously a very biased list and reflects my limitations as a Windows user that is too stupid to learn to use emacs  and vim. Please share your better tips in the comments:

LaTeX editor / collaboration platform: I recently discovered Overleaf  which can be described as “Google Docs” for LaTeX. It’s a web-based LaTeX editor that supports several people editing the same document simultaneously, so it’s great for multi-author projects, especially for those last days before the deadline where everyone is editing at once. There are few things as satisfying as watching improvements and additions being added to your paper as you’re reading it. One of the features I like most about it is its git integration. This means that you can also work offline on your favorite editor and pull and push changes from/to the overleaf repository. It also means that authors that don’t want to use overleaf (but can use git) can still easily collaborate with those that do. I actually like the editor enough that I’ve even used it for standalone papers.

Version control: I’ve mentioned git above, and this is the version control I currently use. I found source tree to be an easy GUI to work with git, and (before I switched to overleaf) bitbucket to be a good place to host a git repository. Git can sound intimidating but it takes 5 minutes to learn if someone who knows it explains it to you. The most important thing is to realize that commit and push are two separate commands. The former updates the repository that is on your local machine and the latter synchronizes those changes with the remote repository. The typical workflow is that you first pull updates, then make your edits, then commit and push them. As long as you do this frequently enough you should not have serious conflicts. I am also committing the cardinal sin of putting my git repositories inside my dropbox folder. There are a number of reason why it’s a bad idea, but I find it too convenient to stop. To make this not blow up, I never use the same folder from two different computers and hence have subfolders “Laptop” and “Desktop” for the repositories used by these computers respectively. Update 4/29: Clement Canonne mentions in a comment the Gitobox project that synchronizes a dropbox folder and a git repository and so allows easier collaboration with your non-git-literate colleagues.

Markdown: I recently discovered markdown and particularly its pandoc flavored variety as a quick and easy way to write any technical document – lecture notes, homework assignments, blog posts, technical emails – that is not an actual paper. It’s just much more lightweight than LaTeX and so you type things faster, but it can still handle LaTeX math and (using pdflatex) compile to both html and pdf. All the lecture notes for my crypto course were written in markdown and compiled to both html and pdf using pandoc.

Editor: I was a long time user of winedt but partially because of markdown and other formats, I decided to switch to a more general purpose editor that is not as latex centric. I am currently mostly using the Atom editor that I feel is the “editor of the future” in two senses. First, it is open source, backed by a successful company (github) and has a vibrant community working on extending it. Second, it’s the editor of the future in the sense that it doesn’t work so well in the present, and it sometimes hangs or crashes. If you prefer the “editor of the present” then sublime text might be for you. Some Atom packages I use include Build, Emmet, latextools, language-latex, language-pfmMarkdown Preview Plus,  Mathjax-wrapper, pdf-view, preview-inline, sync-settings (I find it also crucial to enable autosave ).

Remote collaboration: I use several tools to collaborate with people remotely. I’ve used slack as a way to maintain a long-running discussion relating to a project. It works much better than endless email threads. In a technical discussion we’ll sometimes open a google hangouts video chat and in addition use  appear to share a screen of a OneNote pad (assuming one or both of the discussants has a pen-enabled computer such as the Microsoft Surface Pro or Surface Book that seem to become the theorists’ new favorite these days). A good quality camera aimed at the whiteboard also works quite well in my experience.

Presentation: As I’ve written before, Powerpoint has awesome support for math in presentations. One thing which I would love to have – a visual basic script that goes over all my slides and changes all the math in them to a certain color. It’s a pain to do this manually.

Bibliography maintenance:  Here is where I could use some advice. It seems that in every paper I end up spending the last few hours before the deadline scouring DBLP and Google Scholar for bib items and copying/pasting/formatting them. I wish there was an automatic script that would scan my tex sources for things like \ref{Goldwasser-Micali-Rackoff??} and return a bibtex file containing all of the best matches from DBLP/Google Scholar. Bonus points if it can recognize both the conference and journal version and format a bibtex which cites the journal version but adds a note “Preliminary version in STOC ’85”. Update 4/29: A commenter mentions the CryptoBib project that maintains a super-high-quality bibtex file of all crypto conferences and some theory conferences such as ICALP, SODA, STOC, FOCS. Would be great if this was expanded to all theory conferences.

Note taking: I am still a fan of a yellow pad with pen, but I find myself using OneNote quite often these days on my surface book (which is also the “computer of the future” in a sense quite similar to Atom..). It’s useful to take notes in talks, and also to write notes for myself before teaching a class so that they would be available for me the next time I teach it.

p.s. Thanks to David Steurer who I learned many of these tools from, though he shares no responsibility for my failure to learn how to use emacs.

 

29 Comments leave one →
  1. Sasha permalink
    April 28, 2016 4:09 pm

    Thanks for this list!

    I found http://classeur.io/ (especially, its version for mac) very convenient to write/synchronize markdown. Unfortunately, it doesn’t seem to have a Windows version (one can use it online, though).

    Regarding presentations, there are non-beamer templates available online (see, e.g., https://www.overleaf.com/latex/templates/metropolis-beamer-theme-v1-dot-0/qzyvdhrntfmr#.VyIzrZMrLjE). They normally require xelatex, which allows to use non-standard fonts.

  2. Thomas permalink
    April 28, 2016 5:41 pm

    I’m also a fan of overleaf. The downside is that it is a bit laggy.

    Re. bibliographies:
    Google Scholar has a browser plugin which helps generate bib items for you. (i.e. it saves you going to DBLP or opening up a Google Scholar tab) I haven’t used it, but I’ve heard good things.

    I just maintain an ever-growing bib file that gets copied from one project to the next and contains every citation I know about. However this requires systematic naming of bib entries, which I don’t do…

    • April 28, 2016 6:28 pm

      Thanks. It is a little laggy but I find it not too bad. Am not sure if the fact that I’m paying for a pro subscription makes it faster or not.

      I will look into that plugin though ideally I’d like something that just scans my latex for me and extracts the right bibitems in one batch, no matter how little I remembered about the paper.

  3. April 29, 2016 7:38 am

    I would be very interested in seeing one markdown source of your course notes. I have known Markdown and pandoc for a while, but I still have not tried it. I wonder how much simpler the source is compared to an equivalent LaTeX source.

    • April 29, 2016 10:35 am

      The source for all the homework exercises is online to make it easier for the students to submit their homework

      Basically it’s plain text + minimal formatting for bold/italics and lists + everything inside $ signs is latex math. If you use pandoc then you can also use newcommand to define macros

  4. April 29, 2016 7:58 am

    You might be interested in JabRef [http://www.jabref.org/] for bibliography. It’s an open-source bilbiography manager, using bibtex as its native file format. It doesn’t scan your latex, but it does have an automated search function that knows about dblp (among others), and a button to automatically insert citations into your latex editor (works for winedt/kile — not sure about atom)…

  5. Ais permalink
    April 29, 2016 8:46 am

    Nice idea to make this list! I’m also a new fan of Overleaf.

    I haven’t tried Atom yet, but while it installs, let me take a moment to praise the “editor of the present”.
    Sublime may offer the solution to your bib maintenence problem. In Sublime (with LaTeXTools – needed for building), once you type \cite and open curly bracket, it opens a search bar, type what you remember (author name, paper title) and gives suggestions from whatever compiled bib file you’re using. Just hit enter on the suggestion you want and then it’s in. closing curly bracket and all 🙂

    If your compiled bib file is something like ENS’s cryptobib (https://cryptobib.di.ens.fr/manual), pretty much all of the crypto papers are there and with Sublime, it makes bib maintenance super stress free.

    • April 30, 2016 3:12 am

      Sublime is actually quite nice – it runs super fast, never crashed for me, and is my editor of choice for handling very large files. I think Atom is based on sublime but is a little bit more modern, and has the backing of a larger company (but on the other hand is slower and more buggy, but hopefully that will become better with time).

      Thanks for the tip on cryptobib – this is a great project and if there was something like that for all of TCS it would more or less solve the problem. It also has nice git integration.

  6. Thomas Kesselheim permalink
    April 29, 2016 10:35 am

    I wrote a Python script just the other day to fetch DBLP bibtex entries using the cite keys. (There are some similar scripts out there but they can do way more than what I need – and don’t work.) I wrote it for my private use with my very limited coding skills. Its available from http://www.thomas-kesselheim.de/fetchdblpbibtex/. Simply run fetchdblpbibtex.py document.aux and you will get a file called dblp.bib.

    • May 1, 2016 6:48 pm

      Thanks Thomas. I think the main issue for me is that I only remember something about the paper, so would like to write very fuzzy cite keys that contain only the information I remember, and have the appropriate entry extracted from either DBLP or google scholar.

  7. April 29, 2016 1:51 pm

    For a project involving people that are reluctant to use source control (say, Git) but are fine with or like Dropbox, there is this option: https://github.com/remram44/gitobox (“Gitobox”). Basically, it will track Dropbox changes and forward them to Git, so that it’s possible to use both in the same project.

    • April 30, 2016 3:15 am

      Thanks Clement! I guess now we just need a project like that that would automatically write and read emails from our colleagues who don’t even use dropbox 🙂

  8. April 29, 2016 2:48 pm

    I use Lyx since my M.Sc. and so far I am very happy with it.

    The only downside is that when collaborating with other people, I need to constantly export lyx files to tex files and then import tex files back to lyx files. It doesn’t take a lot of effort on my side, but my collaborators complain that the exported tex files are not fun to work with.

    • April 30, 2016 3:16 am

      While I am generally a big supporter of the freedom of speech and discussion of controversial topics, I think I have to draw the line at the promotion of Lyx 🙂

  9. April 29, 2016 6:09 pm

    Interesting list! Many of the things I wanted to mention are already in the comments, except for Spideroak. I find it superior to dropbox because I can just tell it to sync certain folders and it will do that automatically, without requiring me to move files to the dropbox or work directly in the dropbox.

    • April 30, 2016 3:15 am

      Thanks!

      • May 1, 2016 12:38 pm

        I have always been a bit nervous about automatic syncing in general. What if the Dropbox/Spideroak/other computer has a fit and deletes files at its end, then when it next syncs deletes them at your end too? I feel safer keeping the working files unsynced, then running the following script (Linux) to copy all changed files to folders that are synced every now and then by typing its name (I just call it backup) as a terminal command.

        #!/bin/bash
        rsync -av –delete ~/sourcefolder1/ ~/thesyncingfolder/destinationfolder1
        rsync -av –delete ~/sourcefolder2/ ~/thesyncingfolder/destinationfolder2
        [Add as many lines as you like]

        Of course this does make life a bit more complicated if you work on the same files on more than one computer.

      • May 1, 2016 3:26 pm

        Dropbox keeps old versions of files (not sure but i think 30 days in the free version and unlimited or one year in the paid one) so if it ever happened that it deleted a file by mistake then itcan be recovered.

        FWIW this never happened to me though what did happen is that a new version of a file I had open in two computers was overwritten by an old one due to an auto save feature of the editor. But it was easy enough to restore using Dropbox.

  10. B.N. permalink
    May 1, 2016 1:36 am

    BaKoMa TeX is the only editor I know that instantly renders as you type. It is expensive, but was totally worth it for me.

  11. adam permalink
    May 7, 2016 11:21 am

    ipad pro + sanebox !

    • May 7, 2016 8:10 pm

      Thanks! I should have noted that I also use google inbox, and in particular its feature of classifying many messages as “low priority” and “snoozing” messages, very heavily.

  12. May 7, 2016 6:54 pm

    Emacs with the built in AucTeX and RefTex packages is the nicest cross-platform environment for editing latex I have used so far (I think it is also unique in having the capability to include previews of latexed mathematics directly in the text bufer, but I personally do not use that feature a lot). It of course has git integration, and with tweaking could possibly even “read email” :).

    There is also Org-mode, another emacs builtin that is basically a more powerful version of markdown which can be used for everything from short technical notes (which can be published with two keystrokes to both pdf and html) to maintaining a calendar or a hyperlinked reading-list.

  13. J Lee permalink
    May 11, 2016 6:47 am

    Here is a small hack that I fell in love with: For ease on the eyes, change the default background color on your PDF reader. This can be done at least in Sumatra and Acrobat. I am currently using “blond” (rgb hex: #fbf6d9). So warm.

  14. May 19, 2016 8:44 am

    Very Interesting and helpful.

  15. May 21, 2016 4:29 pm

    Thanks for the pointers. I’ve written a bunch of Latex macros for doing lecture notes, quickly. Unlike lecture notes you might post for students when are in paragraph form, I like my lecture notes to be exactly what I might write on the board, with reminders of what I might talk about. I’ve been meaning to make these into a class file and put them out there, but who knows when the time for that will happen. I’m happy to share the macro file. The results look like this: http://users.eecs.northwestern.edu/~hartline/lecXX-bayesian-approx-survey.pdf

  16. June 1, 2016 4:05 pm

    For editing Markdown, I really like stackedit.io , which is an in-browser editor that is capable of synchronizing with Dropbox.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: