CS Accounts and CS Lab Computers

From Computer Science
Revision as of 15:23, 13 August 2019 by Jkinne (talk | contribs) (Text Editors)
Jump to: navigation, search

This section contains information for CS majors to help get you started with logging into the CS server and do the sorts of programming that goes on in most of the CS courses

Operating System and Class Accounts

Many of the CS courses make use of the CS server, which runs Linux. For courses that use the CS server, your programming assignments will be compiled and run on the CS server.

If your class makes use of the CS server, you will be given a "class account". These class accounts allow you to login to the CS server remotely and login to the computers in the CS lab and classroom (Root Hall, A-015, A-017, A-019). The class accounts will be given to you by your instructor. The class account login names all start with cs and then the number of course. For example, CS 151 students get class accounts that begin with cs151 (e.g., cs151000, cs151001, ...). Note that the class accounts are deleted at the end of each semester. If you are a CS major and would like a permanent account on the CS server you can ask your instructor.

For courses using the CS server, you are encouraged to do your programming while logged into the server (e.g., using Putty from Windows, or another terminal client if using another OS). You should use the same program to compile/run your code that the instructor uses, so you are sure it will function properly when your instructor grades your code.

Using Linux

See the Linux and CS Systems Bootcamp for getting started in Linux - getting software setup on your personal computer, basic commands to use, text editors, etc.

Logging into CS Server Remotely

You can view videos of the installation and use of the software mentioned here on the CS at ISU youtube playlist.

Working Remotely on the CS Server

From Windows - To login to the CS server from a Windows computer, you should install the Putty software. Putty is a shell/terminal that runs on your computer and sends the commands to the CS server. This allows you to edit files on the CS server, compile using programs installed on the CS server, etc. To install, follow the Installing Putty on Windows instructions.

From Mac or Linux - To login to the CS server from a Mac or Linux, you do not need to install putty. Instead, you can open your terminal or shell program, and then type "ssh username@cs.indstate.edu". On a mac, you find the shell by going to Finder, then Applications, then Utilities, then Shell or Terminal.

Transferring Files To/From the CS Server

To transfer files between your computer and the CS server, use an sftp program. This can be a text-based sftp program (one comes pre-installed on Mac and Linux, and one comes with Putty for Windows). Or, you can use a GUI sftp program. FileZilla is a GUI sftp program that works on Windows, Mac, and Linux. WinSCP is another popular GUI sftp program that only works on Windows. If given an option of what port to connect to, use port 22 (this is the "secure" port, so data is encrypted while transferring over the public internet).

Other Software

If you want to develop on your own computer without logging into the CS server you have a few options...

  • MS Visual Studio - the best option to develop GUI programs for Windows, not a good option for developing for Linux.
  • Eclipse - a cross-platform IDE that can be used for Java, C/C++, and some other languages.
  • Cygwin - software that installs a shell/terminal and associated programs on your Windows computer so that it works pretty much like the CS Linux machines. If you select the option to install gcc/g++ and emacs/vim, then you can work on your programs on your local Windows computer with basically the same environment as the CS Linux computers.

Programming Languages

Many of the CS courses use C and C++. If you are a new graduate student or a transfer student, you should get started by making sure you can connect to the CS server with Putty or another terminal program. Once you can connect, you should familiarize yourself with linux shell commands (see the Unix/Linux Quick Reference Card linked above). You should also learn to use one of the text editors mentioned above.

For CS courses that use C and C++, the gcc and g++ compilers are normally used. These are already installed on the CS server. If you have a C or C++ program, you compile it by first logging into the CS server using Putty or another terminal program and typing

gcc code.c -o outputName

for C, or g++ for c++. You run the resulting program by typing ./outputName (and then enter/return) at the shell prompt (aka command line). You should make sure your C/C++ programs compile and run using gcc/g++. Note that programs made using MS Visual Studio or some other compiler will normally not work straight away with gcc/g++ because there are some differences in which functions are included in the header files.

Tutorials and Reference

For a review of C and C++, you can look at various tutorials and references online and courses from other universities that teach these languages. The following is a list of resources we have used in the past; there are many others online as well.

Practice Programming Problems

To practice C/C++ programming, first start by following a tutorial and writing the programs the tutorial shows you. Once you are reasonably familiar with all the syntax rules, start trying "programming contest problems". These are problems with precisely defined correct output, so that you can submit your program to make sure it is 100% correct.

Source Control

It is a good idea to use source control when developing software, and is necessary when you are developing in a group or professionally. When working on assignments or course projects it is the best practice to use a private repository so other students cannot copy your work. Git is the industry standard for source control. Here are some resources to use to learn Git.