C and C++ are not the same language.
blog.directededge.com
blog.directededge.com
For examples, lot of straight C wrapped in Classes, and accessed in a very C++ way. It's appropriate to say C/C++ for these.
I've added C to my list of languages to learn after Python, mostly from recommendation on HN and I want to get into machine learning.
don't hesitate to read engineering texts. the first few chapters of various DSP texts should give you an idea of what to look for ("oh, so it's loops over real-valued vectors! cool!") but if you read EE texts, feel free to ignore complex variables (unless your earlier math text was good enough to introduce them as vectors of two components :-)
An interactive language, preferably Octave/Matlab should come handy.
None of this will make sense right now, but hints are supposed by like that ;-)
--
[Edit: * basic as in naive set theory, ability to reconstruct and prove properties of Real numbers using Dedekin-cuts, basic proof techniques, sequences, series, limits, functions as sets, basic trigonometric functions, the derivative and the anti-derivative, and most importantly understanding the various type of integrals, specially the Reimann. touching "real analysis" from the standard and Non-Standard angles should be enough. All this could be done in 2-3 months with the right texts. This is the minimal you will need to understand things; the basic properties of the logarithms should come handy, specially converting between logarithms of different bases (you will be working on bases 10 and 2, while the natural number is more prominent in engineering than CS.) ]
Let me add that beginners couldn't go wrong with mathematics texts by Serge Lang, first-rate mathematician and master teacher.
I haven't studied math as a student in a while, though I've been doing a topical review via Project Euler.
I know you asked the question to Mahmud, but here is what I think.
To start with, Undergrad texts (the best I've found) to prepare you for Machine Learning.
Calculus (Strang) available free http://ocw.mit.edu/ans7870/resources/Strang/strangtext.htm
Linear Algebra(Strang) not free.
Probability( by Bertsekas a new edition just came out. expensive but VERY good).
Information Theory (also useful in ML) David McKay. freely available at http://www.inference.phy.cam.ac.uk/mackay/itprnn/book.html
Convex Optimizaton by Boyd. (free http://www.stanford.edu/~boyd/cvxbook/). Videos available on the Stanford site. http://see.stanford.edu/see/courses.aspx
Plenty of books at the graduate level - Spivak's Calculus and Rudin's Introduction to Functional Analysis should get you most of the way through mahmud's list of things to learn
After all these, you should be able to pick and choose for yourself. Enjoy!
I hear what you are saying. By "grad level" I only meant that you need to be very comfortable with doing proofs to make any progress. Clumsy phrasing on my part.
I am completely self taught in mathematics (and computer science).I have no real idea what is undergrad level and what is grad level in a real university. It took me a good long while before I tackled Spivak :-D. Apologies for any confusion caused!
How did you get to the point you could tackle Calculus? I still don't know how to convince myself if my answers are correct or if I'm making assumptions that I shouldn't.
EDIT for Reply: Thanks for the link to Strang. I think I'll begin reading it this weekend. :)
After working through Strang's Calculus and learning how to tackle proof questions (strangely enough I got confident enough to attempt proof questions after working through a good chunk of "Concrete Mathematics" (Knuth)) I then found what was impenetrable before in Spivak looked attemptable, if not easy. It helps that the end result of most proof questions are known in advance and the problem is finding/writing down the proof itself.
nce I got to that point, then grind, grind :-P
This is where I stopped reading. He mentioned "modern C++" many times, which actually should mean that C++ moved away from rigid pseudo-OO GoF-inspired structures, Java-style.
Java itself is a simplified snapshot of much older C++ (circa mid-90s) but equipped with garbage collection. Memory management is an interesting, actually, since C++ doesn't rely on heap allocation nearly as much as Java does.
Well, long story short: no, "thinking in Java" is a terrible, terrible way of describing how C++ programming should be done.
Thinking in _modern_ C++ is supposed to feel like you're trying to bolt on Haskell's type system on top of C.
In practice (mentioned this in the blog comments as well) I've found that the C++ world is somewhat divided between what I'll label the Boost and Qt camps.
Boost, as kind of a conceptual child of the STL, has extended more along the axis of exploring what's possible with the language, at times at the cost of pragmatism. The Qt camp, on the other hand, tends to hide most of the heavy use of generic programming in private classes and exposes more simplified APIs, typically with minimal use of templates in public APIs.
I personally, as a former long-time KDE developer, fall firmly in the Qt camp and it shows in the way that I write C++. It's also the style that's been preferred in the two companies where I've been employed as a C++ developer.
Which is modern is mostly a semantic issue. I'd wager that while advanced template programming is more cutting-edge, it's also not in fact the way that very much C++ today is actually written, which is the definition of modern I was working with.
Maybe you could say that I'm in a "camp", but the C++ style that Qt uses is based on the outdated notion that compilers can't keep up with the "modern" features of C++. That style is antiquated.
They also still (with the Intel compiler as a notable exception) generate nonsensical error messages when templates are used heavily.
The latter reason is one of many that a lot of C++ programmers don't do well with heavy template usage. One naturally could fault those programmers, and I think that's half-way fair, but in designing reusable APIs, API usability is and should be a concern. The corollary seems is obviously a bad principle when applied to (graphical) interfaces: if the users weren't so dumb it'd be easy to understand. I believe the same holds true, generally, for API design.
Half-way related, I'm personally quite a fan of Designing Qt-style C++ APIs:
http://doc.trolltech.com/qq/qq13-apis.html
As for "modernness" the point still stands; when some people say, "modern music" they mean "avant garde". Others mean "the stuff on the radio". I mean the stuff on the radio; Alexandrescu is the avante garde.
Theoretically the incomprehensible compiler errors will go away in the next couple years as compiler writers integrate C++0x "concepts."
The most problematic case at my last company was where there were several hundred specializations (just one-liners) one after another in some of the error handling code. Each of those specialized several more templates. I managed to shave a few dozen MB off of the binary size (and remember, larger binaries == more cache pressure) by replacing the templates with a base class and virtual function.
I'd be interested to know what industry those companies are in. Do certain fields prefer one style or another?
At the latter company we had about 30 developers, on average quite good. There were a couple that were into advanced template techniques, but the usage of such in the code was usually quite limited.
My feeling, though this could probably be better answered by folks that are fans of said template techniques, is that the primary usage of such happens in academia and smaller shops.
(Dude wrote the world's first implementation of merge sort. It's saved on paper punch-tape! And he has stuff in one of the 1st 3 Knuth books.)
C++ integration is usually moderately more annoying since once you start moving beyond ordinal types cross-language communication becomes hairier. C ends up being the lingua franca between programming environments a lot of the time.
There is no reason to favor C over C++ when extending a scripting language.
With C++ you often don't need to reach for a heavy and slow language. You'll do just as well for maybe a 2X development speed penalty.
- The set / list difference is noted just below the code samples
in std::cout << "Whoopee." << std::endl; is std::endl putting a newline char after "Whoopee. "?
Anyway in the C example it could have been written puts("Whoopee."); instead of printf("Whoopee. \n"); puts() places a \n after the char * it accepts as an argument.
I'm sorry for the triviality here :)