Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Possible Duplicate:
Why c++? Where to start?

I consider myself a java and python coder.

For python (usually not so big project but more scripting and fast stuff) I use vim, for java I use eclipse. I think that eclipse is a really gold toy for java programmers. It permits to do refactor and writing code in really easy and funny way. I began to appreciate design pattern and refactor with eclipse features.

Now I'm approaching to a simple c++ project (till now are 10 classes and some more .h with static helper) and I am at half of the project (half of features implemented). It is a project on machine learning stuff in where I'm not a guru and this is my first serious attempt to write c++.

For some refactor (some changes in data structure, like map and set instead of plain vectors, some subclasses and method moving from a class to another, a decorator and a strategy-like pattern, changing in a lot of variable and method names and some types in input method) I've been troubling for more then 2 hours. In java a work like that should be half-hour, 40 minutes maximum. I am exhausted. I am near desperate.

I spend 2 hours in change cpp, compile, switch back in header, change in cpp, waiting for compilation, waiting for eclipse cdt to refactor (eclipse cdt is not ready for c++ refactor at all), compile, remember that I have to change also the .h, switch back, etc...

My methodology is really bad: compiler-driven. I write code, I compile, I check error in compiler output.

Here in cpp time laps are bigger because of much time of compilation and my poor knowledge of language (I had to check on StackOverflow what was the better way to create a vector from map values) is getting thing also worse.

I need advice to improve my methodology, my approach to IDE and my skill in c++.

share|improve this question

marked as duplicate by gnat, Mark Trapp Feb 20 '12 at 18:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

If you're looking to improove your C++ skills you could consider this:

  • Look for a great C++ compiler such as Codeblocks or eclipse.
  • Read as many books as you can find;
  • Work! The best way to learn is to practice. Do this by writing code
  • Find tutorials on the internet. They are helpful.

    I won't go deep through these points as they speak for themselves but these are some basic ways of getting better programming skills when it comes to C++.

share|improve this answer
CodeBlocs & eclipse are not compilers, they're IDEs. –  ddacot Feb 22 '12 at 4:43

You could try using Unit Testing to reduce the amount of time spent in the compile phase.

Take a look at this question on Stack Overflow: Unit testing for C++ code - Tools and methodology

I'm working on a large c++ system that is has been in development for a few years now. As part of an effort to improve the quality of the existing code we engaged on a large long-term refactoring project.

Do you know a good tool that can help me write unit tests in C++? Maybe something similar to Junit or Nunit?

Can anyone give some good advice on the methodology of writing unit tests for modules that were written without unit testing in mind?

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.