-->

Thursday, February 13, 2014

Monday, February 3, 2014

Free Tools to Help you on your PhD

When I started writing my thesis, I wanted to go completely bare bones on it. I thought that if I stuck to a word processor, the simpler the better, and kept my files organized, then I was done. I could just use a thumb drive to carry files back and forth and work anywhere, anytime, no internet connection required, right? That worked out fine until my reading list started to grow, and with it, my need to keep it organized by something else than file names and folders.

Enter Calibre. I thought that what worked out for my e-book collection, would work out well for my article collection too. After all, Calibre had fulfilled my needs during my Master’s, so… But then there’s this whole boring thing called reference management. I tried Endnote in the past, but it wasn't a good fit for me, so I set out to find something else. I first tried Dropbox and Box to keep my files in one place, but I found them too slow to sync. I wanted a program that not only made it easy for me to keep track of what I was reading / had to read, but that also would synch online. Some people use Mendeley for this. In my case, I really like Zotero.

Zotero is a free reference management tool that can index books, retrieve metadata from PDF files, keep a snapshot of web pages, add links to videos to your library, and create references for most formats out there. It also stores a copy of everything on the cloud, so that you can access it through a browser, and is available for Mac, Windows and Linux. There is a paid third-party app to use it on Android too, but if you prefer to use it from your Android browser, that’s also possible. I like to go paperless whenever I can, so I paired Zotero with Adobe Reader, which allows me to highlight text and add comments on the PDF file I’m working on. After I do this, I overwrite the file so that when Zotero synchs up, all my copies have the highlighted file and I can work from my desktop or my netbook, no problem. Zotero notes are also useful as an auxiliary research journal.

If your thesis requires you to write code, you might want to have a Version Control Software. In my case, I really like Git (free). With Git I can change my code however I want and tag those changes and upload them to a server, so that if my computer disappears, at least I’ve got my code and my references backed up somewhere else. Two of the best known places to host your Git repositories are GitHub and Bitbucket. GitHub has a lot of advanced features, but if you want a private repository, you have to pay. I prefer a free private repository, so I use Bitbucket, even though GitHub has some more advanced features, such as better Wiki support. So far we have solved the reference management problem, the version control problem and the hosting problem…what next? Well, there are bound to be times when you want to keep pages saved but you don’t want them in your Zotero library (though you could have a different library to hold the misc stuff). That’s when I use a plug-in called Pocket (formerly known as Read It Later). The reason I use Pocket instead of simply synching my bookmarks with Google’s synch or Firefox Sync is because I use many different browsers on different computers and partitions. My Pocket account allows me to add bookmarks to it no matter where I am, or what browser I am using. It also offers a free Android app. This is very handy when you have to get going and want something to read on the way. Sometimes I’ll bookmark a website before I leave, or the night before, and since Pocket downloads a snapshot of that website, I can read it while I’m on the go even if I don’t have an internet connection or my data plan is down.

 As far as writing concentration goes, your desktop can be a concentration zapper. If you are on Windows, you might want to try out a program called Fences, by Stardock. You can create icon groups (“fences”) that keep your icons and folders neatly organized. I think its best feature is that it allows you to hide most icons, except a few predefined ones, with a double click on your desktop. Whenever I start up the Windows computer, I do this so that I can only see thesis related folders and icons on it. It really helps to keep you on track. As far as I know, there are a free and a paid version of it.

Here is an important tool that will be a life saver to all the sidetracked students out there: Stayfocusd. This is a free Chrome App that basically blocks out time-wasting websites or allows you to go “nuclear” and block everything that is not on your whitelist for a predefined amount of time. ManicTime is a good time tracking tool if you are on Windows. It automatically tracks everything you are doing on the computer and allows you to tag activities and see statistics on your time. There are a free and a paid version of it. The only downside to this is that I’m also a Linux user, so it doesn’t cover all my needs.

If you are broke and need free writing software, there is a Zotero plugin for OpenOffice (free). Some people swear by full screen word processors, such as FocusWriter. If you need to use a LaTeX editor, instead, I recommend ShareLateX for some projects (cloud-based), but I really like MikTex (also free). Remember that you can also keep track of changes on your written documents by using Git.

Finally, how do you keep motivated and map out your ideas? Well, if you need a mind-mapping tool, FreeMind is free, and Mind42 is cloud based. As far as keeping track of the big picture goes, I like using Trello, especially with a plug-in that allows me to see how much progress I've done, but you could also use Asana or Teambox or BaseCamp, for instance. Even Google Calendar and a To-Do list would be enough for some, though the previously mentioned options allow you to upload files related to each task. Timers are useful as well, especially if you want to follow the Pomodoro technique. It is vital that you keep some form of log, for accountability and motivation purposes. One such log for Android would be Goal Coach (in which you can only tick if you have done something or not) or My Logs (in which you write about what you've achieved, but it is not as easy to track at once as Goal Coach). I like to use Goal Coach for repetitive tasks that need to be done each day and My Logs or Joe’s Goals (web) to keep a log of what I've actually accomplished.

