Computer Science Canada I want to learn OOP |
Author: | noodle [ Sat Jun 02, 2012 4:58 pm ] |
Post subject: | I want to learn OOP |
I'm 9 year old and I have been looking and reading a lot of tutorials/guides about doing C++, I have watched a variety of video tutorials too, but I have had some difficulty learning certain aspects of C++ (I think I have some of the basics down, such as Functions, but moving down, things are becoming more "difficult" to read and properly understand, I am far from getting to OOP). This has been repeating in a cycle for a few months. I think this partly to blame with the fact that I often read the lessons without practicing them, but I have a difficulty putting what I read into application. If anybody can help me with issue. It'd be appreciated. I know everybody here is doing Software Engineering and have countless degrees, plz no be 2 condescending. |
Author: | Raknarg [ Sat Jun 02, 2012 5:04 pm ] |
Post subject: | RE:I want to learn OOP |
I'm no expert, but Turing I'm pretty sure is an OOP language, and infinitely simpler. Perhaps you shouldtry that, things will make much more sense there than in C++ |
Author: | Senecide [ Sat Jun 02, 2012 5:26 pm ] |
Post subject: | Re: I want to learn OOP |
I personally would recommend start learning programming with Python. The advantage is that it's widely used and have very simple syntax. That way you can learn faster, be able to create programs, and then apply them to other languages. Being only 9 and learning C++ by yourself sounds a bit scary. |
Author: | mirhagk [ Sat Jun 02, 2012 6:56 pm ] |
Post subject: | RE:I want to learn OOP |
C# is one of the easiest languages to learn and use, and is 100% object oriented. I am in the process of writing high school courses on learning C#, so I can give you those if you want to try to learn. Good job for trying to learn so young, you'll be much better off in life. |
Author: | Amarylis [ Sat Jun 02, 2012 10:37 pm ] |
Post subject: | Re: I want to learn OOP |
noodle @ Sat Jun 02, 2012 4:58 pm wrote: I'm 9 year old and I have been looking and reading a lot of tutorials/guides about doing C++
I envy you, when I was 9 all I did was sit around and day dream. I'm fairly sure I wanted to be a dolphin when I was older, at that age. |
Author: | Aange10 [ Sat Jun 02, 2012 10:53 pm ] |
Post subject: | RE:I want to learn OOP |
Indeed me too Amarylis. But anyways, suggesting 3 different lagnauges is probably not going to help him much. At least, it never helped me any. I'd honestly suggest starting with Turing soley because of the Turing Walkthrough. I'm not saying Turing is better (it's not) or easier to learn (debatable) than any of the other languages, but you have way way more resources here to learn Turing. True, there are a lot of documents and blah blah on C# and Python, but it's much more confusing than Turing. Not to mention Turing Walkthrough alredy has a ton of information in it that is understandable. You (and me) would be lucky to get through a C# or Python document without getting confused. And for icing on the cake, Turing is the most active form, and also one of the easiest to get help on (given that the environment is the same for everybody, and there are no other library to worry about needing to know.) I personally suggest Turing. I'm not saying not to do C# or Python, but do start here, then progress. |
Author: | jr5000pwp [ Sat Jun 02, 2012 11:28 pm ] |
Post subject: | RE:I want to learn OOP |
I agree with Aange10, however, I discourage attempting to learn OOP through turing's current implementation of OOP. Instead, you should learn OOP through a more friendly OOP language such as C# or Java after you've established a strong programming foundation. Turing is a great place to start and learn about functions, procedures, variable types, input, graphics and such. Once you are comfortable in turing, then you can try and learn C# or Java with OOP. I started to learn turing last September, and from November-January, I knew enough about turing to make a very cool minecraft 2d game. Learning to program in turing is great because all of your resources are easy to understand, while resources for other languages don't explain things as well. So from experience, I would suggest you take Aange10's advice and learn turing for a few months. The Turing Walkthrough has enough to get you started, along with the help section of these forums, and the semi-good documentation available online. |
Author: | Amarylis [ Sun Jun 03, 2012 9:21 am ] |
Post subject: | RE:I want to learn OOP |
Turing also has the example programs (<- how I learnt it, before I found out that there was a help file) |
Author: | QuantumPhysics [ Sun Jun 03, 2012 9:38 am ] |
Post subject: | RE:I want to learn OOP |
Dont. It's pointless. But if you do, then learn C# that's the closest ill ever go to it. Oh and UDK... but thats just for the fun of it ![]() EDIT: And wow. For a nine year old you have quite a wide-span vocabulary. I wish I had much wisdom at nine years old. @Mrighak i second that, since it has built in drag drop functions its very easy to learn the commands, because it pretty much gives them for you. (sorry if i spelled you name wrong) |
Author: | jr5000pwp [ Sun Jun 03, 2012 11:04 am ] |
Post subject: | RE:I want to learn OOP |
@QuantumPhysics Ever heard of copy and paste? That way you never misspell someone's name. In addition to the drag and drop features(no one uses those) you have a very good debugging system, there is tooltips for all the functions, what they do, what parameters they accept, and what they return. And not to mention the simple yet powerful XNA game library. @noodle It's your choice, if you want to have a very easy start to programming then learn turing, but also realize that you will have to relearn some things when you switch to a new language(Will be a lot easier though), or start with C# or Python and go straight into a more general use language. Either way, there are people on this forum who would be glad to help you if questions arise whichever path you choose. |
Author: | bl0ckeduser [ Sun Jun 03, 2012 12:06 pm ] |
Post subject: | Re: I want to learn OOP |
Well I'm certainly no programming expert (I'm a hobbyist), but I think C++ is probably not a good choice for a first, beginner language, because it is known to be very complex, and it is designed for professional use. Furthermore, I believe OOP is most useful for larger programs, which, being a beginner, you are unlikely to write. I agree with Senecide that Senecide wrote: Being only 9 and learning C++ by yourself sounds a bit scary. Although OOP seems to be very much in vogue and is apparently popular in industry (which makes it wise to learn it), my personal advice is to learn how to write simple programs and algorithms before you learn OOP (I hope nobody calls me a heretic over this). Many simple programming tasks from which you could learn much have no reasonable need for OOP. |
Author: | mirhagk [ Sun Jun 03, 2012 2:45 pm ] |
Post subject: | Re: I want to learn OOP |
bl0ckeduser @ Sun Jun 03, 2012 12:06 pm wrote: Well I'm certainly no programming expert (I'm a hobbyist), but I think C++ is probably not a good choice for a first, beginner language, because it is known to be very complex, and it is designed for professional use. Furthermore, I believe OOP is most useful for larger programs, which, being a beginner, you are unlikely to write. Although OOP seems to be very much in vogue and is apparently popular in industry (which makes it wise to learn it), my personal advice is to learn how to write simple programs and algorithms before you learn OOP (I hope nobody calls me a heretic over this). Many simple programming tasks from which you could learn much have no reasonable need for OOP.
I agree in that there is no need to dive right into object oriented programming, but you should learn OOP before you even think about writing a large project, because the concepts in it (modular, extensibility) are an absolute requirement for a successful large project. I believe you should learn all the major programming paradigms, but if you don't have the time, OOP should be the priority with functional being 2nd (the first will teach you how to write programs that you can extend easily, and maintain easily, and the 2nd will teach you how to utilize multi-threading, and truly powerful concepts to get stuff done quicker, both in terms of processing and writing). Do not start with C++. It's an older language and is really only popular in embedded systems (even then variations of basic, or other languages are common). Most of the programming nowadays is with either mobile or web platforms, both of which C++ is useless for. While it's a great language to learn, and something useful to have under your belt, it's becoming less and less popular, and it's too difficult to start with. It is entirely up to you what you'd like to learn, but here's my personal suggestion: If you already know some basic concepts of programming, what a variable is, what functions are, loops etc, then switch over to C#. It's an easy to learn language, if you use visual studio you have drag and drop functionality for building graphical programs, and there is a HUGE amount of support if you go the MSDN forums (microsoft actually pays people to just go around answering questions). It also has a beautiful help system, and just simply typing the function name will show you all the information you need to know about it. If your entirely new to programming, and you're not thinking about the long term, or want a slightly easier time learning the basics, then start with the basics with Turing, but get out quick. DO NOT LEARN OOP IN TURING! I can't stress that enough. Turing's OOP was tacked on so that it could say it has it, but it's unnecessarily complex, and near useless. Switch to C# (or another language if you prefer) before you get too far into the language. |
Author: | Amarylis [ Sun Jun 03, 2012 9:35 pm ] |
Post subject: | Re: I want to learn OOP |
mirhagk @ Sun Jun 03, 2012 2:45 pm wrote: DO NOT LEARN OOP IN TURING! I can't stress that enough. Turing's OOP was tacked on so that it could say it has it, but it's unnecessarily complex, and near useless. Switch to C# (or another language if you prefer) before you get too far into the language.
Having followed the above quotation myself, I find that after I learnt some basic C#, Turing made a lot more sense to me. Also, playing around with Turing classes can be a fun exercise if you're bored on a Sunday evening |
Author: | jr5000pwp [ Sun Jun 03, 2012 10:27 pm ] | ||||||||
Post subject: | Re: I want to learn OOP | ||||||||
Once I learned C# I found myself constantly attempting to grasp why the people at holtsoft would use such horrible syntax. For example, instead of doing something simple like:
They have a complex method something like this:
However, something like:
may be easier to understand at first than:
Many people take the Turing->C#/Java/Python route, however, it seems as if noodle already knows the basics of programming (variables, functions, probably IO) so he may be best to dive straight into C# or Python. |
Author: | [Gandalf] [ Mon Jun 04, 2012 4:04 am ] |
Post subject: | RE:I want to learn OOP |
Take a look at wtd's Reflections on OOP, there's some good material in there! With concepts like this, you often just have to expose yourself to them enough, and eventually they'll "click". Then, after working with them some more, they'll "click" again. Learning is a continuous process. ![]() |
Author: | mirhagk [ Mon Jun 04, 2012 8:19 am ] |
Post subject: | RE:I want to learn OOP |
Gandalf is correct. You never stop learning. I come across new features in C# nearly every day, and every single time I'm like "Why didn't I know this before, this is awesome and totally useful". Computer science is an ever expanding field, there are always new things to learn, and new things to explore. IT'S AWESOME! |
Author: | linuxp [ Thu Jun 21, 2012 5:07 pm ] |
Post subject: | Re: I want to learn OOP |
[quote= Do not start with C++. It's an older language and is really only popular in embedded systems (even then variations of basic, or other languages are common). Most of the programming nowadays is with either mobile or web platforms, both of which C++ is useless for. While it's a great language to learn, and something useful to have under your belt, it's becoming less and less popular, and it's too difficult to start with. [/quote] LOL, do you know. More than 80% high performance game you played on X360 Ps3 PCs were made by C++? Like war3 wow cs cod bf.... etc. All the best game engine were write by c++ too. C++ will never over date. High performance = Difficult to start != less popular !!! |
Author: | jr5000pwp [ Thu Jun 21, 2012 5:57 pm ] |
Post subject: | RE:I want to learn OOP |
You also realize that they can't put a C# or java game onto the major consoles. Making your point invalid because the companies didn't have a choice. |
Author: | mirhagk [ Thu Jun 21, 2012 6:34 pm ] |
Post subject: | RE:I want to learn OOP |
@jr5000pwp that's actually incorrect. C# can be run on all the current generation consoles using mono. In fact C# can be run on most devices using mono (not sure about java on consoles though). @linuxp C++ is used because most existing engines are written using C++. In fact CPU usage in games is very minimal (compared to GPU usage, or memory usage) so using a more inefficient language doesn't matter, it actually gives the developers more time to optimize (since the algorithm is more important than the language). Also it's been shown that in several cases JIT languages can beat compiled languages in speed, particularly in the case of vastly different platforms (ie consoles) since the JIT compiler will know the platform and it's optimizations better than the programmer (since you can't possibly hope to maintain a different set of code for every platform). |
Author: | DemonWasp [ Thu Jun 21, 2012 7:00 pm ] |
Post subject: | RE:I want to learn OOP |
As far as I know, Java doesn't appear much on game consoles. It appears a lot more frequently in the embedded markets -- the bit in the JRE installer about "Java is on 3 billion devices" is more or less true. There are ARM chipsets that run JVM bytecode directly, though few devices that support that natively exist. A big part of the reason that the triple-A games industry is all about C++ is because everyone who works in that industry knows C++ inside and out. This is similar to the reason why that industry is mostly DirectX-based. Neither is built for the beginner: start with a simpler, safer language and two dimensions: adding a third dimension complicates everything. |
Author: | [Gandalf] [ Thu Jun 21, 2012 8:14 pm ] |
Post subject: | Re: RE:I want to learn OOP |
C++ isn't a good language to learn OOP with because it's riddled with complexity, choices, and paradigms that have nothing to do with OOP. Trying to learn OOP from C++ is like trying to learn English from someone who is speaking half English and half French (and another half Spanish, etc.). It'll be a lot easier to learn OOP using a purely object oriented language, and you'll get a clearer message on what OOP is all about and what it enables. mirhagk @ 2012-06-21, 6:34 pm wrote: In fact CPU usage in games is very minimal (compared to GPU usage, or memory usage)
This is not true in general. Many games don't leverage multiple cores as well as they could, but they'll happily eat up the entirety of your first and often your second cores. There is even a philosophy that goes something along the lines of "if you have spare CPU cycles, put them to use by making the game look even shinier or else you're wasting them." |
Author: | mirhagk [ Fri Jun 22, 2012 10:42 am ] |
Post subject: | RE:I want to learn OOP |
Yeah but shinyness is handled by the GPU, and graphics is the main focus of major games these days. As a general rule of thumb, if your system can't run a game, upgrade your graphics card. It's unlikely the game actually requires a lot out of your CPU, and rarely do they take advantage of multiple cores, hyperthreading, and 64 bit systems. |
Author: | [Gandalf] [ Fri Jun 22, 2012 6:37 pm ] |
Post subject: | Re: RE:I want to learn OOP |
mirhagk @ 2012-06-22, 10:42 am wrote: It's unlikely the game actually requires a lot out of your CPU, and rarely do they take advantage of multiple cores, hyperthreading, and 64 bit systems.
It would be fair to say that most modern CPUs are plenty good enough for basically every game, however that doesn't mean a modern CPU isn't necessary for extra shininess. Just take a look at these benchmarks - http://www.anandtech.com/show/4083/the-sandy-bridge-review-intel-core-i7-2600k-i5-2500k-core-i3-2100-tested/20 - even among modern CPUs the difference can be huge. Where a better CPU provides benefits, so too would faster code*. A lot of things that make games look good, like lots of units shooting simultaneously are still very CPU bound. *I have a feeling like this statement isn't as true as it seems on first glance. Prove me wrong! |
Author: | wtd [ Mon Jun 25, 2012 10:25 am ] |
Post subject: | RE:I want to learn OOP |
CPUs can be critical for game physics. |
Author: | mirhagk [ Thu Jun 28, 2012 8:43 am ] |
Post subject: | RE:I want to learn OOP |
@wtd yes they can be, but ideally graphics shouldn't hog the graphics card so much, and physics can easily be calculated on that. @Gandalf faster code would indeed be a benefit, but that language you use/tools you use are less important than the algorithm you use, and using a language that decreases development time increases the ability to spend time on better algorithms, or major optimizations (like graphics card based physics or AI) for a very interesting example of why C# can actually be faster is here: http://stackoverflow.com/questions/686483/c-sharp-vs-c-big-performance-difference/687741#687741 C#'s implementation of floating point math instructions is apparently closer to the FPU's implementation which means it can optimize the calls a lot better. It is worth noting that the same optimizations can be made in C++ if you know your way around compiler optimizing flags, or if you have a sufficiently aggressive compiler that compiles different binaries for each machine. Basically C# can let you optimize without having to optimize, you can worry on your algorithms and let the JIT worry about the processor. |
Author: | [Gandalf] [ Thu Jun 28, 2012 9:39 pm ] |
Post subject: | RE:I want to learn OOP |
mirhagk, that's part of the reason why I never explicilty said C++ is good for games because it's fast. ![]() I'm not a game developer, but as far as I'm aware it's still true that CPU intensive tasks cannot "easily" be moved to GPUs because GPUs are only good at certain types of computations (i.e. massively parallelized vector calculations). While there has been some progress in that area, I haven't heard of many games that attempt to offload physics from the CPU (with the exception of PhysX, although I'm not sure how well that actually manages to utilize your graphics card). CPUs are still pretty important for gaming! Thread - DERAILED |
Author: | mirhagk [ Fri Jun 29, 2012 7:12 am ] |
Post subject: | RE:I want to learn OOP |
I like this discussion perhaps we can move some of these posts to another thread? |
Author: | bl0ckeduser [ Fri Jun 29, 2012 11:05 am ] |
Post subject: | Re: RE:I want to learn OOP |
Gandalf @ Thu Jun 28, 2012 9:39 pm wrote: mirhagk, that's part of the reason why I never explicilty said C++ is good for games because it's fast.
![]() Yeah, and I believe they use C++ instead of the also-fast C because the built-in OOP facilities in C++ work well with the notion of game "objects". For example, it seems having a set of methods (like "tick" and "collide") for each object class makes programming interactions simpler, and the use of classes promotes modularization. Of course, OOP is not an absolute in game programming. In the early days of video games, assembly language was used. Even today, some independent developers, as well as many hobbyists, write in C or assembly, likely avoiding OOP altogether. (Apologies for further derailing this thread). EDIT: Quote formatting |
Author: | Insectoid [ Fri Jun 29, 2012 11:57 am ] |
Post subject: | RE:I want to learn OOP |
Quote: In fact CPU usage in games is very minimal (compared to GPU usage, or memory usage)
My system monitor disagrees. Idling: ![]() Running Skyrim: ![]() Quote: I believe they use C++ instead of the also-fast C because the built-in OOP facilities in C++ work well with the notion of game "objects".
Also because C++ is a superset of C, and proper OOP code lets you easily add and remove features and re-use massive chunks of code for later projects, which is a lot harder (though still possible) to do with purely procedural language. |
Author: | mirhagk [ Fri Jun 29, 2012 12:32 pm ] |
Post subject: | RE:I want to learn OOP |
What kind of CPU do you have, I play skyrim constantly and the only thing running high is the graphics card. Regardless skyrim is one of those games that actually does utilize it, because of the amount of objects in the game world. Games like call of duty and halo and others don't use it well. (skyrim also makes use of other's libraries in many places, which is evident by their horrendous use of a volatile sorting algorithm in the inventory screen). Most games use C++ because code gets reused constantly in the game world, and no-one wants to rewrite the entire engine from scratch in a new language. More and more indie games are starting to use things like C# and Java, because if you're writing the engine yourself anyways, might as well use a language that will decrease development time. |