CS 257: Software Design

WordGameAssistant, Phase 1 of 3

Work with one or two partners on this. Do all the installations and account signups individually on your own computers, but share a single git repository for your project. Put both of your names in the comments at the top of each source file.

What you should know after this assignment:

Your practical goals for this assignment are:

You'll have lots of questions. You'll be able to answer some of them through experimentation and searching the Internet, but don't hesitate to ask other people (including me) for help.

So, here we go...

1. Set up an account on Bitbucket

Go to bitbucket.org and create an account for yourself based on your Carleton email address. (It's important to use an address ending in ".edu" so you will get a free, unlimited academic account.)

2. Create a Bitbucket git repository to hold your project

Login to your Bitbucket account, go to Repositories→Create repository and create a git (not mercurial!!) repository named WordGameAssistant. Keep it private.

A repository is essentially a folder in which you can store whatever files and subfolders you want. What makes a repository more than a folder, however, is that the version control system (git, in this case) keeps track of all the changes that get made to the files in the repository. This saving of history makes it possible for you to retrieve old work, track down the time when a bug was introduced (and who introduced it), collaborate on a project with a team of programmers, easily back up your work, etc., etc. Version control systems are a bit of a hassle to learn for the first time, but they're indispensable programming tools and unquestionably worth the effort.

3. Install git on your computer

You can get git here. It's possible that you already have git on your computer (e.g. it's available by default on most Macs).

Once you install git, you'll be able to use it from the command line. For many people, that's sufficient. However, there are some benefits to using a GUI git client, too. Since we'll be using Bitbucket to host our git repositories, I recommend that you take Bitbucket's advice and install Atlassian SourceTree, which integrates very well with BitBucket.

For the rest of this document, whenever there's need to show a git operation, I will show you the git command-line version of that operation. If you're using SourceTree or any other git client, you'll need to figure out the equivalent operations in your client.

3a. [Optional but recommended] Windows only: Install cygwin

Installing cygwin gives Windows users access to a wide range of Unix/POSIX/GNU tools. These are the tools that you'll see me using all the time in a Mac terminal, because MacOS X is based on a Unix core. Similarly, Linux is a variant of Unix, and thus has all the usual Unix tools. Windows has its own command-line interface and command collection that's plenty powerful, so you can definitely work to become an expert on that interface and not worry about having Unix on Windows. That said, the documentation and open source software available for Unix-like systems is a huge benefit to day-to-day programmers, and I personally never work long with a Windows machine without first installing cygwin. Since I won't be demonstrating Windows-specific tools at all this term, you might find it handy to have the tools that I do demonstrate.

The cygwin installer is pretty much self-explanatory, and it leaves a shortcut on your desktop. But there's a moment during installation when you have the option to add non-default tools. The available choices are bewilderingly numerous, but I recommend that you make sure you're installing at least: git, vim, emacs, OpenSSH, python.

4. Get a local copy of your WordGameAssistant repository

Right now, your WordGameAssistant repository is stored only on the Bitbucket server. To add files to it, you'll need to "clone" a copy of the repository onto your own computer. You will then add files to your local copy of the repository and push your changes back up to Bitbucket.

Bitbucket gives you some setup instructions right after you create a new repository, and they work just fine, but there's a simpler way to make your clone:

git clone https://YOUR_USER_NAME@bitbucket.org/YOUR_USER_NAME/wordgameassistant.git WordGameAssistant

(Note that bitbucket instructs you to use git@bitbucket.org:YOUR_USER_NAME/wordgameassistant.git instead of the https version above. However, this latter version only works if you have installed an SSH key in your Bitbucket account. Doing so can make some Bitbucket operations simpler, but it's not required.)

You should now have a folder called WordGameAssistant, containing only a subfolder called ".git". (Curious? Go ahead and poke around in .git to see what's there. It gets more interesting, of course, after you add some files.)

5. Install IntelliJ Community Edition on your computer

Get it at IntelliJ Community Edition.

6. Create an IntelliJ project

Here are the steps. (There's also good help at the JetBrains IntelliJ Help page.)

7. Add your IntelliJ files to your WordGameAssistant repository

(Curious again? Take a look at what your repository now looks like on Bitbucket. Also, you can take a look at the contents of .git to see whether anything changed.)

8. Add a little bit of code, commit, and push again

9. Share your repository for grading

In your Bitbucket account, go to your WordGameAssistant repository. Use the "Send invitation" button to share your repository with me (jeffondich) and the grader, Chet Aldrich (aldrichc). Now we'll be able to clone your repository to take a look at your work.