Skip to content
tsirif edited this page Oct 5, 2014 · 3 revisions

General Topics

###4. Tools

This chapter contains information about software programming tools in general and tools for C++ programming in specific.

Version Controlling

A developer team needs to keep track of the changes in the project's source code and also a way to easily distribute code to its members and contributors. One solution to this, is saving your source code in usb flash drives along with the date that the change was made and then... NO this is way too messy. A modern solution to this, is getting an account on a cloud service such as dropbox and sharing with your teammates... NO. There would just be too many files.
The correct way to distribute code is through the usage of a version controlling system. There are many systems out there that are used for our convenience (almost). They are mainly open source which was the whole point in developing a version control system. Most popular are SVN, Mercurial and Git. In Pandora currently we are using Git for this purpose. Git is very powerful software written by the most eccentric of all, Linus Torvalds, and is designed to give developers great features on project management.
Here is the official site. And here is a useful tutorial on branching! It is crucial to master git's basics as soon as possible because you don't want a version control system to hinder your developing productivity, as well as the co-workmanship.

Apart from version control software, there are also cloud services that implement VCS in order to save your work remotely. Check out GitHub which Pandora uses and which is the site that you are currently at :P . Go and make an account now if you haven't already made one and make it your official programmer profile too! It is most convenient if you are a student because it gives you 5 private repositories. Check: https://education.github.com/

IDE

Integrated Development Environment is basically a text editor decorated according to a programmer's needs. There are just too many to choose from. I will write some names here sorting them from simplest to most complex.
vim
geany
qt-creator
eclipse

Compilers

In C++, I favor these two compilers: GCC and Clang. GCC is the most compatible of all compilers and it accounts almost 30 years of experience and continuous work on it. Totally reliable. CLang is a relatively new compiler that cannot compete with GCC on terms of how many software is compiled with. It provides nice static analysis though. Pandora is finalized on GCC.

Debugging

As a debugger, which is a hardship that one must carry if software has erroneous behavior or - worse - fatalities, one can use the integrated debugging tools with IDEs such as Eclipse for example. But one who wants keep it simple and separate, can use GDB (whose name is unorthodox because it is not DBG instead :P ) or KDBG, which is dbg - fuck! - ... gdb with gui.
And then there is Valgrind which is for hardcore dynamic debugging! It is useful when trying to find the source of a memory corruption, as it tries to write down all changes in related memory assigning them time-stamps in real time execution.

Build and Testing Automation

Finally, in order to be able to co-operate and realize the agile programming scheme we use tools to help us build and test, clean and fast. These tools also try to organize our project needs.

First, i will mention CMake which is a scripting language used to organize the compiling and building process of a process. It includes commands for creating libraries out of source code, for exporting, for linking, for compiling, for creating executables, for testing and others. One should write a CMakeLists.txt too with each software because it is the developer who knows how his software should be built.
http://www.cmake.org/

Next, there are tools that invoke CMake commands automatically when an event occurs, thus taking building automation to its fullest. This is what continuous integration, which was discussed previously, is all about. CI tools organize building and decouple completely (almost) the developer from constantly checking code's health. As CI is most modern way to organize your developing process, there are not many tools that utilize this. Some tools are: Jenkins, Travis and Buildbot. Currently, Pandora uses Jenkins for module integration and Travis for system integration. All these frameworks work in conjunction with version control tools (e.g. with Git and GitHub) and are able to get a lot of plugins for enhancing the experience, such as tools that provide code statistics, static analysis, testing coverage and documentation generation. Having said that...