Jump to content
  • Advertisement
Sign in to follow this  
game of thought

how to unlearn a language

This topic is 2132 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

for maybe a year now i have been writing very messy code in C++. I like the language but i am beginning to encounter very big problems in my code, mainly due to the way a write it and they way i have learned it. I like C++ and i would like to "relearn". How do you suggest i do that, because i don't think it is as easy as just reading the tutorials over again.

Thank you for your time

Share this post


Link to post
Share on other sites
Advertisement
1. I think the answer to your question depends on what sorts of problems you were seeing in your code that made you want to start over.

2. On your comment "[...] just reading the tutorials over again. [...]", you don't learn programming by reading (or cut-and-pasting) tutorials. If you have been working in C++ for a year, and you are still fooling around with tutorials about language constructs and setting up a class hierarchy or whatever (and not API's or libraries etc., which is a different story) then you are doing it wrong. I'm not saying that you should have learned the whole language in a year (which, depending on what you mean by "learning the whole language" is more-or-less impossible for C++) but you should concentrate on learning enough of the language that you can work independently on projects where step 1 is not cut-and-paste someone's code from the internet. Edited by jwezorek

Share this post


Link to post
Share on other sites
Read Thinking in C++.
Check out the online C++ FAQ Lite too. http://www.parashift.com/c++-faq-lite/

Read lots of books about writing software, for fun, over time. Maybe something like CODE COMPLETE too. Don't focus on game books. You will need complete knowledge of C++ to make anything worthwhile, game or not.

Share this post


Link to post
Share on other sites
I reccomend getting a good book about C++ programming patterns and object oriented design. There is a lot of nice youtube series dedicated to solely this. Also, try to get a book updated to the neew C++11 standard and read through it. Practice every day. My goal is to make one small simulation every day that is useful using good object oriented design. Also, read the books servant of the lord mentioned. They are awesomesauce.

Share this post


Link to post
Share on other sites
Messy code means you have some code design issues, because most programming language have some very basic concepts in common. But every language has its own strengths and weaknesses. You have to play for what c++ offers you and for that you must know some design principles. Read Effective C++. Hope that makes your messy programs go away :D

Share this post


Link to post
Share on other sites

Messy code means you have some code design issues, because most programming language have some very basic concepts in common. But every language has its own strengths and weaknesses. You have to play for what c++ offers you and for that you must know some design principles. Read Effective C++. Hope that makes your messy programs go away biggrin.png

Most programming languages actually share most of their concepts not just a few basic ones, it is the syntax that's different and what's considered to be part of the Standard Library that wildly changes between languages.

For example I hadn't touched Python ever two weeks ago, but I have been programming in C++ and C# for years and I feel fairly confident about my ability to solve a non trivial problem in python after two weeks. I know Python is easy to learn(and there is stuff I don't like about the language, like duck typing and no headers), but this concept goes for other languages as well. As soon as you get fairly competent in one language switching to another one that doesn't use a different paradigm should be really easy once you get the syntax of that language.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!