XNA Creators Club Online
Page 1 of 1 (14 items)
Sort Posts: Previous Next

I do not know how to program!

Last post 12/11/2009 18:29 by Pugnap00. 13 replies.
  • 07/10/2009 0:21

    I do not know how to program!

    I know that I may get insults or arrogance from this but really its cool. Alright - when I was approximately 15 years old I began trying to learn computer programing. I either bought or my dad bought a book  on C++. I believe it was titled "Sam's teach your self to program in 24 hours". Well I did try it and in the first chapter it occurred to me that I was really reading a book that had been sliced to peaces with information from a much larger more thorough book scattered around. So as I'm reading this first chapter and really reading chapter 5, then chapter 18, and then chapter 27 more or less in this order I realized I was going to need the real book that all this came from. So when I was this young I started to search for this real programing book. Since that time I've visited many book stores that had books on C++ that all read the same way. I've looked at college book stores (although not recently) and the books they carried seemed to start you off on chapter 45 of some larger more real programming book. This real book which in order teaches you from chapter 1, chapter 2, and chapter 3... I have never been able to find. So I believed maybe it came from math books or something. Well although I've heard about 7 year old and 15 year old learning programming which would not know very much math at 7 and only a slim chance in heaven that they could have learn up to something above trigonometry by 15 years old. Well it occurs that they wouldn't know very much math and even if they did then I still can't find any thing about programming in any of the books I've read. But still if thats the answer then I failed algebra 3 in high school but still did most of the work and can't remember it now but I've read the first half of a pre-calculus book and grasped most of it since the first half is still pretty much algebra 3.

    So I've broken down why I cannot program and yet 7-15 year olds seem to be able to.
    -I have a lower education than a 7 year old
    -Every one is hiding the real book from me
    -Programming cannot be learned from a book but can only be learned from copied notes taken off a board in a class room from a teacher

    Can some one please tell me the real school book - like a computer science or math book that teaches the word sprite. Sprite and collision detection are the closest words I know to the real programming book. Where ever or what ever the name is. Or if the name is common like Computer Science 3 then please link to an address where I can either see the book or preferably buy the book online. Because if it really takes 4 years of college to learn to program I don't care. I just want to make sure before I shell out for school that they are not going to start me out on chapter 27 also.

    You know what I really don't know if I'm even educated enough to ask this question so instead I think that I'm going to explain what I see when I read a small amount of code from something.

    #include <iostream>
    int Main ()
    (

    )

    Ok here is a good example. I have no idea what iostream is or why it needs to be there. I just see it at the top of a lot of programming tutorials and thats it. I don't know why there has to be a pound sign in front of the word include which I also don't know why it needs to be there. I just see a word that I've seen so much on these tutorials that I still know nothing about. In fact the only real thing I understand from this whole amount of code are the parenthesis. I understand that the operations inside them occur first. The brackets and angle brackets I'm not sure about because they might just be parenthesis or they could mean something else.

    Any way... If any one can help that would be great. So I'm asking how did you learn how to program. Because if you figured it out short of a college degree and I mean any one. I want to know exactly where I can buy that book at. Or web page or what ever. I'm positive that this can happen but I don't know how. So any way just tell me the book I need to read. Thanks.

    -Ian

  • 07/10/2009 3:18 In reply to

    Re: I do not know how to program!

    Firstly C++ isn't the best language to start with... C#, VB.Net or Java would probably be better.

    Secondly everyone learns differently. Some people can learn from a book, others from online and others need 1 on 1 help. Even if you are a book learner then there's so many different styles of books you might have to shop around to find the one that works for you. A college education means nothing. Some people without one program fantastically, others with Masters degrees simply don't get it. So don't worry about education.

    Thirdly, don't worry about sprites, collision detection or any game related things - learn the basics first even though it might seem boring.

    Fourthly, like anything it takes a long time to be proficient. Sure you can read about the guys who everything clicked for in a week but its not the norm. Just like playing piano or learning to speak a foreign language you need to start small and practise often.

    Here's a good free book about learning c# http://www.robmiles.com/c-yellow-book/ - used the yellow book 2009 link. Its both a book and a college class so maybe that approach will help. Robs XNA book would also be a good choice as it also teaches some c# basics at the same time as XNA http://www.amazon.com/Microsoft%C2%AE-XNA%C2%99-Game-Studio-2-0/dp/0735625220
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 07/10/2009 16:26 In reply to

    Re: I do not know how to program!

    Ok I'm at work right now so I can't view that yellow book on our systems here because it is a pdf. But I did want to thank you for the helpful advice.
  • 09/10/2009 21:16 In reply to

    Re: I do not know how to program!

    There's nothing wrong with not knowing how to program, not everyone does.
    Rabidious:
    Well I did try it and in the first chapter it occurred to me that I was really reading a book that had been sliced to peaces with information from a much larger more thorough book scattered around. So as I'm reading this first chapter and really reading chapter 5, then chapter 18, and then chapter 27 more or less in this order

    +1, I hate tutorials, so hard to find good ones :(

    Microsoft has an amazing library of what each command does in a number of languages (I've only ever paid attention to the C++ and C# areas, but there are plenty more), it's found here: http://msdn.microsoft.com/en-us/library/52f3sw5c.aspx

    Rabidious:
    [...]Can some one please tell me the real school book - like a computer science or math book that teaches the word sprite. Sprite and collision detection are the closest words I know to the real programming book. Where ever or what ever the name is. Or if the name is common like Computer Science 3 then please link to an address where I can either see the book or preferably buy the book online. Because if it really takes 4 years of college to learn to program I don't care. I just want to make sure before I shell out for school that they are not going to start me out on chapter 27 also.

    You know what I really don't know if I'm even educated enough to ask this question so instead I think that I'm going to explain what I see when I read a small amount of code from something.

    #include <iostream>
    int Main ()
    (

    )

    Ok here is a good example. I have no idea what iostream is or why it needs to be there. I just see it at the top of a lot of programming tutorials and thats it. I don't know why there has to be a pound sign in front of the word include which I also don't know why it needs to be there. I just see a word that I've seen so much on these tutorials that I still know nothing about. In fact the only real thing I understand from this whole amount of code are the parenthesis. I understand that the operations inside them occur first. The brackets and angle brackets I'm not sure about because they might just be parenthesis or they could mean something else.

    Any way... If any one can help that would be great. So I'm asking how did you learn how to program. Because if you figured it out short of a college degree and I mean any one. I want to know exactly where I can buy that book at. Or web page or what ever. I'm positive that this can happen but I don't know how. So any way just tell me the book I need to read. Thanks.

    -Ian

    You want this right?

    #include <iostream>
    int main()
    {

    }

    "Banana" brackets are used for arguments (I honestly can't find another use for them), and the curly ones are used for blocks. "iostream" is part of the default C++ library, it stands for Input/Output Stream, it gives access to cin, cerr, cout etc. The reason why #include starts with a '#' is because it is a preprocessor command.

    Basically, when someone runs your compiled executable, the whole program is skimmed over for preprocessor commands and those are executed, the best thing I can relate to #include is the PHP command include("etc");. #include just takes the other files contents and shoves it in the file including it.

    There are other preprocessor directives like #define, but I'd stick with includes for now and get the basics of the console down, that's what I did at least, and when I got bored I read up more on the standard C++ library, the documentation/reference is here: http://cplusplus.com/reference/

    There's also a tutorial on cplusplus.com, here: http://cplusplus.com/doc/tutorial/

    If you're just starting out with programming, then I suggest C# because it's a lot more forgiving than other languages, then if you want you can go on to C++ - or you could tackle C++, I personally didn't learn C++ before I had a good understanding of PHP. The only downer to using C# that I've found so far is that it isn't cross platform, compiled programs will only work on Windows because of the .NET dependencies, you could use Mono (http://www.mono-project.com/Main_Page) though.

    If you have any questions, just ask :)
  • 11/10/2009 20:41 In reply to

    Re: I do not know how to program!

    A lot of programming books will seem like they are written out of order. It's because they don't want to overwhelm the reader with a lot of technical details and jargon on the very first page. Your example is a good one. Most C++ programming books will have the #include <iostream> line in chapter 1 and not explain it. It's not because they think that you should already know it, it's because they know that anyone new to programming will not understand without a lot more background information.

    You should be patient. Let the book teach the material in the order it wants. Don't worry if you don't understand every line, the book will eventually get around to explaining it.
  • 20/10/2009 13:05 In reply to

    Re: I do not know how to program!

    Mister Hyde:
    A lot of programming books will seem like they are written out of order. It's because they don't want to overwhelm the reader with a lot of technical details and jargon on the very first page. Your example is a good one. Most C++ programming books will have the #include <iostream> line in chapter 1 and not explain it. It's not because they think that you should already know it, it's because they know that anyone new to programming will not understand without a lot more background information.

    You should be patient. Let the book teach the material in the order it wants. Don't worry if you don't understand every line, the book will eventually get around to explaining it.


    Mister Hyde nailed it. Sometimes with programming books you have to just roll with it. There will be times you just have no idea what is going on, but then they will explain it afterward. You will most likely have to read the book numerous times to fully understand it. Heck I have books that I still don't understand full chapters... and I am a developer by trade!

    There are 3 things I would suggest:
    1) Check the back of all books you get on programming. They will normally tell you what level you need to be at (beginner to professional) to get the most out of it.
    2) Practice, practice, practice.  You should be trying to re-create everything in your book. Multiple times. If they have a sample on outputing to a console window, try making one that does even more. Play around with the samples, change different parameters, try to break it and figure out why it broke. Its the only way to truly understand how things work.
    3) Get multiple teaching sources. Don't just go off 1 book or teaching style. It may not be the best style for you personally, or it may not be the most clear way of doing things. Google/Bing your favorite programming language along with "beginner tutorial" and start following some of those examples.

    Good luck!
  • 22/10/2009 3:56 In reply to

    Re: I do not know how to program!

    I can understand your frustration. A friend of mine switched from being a Computer Science major to an English major because he had no previous programming experience, and the proffessor in his introductory CS class wouldn't even explain why the "main" method had to be named "main" in Java. (There was a bit more to the change, but he was generally frustrated by the lack of information he was getting in his CS classes)

    I'm going to echo Mister Hyde. If you really want to get into programming, read what the instructions say, and for now, ignore the parts of the code that aren't mentioned in the instructions. For many teaching sources, the unmentioned parts will either be explained later, or require more knowledge of the system to fully grok.

    I'll also agree that C/C++ isn't the best language to learn with. However, I'm going to disagree with ZMan's suggestion for a C-derivative like C# or Java (I don't have experience with VB, so can't comment). Instead, I would recommend Python for a new learner, as the code (to me) is generally easier to read, and I think it's fairly easy to learn. The one caveat to that suggestion, however, is that Python supports functional, imperative, and object-oriented programming paradigms. A given teaching source may only focus on one, which leaves you learning only part of what Python is capable of, and may leave you high and dry when you change to a new language.
  • 22/10/2009 4:14 In reply to

    Re: I do not know how to program!

    During my adult life, I have only been to the movies once with my mother.  I will never go again with her.  She continually asked me questions about what was going on.  I would tell her "I don't know" and she thought I was being rude and trying to shut her up.  But, in truth, it was a suspense/mystery type of movie and I really didn't know.  In fact, the full details of what is going in those types of movies are not usually fully explained until the last 10-15 minutes of the movie.

    The ability to not fully understand something, but still quietly continue to absorb new facts is a skill in patience that my mother never learned.  But, it is a required skill for learning programming.  We have come a long way from room sized computers being fed punch cards to crunch numbers.  A single of line of code in higher level languages can literally do a million things.  So, sometimes it is just easier for both the teacher and student to just say "Do it.  Trust me.  I'll tell you all about it later."

    I'm 8 weeks away from a degree in Software Engineering and there are still things in programming that I just accept as working, but don't have a clue how or why.
  • 22/10/2009 17:04 In reply to

    Re: I do not know how to program!

    Beside agreeing with everyone else, I do not have much to add to this as they've already said everything.

    What I find most important in programming, at least in the beginning, is not asking yourself "Hey, I wonder how this thing works" but asking yourself "Hey, I wonder what this thing does". That is because at first you won't be able to understand the underlying algorithm behind every function (especially native ones or standard libraries, coded by "pros") and it's just easier to use them knowing what they do and not how they work.

    The ability of understanding how stuff works will come later on, while you spend hours and hours tweaking other people's code, integrating it in your projects and daring to try new stuff by yourself, making countless of application fail and crash, so you can fix them and understand them even better. That's what I've done for the first 3-4 years of my programming lifetime (when I was 14 till 18). Then, just one day, I was enlightened and finally understood how some functions worked or, at least, I had the vague idea of how those shady underlying algorithm might have been created.

    Sure, reading books, listening to classes, taking down notes or just having a personal tutor to teach you how to program is a nice way of learning, but it's not the best. It's useful to get the basis of the language, but that's not building up skills. Just because you know how to do something, it doesn't mean you can actually do it. Most of the people in my university class (I'm taking computer science) have a programming background in Java of about 3 years, same as me, but it's just hours and hours of classes and they never really created a real application by themselves and I found them really behind me in this, where I can probably top them in Java though we have the same abilities. What I have more is experience behind programming and real life situations.

    I did practice and I did learn, what you should do is just get some code and tweak it out with crazy/stupid commands and see how it works, then pass onto another piece of code to tweak, etc etc etc.

    Ok, probably this whole post didn't make much sense, but I hope it did just for a little at least.. and as a last suggestion I'd say that C++ is not the best language to start but it is indeed a start. It will be rough and not really totally pleasant and I'd suggest a more human friendly language like Python or Pascal. I love pascal, maybe because we started with that at my school (and now in University we're re-taking it and love it even more). Sure it can't do much and is mostly console-based, but it's really intuitive and has got a clean and nice syntax. It's pretty much at human level with words, you won't see weird symbols (# {}) beside the parenthesis ( () ) and the assignation operator ( := ), everything else is just coded in with words. I highly suggest it.
    Developer's Blog - My Blog || Twitter: xMorgawr
  • 23/10/2009 5:18 In reply to

    Re: I do not know how to program!

    Hi everyone (my first post!)

    To TC:
    In case you're still set on learning C++, there's a full book that you can read free online:

    http://www.steveheller.com/cppad/Output/dialogTOC.html

    I've been learning C++.  Many people recommend against learning it as a first language, but if you look around the web, you'll also find many people suggesting it as a great place to start (even if it will be harder).  So you should do some research, consider your goals, and then decide what the best path is for you.

    As for the link that I posted, that book will start at the ABSOLUTE beginning, and won't assume that you know ANYTHING.  Read the "foreward" at the beginning of the book too, it's really interesting...  Besides lessons & tutorials, the book has email-exchanges between the author & a woman who was test-reading an early draft of his book.  She knew nothing about programming, and throughout the book she asks all the questions that you'll probably be wondering about too.  The basics of the C++ language are presented to you slowly, and in plain English (well, as plain as an academic text can be).

    I'm using three books to learn from, simultaneously.  Read a few chapters in one book, and it will MOSTLY make sense.  Then re-read the same material in the next book, and you may find your questions answered.  Sure, this takes more time, but it gives you a more thorough understanding, and will show you how to do things from a few different angles...

    But of course, you actually have to use & practice what you learn.  You haven't really learned anything unless you can apply what you've read.  The books will always show examples of code.  After you've read through them & think you understand them, close the book, open your compiler, and write a quick program like the one you just went over in the book or tutorial.  Try your best, and when you're stuck, use the book again to figure out what went wrong...

    Eventually you'll be able to write a small program that will work just like the one you were reading about, just off the top of your head.  That's when you know you've learned something, and it's time to read about the next topic...

    Like others have said, you'll have some unanswered questions at first, and you won't be able to see the big picture.  But that's just how the learning process goes.  If you can stick with it, you'll be a fantastic programmer someday...  you and me both, I hope!  ...................ken


  • 03/11/2009 19:17 In reply to

    Re: I do not know how to program!

    I'm with the original poster. I've had experience with Visual Basic, Visual Basic .Net, SOME C#, and C++. I have a few books, eBooks. I just find that it doesn't make sense. I can read the material, and try and understand it, but when I come back to that information, I've completely forgotten it. I have some wicked ideas for games, my friend Cloud777 from 2Moons suggested I check out XNA and i have no idea what I'm looking at.

    My goal is to learn VB .Net, then C# then finish off with C++. I have ADD which makes it really hard to learn, which is why I struggle with school. My friends and family keep telling me I have potential to work for a big time company, but I can't see through the fact that I can't even pay attention to a MSN Conversation for more than 5 minutes. The only thing I can do, is play Video Games for hours.


    Anyone got a suggestion for a learning technique? I'm a hands on type of person, I love puzzle and building things. I just dunno how to build something with words :P
  • 03/11/2009 21:32 In reply to

    Re: I do not know how to program!

    Zilidious:
    My goal is to learn VB .Net, then C# then finish off with C++. I have ADD which makes it really hard to learn, which is why I struggle with school. My friends and family keep telling me I have potential to work for a big time company, but I can't see through the fact that I can't even pay attention to a MSN Conversation for more than 5 minutes. The only thing I can do, is play Video Games for hours.
    If you truly have ADD and can't pay attention to instruction for more than 5 minutes or so at a time, shouldn't there be some medication that can help?

    Such a short attention span would be extremely detrimental in learning (or working in) any field. If you really have so much trouble focusing on something, I would honestly seek medical help.

    Alternatively, if you're able to play games without losing focus, maybe you could get a job as a playtester ;)
    How're you at writing bug reports? How much can you handle playing through a buggy game?

    I remember last summer watching some testers working on some Rock Band 2 expansion or other, and all the text on the screen turned to garbage and the music turned to something akin to a banshee screaming at nails on a blackboard. Not exactly the most pleasant experience of my life, but an example of the problems an actual paid playtester might face :)
  • 04/11/2009 16:35 In reply to

    Re: I do not know how to program!

    Zilidious:
    I have some wicked ideas for games, my friend Cloud777 from 2Moons suggested I check out XNA and i have no idea what I'm looking at.

    The best tutorial I've ever found on XNA is Riemers. Not only will it help you learn C# syntax, but it will introduce you into the world of XNA, which, is not overly complicated. It is also the tutorial that I started with for XNA, and I found it to be very intuitive.

    Here is the link: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Starting_a_project.php



    - Cloud777 (No I'm not a stalker, I just happened to stumble on this post... I think it was FATE!)

    P.S. Give me your mage!! Hahaha... ;)

  • 12/11/2009 18:29 In reply to

    Re: I do not know how to program!

    I would honestly check out 3D Buzz.
    http://www.3dbuzz.com/xcart/home.php?cat=13

    These are some of the best video tutorials on C# programming methodologies and XNA ive gone through. Ive got 4 years of college and programming under my belt and those videos taught me so much stuff that i never quit understood in school
Page 1 of 1 (14 items) Previous Next