Friday, January 31, 2014

How to recover or modify your PATH variable on Windows

How to Recover or Modify your Path Environment Variable on Windows

When you need to run an executable from the command line, your operative system needs to know where to find it. Otherwise, you get an error like this one:

C:\> ping www.google.com
'ping' is not  recognized as an internal or external command, operable program or batch file.

To fix this, you need to add the directory in which that executable is located to your PATH environment variable.
Warning and disclaimer: don't touch this if you are clueless about what you are doing. The Path variable is used by your operative system even for the most basic of commands, if you delete it or make a mistake, your system could become unstable. I will NOT be held responsible for any damages or consequences whatsoever. 

How to Modify the Path Variable:

If you are not sure if the variable you are looking for is added to your Path or not and you don't want to use the GUI, you can try running cmd.exe and entering this command:
echo %PATH%
  1. Right click on 'Computer' and select 'Properties'
  2. Go to the Advanced Systems Settings section and select the 'Advanced' tab
  3. Click on 'Environment Variables'
  4. The Path variable is located on the second list, you might have to scroll down a little (see picture). Select it and click on 'Edit...'
  5. When modifying the Path variable, only add exactly what you need and don't remove anything else. When you are done, OK the changes. Make sure that you do not leave any spaces between the semicolons and add a semicolon to your final variable, e.g.:
C:\Windows\system32;C:\Python27;

The Path variable is selected in light blue.

I made a mistake before and nothing works. How do I recover my Path variable?

Follow steps 1-5, but add this variable:

%SystemRoot%\system32;%SystemRoot%;
Make sure that there are no trailing spaces anywhere (check the other variables), and that no variables are missing semicolons. This has been tested on Windows XP 32-bit and Windows 7 64-bit.
If this doesn't work, and you are using a very basic command (I like to test with 'ping'), you should check that the files themselves have not been deleted. Ping is usually located at C:\Windows\System32







Thursday, January 30, 2014

Installing the NLTK: Tips and tricks

Installing the NLTK: 

Tips and Tricks

Though the NLTK is a very useful tool aimed at students, sometimes its installation can be a bit tricky. Some people recommend that you use a pre-bundled version such as Enthought, but I have not had the chance to use it yet.These tips might help you if you are having trouble:
  • If you are getting an error when trying to install Numpy, NLTK or YAML on a 64-bit version of Windows complaining that Python has not been found, check that you have installed a 32-bit version of Python (x86). Also, bear in mind that you need different downloads for Python 2.x and for Python 3.x. If you are going to use Python 2.x, I recommend that you use Python 2.7.
  • I highly recommend that you download and install setuptools and pip. Setuptools includes easy_install, which will make your life so much easier. They can help you when the binaries are defective or outdated. These tools are aimed at simplifying your work when you need to compile from source. To install setuptools, follow the instructions on this link. Pip installation instructions can be found here. Basically, you just download the .py file and run it. 
Warning: To be able to run it, make sure that you have added C:\Python27 (or whatever your Python installation directory is) and C:\Python27\Scripts to your PATH variable. Instructions on how to do this (and how to fix your PATH variable if it is broken) can be found on this post.
  •  You won't notice any big changes, but you can check that it worked by trying to install a package such as matplotlib. You need to use Windows' Command Line Interface for this (Start menu>Run>cmd.exe). Just type this on the prompt and hit Return:
pip install matplotlib
or, if you prefer to use easy install:
easy_install matplotlib
You will often see it written as:
sudo easy_install matplotlib
sudo pip install matplotlib
The 'sudo' is meant for Mac and Linux systems, not Windows systems. In order to know if everything went well, open up IDLE and try to import the package you just installed, e.g.:
 >>> import matplotlib 
If Python doesn't complain about a package not being found and simply shows you another line of the prompt, the installation went well. 
  • I found that matplotlib, which is used throughout the book to plot graphs, gave some problems after installing from the binaries (it would install correctly but NLTK was having trouble with it), so I finally installed from source. This solved the problem.
  • Sometimes pip or easy_install will complain about a lack of vcvarsall.bat.This means that easy_install or pip need a C compiler in order to compile part of the code you asked it to install. To fix this, you need to install Microsoft Visual Studio and add it to your path. These StackOverflow answers should help, but make sure that you know what C compiler your Python version uses, in order to avoid problems (they are not the same).