Thread: Nested while loop inside for loop

  1. #31
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Sonny View Post
    Very efficient. :P haha thanks a lot for the help guys. Hopefully after a little more experience I can help future noobs like you're helping me.
    It's all about practice and experience... Keep writing code... One day the little light goes on and you can officially declare "I get it!"...

  2. #32
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by AndrewHunter View Post
    D**n, now my secret is out! ...LOL
    That was a secret? OOPS... my bad.

    EDIT: BTW Tater, I like your new tag line.
    Actually it would pretty cool if everyone listed their compiler/IDE and OS in the .sig... would save a lot of confusion on OS specific stuff.

    The windows aptitude test is one of those nifty "cookies" that people should explore.

  3. #33
    Registered User
    Join Date
    Jul 2011
    Posts
    38
    Quote Originally Posted by CommonTater View Post
    It's all about practice and experience... Keep writing code... One day the little light goes on and you can officially declare "I get it!"...
    Yeah my prof keeps telling me it's about practice. Doing a few programs everyday but it gets really tedious after a while I don't know how you guys do it.

  4. #34
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by Sonny View Post
    Yeah my prof keeps telling me it's about practice. Doing a few programs everyday but it gets really tedious after a while I don't know how you guys do it.
    If you don't enjoy it, it's not worth doing. Words to live by.


    Quzah.
    Hope is the first step on the road to disappointment.

  5. #35
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Sonny View Post
    Yeah my prof keeps telling me it's about practice. Doing a few programs everyday but it gets really tedious after a while I don't know how you guys do it.
    Can't speak for the others... but I Don't.

    I tend to walk around in a haze thinking about this or that function or module and then when I'm ready I'll sit down and zip it out in short order. Typing code is a very small part of programming... The big skill is not learning a language with less than 2 dozen words in it... it is in understanding a problem (i.e. project) well enough to write an adequate solution. For small stuff like you're doing now, an experience programmer might only need a couple of minutes to plan it out... but when the projects get big, the understanding and planning stages can take weeks or even months sometimes... Writing code is the second to last step in creating a program. The last step is fixing all your smegups and getting it to work...

  6. #36
    Registered User
    Join Date
    Jul 2011
    Posts
    38
    Quote Originally Posted by quzah View Post
    If you don't enjoy it, it's not worth doing. Words to live by.


    Quzah.
    Well said.

  7. #37
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Quote Originally Posted by Sonny View Post
    Yeah my prof keeps telling me it's about practice. Doing a few programs everyday but it gets really tedious after a while I don't know how you guys do it.
    quzah is right about that. However, if you generally like programming, it might just be because of the type of programs you are working on. Going through a book is in no doubt a good way to learn, however it gets boring. Take what you know already, and then work on making something fun. If you know loops and some basic logic functions, why not make a game? It really doesn't take too much to start working on making an asteroids style arcade shooter. You will learn a lot by doing that as well.

    @Tater: I agree, however it would also be nice if we could fill it out in our profile and it showed up in all the free space next to our name.

    <--------
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  8. #38
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by quzah View Post
    If you don't enjoy it, it's not worth doing. Words to live by.
    Quzah.
    Also ... Any project worth doing is worth doing right.

  9. #39
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by AndrewHunter View Post
    @Tater: I agree, however it would also be nice if we could fill it out in our profile and it showed up in all the free space next to our name.
    Y'know what... that is a really good idea.
    You should pop over to the General forum and see if Webmaster can do that for us...

  10. #40
    Registered User
    Join Date
    Jul 2011
    Posts
    38
    Quote Originally Posted by AndrewHunter View Post
    quzah is right about that. However, if you generally like programming, it might just be because of the type of programs you are working on. Going through a book is in no doubt a good way to learn, however it gets boring. Take what you know already, and then work on making something fun. If you know loops and some basic logic functions, why not make a game? It really doesn't take too much to start working on making an asteroids style arcade shooter. You will learn a lot by doing that as well.

    @Tater: I agree, however it would also be nice if we could fill it out in our profile and it showed up in all the free space next to our name.

    <--------
    Yeah definitely, I have this 1000 page text book and going through it is not fun at all. You're right I should try to make a game.

  11. #41
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Sonny View Post
    Yeah definitely, I have this 1000 page text book and going through it is not fun at all. You're right I should try to make a game.
    Please don't take offense at this, because that's not how it's meant...

    Before you start doing stuff that diverges from the textbook... make real sure you don't abandon the learning curve in favor of personal projects. You will pay a penalty for that down the road when you discover you really do need to know the rest of what's in that book.

    I'd suggest at least a good review of concepts that are obviously giving you difficulty here, before you branch out into anything new.

  12. #42
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    I agree. My intent was that while going through the book, you could solidify the knowledge gained there by making a game utilizing that knowledge, vice doing 100s of the boring textbook problems. Let's say I just finished learning about functions and loops. I could use that to make a game where I could actually explore these concepts but in a fun manner. I believe Matticus is doing just this.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  13. #43
    Registered User
    Join Date
    Jul 2011
    Posts
    38
    Quote Originally Posted by CommonTater View Post
    Please don't take offense at this, because that's not how it's meant...

    Before you start doing stuff that diverges from the textbook... make real sure you don't abandon the learning curve in favor of personal projects. You will pay a penalty for that down the road when you discover you really do need to know the rest of what's in that book.

    I'd suggest at least a good review of concepts that are obviously giving you difficulty here, before you branch out into anything new.
    No of course i'm going to follow my syllabus as well. I meant that I learn better by doing rather than seeing it in a textbook. So what I can do is probably look up exercises in the text book and try those out.

  14. #44
    Registered User
    Join Date
    Jul 2011
    Posts
    38
    Quote Originally Posted by AndrewHunter View Post
    I agree. My intent was that while going through the book, you could solidify the knowledge gained there by making a game utilizing that knowledge, vice doing 100s of the boring textbook problems. Let's say I just finished learning about functions and loops. I could use that to make a game where I could actually explore these concepts but in a fun manner. I believe Matticus is doing just this.
    Exactly.

  15. #45
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Sonny View Post
    No of course i'm going to follow my syllabus as well. I meant that I learn better by doing rather than seeing it in a textbook. So what I can do is probably look up exercises in the text book and try those out.
    Actually... doing the exercises and quizzes in the textbook is an expected part of the process...

    Type them up, compile them, play with them, break them, fix them.... make sure you understand what they're doing and how before you move on to the next section... Reading retention runs about 50%... you can probably up that to 80 or 90% by working the exercises.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. change var inside loop and run loop again
    By d387420489 in forum C Programming
    Replies: 5
    Last Post: 07-29-2011, 01:19 AM
  2. For Loop inside While Loop
    By mesmer in forum C Programming
    Replies: 1
    Last Post: 11-29-2008, 12:29 PM
  3. for loop ignoring scanf inside loop
    By xIcyx in forum C Programming
    Replies: 2
    Last Post: 04-17-2007, 01:46 AM
  4. for loop inside of a for loop
    By pippen in forum C++ Programming
    Replies: 5
    Last Post: 03-28-2003, 04:11 PM
  5. Nested Loop
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 05-07-2002, 12:40 AM