|
Hey all. So recently I have decided to get back into programming. While this is something I was originally going to delay until school was over, I decided I didn't have to. I have plenty of free time (a lot more since I kinda stopped playing sc2) and I can easily start learning programming.
So a brief history is I have always been fascinated by programming. I took some classes about it which was only HTML/Java. I built a website, I built a few basic things in Java, but I don't remember any of it as I kinda found how we were being taught was stupid. The way we were taught java was some program where we dragged code, didn't type any of it and I mean it was kinda cool I guess, but I really found it dumb for the most part.
I attempted to learn C++ when I was younger at like 13-14, but I was teaching myself wrong. I just wrote the code in the book or watched videos, but I never learned. I eventually would just stop for whatever reason, whether it was because I got into a new game or got bored (was both). Now that I am older (20) I have been learning C++ again off of a tutorial set up by bucky (http://www.youtube.com/user/thenewboston).
For starters this guy does a great job on his videos explaining everything and I am actually understanding what I am doing. It's a lot more fun and again now that I know how to actually use what I am watching and understanding why x happens when you do something is awesome. For some reason whenever I hear his voice though I think of Artosis as a random thing I thought I would throw out there. This can't be just me who thinks so either, maybe I am just dumb but swear to god everytime I hear him I think it's Artosis :D.
I am on lesson 20 on his youtube videos and I have been able to program extremely basic programs, but being able to do my own small thing is awesome.
So far it's only been a week which isn't very long, but I plan on typing a blog every week or 2 with my progress for anyone curious. Now for long term my goal would obviously be to program my own games which is obviously a long way off. I know this, while it would be awesome to start now I know this will take a long time before I can start doing that, but that's my long term goal.
I don't plan on ever working for a game company or anything, it's just going to be a hobby of mine. I am also writing these blogs as a thing I can look back on. While right now I'm not really going to share anything I have made, some point in the future I will be and it would be awesome to look back on as well. If anyone has any questions or anything feel free to ask or not either works!
Thanks for reading! If anyone wants to share their programming of what they have learned or anything feel free, I like to read what other programmers have done (mainly in game development) or their journey!
|
To actually program your own game isn't really that hard.
Even with the most fundamental knowledge in C++ you still can make a text based game where the input is simple commands from the user typing "Move up", or "take candle". You could even make a simple event driven game such as nibbles fairly quickly since there are plenty of examples and explanations on how to this once you mastered the C++ fundamentals.
|
Kyrgyz Republic1462 Posts
I would suggest to drop C++ until it's too late and switch to an easier language. C++ does not seem so bad when you are writing small practice programs, but when you have to deal with a reasonably large project it becomes a nightmare, and it is very difficult to write a good, robust program with no serious bugs or resource leaks.
If you want a taste of what C++ really is like, just take a look at this. If you are still not convinced, here Tim Sweeney (the person behind Unreal Engine) explains why it is very difficult to use languages such as C++ (take a look at slide #29 in particular :-) ), and here John Carmack (Quake, Doom, etc) talks about the incredible amount of bugs his company had found in their C++ code by using 3rd-party code analysis tools.
Just take up any other simpler, higher-level language (Python, Java, C#, whatever). Not only that, but also take some time to understand why functional programming style is very helpful (I think those slides by Tim Sweeney explain that very well) and try to keep to it in your language of choice even if the language is not functional.
If you really want to finish a game project this will immensely increase your chances of success.
|
If he learns C++ well, he can easily switch to Python.
Good luck with programming, just dont give up early, it takes time to become good at it.
|
Let me persuade you to learn a language other than C++. It is not a language that will aide you in development of programmes as a "hobby", though it could help if you decide to take it as a profession.
Learn Python, and try to do some research on functional programming. LISP is a better language for a nearly pure functional programming approach that can be applied to real programmes as well.
Good luck. I would still ask you to change your opinion on C++ and switch to a different language.
Edit: If you do decide to further your knowledge in C++, or any language, I would be glad to help. Feel free to ask for support or assistance if you get stuck.
|
I don't plan on ever working for a game company or anything, it's just going to be a hobby of mine. I am also writing these blogs as a thing I can look back on. While right now I'm not really going to share anything I have made, some point in the future I will be and it would be awesome to look back on as well. If anyone has any questions or anything feel free to ask or not either works!
Then there is absolutely no reason for you to learn C++. C++ is a great language (my first), but it's a very difficult one to master, nay, to even be proficient. There are so many things you need to understand about C++ to even use it correctly, and I highly doubt the youtube tutorials would be sufficient. I've used it extensively in school as well as my previous jobs, and I've had professional training in C++, and I'm still not comfortable using it.
I would strongly recommend Python if you just want to write simple utility programs. For a beginner, Python is a lot more friendly, and it's highly unlikely for you to encounter something that you cannot do due to Python's language features.
If you are keen on studying the C++ language, then I would recommend C#. C# is actually an extremely well designed language that incorporated the strengths of both Java and C++. You can learn tons of pointers, references, object inheritance, object life cycles, scopes, etc. just like you could in C++, and they are a lot more obvious than Java. Linq is also very cool.
|
Like the others above, I think it's a better idea to learn an easier language first, and then if you really see the need to learn c++ do it. You could also get into creating games real quick with C# and xna(though you wont be going deep into the actual engine side of things), you'll be able to something up. Yes Linq is very cool!
I'd advice you to get a book, youtube is nice, but it's no substitute for a book.
|
If programming is just a hobby, I would definitely recommend going for Python or Ruby rather than C++, possibly C# or Java if you want to make some GUI heavy applications quickly.
|
Just started an into to programming class... I have to say that I found thenewboston (yt) to be very helpful also!
|
I've worked for software companies as a programmer, engineer, database miner, and loads of other things. I minored in computer science. I got a 5 the first year that they offered AP Comp Sci.
Programming isn't about learning a language. Its about learning how to find how to.
Stack Overflow. Google. Technet
Learning how to find what you need to solve a problem is what its all about in my opinion. Do I know C++? No. Could I write a program in C++ for a business task if asked by my employer? Yes.
I think you definitely need to learn the basics of one language. It doesn't matter what. Then you essentially know all other languages. Because for any task X that you know how to do in C++, then you can simply google "how to X in Java". There you are now a Java programmer.
|
Hah, what are the odds all these c++ topics come up as I'm picking up the language myself.
I've found that watching videos and just going "uh huh, i know that now. get on with the next topic!" to most of the videos of the concepts they're trying to teach you is the wrong approach to be looking at for programming.
My reasoning for this is that you're not actually doing ANYTHING about the knowledge they're telling you.
I'll tell you what my experience has been recently:
I've been picking up on c++ classes and how they differ from their java counterparts (I work as a Java dev). I knew already the structure of how c++ classes work, what they're supposed to look like syntactically, but semantically, I had no fucking clue.
When it came to instantiating said class, I was lost. I got confused greatly by the usage of header files, file management (when to use *.h files and when to use *.cpp files) and just general simple things like creating objects and having them linked correctly in the language.
After sitting down and trying out coding classes and having them instantiated in different files, I feel like I've learned a great deal MORE than the silly little tutorial on how to write a class. They don't ever tell you the little quirks like when to use headers vs when to use .cpp files or header guards, they just give you the raw data.
The only real way to really pick this up (this applies to anyone who wants to pick up any language, not just c++) is to just code something simple (my coding program I've worked on is a console, text-input based game of casino black jack) and use help when necessary. Once complete, submit your working program's code to a community that cares for code and have them critique your program to learn valuable insights into what you're doing right and what you're doing wrong, and use that knowledge for your next, and more expansive and more difficult program. Eventually you'll be able to competantly do the basics and even some of the advanced stuff without worrying about whether you're doing it right or wrong, because of all the valuable feedback, you know the best (or better) practices of how to do something.
It is usually a good thing to post your program onto multiple different communities that can help out, as some communities may not give as good advice as others, or they may frown upon a certain coding style etc etc. The more places you can get feedback for it, the better. There's countless "learn programming" communities on reddit for instance if you search for them. They would always be willing to critique. :D
Hope this helps.
|
If you like technical details and abstract math you should definitely stick to c/c++ (or even try assembly). They're easily the most fun programming languages. If you get frustrated easily you might want to consider switching to an easier language though.
|
Wow so many comments that you shouldn't do C++.. Its up to you if you want to switch languages, but if you want to stay with C++, I would recommend you the book "C++ Accelerated" by Andrew Koenig and Barbara E. Moo. I got it recently as I'm learning C++ beside my CS Degree(we learn Java). It teaches you the language in an other way than you would expect. Instead of trying to teach you all the little details, it gives you the basics you need to know(while still giving you an explanation of why and how something works) and then goes on to use the all the good stuff and tools in the standard library of C++ to enable you to write useful programs right from the start. And only later on comes back to the tiny details of the language. As you say you want to do programming as a hobby, I think this approach would suit you really good.
|
On November 08 2012 22:00 Smancer wrote: Learning how to find what you need to solve a problem is what its all about in my opinion. Do I know C++? No. Could I write a program in C++ for a business task if asked by my employer? Yes.
Then you are probably a bad programmer and a even worse code maintainer. It's like saying you can create a professional software without knowing a modelling language. Everybody can but it's not about being good enough, it's about being efficient enough and not understanding the solution you copied from someone else is bad. BAD.
|
On November 08 2012 20:58 Unshapely wrote: Let me persuade you to learn a language other than C++. It is not a language that will aide you in development of programmes as a "hobby", though it could help if you decide to take it as a profession.
Learn Python, and try to do some research on functional programming. LISP is a better language for a nearly pure functional programming approach that can be applied to real programmes as well.
Good luck. I would still ask you to change your opinion on C++ and switch to a different language.
Edit: If you do decide to further your knowledge in C++, or any language, I would be glad to help. Feel free to ask for support or assistance if you get stuck.
I'm learning Javascript as my first coding language, but I see many here promoting Python, should I switch to Python?
|
On November 09 2012 01:12 Otolia wrote:Show nested quote +On November 08 2012 22:00 Smancer wrote: Learning how to find what you need to solve a problem is what its all about in my opinion. Do I know C++? No. Could I write a program in C++ for a business task if asked by my employer? Yes.
Then you are probably a bad programmer and a even worse code maintainer. It's like saying you can create a professional software without knowing a modelling language. Everybody can but it's not about being good enough, it's about being efficient enough and not understanding the solution you copied from someone else is bad. BAD.
I thought exactly this when I read that guy's post. Especially when talking about C++. If you think you know C++ pretty good, you're just kidding yourself. It's impossible to intimately learn as a hobbyist.
My opinion on programming language choice is also not C++ because of the complexity and pointlessness.
As a hobbyist you should really look at Ruby/Java/C#.
Java if you like mobile development, Ruby if you like linux/web development, and C# for Windows Gui programs. I've programmed in dozens of languages but I find the level of productivity of these languages for their respective listed tasks quite nice. If you choose Ruby send me a PM and I'll get you up and running. By far my favorite language these days.
|
On November 09 2012 01:49 Recognizable wrote: I'm learning Javascript as my first coding language, but I see many here promoting Python, should I switch to Python?
Depends what you want to make. Python is a great all around interpreted language. You can make basic games, library support is great. But if you're learning Javascript, you are probably interested in web, and for that I'd highly recommend Ruby / Ruby on Rails over python.
|
Xzibit would be tripping balls if he learned C++
"yo dawg we put functions in your pointers so you can return pointers to arrays of pointers to class objects whose constructors are passed references to pointers to other functions."
I'd pass something I coded but I'm in a state where I learn so fast that as soon as I write something down it'll be obsolete the next day.
|
With some tricks and knowledge + if you make a bunch of utility classes that are intuitive and reusable you can code as well as in C# but more effectively. 1. Use stl - great library, has many useful collections(vector, set, map...) 2. If you need some other library for string operation/file/date operations use boost library. I know it's not super effective but it's standard and multi-platform. 3. Learn to use const and reference(&) properly. 4. Avoid using pointers(*) whenever you can. Instead learn to use shared pointers boost/std::tr1 shared_ptr, they work similarly to how standard objects behave in Java/C#, but without garbage collection. 5. Read a book called Effective C++, small book but with all the essential knowledge inside.
If you need any help or directions just PM me and I will assist you.
|
IMO if you're going to learn C++, you should read The C++ Programming Language: http://www.stroustrup.com/3rd.html
However that book isn't intended for people who have no programming experience, so you may want to learn a different language first and then read that book while learning C++. Also, there is a 4th edition coming out in 2013 which deals with C++11.
Stroustrup also has a book intended for beginning programmers which uses C++, but I haven't read it: http://www.stroustrup.com/programming.html
It's easy to misuse C++ and wonder your program has memory leaks and crashes. In addition to that book, you should learn either Boost or the C++11 standard library. I'd recommend ignoring Boost for now and learning the C++11 features first after you have a good understanding of C++98. This is because many of the Boost libraries have been incorporated into the C++11 standard library. Right now there is little writing about C++11, but there should be more in the next few years. When learning C++11/Boost, you'll want to make sure you are using RAII where it is possible and that you are not reimplementing parts of the libraries unless you have a good reason to do so (so, use vector instead of allocating an array with new; any use of new should be in a class whose purpose is memory management).
In addition to learning the language, you'll want to learn how your tools work and what the compiler, assembler, and linker actually do. This is important because using C++ effectively requires you to use 3rd party libraries, but doing so is unintuitive without a good understanding of how C++ code is compiled and linked.
Having a good understanding of various types of libraries is also important. Designing code requires you to understand what good code is, and this understanding comes partially from using and evaulating libraries. Learning a library will also teach you about the problem the library solves, but to fully understand this it is also important to know how the library is implemented and which algorithms it uses. Finally, knowing many libraries will allow you write many types of programs quickly.
It would probably take you a few years to learn enough C++ features to be competent at the language; it's difficult to write maintainable C++ code without having a full understanding of its standard library and features. C++ is also difficult for beginners to learn because it requires a good understanding of how computers work in order for you to reason about the performance and behavior of your program.
In addition to learning C++, I would recommed learning a RISC assembly language such as ARM (I don't recommend x86 because it is difficult to reason about the performance of x86 assembly code) and the IEEE floating point standard and some basics about numerical computing. After learning the RISC assembly, you may also want to read about how x86 CPUs work and how caching and memory access is done. This can be ignored but it is difficult to write efficient code without a firm understanding of the architecture you are developing for, and many of the bugs that occur in C++ code are difficult to understand without knowing how stack frames are stored in memory or what a segmentation fault is.
|
On November 09 2012 01:57 Ao wrote:Show nested quote +On November 09 2012 01:49 Recognizable wrote: I'm learning Javascript as my first coding language, but I see many here promoting Python, should I switch to Python? Depends what you want to make. Python is a great all around interpreted language. You can make basic games, library support is great. But if you're learning Javascript, you are probably interested in web, and for that I'd highly recommend Ruby / Ruby on Rails over python.
Are the languages very different? I'm just learning the very basics right now, are these the same for most languages?
|
On November 08 2012 22:15 Mirosuu wrote: Hah, what are the odds all these c++ topics come up as I'm picking up the language myself.
I've found that watching videos and just going "uh huh, i know that now. get on with the next topic!" to most of the videos of the concepts they're trying to teach you is the wrong approach to be looking at for programming.
My reasoning for this is that you're not actually doing ANYTHING about the knowledge they're telling you.
I'll tell you what my experience has been recently:
I've been picking up on c++ classes and how they differ from their java counterparts (I work as a Java dev). I knew already the structure of how c++ classes work, what they're supposed to look like syntactically, but semantically, I had no fucking clue.
When it came to instantiating said class, I was lost. I got confused greatly by the usage of header files, file management (when to use *.h files and when to use *.cpp files) and just general simple things like creating objects and having them linked correctly in the language.
After sitting down and trying out coding classes and having them instantiated in different files, I feel like I've learned a great deal MORE than the silly little tutorial on how to write a class. They don't ever tell you the little quirks like when to use headers vs when to use .cpp files or header guards, they just give you the raw data.
The only real way to really pick this up (this applies to anyone who wants to pick up any language, not just c++) is to just code something simple (my coding program I've worked on is a console, text-input based game of casino black jack) and use help when necessary. Once complete, submit your working program's code to a community that cares for code and have them critique your program to learn valuable insights into what you're doing right and what you're doing wrong, and use that knowledge for your next, and more expansive and more difficult program. Eventually you'll be able to competantly do the basics and even some of the advanced stuff without worrying about whether you're doing it right or wrong, because of all the valuable feedback, you know the best (or better) practices of how to do something.
It is usually a good thing to post your program onto multiple different communities that can help out, as some communities may not give as good advice as others, or they may frown upon a certain coding style etc etc. The more places you can get feedback for it, the better. There's countless "learn programming" communities on reddit for instance if you search for them. They would always be willing to critique. :D
Hope this helps.
I just want to state I do mess around with it. I don't just watch the video - copy the code and then go "yes I understand!" I write my own little programs with it and try things with it to make sure I understand it. Thanks for the advice though as its definitely a good approach ^_^.
As for tons of people telling me to go the easier route, it's not going to happen. I don't know why but I have always wanted to learn C++, it's just what I want to do, so that's what I am going to do. If for some reason it does happen that I can't teach myself this then I will switch languages, but for now I am just going to keep on trucking. In general I am a stubborn person, so when I want to learn c++ because it's always been the language that I have wanted to learn (I don't know why just always have), it's what I attempt to do at minimum.
I do have a book as well, as a reference and to read more detailed explanations (the book I have is Sams Teach yourself C++). I also google if I have a problem as well to better understand ^^.
On November 08 2012 20:58 Unshapely wrote: Let me persuade you to learn a language other than C++. It is not a language that will aide you in development of programmes as a "hobby", though it could help if you decide to take it as a profession.
Learn Python, and try to do some research on functional programming. LISP is a better language for a nearly pure functional programming approach that can be applied to real programmes as well.
Good luck. I would still ask you to change your opinion on C++ and switch to a different language.
Edit: If you do decide to further your knowledge in C++, or any language, I would be glad to help. Feel free to ask for support or assistance if you get stuck.
I may take you up on that offer for assistance haha :D.
|
I happen to be learning C++ right now too, pretty much just making a game with the help of this library: http://www.libsdl.org/
Previously I've made games with Python and Java, if you have an Android phone you might be interested to see what a fellow noob programmer has made: http://cambridgegamestudio.co.uk/
I'm learning C++ because it will be useful for what I want to do, but if I was just a hobbyist game maker I would probably stick to Python for PC games and Java for Android apps.
|
On November 09 2012 02:37 sundersoft wrote:+ Show Spoiler +IMO if you're going to learn C++, you should read The C++ Programming Language: http://www.stroustrup.com/3rd.htmlHowever that book isn't intended for people who have no programming experience, so you may want to learn a different language first and then read that book while learning C++. Also, there is a 4th edition coming out in 2013 which deals with C++11. Stroustrup also has a book intended for beginning programmers which uses C++, but I haven't read it: http://www.stroustrup.com/programming.htmlIt's easy to misuse C++ and wonder your program has memory leaks and crashes. In addition to that book, you should learn either Boost or the C++11 standard library. I'd recommend ignoring Boost for now and learning the C++11 features first after you have a good understanding of C++98. This is because many of the Boost libraries have been incorporated into the C++11 standard library. Right now there is little writing about C++11, but there should be more in the next few years. When learning C++11/Boost, you'll want to make sure you are using RAII where it is possible and that you are not reimplementing parts of the libraries unless you have a good reason to do so (so, use vector instead of allocating an array with new; any use of new should be in a class whose purpose is memory management). In addition to learning the language, you'll want to learn how your tools work and what the compiler, assembler, and linker actually do. This is important because using C++ effectively requires you to use 3rd party libraries, but doing so is unintuitive without a good understanding of how C++ code is compiled and linked. Having a good understanding of various types of libraries is also important. Designing code requires you to understand what good code is, and this understanding comes partially from using and evaulating libraries. Learning a library will also teach you about the problem the library solves, but to fully understand this it is also important to know how the library is implemented and which algorithms it uses. Finally, knowing many libraries will allow you write many types of programs quickly. It would probably take you a few years to learn enough C++ features to be competent at the language; it's difficult to write maintainable C++ code without having a full understanding of its standard library and features. C++ is also difficult for beginners to learn because it requires a good understanding of how computers work in order for you to reason about the performance and behavior of your program. In addition to learning C++, I would recommed learning a RISC assembly language such as ARM (I don't recommend x86 because it is difficult to reason about the performance of x86 assembly code) and the IEEE floating point standard and some basics about numerical computing. After learning the RISC assembly, you may also want to read about how x86 CPUs work and how caching and memory access is done. This can be ignored but it is difficult to write efficient code without a firm understanding of the architecture you are developing for, and many of the bugs that occur in C++ code are difficult to understand without knowing how stack frames are stored in memory or what a segmentation fault is.
This guy knows what he's talking about. I've bolded a few things I would look to go a bit more in depth with...
First off, while C++ is one of the fastest languages (the C++ tax is dieing very quickly), it is not a fast language to write with. If you are doing anything beyond a simple application, you will start to realize real quick how much code needs to be written. With a large volume of code comes a large surface area for bugs and mistakes. C++ teaches you patience and diligence.
Start using the standard library or Boost ASAP so you can get used to interfacing with the library. Learn just how much you can accomplish by only calling other peoples code. In all coding, this is an important skill, and is what engineering is all about. My suggestion: try rewriting a handful of older programs using the standard library to accomplish some of the tasks. Don't try to learn both the library and the lesson at the same time.
And yes, knowing more about stacks and processor architecture is important. Its impossible to understand why until you start debugging a more nefarious bug, then you'll learn real quick.
Good Luck with the learning endeavour! +1 for Stroustrup's books. He invented the language after all....
P.S.: A coworker of mine's favorite quote: "Not even Stroustrup knows C++, here, I found a bug in his book!"
|
Ok, so now I know why you haven't been streaming lol.
Best of luck and have fun dude . You have winter break right? You stream more then?
|
On November 09 2012 04:18 Qwyn wrote:Ok, so now I know why you haven't been streaming lol. Best of luck and have fun dude . You have winter break right? You stream more then?
It's not actually the reason I haven't been streaming. I just got kinda sick of sc2 due to zvp. I won it the most once I understood it but that's why I quit is I understood zvp which was turtle to corr/bl/infestor and I just can't handle having to do that to win, so I lost motivation and just don't have any real desire to touch sc2 for now. As long as zvp remains the way it is it'll be a long time before I can touch sc2 probably xD.
So in short no idea when I will play sc2 again .
On November 09 2012 04:13 RoyGBiv_13 wrote:Show nested quote +On November 09 2012 02:37 sundersoft wrote:+ Show Spoiler +IMO if you're going to learn C++, you should read The C++ Programming Language: http://www.stroustrup.com/3rd.htmlHowever that book isn't intended for people who have no programming experience, so you may want to learn a different language first and then read that book while learning C++. Also, there is a 4th edition coming out in 2013 which deals with C++11. Stroustrup also has a book intended for beginning programmers which uses C++, but I haven't read it: http://www.stroustrup.com/programming.htmlIt's easy to misuse C++ and wonder your program has memory leaks and crashes. In addition to that book, you should learn either Boost or the C++11 standard library. I'd recommend ignoring Boost for now and learning the C++11 features first after you have a good understanding of C++98. This is because many of the Boost libraries have been incorporated into the C++11 standard library. Right now there is little writing about C++11, but there should be more in the next few years. When learning C++11/Boost, you'll want to make sure you are using RAII where it is possible and that you are not reimplementing parts of the libraries unless you have a good reason to do so (so, use vector instead of allocating an array with new; any use of new should be in a class whose purpose is memory management). In addition to learning the language, you'll want to learn how your tools work and what the compiler, assembler, and linker actually do. This is important because using C++ effectively requires you to use 3rd party libraries, but doing so is unintuitive without a good understanding of how C++ code is compiled and linked. Having a good understanding of various types of libraries is also important. Designing code requires you to understand what good code is, and this understanding comes partially from using and evaulating libraries. Learning a library will also teach you about the problem the library solves, but to fully understand this it is also important to know how the library is implemented and which algorithms it uses. Finally, knowing many libraries will allow you write many types of programs quickly. It would probably take you a few years to learn enough C++ features to be competent at the language; it's difficult to write maintainable C++ code without having a full understanding of its standard library and features. C++ is also difficult for beginners to learn because it requires a good understanding of how computers work in order for you to reason about the performance and behavior of your program. In addition to learning C++, I would recommed learning a RISC assembly language such as ARM (I don't recommend x86 because it is difficult to reason about the performance of x86 assembly code) and the IEEE floating point standard and some basics about numerical computing. After learning the RISC assembly, you may also want to read about how x86 CPUs work and how caching and memory access is done. This can be ignored but it is difficult to write efficient code without a firm understanding of the architecture you are developing for, and many of the bugs that occur in C++ code are difficult to understand without knowing how stack frames are stored in memory or what a segmentation fault is. This guy knows what he's talking about. I've bolded a few things I would look to go a bit more in depth with... First off, while C++ is one of the fastest languages (the C++ tax is dieing very quickly), it is not a fast language to write with. If you are doing anything beyond a simple application, you will start to realize real quick how much code needs to be written. With a large volume of code comes a large surface area for bugs and mistakes. C++ teaches you patience and diligence. Start using the standard library or Boost ASAP so you can get used to interfacing with the library. Learn just how much you can accomplish by only calling other peoples code. In all coding, this is an important skill, and is what engineering is all about. My suggestion: try rewriting a handful of older programs using the standard library to accomplish some of the tasks. Don't try to learn both the library and the lesson at the same time. And yes, knowing more about stacks and processor architecture is important. Its impossible to understand why until you start debugging a more nefarious bug, then you'll learn real quick. Good Luck with the learning endeavour! +1 for Stroustrup's books. He invented the language after all.... P.S.: A coworker of mine's favorite quote: "Not even Stroustrup knows C++, here, I found a bug in his book!"
Thanks I plan on looking into that. I won't decline any help/advice that's for sure .
|
i agree with all statements in this thread saying you should not start with c++ if you want to get into programming for fun. there is more fun to be had in other languages than fiddling around with pointers and memory management.
|
On November 09 2012 02:44 Recognizable wrote:Show nested quote +On November 09 2012 01:57 Ao wrote:On November 09 2012 01:49 Recognizable wrote: I'm learning Javascript as my first coding language, but I see many here promoting Python, should I switch to Python? Depends what you want to make. Python is a great all around interpreted language. You can make basic games, library support is great. But if you're learning Javascript, you are probably interested in web, and for that I'd highly recommend Ruby / Ruby on Rails over python. Are the languages very different? I'm just learning the very basics right now, are these the same for most languages? The basic constructs (if statements, loops etc.) work the same for each language, but each language has its personal look and feel. For just learning pure basics, I would actually recommend Python since it doesn't have much overhead (braces etc.) and it forces nice looking code through indentation. Python was pretty much the only language I knew for a long time, and for my needs (writing small scripts for some calculations and computer stuff I didn't want to do myself) it's pretty much perfect. It doesn't have much web presence though, like Ao said, so if you want to develop things other people can interact with over the internet you will want to stick to Java/learn Ruby.
|
On November 08 2012 18:31 blade55555 wrote: Now for long term my goal would obviously be to program my own games which is obviously a long way off. I know this, while it would be awesome to start now I know this will take a long time before I can start doing that, but that's my long term goal. It's not all that hard You could make something simple pretty easily, with only an understanding of loops, functions and pointer/references.
|
On November 09 2012 04:49 KharadBanar wrote:Show nested quote +On November 09 2012 02:44 Recognizable wrote:On November 09 2012 01:57 Ao wrote:On November 09 2012 01:49 Recognizable wrote: I'm learning Javascript as my first coding language, but I see many here promoting Python, should I switch to Python? Depends what you want to make. Python is a great all around interpreted language. You can make basic games, library support is great. But if you're learning Javascript, you are probably interested in web, and for that I'd highly recommend Ruby / Ruby on Rails over python. Are the languages very different? I'm just learning the very basics right now, are these the same for most languages? The basic constructs (if statements, loops etc.) work the same for each language, but each language has its personal look and feel. For just learning pure basics, I would actually recommend Python since it doesn't have much overhead (braces etc.) and it forces nice looking code through indentation. Python was pretty much the only language I knew for a long time, and for my needs (writing small scripts for some calculations and computer stuff I didn't want to do myself) it's pretty much perfect. It doesn't have much web presence though, like Ao said, so if you want to develop things other people can interact with over the internet you will want to stick to Java/learn Ruby.
I have no particular interest in web related stuff, and seeing as how I'm just learning the basics, I'll switch to Python.
|
On November 09 2012 01:12 Otolia wrote:Show nested quote +On November 08 2012 22:00 Smancer wrote: Learning how to find what you need to solve a problem is what its all about in my opinion. Do I know C++? No. Could I write a program in C++ for a business task if asked by my employer? Yes.
Then you are probably a bad programmer and a even worse code maintainer. It's like saying you can create a professional software without knowing a modelling language. Everybody can but it's not about being good enough, it's about being efficient enough and not understanding the solution you copied from someone else is bad. BAD.
First, I'm pretty damn good. But based on your response you have no idea what I was talking about at all. You missed the entire point and focused on a hyperbole.
And I never said that you should just copy code, I don't know why you are putting words in my mouth.
|
On November 09 2012 04:59 Smancer wrote:Show nested quote +On November 09 2012 01:12 Otolia wrote:On November 08 2012 22:00 Smancer wrote: Learning how to find what you need to solve a problem is what its all about in my opinion. Do I know C++? No. Could I write a program in C++ for a business task if asked by my employer? Yes.
Then you are probably a bad programmer and a even worse code maintainer. It's like saying you can create a professional software without knowing a modelling language. Everybody can but it's not about being good enough, it's about being efficient enough and not understanding the solution you copied from someone else is bad. BAD. First, I'm pretty damn good. But based on your response you have no idea what I was talking about at all. You missed the entire point and focused on a hyperbole. And I never said that you should just copy code, I don't know why you are putting words in my mouth.
No but he has a point, if your constantly googling or using outside sources all the time then you probably arent understanding what your doing to begin with, I mostly see new recruits doing this. I know consultants are often shunted around into different platforms/languages, but if you have any sort of experience, it shouldnt take you too long to pick up a language after spending a day or two with a decent book, and you gain way more than by constantly searching. Also, often you might have to work in highly secure areas where the nearest net connection is 3 rooms away, and is often in use.
|
ok I lied I well end up posting a little program I made. Mainly I will just post the code and explain what it did (this took me a little bit to figure out after a little bit of messing around :D).
Very basic, nothing amazing just a guess a number that's already preset. If you guess wrong it'll keep saying incorrect and once you get it right it will give you a message saying it is correct.
So I ended up making a revision to make it shorter to. Here was my original code:
+ Show Spoiler +#include <iostream>
using namespace std;
int main() {
int yourage; cout << "How old is Morphine Lapunk (Made up name!)? \n"; cout << "Input the number (Hint it's between 1-20) \n"; cin >> yourage;
if(yourage == 20) {
cout << "That is correct! Morphine Lapunk is 20 years old! \n"; } else { while(yourage != 20){ cout << "That is incorrect, please put another number \n"; cin >> yourage; if(yourage ==20) { cout << "That is correct! Morphine Lapunk is 20 years old! "; } }
return 0; }
When looking at that it seems a bit repetitive so I decided to remove the first If and instead the code is only: + Show Spoiler +#include <iostream>
using namespace std;
int main() {
int yourage; cout << "How old is Morphine Lapunk (Made up name!)? \n"; cout << "Input the number (Hint it's between 1-20) \n"; cin >> yourage;
while(yourage != 20){ cout << "That is incorrect, please put another number \n"; cin >> yourage; if(yourage ==20) { cout << endl; cout << "That is correct! Morphine Lapunk is 20 years old! "; } }
return 0; }
Again very basic, but something I did today that I had to mess around a bit to finally get it the way I wanted .
|
^ you can refine it a bit more, you dont need the if. The while loop will be broken only if the age entered is 20 right? So...
int main() {
int yourage; cout << "How old is Morphine Lapunk (Made up name!)? \n"; cout << "Input the number (Hint it's between 1-20) \n"; cin >> yourage;
while(yourage != 20) { cout << "That is incorrect, please put another number \n"; cin >> yourage;
} cout << endl; cout << "That is correct! Morphine Lapunk is 20 years old! "; return 0; }
Also, with the older code, if you entered 20 on the first try, you would not get the confirmation message that the answer was right,because it would never go into the while loop.
|
Ah you are right. The if statement really is kinda pointless there lol. Thanks, should have tried that first :D.
Currently that's one of the few ideas I have had to do with the programming I know so far. I know how to put functions and use them, constructors I am just not sure when I would use them yet, but I imagine once I learn a little more I will see why as right now don't know enough to make anything worth using them yet.
Actually with that does anyone know any websites for c++ exercises or some kind of way to practice? I mean I come up with little things, but would like to be able to try something that is a problem or something as I feel that would be better practice.
|
Dont really have a site, but the big programming thread should have something in it, a lot of people who are learning post there,and I think there was a resources section too for various languages, might help.
Off the top of my head some of the basic problems that we did to get comfy with the basics of the language would be things like a basic text menu based calculator i.e. show a list of options (add,sub,exit etc) do the calculations and return to the menu, accept a string from the user and reverse it, check if a string is a palindrome, fibonacci series. Those would teach you about arrays, recursive functions, switch cases etc.
Then maybe you could try something like a text based tic tac toe game.
|
cplusplus.com is a good one. I used to post there often, especially in the UNIX section. I believe you should start from there.
Once you learn the basic syntactic language, the only other task is to choose a set of libraries to work with. Boost is a good one, it tries to be the "all rounder" rather than focusing on one specific strain.
|
Hm ok I am going to be honest. While I still want to do C++ I might bite the bullet and just do C#.
I'm not struggling in C++ (yet), but from googling and all that the one thing many people say is that you will regret it in 3-4 years. OK that is what got me thinking. When I read multiple people saying I will regret it in YEARS I decided I am going to be smart and do what everyone recommends to do. That is learning C#.
I figured if C++ did end up being wrong as a beginner I would regret it in a few months maybe, but didn't think a few years and then I would regret it. So from here on everything will be in C#.
Now for anyone who does C# programming, I will be honest one of my main things I want to do at some point is make an RTS just because I have loved RTS's since my first age of empires games and always wanted to make one. Obviously this is a long, long, long term goal. I know this, I am saying this so people don't tell me not to overshoot, I know I know .
I don't know much about C# as I have mainly focused on C++. So from here on blogs I make will be with C# progress. Any advice on this one would be great .
|
I am glad you changed your mind. A wise decision.
Designing an RTS might be a bit too far away right now, but let's start. Language is just a tool for you, once you learn any one language, you will be able to use every existing language with ease since all languages share the same structure.
C# is platform specific, and a bit harder compared to Python. C# is not the right choice for making an RTS game. You can see most real world programmers switching to Python and it has a similar library base to C++.
In my honest opinion, I would ask you to start with Python as it is perfect and not as limiting as the C# and C++. Most features are "natural" to a new person. There are also some good "toy" games based on Python you can examine. Because Python is so popular, you'll find help everywhere if you get stuck - because of the growth in this language. The library reference for the entire language is also well documented. There is a wonderful tutorial here.
Final goal: Once you're confident with programming and making toy games, you can move on to optimisation and choosing a gaming engine to work with. Learning another language will be easy once you've already learned one. Successful programmers need to know many of them. In my course of life I have come to know, Pascal, Ada, C++, Fortran 95, Fortran 2008, ISO C 1999, just to name a few.
Quite frankly, all popular gaming engines come in C++. But don't worry, you'll be ready to make games in any language once you fully learn a good language.
My Advise:
Learn an easy language (Python is easier and is now being used by corporate sector, including Microsoft and has been in use for POSIX systems as well). Then you're ready to make games with any language. C++ will be the choice for making RTS games.
|
C# is nice easy and a great language to begin with, and just in general a nice language.
You will be able to achieve your goals with it (long term,long term ). Much of what you've learnt till now will apply there aswell. Many games like bastion,fez etc were written in c# and xna.
the stuff you've learnt till now all apply. The loop constructs etc all still apply. Some differences do exist, for example structs and classes,how stuff is stored in memory, and everything is inside a always inside a class.
The first thing to do would be to get the express version of visual studio from the website(if you dont have it already), and try the stuff you've already done with it. Also...dont know what IDE you've been using till now, but intellisense(the dot prompter) is pretty sweet(the one for c++ in vs is not that great...I use an external tool).
Also, microsoft have a very nice reference site (MSDN) to learn things with tons of examples, for everything in c#..
|
On November 09 2012 18:04 blade55555 wrote:Hm ok I am going to be honest. While I still want to do C++ I might bite the bullet and just do C#. I'm not struggling in C++ (yet), but from googling and all that the one thing many people say is that you will regret it in 3-4 years. OK that is what got me thinking. When I read multiple people saying I will regret it in YEARS I decided I am going to be smart and do what everyone recommends to do. That is learning C#. I figured if C++ did end up being wrong as a beginner I would regret it in a few months maybe, but didn't think a few years and then I would regret it. So from here on everything will be in C#. Now for anyone who does C# programming, I will be honest one of my main things I want to do at some point is make an RTS just because I have loved RTS's since my first age of empires games and always wanted to make one. Obviously this is a long, long, long term goal. I know this, I am saying this so people don't tell me not to overshoot, I know I know . I don't know much about C# as I have mainly focused on C++. So from here on blogs I make will be with C# progress. Any advice on this one would be great . This will be your first C# program: Class Program{ static void Main(string[] args) { Console.WriteLine("Hello world"); //Prints out Hello world to the user Console.Read(); //waits for interaction from the user so the console doesn't vanish the instant the message is typed out. }
}
|
Well unless I am mistaken Hello World is for most that I have seen :D.
|
The language you use isn't really all that important. Your goal is to make an RTS, and with that being known any language will work. I'd want to make an RTS with C++ and Lua, but that's just my own preference. To all the people crying over specific languages, they are really just pressing their own preference at you. Since you have a clear goal of an RTS the language is only a means to an end. If your goal is to... Say learn how to create professional software then choices like languages or tools learned are actually very important.
|
On November 10 2012 04:38 CecilSunkure wrote: The language you use isn't really all that important. Your goal is to make an RTS, and with that being known any language will work. I'd want to make an RTS with C++ and Lua, but that's just my own preference. To all the people crying over specific languages, they are really just pressing their own preference at you. Since you have a clear goal of an RTS the language is only a means to an end. If your goal is to... Say learn how to create professional software then choices like languages or tools learned are actually very important.
Well from what I gather you seem to be a pretty good programmer from that one blog you posted.
Do you think I would regret learning C++ first? I mean I keep hearing that if I learn C++ first (which I already made decent headway and so far understanding it), but a majority of people seem to say I will regret it in xx time.
I would rather learn C++ first, but then most people say it's a really bad idea and you'll regret it! So now i'm in a tough spot to start over and learn C# or continue on with C++ and take the risk of regretting it xD.
to be honest after really thinking about it I think I might just keep learning C++ and take the chance I might regret it. I have already put quiet a bit of time into it and so far understanding it, it's always been the language I have wanted to learn the most so I might just stick with it. If I regret it in a few years then whatever, but I think I may continue on as I have been ^^.
|
On November 10 2012 06:03 blade55555 wrote:Show nested quote +On November 10 2012 04:38 CecilSunkure wrote: The language you use isn't really all that important. Your goal is to make an RTS, and with that being known any language will work. I'd want to make an RTS with C++ and Lua, but that's just my own preference. To all the people crying over specific languages, they are really just pressing their own preference at you. Since you have a clear goal of an RTS the language is only a means to an end. If your goal is to... Say learn how to create professional software then choices like languages or tools learned are actually very important. Well from what I gather you seem to be a pretty good programmer from that one blog you posted. Do you think I would regret learning C++ first? I mean I keep hearing that if I learn C++ first (which I already made decent headway and so far understanding it), but a majority of people seem to say I will regret it in xx time. I would rather learn C++ first, but then most people say it's a really bad idea and you'll regret it! So now i'm in a tough spot to start over and learn C# or continue on with C++ and take the risk of regretting it xD. Use whatever language you want. I have no idea why people would say you would regret using C++. C and C++ are powerful languages that people can use to make highly optimized code. The only reason anyone should regret using these tools is if they wasted years of their life learning nothing about writing high quality code, and that's not the language's fault, it's the programmer's fault.
With that said unless you use libraries heavily in C++ you'll have to learn a lot of things in order to make an RTS. So plan to use other people's APIs and tools to finish your project.
|
Oh of course, as I said before an RTS is a long long way off for me. That is my end goal which I anticipate it to be years before I can make what I would like. That is just my long term goal.
Short term is to learn C++, make some simple games, make games without using tutorials (in terms of creating my own type of game, obviously if I need to google to figure out a problem I will do that).
|
Well if you want to make a simple game in C++ in a way that focuses a lot on learning, then I'd recommend the way I did it: here.
Edit: It's in C, but honestly anything you learn would be directly transferable to C++.
|
A tip: Do not look for the best way to solve a problem. Think of a fun way to solve a problem.
|
You aren't at the level where the language you're learning really matters at all. Many of the intricacies will be lost on you while you still explore things like simple data structures and language syntax. At this point, if you are enjoying what you're doing and feel as though you are satisfied with the rate of your progression, just keep at it. Once you hit that wall and ask yourself ,'Why am I learning C++ again?' or learning something new about the language and asking yourself 'Why do I care about this?' you might need to take a step back and re-evaluate the language. Different things are easier / harder for certain languages, but those details come later. Enjoy learning simple control flow, sorting algorithms and implementing data structures in C++ first.
|
|
|
|