Development Environment

Unix style operating systems are the standard both in academia and in industry. In this course you are free to use whatever tools you wish for completing the assignments. However, the assignments will be checked under the CSC system so they should work there. Further, as a computer science student it is important to have at least a basic knowledge of development with unix style tools. Therefore it is strongly recommended that you use this course to familiarise yourself with developing under Unix.

Linux is a free open-source unix flavour that can be installed on a large variety of different platforms. There are several different distributions available, one popular provider is Ubuntu which is used throughout KTH. If you are using a different OS such as Microsoft Windows you can create a dual-boot installation through these instructions.

A programmers main tool is the editor. There are several different choices of free open-source editors the most popular being emacs and VIM which are both included with most Linux distributions. Good knowledge of ones editor of choice can significantly increase efficiency in writing code. Both emacs and VIM can be quite daunting when you start however once you get going you will really appreciate their efficiency.

The first part of the course will focus on the propertary language Matlab which is provided with the KTH program distribution. In the second half of the course we will use C/C++. There are several commercial and free compiler suites however the free GNU-GCC is quickly becoming de-facto standard and is also included with every Linux distribution. All the examples in this course will use GCC.

Integrated Development Environments (IDE) are program suites that integrate many different parts of the development chain by merging editor, compiler and debugger into the same interface. Such tools can provide a very efficient workflow to create programs. However, IDE’s tends to “hide” a lot of what actually goes on in the background many things which are essential in this course. This course is not about developing fancy program but rather about learning the tools for developing fancy programs. Therefore avoid IDE’s when doing the course work.

Virtual Machine

A different possibility to get a Unix environment running on your machine is to use a Virtual Machine. By following the instructions below you should be able to set-up a virtual machine running Ubuntu with all the necessary tools installed for doing the labs and project assignments.

  1. Download and install VirtualBox on your machine
  2. Get the course Virtual Machine (I will hand out a few DVDs in the lectures for you to share)
  3. Open VirtualBox and select “Import Appliance” from the “File” menu
  4. Select the “.ovf” file from the DVD and follow the instructions on the screen (this might take some time)
  5. Start the Virtual Machine “Ubuntu” from VirtualBox
  6. Log in as user “EL2310
  7. The keymap is set to UK, if you want to change that you can do so in the preference pane.

Due to licensing issues we are not allowed to distribute Matlab as part of the Virtual Machine. You have to get Matlab from the KTH distribution on your own.

OS X

If you are running OS X you are actually using a Unix system. OS X was derived from UC Berkeley’s own Unix distribution referred to as BSD and all the tools that we are using can be used under OS X. However, there are a couple of things to set-up first.

  1. Locate and open the “Terminal” program in /Applications/Utilities/
  2. Dependent on the version of the operation system gcc might or might not be installed. Test this by executing gcc.
  3. If gcc is installed you should be able to compile and run programs. If gcc is not installed you need to install the developer tools from the OS X DVD that you got with your computer
  4. In order to be able to do the C Project you will need to install the SDL libraries this can be done through MacPorts.
  5. Follow these instructions to install the package manager and then proceed to install SDL by the port libsdl.
  6. If everything was done correctly you should be able to compile and run the base-files for the C-project.