E
eli m
I am coming to C++ from python. Do you guys have any tips for me? Examples: How to learn it effectively, what not to do, etc.
eli said:I am coming to C++ from python. Do you guys have any tips for me?
Examples: How to learn it effectively, what not to do, etc.
I am coming to C++ from python. Do you guys have any tips for me? Examples: How to learn it effectively, what not to do, etc.
I am coming to C++ from python. Do you guys have any tips for me?
I am coming to C++ from python. Do you guys have any tips [...] ?
Hi
1. At first you should understand the common property
between C++ and Python is both are programming languages, period.
[...]I am coming to C++ from python. Do you guys have any tips
for me? Examples: How to learn it effectively, what not to
do, etc.
2. You should never learn "Modern" C++ with a book that was written before
1997. My recommendations:
1) Andrew Koenig & Barbara Moo. Accelerated C++, Addison-Wesley, 2000.
2) Bjarne Stroustrup. Programming: Principles and Practice in C++,
Addison-Wesley, 2009.
3) Bjarne Stroustrup. The C++ Programming Language, Addison-Wesley,
2013. (Coming soon)
4) Stanley Lippman, Josee Lajoie & Barbara Moo. C++ Primer, 2012.
5) Bjarne Stroustrup. The C++ Programming Language, Addison-Wesley,
special edition, 2000.
At this time, the point is: use C++98 or C++11, the books
1, 2 and 5 are based on C++98 and 3 and 4 based on C++11.
of course there other good books. I believe the book #1 and #2
are really good. #1 is concise and #2 is very detailed about
programming not C++.
4. Use modern C++ programming environment.
My recommendation:
- Visual Studio 2012, Visual Studio 2010 (Windows)
- Code::Blocks (Linux/Ubuntu)
No pun intended, but there's actually a book called "Effetive C++",
which is actually quite good. It's not a total beginner's book, as it
assumes that you have at least some knowledge of C++ already, but I would
say that you can actually learn quite a lot on-the-fly while reading the
book and finding out what it's talking about. Probably better than by
reading some beginner's book. (What makes this a better way of learning,
IMO, is that it goes right to the good stuff, rather than spending
hundreds of pages on trivialities and teaching bad habits, like most
beginners' books do.)
I don't know. I use Visual Studios 2012 (at present) under
Windows, because that's my employers standard; I've always used
vim, bash and makefiles under Unix. And the vim, bash and
makefiles environment is far more productive than the Visual
Studios environment.
But if you are already an experienced programmer,
it's probably worth your while to learn how to use more powerful
tools; there's just so much you can't do in Visual Studios (or
in any of the IDE's
Could you elaborate please? What makes the listed things more
productive? (Or did you meant it for yourself only based on familiar
ground, not in general?)
Juha said:One thing about Unix, especially modern Linux distros, is that it has
been kind of designed for development, unlike Windows, which has been
designed as a graphical user interface, with little regard to anything
else.
Jorgen said:Hopefully he did, or I'd have to start an Emacs-vs-Vim war ;-)
Unix versus (other) IDEs has been discussed continuously for as long
as I can remember, and it never leads anywhere. It's near impossible
to find someone who knows both worlds well enough to have a useful
general opinion, and if such a person exists she can't prove it to us.
Personally: my workflow combined with a decent Unix environment
doesn't feel limiting. And I don't think it's because my brain is
wired in an unusual way. Can I switch to an IDE and change my
workflow to become even /less/ limited? No idea; it would take years
to find out, and I'm not prepared to make that huge investment with
an uncertain outcome.
Also, I've never seen anyone do anything with an IDE that I couldn't
do as well or better. (That's not proof, because most people seem not
to use their tools efficiently at all, no matter what the tools are.)
I do most of my work in NetBeans.
Juha Nieminen wrote: ....
That comment shouldn't be specific to Linux, most modern UNIX systems
are equally, if not more, developer friendly.
Apart from the *BSDs, not in the sense that JN meant. Are there
really any left, anyway?
Jorgen said:Apart from the *BSDs, not in the sense that JN meant. Are there
really any left, anyway?
Unix versus (other) IDEs has been discussed continuously for as long
as I can remember, and it never leads anywhere.
It's near impossible
to find someone who knows both worlds well enough to have a useful
general opinion, and if such a person exists she can't prove it to us.
Personally: my workflow combined with a decent Unix environment
doesn't feel limiting. And I don't think it's because my brain is
wired in an unusual way. Can I switch to an IDE and change my
workflow to become even /less/ limited? No idea; it would take years
to find out, and I'm not prepared to make that huge investment with
an uncertain outcome.
Also, I've never seen anyone do anything with an IDE that I couldn't
do as well or better.
(That's not proof, because most people seem not
to use their tools efficiently at all, no matter what the tools are.)
On 3/7/2013 9:10 AM, Jorgen Grahn wrote: ....
IDE is not supposed to be a silver bullet, but to save time wasted on
switching tools and views.
I just HATE to see some piece of info on the
screen ad being forced to select, copy, paste it to some other place,
enriched with some commands instead of being able to just do it on spot.
And in work I have a ton of such activity.
Yeah, Iwas pretty shocked to observe that with all those supposedly
excellent unix-based tools my colleagues (who were linux guru level)
could not do as much as walking a list of compiler errors with F4 --
instead had to do actions to open the related sources and navigate to
lines. :-((( I thought we left that behind in last century.
The above was just a statement about what I've seen -- not
a statement about what IDEs are good for.
The counter-argument: when I do stuff in a shell I can use any tools I
want, not just the ones the IDE maker thought of. And I can write my
own.
I also use the shell history and its search functions (e.g.
Ctrl-R in bash) a lot, so I never have to type the same thing twice.
Linux "gurus" know that Emacs does this by default. Either they
felt this was unimportant to them, or they were just wannabes.
To me, that shows how hard it is to discuss this. You are shocked by
that, but I on the other hand don't feel a need for such a tool. I
just look at the first few errors, or the one I know is the core one,
and recompile[1].
You can't look at the tool without taking the /workflow/ into account.
[1] Compilation must be fast, correct and free from noise for this to
work.
....On Fri, 2013-03-08, Balog Pal wrote: ....
To me, that shows how hard it is to discuss this. You are shocked by
that, but I on the other hand don't feel a need for such a tool. I
just look at the first few errors, or the one I know is the core one,
and recompile[1].
It probably fits some workflow when you concentrate on a few-line
change. I'm currently reshaping an old codebase that's over 1MLOC in
size. Would be dead in the water if could not navigate error
or search
locations at once anywhere in the ~3300 files.
But even at the smallest scale I never got the idea what is good to type
(or even fetch from history) a filename in the project to open it manually.
Switching views in a non-IDE is Alt-Tab or equivalent, but I have not yet
found convenient ways to switch views inside an IDE without reaching to
the mouse.
The history of debug launch commands with different command-line
arguments is still missing in my primary IDE
, after 10+ years. I have
resorted to starting the program from the bash command-line, then
attaching the debugger, but this is cumbersome as well.
+1 for that, having multiple CygWin bash shells running all the time. But
I would not be so sure which one is primary and which is supplement.
Ironically, this is the only reason I launch our chosen Linux IDE
(CodeBlocks, and I did not choose it) - the only thing which it is good
at is navigating to errors (editing sucks, debugging does not work at
all, compile without attempted recompile of earlier dependencies not
possible, find-in-project-files missing, recently edited windows list
missing (i.e. Alt-W-2 not working), etc.), so the only use is actually to
fix some random compilation errors time after time (usually caused by so-
called "MS language extensions" compiling fine on Windows and failing on
Linux).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.