Advertisement

To memorize or not to memorize?

Started by August 12, 2002 01:45 AM
6 comments, last by DrunkenBastard 22 years, 4 months ago
I finished chapter 2 of Tricks of Windows Game Programming Gurus last night. It went over: 1) The windows class 2) Registering my class 3) Creating the window 4) The event handler 5) And the message loop It''s about 120 lines of code and I was wondering if I should memorize it all. I understand what it all does and how to change things to suit my needs, but I still need to look at the book to remember what goes where. I tryed typing it on my own and only got about 3 lines into it before i drew a blank. So back to my question. Would it be worth it to take a few days to memorize it all (or even part such as my WinProc func) or would it be better to just copy/paste for now and move on to the next chapter?
Dont try to memorize the code. The more you use it, the better you will be able to remember it. Just use it and it will come, there''s no use in working to do something that will eventually come naturally.


I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
Advertisement
It's already one year day per day from the first time i read that book

In my own, i don't think it's necessery to memorize all those dwFlags stuffs, i don't find that important. No, what i find important are the meaning of functions, classes, flags,etc...
And what i advice you to remember now are these "words" WNDCLASS(EX), WndProc(), WinMain(), RegisterClass(EX), CreateWindow(), ShowWindow(),....the other things u need may come their selves as u continue to program.

For now, just copy,paste where u need to and undrestand what the codes do. After u got much familiar then try to remember more things.

[edited by - remi on August 12, 2002 3:00:35 AM]
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"
Thank you both for the replies. I am going to make a skeleton window app and just copy/paste for now. I am having another problem if either of you can help. Its entitled Help with LNK2001 error.

Thanks Again
Drunkenbastard - thanks so much for posting that.

I was about to ask the same question. I bought the book on Friday and just was dazzled by how much about constructing a window is thrown at you without in detail explanation. Now that I know that it is something that you don''t have to sit and memorize I''ll go back to it.
Make an app framework, but don''t copy and paste. You''ll learn and understand nothing that way.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Advertisement
Never ever try to memorize Win32 API code... You will somehow memorize it if you have to use it a lot, but better is to forget about it as soon as possible. Write your own simple wrapper (cleaner, faster and better designed than the MFC or ATL/WTL) one day and use that one.

You don''t have to memorize DirectX initialization code either, for example... If you do one day, be sure that you''re not actually writing the same code over and over again. Create a small utility class and dump the code in there.

Don''t memorize other people''s code. Memorize concepts instead.
Also, as a follow up, don''t be afraid to use the docs. When I code I always have MSDN or the DirectX SDK docs close at hand.


The hackers must have gotten into the system through the hyperlink!!

Invader''s Realm

This topic is closed to new replies.

Advertisement