tags:

views:

246

answers:

5

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)?


Thanks a lot.

AJ

+2  A: 

in my opinion if you make some small project using

you can get into the advanced C++ topics like expression templates. the project even does not have to do anything useful, as long as you are able to put pieces together to produce some output.

if you know some C++, you can have a lot of fun pushing language to limits with phoenix alone.

as far as ideas, CGI is likely to be heavy in mathematics, try for example writing parallel integration algorithm using expression templates.

for example, you can create syntax like this:

integrate(x*x + sin(x), 0, 100, threads(4));
aaa
But he wants some ideas...
thyrgle
+4  A: 

The best way to become better at C++ is... writing C++ code. Start with a simple raytracer without any external dependencies (just write output to a PPM file).

  1. I think this is an interesting enough problem and will let you get started with the language core,
  2. The lack of dependencies will reduce distractions with potentially complex third-party library idioms which you can't appreciate yet and annoying things like libraries and linking. Plus, you will have less C++ quirks blow up in your face.

Build on that after you have more experience. Go back, refactor your code, add more complex features, third-party libraries (e.g. write a JPEG output, start using bits of boost, like smart pointers).

Rinse, repeat.

Alex B
+3  A: 
Michael Aaron Safyan
I am fairly certain he meant computer graphics CGI
aaa
@aaa, oh. Why is computer graphics "CGI" and not "CG"?
Michael Aaron Safyan
@Michael: Computer Generated Imagery. However, I too think that the OP meant Common Gateway Interface. It's certainly hard to tell.
James McNellis
+1 C++ FAQ Lite's a good one.
hlynur
I like the idea of finding projects that need help. Really liked it but do I need to take care of the environment. I have a Mac. Should I switch to Ubuntu for those projects?
AJ
@AJ, it depends on the project, but most projects that target Linux tend to target UNIX, in general, which includes Mac OS X, rather than Linux, specifically. In either case, see my setup guide: https://sites.google.com/site/michaelsafyan/setup-guide
Michael Aaron Safyan
+2  A: 

answer to the title of the question :) assuming C++03

From Bjarnes website:

1. New learning

2. Principles and Practice Using C++ (Should give ideas about short programs/projects)

3. Learning and teaching C++

And yes, have a good reviewer by your side if you have to learn good C++. Keep a copy of the relevant standard handy (open-std.org)

Chubsdad
+2  A: 

Read the book 'Effective C++' by Scott Meyers. It's excellent, and will give you good advice on best practices and stuff to avoid.

C Johnson