Skip to content

How to install MadEye - a remote pair programming tool

Marek Kalnik3 min read

Theodo is constantly looking to improve its code review tools and collaboration. Recently we have encountered a problem about how to organize pair programming sessions with our programmers working at client’s offices. The fact that you are not in place should not prevent you from having your pair programming session with more experienced collegues!

So far we are testing MadEye which turns out quite good. I am going to show you how to install it using nvm and npm in few quick steps.

Using Node Version Manager

NVM, a Node Version Manager is a tool that helps you manage multiple NodeJS versions.

Run the following command to install it:

$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh

You do not need to have NodeJS installed to run the script, but it will not work without Git. If you want to install it without using Git, see the GitHub repository for more info.

This command adds an alias to your bash config files, so you can either execute $ source ~/.profile or restart your console in order to get nvm command working.

Once NVM is installed you can install NodeJs (I have tested MadEye with Node 0.10) and NPM:

$ nvm install v0.10

Note that NPM is already bundled with Node, so no need to install it separately.

Now use NPM to install MadEye. NPM will download all dependencies automatically.

$ npm install -g madeye

Note: When using npm with nvm, you should not use sudo. All packages are installed in your home directory. If you used sudo accidentaly, change the owner of .nvm and .nmp to your user.

Usage

Just cd to your folder and type madeye. You should see something like that:

Enabling MadEye in /var/www/theodo-site View your project at http://madeye.io/edit/{project-key} Use Google Hangout at https://plus.google.com/hangouts/\_?gid={private-id}&gd=http://madeye.io/edit/{project-key}

Once you open GoogleHangout link, Google will ask you to give MadEye the permission to run and load your project. The madeye.io link becomes inactive once you stop sharing, but the GoogleHangout keep all files readable (no saving though).

The google hangout lets you see the folder directory structure, edit files in a GoogleDocs-like manner - each hangout participant has his own color of cursor. You can then synchronize filed to the project host or discard changes if it was only a proof of concept.

So far we encounter some performance problems while opening directories on files, but the code edition in one file is realtime. Both users navigate throught files independently, it is not a simple “screen sharing”, so some communication is required (like “Open this file, I’ve modified that”). Saving works well, there is no server-side code update though.

Troubleshooting

MadEye does not install

See if you have the required NodeJs version, type node —version

You have installed MadEye but the madeye command is not found

If you manage multiple Node versions with NVM, it is possible that it was installed with other NodeJs version.

Run $ cd ~/.nvm && find -name madeye and see in which directory it is stored. Also check your default Node version nvm alias default and if there is none it may be a good
idea to set it.

Happy MadEying and let us know if you liked it or if you use any similar solutions!