CS 257: Software Design

EncodingHelper

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 EncodingHelper. 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, but you would probably know it if you do.

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.

4. Get a local copy of your EncodingHelper repository

Right now, your EncodingHelper 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/encodinghelper.git EncodingHelper

(Note that bitbucket instructs you to use git@bitbucket.org:YOUR_USER_NAME/encodinghelper.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 EncodingHelper, 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 EncodingHelper 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 EncodingHelper repository. Use the "Send invitation" button to share your repository with me (jeffondich) and the grader, Eric Ewing (ewinge). Now we'll be able to clone your repository to take a look at your work.