Thread: memory issue

  1. #1
    former member Brain Cell's Avatar
    Join Date
    Feb 2004
    Posts
    472

    memory issue

    I bet you are thinking "this is a C related issue" or "RAM" or something but its nothing technical. Its my actual memory.

    The problem is ... whenever i go away for a bit (like 2 weeks) from C , i start forgetting things in it. Like i made a program using linked lists in the last 2 weeks , and yesterday i tried to remake it and my brain just stopped there because i forgot to add LOTS of things and even forgot how to implement the concept.

    Now its getting even worse , im spending most of my time in college , learnning C++ and windows programming in VB. Net (we make windows programs from console not just drag and drop) so im starting to mix up things.

    What i wanna know is ... do you guys experience the same thing or is it just me? that is , you need to always program stuff in a language or else you'll slowly start forgetting it? if so , what other ways there are to prevent such thing? (other than constantly programming in it)


    sorry for the long thread

    thanks for your time..
    My Tutorials :
    - Bad programming practices in : C
    - C\C++ Tips
    (constrcutive criticism is very welcome)


    - Brain Cell

  2. #2
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    you have a defective brain cell

  3. #3
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    it sounds like you are getting by, soley by "learning" what to type to make your program work. If you learn the algorithms, implementation will follow with ease.

  4. #4
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Aye, I've experienced something similar. I don't do file I/O that often. Every time I need to do it, I have to look it up again, both in VB and C++. It's not something I worry about; I've always got my books on hand. However, that's just syntax. I agree with Perspective about learning the underlying "how it works" instead of just that it does work.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  5. #5
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    I experienced the same problem when I was first beginning to learn C++, but I've been programming for 2 years now and it's very rare that I'll find something that I've completely forgotten how to do if it's something simple (file io, win32 api messages, opengl functions, etc) and everything else that I don't know how to do, I can usually find in about 2-3 minutes on google.

    It's just like learning another language: you've got to keep at it to really cement it in to your head, or it will begin to fade away. Hell, even if you do have it cemented in your head, it could easily fade away if you don't program for extended periods of time (2-3+ months).

  6. #6
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    On the flip side, has anyone here had the experience of backing off the programming (like right out of it) for a couple of months, and then coming back, only to find things a little clearer (after the initial rustiness leaves of course)

  7. #7
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    Try practicing a lot a language after learning it. That way it's less likely that you mix up concepts.
    I learned C then Java at my university... then in 5 days i learned C++ by myself, I wrote for that matter an simple class then a template class, and those where enough. Now I use C, prolog, and C++ with openGL at several disciplines. Most of my other colleges don't even know what C++ is, and they only use C and badly... They are the kind of people that only cares with exames...

    Look what a partner of mine once wrote...
    Code:
    int GetString(char *str, int len, int x, int y) {
      int i=0;
      char ch=0;
      while(ch!=13) {
        if((ch = GetCh()) != -1) {
          if(ch==27)
    	return 0;
          if(i>=len-1 && ch!=13 && ch!=8)
    	beep();
          else {
    	if(ch==27)
    	  return 0;
    	else{
    	  if(ch==8) {
    	    if(i==0)
    	      beep();
    	    if(i>0) {
    	      i--;
    	      SetCursorPosition(y, x+i);
    	      PutChar(' ');}
    	  } else {
    	    SetCursorPosition(y, x+i);
    	    PutChar(ch);
    	    str[i]=(char)ch;
    	    i++;}
    	}
          }
        }
        updateTime();
      }
      str[i-1] = 0;
      return 1;
    }
    And my improved version...
    Code:
    int	GetString(char *str, int len, int x, int y)	{
    	int i=0;
    	char ch=0;
    	while(1){
    		updateTime();
    		ch = GetCh();		
    		switch(ch){
    		case -1: break;//key not pressed
    		case 27: return 0;//cancel
    		case 8:	//backspace
    			if(i<=0)
    				beep();
    			else{
    				i--;
    				SetCursorPosition(y, x+i);
    				PutChar(' ');
    			}
    			break;
    		case 13://enter
    			str[i]=0;
    			return 1;
    		default://another char	
    			if(i>=len-1){//size to big
    				beep();	
    				break;;
    			}
    			SetCursorPosition(y, x+i);
    			PutChar(ch);
    			str[i]=(char)ch;
    			i++;
    			break;
    		}
    	}
    }
    Consider yourself lucky Brain Cell

  8. #8
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    I was gonna reply but when I got to the bottom i forgot what the subject was...

    Anywho.. aparrently this happens to me quite often. I'll get up off the couch to do something and by time a take a few steps I turn around and sit back down, cuz I forgot what I was gonna do.
    What is C++?

  9. #9
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    It's just like learning another language: you've got to keep at it to really cement it in to your head, or it will begin to fade away. Hell, even if you do have it cemented in your head, it could easily fade away if you don't program for extended periods of time (2-3+ months).
    This is a fact which i experienced, on during my one year voluntary work in nigeria i could not talk Dutch to anybody for one year long ( even at my embassy they spoke french ).
    I only spoke English for one year and the only times when i could speak Dutch was when i was talking to myself...

    When getting back in Belgium i couldnt talk Dutch again that is i was talking 90% english and the rest was dutch...after two weeks that started to fade away and i could speak my mother tongue like i could before...

    Its the same with programming so as long as you keep practicing it you remember it but once you dont practice it for a very long time you will forget even the most simple things...

    Just my own tought though..

  10. #10
    former member Brain Cell's Avatar
    Join Date
    Feb 2004
    Posts
    472
    Quote Originally Posted by RoD
    you have a defective brain cell
    lol. If i had any , there would be more than one

    Quote Originally Posted by Perspective
    it sounds like you are getting by, soley by "learning" what to type to make your program work. If you learn the algorithms, implementation will follow with ease.
    actually i learn both but i forget things like functions with 4 arguments. I know what the arguments are but i forget their order.. things like that..

    xEarth :
    lol. I guess he's doing better than the students in my college. The proffessor once showed them how to print outputs with 'cout' and as an example he made a program with :
    // first c++ program
    cout << "Welcome to C++";

    Most of the students were like "what if we change 'welcome to c++' to something else? will it still work prof?"

    besides , they type exactly the same comment above , in every program, thinking the program wouldn't work without it ..

    at least your friend is trying


    Quote Originally Posted by Vicious
    I was gonna reply but when I got to the bottom i forgot what the subject was...

    Anywho.. aparrently this happens to me quite often. I'll get up off the couch to do something and by time a take a few steps I turn around and sit back down, cuz I forgot what I was gonna do.
    lol thats way worse man



    i guess ill just keep reviewing C every now and then so i won't forget it. How many languages can you guys handle? i mean without forgetting any of 'em
    My Tutorials :
    - Bad programming practices in : C
    - C\C++ Tips
    (constrcutive criticism is very welcome)


    - Brain Cell

  11. #11
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Well I only had one programming class and it was BASIC. By the time I got to the class I knew it so well that while other's were printing "Hello my name is dingbat" 5000 times on the screen, I was busy programming a missile command clone. Yep, in BASIC.

    Some people just don't seem to get it and while the language has the same elements for every human being on planet earth, few use those elements correctly. That code is one good example.

    My first 3D program was built entirely in QuickBasic 4.5 and it was a small gouraud shaded, cosine lighted 3D sphere. It really is not the language because all things can be done in all languages - notice I didn't say how well, but they can be done. It comes down to the programmer and the logic skills that they have. Some just don't have any. For more examples check the recent invasion of new posts on the C and C++ boards.

    Usually if I've been away from C or something else for some time I spend a lot of time in the help file and help file index. When I came back to Direct3D after coding my terrain engine I couldn't believe how much I had forgotten. It came back in a day and now I could code you pretty much anything from scratch in Direct3D.

    But you are right, there is a lot to remember and you won't ever remember how to implement everything you've learned, but if you have the concepts of C and C++ down pat the implementation is just details.

    And right now I've been coding in C++ and Direct3D for so long that my assembly language skills are probably a bit rusty. However one program that made heavy use of assembly would bring it all back very quick. And now I'm learning NVidia's CG and MS's HLSL so that just adds more to the mix of stuff I need to remember.

    I don't think it ever stops and if you like learning and are good at learning then you should be just fine. Don't be too concerned about forgetting stuff, because we all do.

    Well, except for Salem and Prelude. But they don't count because they are not even humans. I think they are some kind of code deities or something.

    Last edited by VirtualAce; 10-07-2004 at 07:54 AM.

  12. #12
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    Bubba how long have you been coding! And what do you eat for breakfast?

    I think you should be in that list with Salem and Prelude as the non human coding robots.
    What is C++?

  13. #13
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by Brain Cell
    actually i learn both but i forget things like functions with 4 arguments. I know what the arguments are but i forget their order.. things like that..
    this isnt out of the ordinary. Even professionals keep resources around for this type of thing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help finding potential Memory issue
    By JoshNCSU22 in forum C Programming
    Replies: 9
    Last Post: 10-29-2008, 09:58 AM
  2. What's the difference?
    By Stonehambey in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 10:26 AM
  3. threads and memory issue
    By Anubhav in forum C Programming
    Replies: 6
    Last Post: 07-25-2006, 04:51 AM
  4. Memory Leak Help
    By (TNT) in forum Windows Programming
    Replies: 3
    Last Post: 06-19-2006, 11:22 AM
  5. Accessing Video Memory Information...need help
    By KneeLess in forum C++ Programming
    Replies: 8
    Last Post: 08-24-2003, 03:53 PM