Pre-Lab 0


  • Set up your git repository.
  • Reinforce what you know about the C build process.


The material developed for this lab was developed by Prof. L. Felipe Perrone. Permission to reuse this material in parts or in its entirety is granted provided that this “credits” note is not removed. Additional student files associated with this lab, as well as any existing solutions can be provided upon request by e- mail to:


Preparing for CSCI 315 Labs

Choose a programming text editor to use. In CSCI 315 labs, we will not use any IDE (such as Eclipse or Visual Studio) so that you develop more of your self-reliance. You should ditch gedit for programming, if you haven’t done so yet. Instead, you should work with choose one of the two following editors to master:

  • vim (classic; uses small amount of memory; widely available on barebones environments)
  • emacs (classic; not so small memory footprint)

There are reference cards and tutorials for these editors everywhere on the Internet; find one that works for you and practice working with it before our lab exercise. You will want to know how to create new files, open files, save files, and use any editor functionality that might help you when writing programs.

Set Up

All the work for the lab component of this course will be turned in via a git repository. You need to take the time now to set up your repo!

  • If you never generated your own ssh keys, open a terminal and run ssh-keygen.
    • Press enter to use the default file name for your key files.
    • Press enter to use an empty passphrase.
  • Still at the terminal, in your home directory, create a directory called csci315, where you will put all the work for this class.
  • Next, create the directories indicated below – please make sure to follow the same capitalization convention:
    • Inside ˜/csci315, create a directory called Labs
    • Inside ˜/csci315/Labs, create a directory called Lab0
    • Inside ˜/csci315/Labs, create a directory called Lab1
    • In future labs, you will need to create one such directory for each of the labs.
  • Open a web browser and follow the link to access  our Gitlab installation.
  • Authenticate with your Bucknell credentials.
  • Create a new project called csci315 (use all lowercase, please).
  • Back in the local terminal, go to your directory for csci315. Run the following commands: (You should see the same sequence of commands suggested by gitlab in the gitlab browser window for the case of “Existing folder”.)
git config –global “youruserid”
git config –global “”
cd csci315
git init
git remote add origin
git add
git add .
git commit -m ‘repo setup’
git push -u origin master
  • Return to your browser pointed at Gitlab, share your project with Prof. Perrone, and Prof. Nasiriani and all our TAs (when their names are announced on the course web page) by inviting them as a developer of your project. Set your project to be unprotected so that the TAs can write grading comments to your project. Make sure to complete these two steps, otherwise your submissions will not be graded.

Dig deeper into git. You have a wide choice of web sources at your disposal, if you look around, and you should try to find one that explains the basic operation of git in a way that you can understand. Here’s one tutorial to get you started; feel free to look for others if you don’t like it. YouTube has many interesting video tutorials, if your learning style is more visual.

Take a look at this! One of our awesome TAs pointed us to this web resource (, which can help you “translate” a line of C gibberish (ahem, beautiful source code) into English. It might come in handy when you are trying to understand whether the code you wrote really means what you think it means.

Problem 1  (5 points)

Take a minute to think about the values, the facts, the experiences that define you as a person. Make a list of three of the points that you find most relevant and send them by email to your lecture instructor as well as your lab instructor. Please make sure the subject line of the message is “CSCI 315 prelab 0 Problem 1.”

Problem 2 (15 points)

This problem can be found in the Moodle course specific to your lab section. You will watch a couple of YouTube videos and answer an online quiz. Note that your pre-lab quiz must be completed in Moodle by the start of your lab section!  Once the start time of your lab section arrives, the link will close automatically.

Problem 3 (10 points)

This problem can be found in the Moodle course specific to your lab section. In preparation for it, spend some time reading and learning about GNU make. There are multiple fine tutorials online and you should look for one that is best suited to your learning style, but here’s one to get you started. Note that you are not trying to become the master of make; you are doing the best to learn a foundation to build upon during the semester. Once you are satisfied, log in to Moodle and answer the quiz questions for this problem.  Again, the quiz must be completed before the start of your lab section.

Print Friendly