Archived

This topic is now archived and is closed to further replies.

DrunkenBastard

To memorize or not to memorize?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites