Archives for mei 2014

Setting up my new MacBook

We are going to move to a new building, which means we are leaving the beautiful Bushuis/Oostindisch Huis in the Center of Amsterdam. Once we arrive there, probably in September (although there are some protests), we will all have to work on so-called flexplekken, meaning that we won’t have an own office any more. That’s why all of us got a laptop. I chose the MacBook Air: For my own research, I would probably be best off with a Linux machine, but for teaching and for collaboration with others, I need some programs (like SPSS or Office) that wouldn’t run (well) on Linux. And you never know if the IT department again implements a new VPN or something that is not compatible. So for me, MacOS was the best compromise between a “mainstream” computer and being able to run some UNIX-like software.

While teaching courses like Big Data and Automated Content Analysis, I realized that I often assume that some software just is installed on everyone’s computer, which of course is not true (Last week again, I realized that normal people don’t have a c-compiler an thus cannot install everything from source…). So I decided that this time, I’ll take notes and write down which programs I installed to turn my brand new computer into something I can work with. Of course, it is sometimes highly subjective which programs one prefers, but maybe this lists hints you to something you can use. And otherwise, I’ll just use it for looking things up next time I have to set up a laptop ;-).

Installing everything on my new MacBook

That’s how my desk looks like…

But now, in the order in which I installed everything.

  • XCode
    The developer tools by Apple. I installed them via the App Store. I don’t really use them directly, but I install a lot of packages from sources, so I need things like a C compiler and the like. This means that you also need the XCode command-line tools. They can be installed by typing sudo xcode-select –install in the Terminal. Don’t forget to sign the license, otherwise you won’t be able to use the tools. You can do so with sudo xcodebuild -license.
    Even if you think you don’t need this, as you are not a programmer, you might be wrong. Some really useful programs I’ll describe below can be installed with not too much effort, but might require a C compiler for installation – one of the ingredients of XCode.This is also why it is the first thing I installed.
  • Dropbox
    I use intensively to sync my data and to share data with colleagues.
  • Some useful Python-packages
    I use Python in teaching and research. MacOS comes with Python 2.7 pre-installed, but I need some additional packages. I installed pip first, a very useful tool to install additional packages. If they are from source, you might need XCode (see above) as well. On my old MacBook with MacOS 10.6, I had gcc instead (which I installed from a pre-compiled package), that worked fine as well. I install pip and the packages by typing the following commands in the Terminal:
    sudo easy_install pip
    sudo pip install nltk
    sudo pip install pattern
    sudo pip install twitter
    NLTK and pattern are packages vor natural language processing, twitter allows to access the Twitter API.
    Later, I installed two packages for parsing XML and HTML-files:
    sudo pip install BeautifulSoup4
    That one went well, but
    sudo pip install lxml
    did not. I tried a lot of things, but finally found out the reason: MacOS 10.9 changed the compiler settings in a way that instead of a warning for unknown parameters, you get a hard error. The workaround to install lxml (which is great for parsing, e.g., reviews from consumer sites and the like, something my students like to do):
    sudo bash
    export ARCHFLAGS=”-Wno-error=unused-command-line-argument-hard-error-in-future”
    pip install lxml
  • R and RStudio
    For teaching, I am kind of forced to use SPSS as statistics program, and for some research projects, I use STATA, but I want I try to do more and more with R and RStudio (for idealistic reasons [because it’s free, and scientific software should be free], but also because you can to some cool stuff with it).
  • TexShop & TexLive
    I sometimes use LaTeX to make slides. What I like about it is that it takes me less times than messing around with Powerpoint. And especially for some of my courses, it is really useful that I can use things like line numbering to display source code (using the lstlisting environment). TexShop is pretty OK for making them. (But nevertheless, I use Apple Keynote or Microsoft Powerpoint as well). I actually don’t use LaTeX it for writing articles, as in my field, many journals and virtually all collaborators work with Microsoft Office.
  • Gimp
    My choice for manipulating images is gimp. It offers many of the function that all-mighty Adobe Photoshop offers. It might be a bit less intuitive and some things are missing, but for most tasks it’s just fine. And, of course, it is open source and free.
  • Skype
    Can you imagine working today without Skype? I actually cannot recall when I called an international collaborator via the Phone the last time, but I do so regularly on Skype. Even my parents  only call me on Skype.
  • Microsoft Office
    Definitely not my favorite program and some things drive me crazy (like the fact that Excel for Mac completely messes up UTF-8 encoded csv-files), but I’m kind of forced to use it, as everyone is using it, so I installed from a UvA software repository.
  • Acrobat Pro
    Also from the UvA repository. As I work a lot with PDF files, it’s pretty cool to have the Pro version.
  • Symantec Endpoint protection
    From the UvA repository. Alerted me already several times about viruses on students’ pen drives.
  • Cyberduck
    I have to connect to a lot of different services using protocols like FTP, Webdav, SSH, … – for example to get access to data on a virtual sever I am running for data collection purposes. Cyberduck is a good client.
  • Firefox
    Nobody wants to have Safari as only browser, right?
  • wget
    The tool for downloading stuff, mirroring whole website and the like. MacOS comes with curl, which is kind of similar, but as I use wget on Linux servers as well, I wanted it on my laptop, too. And my students use it as well. Luckily, I already installed XCode (see above), so I can easily install wget from source (explanation here).
  • Java 6
    You might wonder why this is necessary. The thing is that it was shipped with earlier versions of MacOS, but it’s not any more – however, Gephi (see next point) doesn’t run without it. You get Java 6 for MacOS directly from Apple.
  • Gephi
    OK, this one is complicated (if you are not aware of the instructions below – and if you haven’t instaled Java yet). Gephi is kind of the upcoming star among network visualization tools, and I use it both in research and in teaching. This is how you install it:
    1. Download it and run it one time. Close it again.
    2. Move the App from the image to your program files folder. It won’t run anymore, you have to do the following steps once:
    3. Open the terminal and enter the following commands:
    cd /Users/damian/Library/Application\ Support/
    rm -r gephi
    (of course you replace damian by your name)
    You’re done. But if you additionally want Gephi to be able to use more memory than the 512 MB it gets by default, you can do the following:
    1. Right-click on the Gephi app and choose “Toon pakketinhoud” (probably something like “Show package content” in the English version).
    2. Within the package content, open Ressources/etc/gephi.conf in an editor.
    3. It somewhere says 512 (for the amount of memory allocated). Change it to a higher amount.
  • Mendeley
    I use Mendely for organizing my literature. There where some people who stopped using it after it was taken over by Elsevier, but for me, it still is the best solution, as it also allows me to read the PDF’s of the articles on my iPad.
  • Evernote
    Some people love Evernote for taking notes, I’m still not so sure, as I very often just put plain-text files with notes in my dropbox, which works fine. But I’m kind of using it, although not as systematically as I should to really make sense.
  • Teamviewer
    Teamviewer is not only great for logging on to your Desktop computer at the Office (which I, admittedly, will note have much longer) when you are sitting somewhere in the sun, but also great for helping parents with computer problems. Just work on another computer as if you were sitting in front of it.
  • git
    I’m still at the beginning, but I try to share more and more code on github, so I need git to upload stuff.
  • Scribus
    Like gimp is an open-source alternative to Photoshop, scribus is something you can use instead of InDesign. It is much less powerful, but I still great for making conference posters – or fake newspaper articles as stimulus material for experiments. Get it here.
  • The last (and, maybe, most important!) program: Spotify!
    Of course, you cannot work without music. I have a spotify-account for that.

That’s it!

Update: You might also want to have a look at the choices other people made.