Getting Started
From UIDWiki
Contents |
Get Permissions
First, you need a CSAIL account. Get Rob's help to get one.
Once you have a CSAIL account, get a CSAIL certificate in your web browser. This will give you permission to edit our wiki and bug database.
You will also need to be a member of the UID Kerberos protection group, which will give you permission to our Subversion repository. Get Rob's help to add you:
pts adduser -group uid -user username
Join the Mailing Lists
Join our mailing lists:
- uid list is for general messages to everybody in the User Interface Design group.
- chickenfoot-developers is for people working on Chickenfoot. It also gets messages from users of Chickenfoot out on the net.
- chickenfoot-developers is for people working on Seaweed.
Join the Tea Agenda
UID Tea is our daily group meeting. We have a rolling agenda stored in a Google Doc, which you'll need permission to view and edit so you can add your progress reports and other interesting items. With your CSAIL certificate, visit the agenda right now, to ensure that you're given permission.
Edit the wiki
Log in to this wiki (using your CSAIL certificate).
After you've logged in, go to your personal page (by clicking on your username in the upper-right corner of the page) and edit it. Add a message about yourself. Start taking notes on the page as you work through the rest of these instructions.
Get the Tools
Collect the tools you need to compile our code. These tools are already installed on CSAIL and Athena workstations, but you may need to adjust your search path to point to them, by following the instructions below. If you want to work on your home machine, you may need to download these tools and install them locally.
Java JDK 6. On CSAIL workstations, you get Java by creating a text file ~/.software containing the single line:
java2
Log out of your CSAIL account and log back in, and test that you can run it:
java -version
On Athena, you get Java by running add -f java. You can get a specific version with add -f java_v1.5.0_02.
On Windows, you can download Java from Sun.
Eclipse. Eclipse is the IDE we use to develop Java code. It includes a source-level debugger and some nice code refactoring support. Eclipse runs on Linux, Windows, and Mac OS.
CSAIL: Add the line "eclipse" to ~/.software, log out and log in Athena: add eclipse-sdk ; eclipse Windows: Download Eclipse
Subclipse. Subclipse is an Eclipse plugin for Subversion, the version control system we're using.
- In Eclipse, go to Help -> Software Updates -> Find and Install... >> Search for new features to install.
- New Remote Site >> Name: Subclipse, URL: http://subclipse.tigris.org/update_1.4.x
- Press Next to scan for updates; when the scan is done, open up Subclipse and select
SVNKit Adapter and Subclipse inside it. Install them. (Don't choose the recommended JavaHL Adapter, because it won't work unless you have a command-line ssh client installed.)
- Restart Eclipse.
Mozilla Firefox. This is the web browser that our Chickenfoot plugin works with. You should have Firefox 3.0 or later.
CSAIL: Version 1.0 is the CSAIL default; see below... Athena: add firefox ; firefox Windows: Download Firefox.
Other tools. Here are some of the other tools we use. Installing them is optional, and if you're just getting started with the UID group, you should skip these for now.
- Cygwin: install this on your Windows machine so that you have access to Unix tools like diff, zip, and command-line SVN. CSAIL and Athena don't need it, since they already have Unix tools. When Cygwin offers you a long list of packages to install, it's a good idea to make sure that openssh and subversion are being installed, since these are useful.
- Apache Ant: the build tool that we use. Ant is included in Eclipse, so you only need to download it separately if you want to run Ant from the command line. On CSAIL, Ant is installed at /afs/csail/group/uid/tools/ant/bin/ant, and on Athena at add 6.170 ; ant.
- Subversion: the command-line client for Subversion. It's easier to use the Subclipse plugin that you already installed above, but the command-line client is a good fallback in case the plugin doesn't work. CSAIL already has the client installed. On Windows, Subversion can be installed as part of Cygwin.
Configure Your Development Environment
There are a few things you need to do to set up your editor or IDE. Do them now:
Install syntax-coloring and autoindentation for Javascript. For Eclipse, most of us use Colorer, which you can get like this:
- Go to Help / Software Updates / Find & Install.
- Select Search for new features to install.
- Click New Remote Site and fill in Name: Colorer and URL http://colorer.sf.net/eclipsecolorer/
- Proceed through the install wizard, making sure to check the checkbox for Colorer each time you're given a choice (you'll have to do it twice).
- Restart Eclipse after Colorer is installed.
- After restarting Eclipse, go to Window / Preferences... and then General / Editors / File Associations. Make sure that Java Editor is still your default editor for *.java files, and not Colorer (or else you lose all the advantages of Eclipse's Java editor).
- While you're there, add Colorer as the default editor for *.rdf, *.sh, and *.xul. (It should already be setup for JavaScript, XML, HTML, and CSS.)
Always change tabs to spaces in source files. We don't want tab characters in text files in CVS, because different editors and tools interpret tabs differently. All indentation should be done purely with spaces. Our Subversion repository will actually reject commits that include tabs in text files, so you'd better fix this now, or face pain later.
To change tabs to spaces in Eclipse, change these preferences:
- Go to Window / Preferences / Java / Code Style / Formatter / Edit... / Indentation. Pull down the dropdown menu for Tab Policy and select "Spaces only."
- Go to Window / Preferences / Ant / Editor / Formatter, and uncheck "Use tab character instead of spaces".
- If you installed Colorer, go to Window / Preferences / Colorer Library Editor / Uses spaces instead of tabs.
For Emacs (if you use it for editing code), put the following line in your ~/.emacs file:
(setq-default indent-tabs-mode nil)
For Vim (if you use it for editing code), put the following in your ~/.vimrc file:
set expandtab " Use spaces instead of tabs set autoindent " Inherit indent from previous line set tabstop=2 " Display \t as 2 spaces set shiftwidth=2 " Number of spaces to use for each indent set softtabstop=2 " Treat 2 spaces as a tab for editing purposes set smarttab " Insert blank space at beginning of line with tab
Check Out the Project
Configure Subclipse to use its internal svn client. Go to Window >> Preferences >> Team >> SVN and select SVNKit (Pure Java).
Check out the project. Our latest projects are stored in Subversion. If you're using Eclipse, you'll need to open either the SVN Repositories view and right-click on it to add the repository location below. If you're using command-line tools, use svn checkout with the location below.
svn+ssh://svn.csail.mit.edu/afs/csail/group/uid/svn/uid
If you look inside this repository, you'll see three root folders:
projects/ for shared group projects like Chickenfoot, Seaweed, and Kangaroo papers/ for papers and talks users/ for personal projects by UID group members
Older projects, like LAPIS, are stored in CVS. In Eclipse, go to the CVS Repositories view and right-click on it to add the location below.
CVS Host: login.csail.mit.edu Pathname: /afs/csail/group/uid/cvs
