Search code examples
c++cgi

Project ideas to become good at C++


I want to get into C++ team at work. Their job is to write CGIs in C++ (mainly but not limited to). I know basic C++. Reading the list at C++ book guide question on SO, I've got three books from a friend (I actually had the first one).

  1. The C++ Programming Language - Bjarne Stroustrup - for reference
  2. C++ Templates The Complete Guide - David Vandevoorde / Nicolai M. Josuttis
  3. Modern C++ Design - Andrei Alexandrescu

  1. I would like to know if there are any projects or ideas you can tell me that I can implement so that I get better at it.

  2. The setup I need. I have a Macbook and a personal crappy Ubuntu dev server machine. I can bootcamp to install any OS if need be.

  3. Can you please also give me some suggestions on how to begin writing CGI (or any tutorial)?


Solution

  • Let me add to your list of reading material; the C++ FAQ Lite is absolutely the best resource for learning the ins and outs of C++. It is useful both as a reference for old timers and as an introduction to beginners. I would strongly recommend reading as much of it as you possibly can, and try small examples that demonstrate each feature mentioned before joining an actual project.

    Once you feel somewhat comfortable in the language, then I would recommend taking a look at Github and seeing if there are any C++ projects that are in need of some help. As for the computer generated imagery or the common gateway interface, both of these are language agnostic. These can be written in any programming language, though different programming languages will have different existing libraries for handling them. I suggest you read up on the subject to better understand the standard/algorithms (depending on which of the two you had meant). Once you are more familiar with the subject, you should be in a better position to understand the documentation of relevant libraries.

    As for the development environment, I find that Ubuntu is the easiest one to configure, because almost all setup can be reduced to a series of apt-get install commands. For example:

    sudo apt-get install build-essential
    

    Regardless of which OS you use, you will probably want to build and run your code in a predictable, reproduceable environment. I should also point out that the environment that you develop on does not need to be the same as the one on which you actually build and run your code. For example, you could write all your code on Mac OS X, but build and execute your code in a Docker container that is running an Ubuntu instance with your preset, reproduceable build/run configuration.

    In terms of resources to implement CGI in C++ (and for other code), please check out the C++ resources page on my website. It lists several tools for networking, computer graphics, and other C++ tasks, as well as general purpose libraries such as Boost and Qt.