If you are continuing on your journey in Computer Science, here are some suggestions for you.
The next class in the sequence will introduce you to completely new concepts, building on the concepts learnt in this class.
Make sure you are very comfortable with the concepts we learnt here. Review labs and homeworks, make sure you can solve them pretty easily.
Install a working environment in C++, which is the language you will be using in the next class.
Review C++ syntax before you take your next class. Make sure you develop:
Students who wrote basic C++ programs over the break did well in Data Structures. It also helps solidify your algorithmic problem solving skills.
You can also review the first few labs in Data Structures if you wish and work on those in advance:
http://www.cs.rpi.edu/academics/courses/fall14/csci1200/calendar.php
In this document, there are some suggestions to help you get ready for your next class.
You are not learning C++ from scratch. Many basic constructs are very similar in C++, but there are differences too. Here are some sources that were highly recommended:
Tutorial on C++:
The following set of videos:
See also this for a quick overview of syntax:
http://www.cs.rpi.edu/academics/courses/fall14/csci1200/other_information.php
Go through the tutorial and the videos. Make sure to write many programs.
Here are a few first things to notice between the two:
For more in depth description of the differences see:
Your basic development environment in C++ consists of an editor for writing programs and a Terminal window for compiling and running your programs.
You must have a C++ compiler installed. In Windows, the compiler comes with Cygwin. In Macs, you must install the Command line tools (which we have already done for our class).
You must open a Terminal window: Terminal under Applications->Utilities in Macs (black box) and Cygwin under PCs. See more about Cygwin below.
Navigate the terminal to the folder in which you have your program. See basic terminal commands below.
You must use an editor to write your programs. Many choices exist. The choice of editor is not so important, but becoming proficient in using an editor is.
Example editors (Google the name for your operating system):
Some of these already come with the Cygwin installation, see below.
Basic terminal operations (Terminal in Macs and Cygwin in PCs) include:
Displaying the current working directory the terminal is pointing to:
$ pwd
Listing the files in the current working directory for the terminal:
$ ls
$ ls p* ##lists files that start with p
$ ls Dropbox ## lists files in the directory Dropbox
## (assuming it is one level below it)
Changing the working directory to a directory on your file system (cd means change directory):
$ cd directory_name
$ cd directory1/directory2 ## if you want to change multiple
## levels of directory in a single step
$ cd .. ## goes one level up in the dictionary hierarchy
Compile code:
$ g++ programname -o outputname
For example:
$ g++ program.cc -o program
This generates a new file called program in Macs and program.exe in PCs.
To run a program called program, use:
$ ./program
Create a symbolic link (a shortcut) between two folders is very good way to simplify your life. Suppose you are at your own Desktop. I will create a shortcut to a directory on my dropbox on my own Desktop:
$ pwd
/Users/sibeladali/Desktop
$ ln -s /Users/sibeladali/Dropbox/CSCI1100_Fall2014/ cs1
This tells me to create a symbolic link (ln -s) for directory /Users/sibeladali/Dropbox/CSCI1100_Fall2014/ and call it cs1. Now, I can simply write the following:
$ cd cs1
If you are using Windows, you should install Cygwin which comes with many things you need.
Visit www.cygwin.com/install.html and download either the setup-x86 for 32-bit systems or setup-x86_64 for 64-bit systems. Most of you will use the 64-bit version.
Save the executable somewhere you can easily access. Run the installer.
Navigate through the installer. It is easiest if you leave all options as the default. When you get to the window of mirrors select one and click Next.
Install the following packages. To install, use the search function to find the package. To mark a package for installation click on Skip and it will change to a version number.
Once all the packages you want are selected click next and make sure the box to Select Required Packages is CHECKED. Click Next and Cygwin will begin installing the packages.
PLEASE NOTE: This step can take a long time.
#. Cygwin is now installed with the packages. If you ever need to uninstall or install new packages just re-run the setup.exe and modify as you need.
When you open a Cygwin window, it does not yet point to a valid location on your hard drive. The first thing you should do is to point it to your C drive with:
$ cd c:
Next, you must point it to the root directory for all your files. In Windows, this is usually something like:
$ cd c:/Users/your-user-name/
Here you should be able to see folders like Desktop and Documents.
As we used Wing for CS-1 as an integrated environment for Python, many IDEs exist for C++. Many general purpose IDEs work for C++ well:
Xcode for Macs (comes preinstalled)
Eclipse (requires Java runtime installed) (http://www.eclipse.org/cdt/)
wxDev-C++ (http://wxdsgn.sourceforge.net/)
Code::Blocks (http://www.codeblocks.org/)
NetBeans (http://www.netbeans.org/features/cpp/)
(Notes on getting Netbeans to work with Cygwin and g++: http://chriseiffel.com/uncategorized/windows-c-compiler-how-to/)
Anjuta (http://anjuta.sourceforge.net/)
Remember: IDEs are useful for debugging with a graphical user interface. But, it is likely that no one will be an expert in the specific IDE you use. Practice and learn its features before starting to use it in class assignments.
Please feel free to send me other resources and corrections to this document by email.