Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I've read various bits and pieces on concurrency, but was hoping to find a single resource that details and compares the various approaches. Ideally taking in threads, co-routines, message passing, actors, futures... whatever else that might be new that I don't know about yet!
Would prefer a lay-coders guide than something overtly theoretical / mathematical.
Thank you.
I recommend An Introduction to Parallel Programming by Pacheco. It's clearly written, and a good intro to parallel programming.
If you don't care about something being tied to a language, then Java Concurrency in Practice is a great resource.
Oracle's online tutorial is free, but probably a bit more succinct than what you're looking for.
That being said, the best teacher for concurrency is probably experience. I'd try to get some practice, myself. Start out by making a simulation of the Dining Philosophers problem. It's a classic.
At first, let's see if you're interested in the topic or not. To grasp a big picture about concurrency, best practice is to take a look at operating systems books, like Operating systems internal by Stalings or Modern operating systems by Tanenbaum. They can give you an intuition about what this is all about.
There's also an old book, named Concurrent programming by Ben-Ari. If you found it, it can be helpful.
Beside reading text books it's good get your hands dirty by writing some concurrent programs. Python is a very good choice if you want to start using threads. Every Python book has a part dedicated to this topic. Also a with a simple search on the web you can find a lot of resources about it, but I give these two higher preference:
Multithreaded Programming (POSIX pthreads Tutorial), A very comprehensive introduction to concurrency and multi-threading. It's mainly about C multi-threading.
The other one is Thread Synchronization Mechanisms in Python.
Now if you still find yourself interested about concurrent programming, it's time to go deeper. You almost have the basic knowledge of concurrency, now the best approach at this point is to start solving problem and become familiar with patterns. To achieve this goal, you can use The Little Book of Semaphores. It's one of best books in the field and it's also free. This is a book that can head you toward becoming proficient at concurrent programming.
These should be enough if you want to approach concurrent programming, but if you have enough time, and you're eager, it's good to take a look at some other paradigms of concurrent programming, like actors which are used in Erlang. I say it is worth to read some chapters of the book Seven Languages in Seven Weeks, especially chapter about Erlang and IO. At first glance, it might be hard and strange, but it's good to become familiar with other solutions to concurrency.
I would recommend Concepts, Techniques, and Models of Computer Programming from Peter Van Roy and Seif Haridi. All the major programming techniques have a follow up sections on concurrent programming. Also the author starts with basics and defines the main concurrent programming concepts, their shortcomings, all accompanied with examples in Oz programming language.
If you happen to be a C# programmer or maybe someday, I highly recommend this tutorial series by Michal Habalcik.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm a practicing C++ programmer (on Unix and gcc 3.x) for the past 6-7 years. I've read Scott Meyer's Effective C++, More Effective C++ and Effective STL cover-to-cover and have lived and practiced his suggestions/techniques along with Boost. I would like to move on to the more advanced aspects of C++ - something along the lines of 'Modern C++ Design' by Andrei Alexandrescu. However, before starting to read this, I am wondering if I should spend time reading Herb Sutter's Exceptional C++ books as well. How would you compare the Effective C++ series with Sutter's books?
Thanks a lot in advance for your response.
Read as much as you can - differing perspectives are always valuable.
Yes, absolutely. Herb Sutter covers a lot of very important, but generally poorly understood areas of the language and provides lots of useful guidance for writing more robust code.
While it's true that much of the material originated on the gotw site, it is expanded and better organized in the books. If you can answer all of the problems correctly then you find that you are very rarely faced with code that you don't understand why it behaves like it does. You may also find yourself heading off many potential problems that you spot in code before they become real issues.
I got a lot more out of the Exceptional C++ books than I did out of Effective C++, but this is going to be a very personal thing.
Frankly, Herb Sutter yanks a lot in the exception safety ever since the introduction of the idea in one of the journals of the pre-2000 age. The fact he used it a lot on replication and transactional systems makes sense, and unless you are a huge follower and interested in only the software of such 'safety' kind you will be bored to death. Meyers is far more practical and engaging.
Besides, if you want to move on, there are other books in the series, notably from the legends and not the writers for the sake of writing. Look up the bits from Nicolai Josuttis (C++ Templates: The Complete Guide), Aleksey Gurtovoy (C++ Template Metaprogramming) and more recently 'Daddy 2' Stepanov. In my opinion, they are more influential, knowledgable, practical and shaping than anything DDJ or exception safety induced writeups...
And of course, if you ever need to go back to basics (and there is always a reason to), one of the best possible books on the subject is by the daddy himself: The C++ Programming Language (most underestimated and skimmed over book out there).
Read The Definitive C++ Book Guide and List. "Exceptional C++" is on the list.
I like the C++ Coding Standard book because it's just that, a coding standard.
Effective C++ introduces important ideas, and was my first read too. C++ Coding Standards however is shaped like a coding standard, which any person programming should have. There are a number of other coding standards available, Sutter's one has the advantage of being concise and well explained (only 100 items very neatly classified).
I would take the time, if I were you, to read the C++ Coding Standards and the Guru of the Week entries before moving on to meta-template programming.
Meta-template programming is interesting. I loved Modern C++ Programming and its approaches. However it is less used in practice I think, strengthen the basics as much as you can, then you can always play around with 'new' ideas.
I would absolutely recommend the Exceptional C++ books if you're looking to move into more advanced C++. My sense from reading both series is that the Effective C++ books tell you how to write code that doesn't completely suck, and the Exceptional C++ books tell you how to write code that's rock-solid and bulletproof. I was less taken with Modern C++ Design; if you want to get into serious template metaprogramming it's pretty much the definitive work, but I found it a little... out there for my taste, particularly where he builds this gloriously complicated template structure that'll bring tears to your eyes with its sheer beauty, and then mentions "Oh yeah, this doesn't actually work on any compiler that's currently available".
I found both books interesting and useful. There are lot of common topics and you might already know them, but certainly it will help.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am a relatively newbie in C++ and have worked in the game industry for a few months. I am looking to get back into the industry and understand that one needs to be a very good C++ programmer (mainly because of how competitive it is to get into making games). I was wondering if there are any really good websites online that would help with that. Basically I am looking for something that would help me master C++ concepts and help me be a good coder through practicing programming examples.
Scott Meyers' books: "Effective C++", "More Effective C++", and "Effective STL" are absolutely essential for you.
Add to that "Modern C++ Design" by Andrei Alexandrescu.
Someone once said that it takes 10 years to learn C++. Having 14 years of C++ experience and still regularly learning new things, I'd say it's true. I would hesitate to call myself a C++ expert even after my considerable experience. Don't expect to master it overnight... you will go through many phases where you think you get it, then you'll discover a whole new world (for lack of a better term; I believe Richard Dawkins refers to this process as "conciousness raising"). I've come to accept that another one of these epiphanies is always ahead of me, hence why I'm not calling myself an expert.
That said, you must practice practice practice. I'll 2nd (or 3rd, or 4th, whatever we're at now) Gamedev.net. I spent a lot of time there back in the day...
GameDev.net.
In Resources, there is a "For Beginners" section. Read through all of this!
C++ FAQ Lite is good. You can learn a lot from that website and there is also a related book which is also good.
The books by Scott Meyers contain very good specific advice too.
C++ is a great language and I love it. It builds ridiculously fast code. With good use of profilers, profile driven optimizers, intermodule optimizers, const and restrict keywords, MMX/SSE/vector intrinsics and other stuff it can build ludicrously fast code.
You probably have your eye on job listings from the bigger game companies and there is a lot of C++ demand.
That said, it isn't the only way to develop games. I just want to present some alternatives.
Microsoft's .NET stuff works pretty well. Check out their XNA platform.
You can also write awesome games even in Java. There is a Java version of Quake2 that can get 1,000 FPS in some areas on my Core I7 system at home. Most of the heavy work is in the OpenGL and graphics drivers of course.
Tons of people are writing fun games in Flash, which has language performance much worse than Java or .NET.
I totally recommend Brucke Eckel's: Thinking in C++
You can download for FREE at his webpage.
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
That should help you master C++, from there, you can start reading code from engines, like Ogre3D, that would be a better learning.
Later, you should check out books from GameDev.net, they are really cool. But in my opinion, the articles found in GameDev are outdated.
www.gamdev.net is an excellent resource for game programming.
I would also recommend the Game Programming Gems Series.
As far as mastering C++ concepts, who better to learn from than the guy who created C++?
He wrote this: C++ Programming Language
One way to get back in and have fun at the same time is to go through Nehe's OpenGL tutorials, or by using higher-level gaming frameworks such as Irrlicht or Ogre3D
You should check out wildmagic at http://www.geometrictools.com/. This is a nice game engine with lots of sample code and related books. I'd highly recommend it as a deep examination of game engines on c++.
I learned C++ (having no previous coding experience) with the following books:
"C++ Without Fear" by Brian Overland
"Sams Teach Yourself C++ in 24 Hours" Fourth Edition
And
"Beginning Game Programming through C++" Second Edition by Jonathan S. Harbour
The first one is very good and ver detailed, if a bit slow to read. The second I use mostly as a reference, the last one is very useful and quick to read, but it uses the phrase "beyond the scope of this book" fairly often.
The C++ Programming Language
by Bjarne Stroustrup.
I use this to this day. It contains succinct descriptions of all the features of the C++ language. When I search on the web for this information, it's flourished beyond clear understanding. Bjarne did a really good job of clearly defining all the principles of the language, and it's a must-have. I haven't read the whole book, but I've read sub-sections.
(Also gave a vote up for Effective C++, Effective STL, and Exceptional C++ (Sutter))
The above are good suggestions for learning C++ and games...
I will give you a recommendation for software if you just want to make games without a lot of programming background...
You could quickly make simple games and then learn the C++ and other languages it really takes to make serious games...
Software:
Gamemaker
http://www.yoyogames.com/make
The Games Factory 2
http://www.clickteam.com/eng/tgf2.php
Books
Picture Yourself Creating Video Games, 1st Edition
Awesome Game Creation: No Programming Required, 3rd Edition
Make Amazing Games in Minutes, 1st Edition
Good luck to you...
I'd recommend starting with the basics:
The C programming language, by Kernigan and Ritchie.
With this book you'll be closer to C's internals than with others. Then you can go with C++ books.
I've studied C++ as a college course. And I have been working on it for last three years. So I kinda have a fairly good idea what is it about. But I believe to know a language is quite different from using it to full potential. My current job doesn't allow me to explore much.
I have seen you guys suggest studying a open source project and perhaps contributing to one too. So my question is, can you suggest one(of both?) to start with that is simple and doesn't overwhelm a starter.
I was in the same situation 12 years ago when I got my first programming job out of college. I didn't do any open source but I managed to gain a lot of practical and advanced C++ knowledge by reading books (the dead tree kind).
In particular, there was an excellent series by Scott Meyers which I feel helped the most in turning me from newbie to professional:
Effective C++: 55 Specific Ways to Improve Your Programs and Designs
More Effective C++: 35 New Ways to Improve Your Programs and Designs
Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library
The topics in these books range from beginner to advanced. It took me about 2 years working in C++ to understand every chapter in these books, so don't be disheartened if it goes over your head at some point... just try reading it again later :)
If you're willing to climb the very steep learning curve, I would think that you could do worse than studying parts of the boost libraries. I don't think there is another similar body of C++ code out there that is pushing the boundaries of what can be done in C++.
re project selection: you'll want to hack on something that has some relevance to you, otherwise it's just unpaid work. i might suggest eg. Pure, but will you find enough interest?
re advanced code: see Boost
Obviously learning something like this does not happen overnight; You can study existing open-source projects like other posters suggested. However, I have one more suggestion: I suggest joining one of the big IRC c++ channels (for example #c++ on efnet or freenode). Of course most of the questions / discussions going there are basic; however quite often interesting discussions and questions come up. Over the several years I've learned quite a bit just by participating in channel discussions.
My main advice would be that you do not need to stick to C++ to learn technique.. Study Erlang, Lua, and Haskell (lots of others). You will learn so much from these language that you can apply in C++.
Google protocol buffers is a very well written C++ application that sticks to the features of C++ that are proven in the industry -- i.e., they don't go over the top with features that cause headaches for using the code.
In terms of learning to use C++ to its full potential, well the full potential is often hidden. There are very few exceptional C++ programmers, even in the open-source community. So I suggest you read some books. Like the books from Scot Myers and Herb Sutter (all 6 of em).
Boost is an amazing library and has a lot of good code, ranging from simple techniques to very advanced techniques. It definitely touches all of the bleeding edge of C++ idioms. The problem with boost is, it doesn't work well with modern IDE features (code-completion being the main problem), and it has a LOT of symbols :D. It is the place to learn about generic programming and template meta-programming, the former represents the most advanced and immediately-usable idioms, and the latter you can skip for the immediate future.
Apart from the Scott Meyers books DSO has already suggested: Participate on SO and try to answer other people's C++ questions. If you don't know the answer, wait a little until some good answers are posted. You will probably get some idea where the gaps in your knowledge are and you could do some more reading to fill those afterwards.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I haven't done C++ for about three years and looking to get back and ready. What is the best way? any open source projects that I might want to look at to recall all the details and be ready for interviews?
I started reading (again) C++ Primer 5th edition but was wondering whether there's more efficient way since I did program in C++ for few years before.
Just wanted to add: Does anyone know about open source projects related to finance? (e.g. servers, fix, etc)
I was facing a similiar situation a while back, and my conclusion was - no matter how many smart books you read nothing will suit you better then practicing.
Find some tutorials or set yourself some simple goals and learn by doing.
Hope that helps
PS. A friend of mine asked me once "How do you eat an elefant? - in small pieces, one at a time"
I'd start in on a real project.
If nothing else, download an open source C++ project that's in the same realm as the jobs you want to target, and start modifying. Practice helps more than anything for being comfortable.
If you're going to focus on reading, or in addition to practice, I'd actually focus on reading books that work more on using C++ well, not necessarily learning C++. Effective C++, More Effective C++, and Effective STL are great for this - you'll learn new things while refreshing your old knowledge. You can always use the primer book as a reference to study things you've forgotten as you read about them elsewhere.
Pick something that you know very little about and attempt to make a program that works with that subject area. For example if you've never done GUI work fire up C++ and try to create a simple paint program in the GUI framework of your choice (Qt, WTL, whatever). Or if you've never worked with a database grab SQLite and create a little app that manages your time. Or better yet, combine all these areas into a larger program.
The key is to force yourself to learn how to do real, practical things and solve problems using the languages paradigms. Books are great to reinforce certain practices but they'll never replace hours of frustration trying to figure out why your pointers aren't pointing where they're supposed to.
If you are good at maths (or statistics, probability, finance, geometry) and want to recall how to build re-useable functions, classes, and templates, you are welcome to help us at mathlibcpp. I recommend it, its good learning. Building a complete library on a large subject is very educatively hard ;) I found a chance to use all OO methods I know in C++, even forced to learn more.
Regarding Fix, there is QuickFAST, a very efficient implementation of the 'Fix for streaming' protocol.
Regarding C++, I would look for something that uses Boost, as it seems to be a premiere library for C++ (QuickFAST uses it to some degree).
Check out http://www.topcoder.com. This is an amazing tool for practicing programming in many different languages (C++, Java, C, C#). You can even win money if you get good at it:)
As with anything, write many programs, (re)read the best books (such as Effective C++, already mentioned). :-)
And ledger is an open source finance program written in C++. (GnuCash is another but written in C.)
Most of KDE is written in C++, albeit with Qt's signal extensions. Probably lots of examples of good code there.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
My degree is in Electrical and Computer Engineering but i'm currently employed as a Software Engineer. I took all of the algebra, geometry and calculus classes that one would expect from someone with my degree however I must admit, I think I learned just enough to pass the test but never really saw a use for it and therefore never really retained much of the material.
Now that i've matured some, I see the use for it all of the time. I KNOW that there are lots of places that math knowledge would improve my coding so i'm ready to relearn the old stuff and learn some new stuff.
What are your favorite resources out there? (Resources that can tie math into programming are even better if you have any!) Books? Websites? Blogs?
I found this blog on the subject intresting:
http://steve-yegge.blogspot.com/2006/03/math-for-programmers.html
also has some recommendations for books.
Wolfram MathWorld is one of my favorite resources for all things math. Wikipedia has plenty of math resources as well.
I think these books will help you on designing algorithms:
Introduction to Algorithms
Concrete Mathematics: A Foundation for Computer Science
Discrete Mathematics and Its Applications
Hacker's Delight is a great little book about math and programming. The blurb:
A collection useful programming advice the author has collected over the years; small algorithms that make the programmer's task easier. At long last, proven short-cuts to mastering difficult aspects of computer programming. Learn to program at a more advanced level than is generally taught in schools and training courses, and much more advanced than can be learned through individual study/experience. An instant cult classic for programmers!
I don't use a lot of "real math", but when I need to remember those formulas that I used in school I go to Google. A lot of the results end up Here
Well, there's always Stack Overflow. :) In all seriousness, if you have a specific question that involves both math and programming, you could do far worse than posting it here.
I favourited a similar Stack Overflow question a few weeks back which contains some good info on the subject:
Essential Math for excelling as a Programmer?
Another poster recommended Numerical Recipes in C++ but posted a link to an older version. The newer Numerical Recipes in C++, 3d ed, ISBN-13: 9780521880688, is available and is an excellent resource.
alt text http://ak.buy.com/db_assets/prod_lrg_images/909/204734909.jpg
Knuth. http://www.amazon.com/Art-Computer-Programming-Volumes-Boxed/dp/0201485419
Or as I like to refer to it: The guy that made me realize I hadn't actually invented or discovered anything that hadn't been known for years.
Alot of the best resources have already been mentioned, but since you specifically called out C++ you should have a look at Numerical Recipes in C++, 3d ed, ISBN-13: 9780521880688.
Also, one of the best mathematics resources on the web is MathsChallenge.net, and its companion site Project Euler.
Math Refresher for Scientists and Engineers (by John R. Fanchi)
Just-In-Time Math for Engineers (by Archibald L. Fripp, Jon B. Fripp and Michael L. Fripp)
I really like the book Mastering Technical Mathematics 3rd Edition. It's kind of a bird's-eye view of mathematics with a technical focus. It starts out with such simple concepts as addition and multiplication, but as it explains the concepts it also explains how computers do the calculations. About half-way through you'll find quadratic equations and calculus. Page 442 begins the discussion of "General Time-Space Hypervolume". I didn't see anything about matrix math in there, but for a good "everything about math in a nutshell"-type book it's great.
I've had this type of experience myself...one of the more comprehensive starting points I found was MIT's OpenCourseWare site. They actually offer their entire Mathematics for Computer Science course materials (and a lot of other course materials for that matter) online, and for free. Here's the link to the Math course:
http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-042JFall-2005/CourseHome/index.htm
It's not the be-all end-all of computer math, but it is a great place to get started, and figure out what other research you may need to gather.