|
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.
|
|
|
|