Archived

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

A Question That Has Plagues My Programming...

This topic is 5667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, I have 1 question for you and it will help me sooooo much. How much is a programmer supposed to memorize? No one has ever told me this. When I got TOTWGG, I memorized the windows init code so i could make a window. What is a programmer supposed to do? Memorize everything before they move on? Or understand it and memorize it as they use it through programming experience. Any styles you all have would be greatly appreciated. Thanks a lot for any replies.

Share this post


Link to post
Share on other sites
For me, I only memorize enough so that I can know where and how to look it up. I use help files in C++ for nearly everything, but you use it less and less as you code just by doing it.

Share this post


Link to post
Share on other sites
The way problems can be solved are so diverse, and the reusability of classes keeps you from having to memorize a lot. Which in one way is a blessing because you can make some REALLY complicated code easily, but also a curse when it comes to having to write some really complicated algorithms because you have to actually work hard at it again!

Windows initialization, I would say, is something you paste from existing projects. Just understand how it works, and use the documentation for special cases. Of courses there's always google, and gamedev.net, for those hard to answer questions!

Memorize as much as you like, but don't think you have to memorize everything. Just have what you need at your fingertips, and memorize what you're sick of looking up all the time, if it's within your means.

I suppose the most important thing to remember is not what to program, but where to look it up when you'll need it again.

EDIT: Looks like the pattern says memorize the references, not the programming!

[edited by - Waverider on June 3, 2002 12:18:23 AM]

Share this post


Link to post
Share on other sites
Understand and remember the general concepts. Then remember where to look up the details when you need it.

I pretend to work, they pretend to pay me.

Share this post


Link to post
Share on other sites
thanks a lot for that reply, I wish i had known this a year ago, I would have advanced much faster(making games wise). I have made a simple 2d game(its pong with missiles) and i did that from scratch, without using help files, so i guess you could say that was a big step into the game world. One of the main problems I have is i like to learn everything about programming but then forget to program itBut im learning direct3d as I speak so hopefully that all goes well. Thanks for any other replies.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You don''t have to know all the answers as long as you know where to go and find them. No one can memorize all there is to know. But you work with, say DirectDraw or Direct3D or whatever, long enough and you just get a "feel" for how it works. Its not a matter of memorization at that point, but rather intuition.

Share this post


Link to post
Share on other sites
Heh, boy am I glad for this topic. I hafta say this is the way I''ve always worked too, and I''d never really thought of it in this way before, but I''m glad so many others just say to memorise what is necessary and everything else, keep as modular code or remember where to look it up. Also as others have pointed out, if you keep using code enough, over time you find that you instinctively memorise it. For example, when starting out learning D3D8 I''d be lookin stuff up almost all the time, now when it comes to setting up a light, creating an index or vertex buffer or some such simple technique I can pretty much do it without thinking, I never intentionally set out to have this permanently engrained in my memory, it just works out that way through practise.

Share this post


Link to post
Share on other sites
Man, I couldn''t memorize a paragraph of text if my life depended on it, let along a whole page of code...

quote:
Original post by MadLep
I pretend to work, they pretend to pay me.


Damn, where''d you get that? It sounds so familiar, but I just can''t place it....


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I almost always have either the C++ win32 or the directX reference page open while programming. As far as memorising goes while learning something, I''d say you really only need to memorise/learn the concepts and ideas behind you''re learning - don''t worry about actually memorising every function name, parameter, flag etc. All those things are accessible in the references.

No one is going to critise you for looking things up - I know a guy who''s been working in the industry for ten years and he still often has the C++ help windows open.

Share this post


Link to post
Share on other sites
Knowing where to look up the info you need and knowing how things generally are structured is much more important that knowing it (all though knowing it helps alot). After you use a command a few times you get to know it and don''t need to look it up all the time.

Personally, other than my "learning" projects, I have not written a program for scratch. I usualy start for an existing program or a shell of some type.

Kars

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Dean Harding

[quote]Original post by MadLep
I pretend to work, they pretend to pay me.


Damn, where''d you get that? It sounds so familiar, but I just can''t place it....

Can''t quite remember. I picked it up somewhere, but I''m not sure where.

Share this post


Link to post
Share on other sites
At first walking was difficult, you had to give it your all and you often fell on your arse, but got up and carried on anyway. Now.. 16 years on from that, and walking isn''t that much of a problem now(negating effects from alcohol), you can apply this analogy to various things like..

Learning to ride a bike(2 wheels ), learning an API.

You''ll repeat the same things over and over again, most of the time without having to think and it''ll be impossible* as to forget how.

* nearly.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
[quote]Original post by Dean Harding

[quote]Original post by MadLep
I pretend to work, they pretend to pay me.


Damn, where''d you get that? It sounds so familiar, but I just can''t place it....

Can''t quite remember. I picked it up somewhere, but I''m not sure where.


I''ve seen it as a Russian joke during Communist times. Everyone had a job but more than a few were make-work jobs. East-bloc as well.

ZoomBoy
Developing a iso-tile 2D RPG with skills, weapons, and adventure. See my old Hex-Tile RPG GAME, character editor, diary, 3D Art resources at Check out my web-site

Share this post


Link to post
Share on other sites
quote:
Original post by Dean Harding
Damn, where''d you get that? It sounds so familiar, but I just can''t place it....



It was somebody else''s sig - Mr Cup''s I believe..

Funny. I can remember useless stuff like who''s sig that was, and I still have to use the help files when creating a window and stuff like that....

Share this post


Link to post
Share on other sites
I think Dr. Jones said it best -
"I wrote them in the book so I wouldn''t HAVE to remember."

It takes a while to get a feel for what you can/should remember. Assembler, for example, generally requires full memorization because if you want to accomplish something in an optimized way, you need to have mental access to everything available. It takes so many statements to accomplish something impactful, it would take too long to look everything up all the time.

Thank God for compilers. Life too, I guess - thank God, I mean

Share this post


Link to post
Share on other sites
Dean Harding: I think that may have been in a Dilbert comic at one point, although I doubt that Scott Adams was the originator of the phrase...

On topic, I don''t make an effort to memorize anything about programming. I learn what I need to to get the current problem solved, then move on. If I manage to memorize it in the process, wonderful, if not, at least I''ll know where to find it next time.

Only thing I''ve ever made a concious effort to memorize was pi, and I''ve got that to 330 decimal places. Kinda sad really...

Share this post


Link to post
Share on other sites
330 DECIMAL PLACES! WOW! Would you mind reciting it? Who cares if it''s totally useless; it impresses everybody else.

Twilight Dragon
www.freewebz.com/j-world

Share this post


Link to post
Share on other sites
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920

Checking this is left as an exercise for the reader....

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Why memorize?

As a C++ programmer, I have tons of resources at my side.

I use VC++ 6.0, so I own the VC++ 6.0 Refernce desk set (100 bucks). For C++, I own the C++ black book. I also keep other API reference manuals at my side (DirectX, Direct3D). I have downloaded the Complete Windows Platform SDK (300+ megs for Microsoft) and I subscribe regularly to C++ User''s Journal, Game Developer''s Journal (I cancelled VisualC++ Journal because it turned into Visual Studio and VB).

Code reuse also helps alot. Common things, like the CFileDialog implementation or resetting the Window RGN. I save these techniques as text files in a folder. Here''s one now:


////// These set of procedures are used to use bitmaps as buttons.
//////Be sure to set the properties of the button to Owner draw
//////
//////


CBitmapButton My,Friend, A, B, C, D; // CBitmapButton object declared in protected header


//////Load Bitmaps into CBitmapButton Object Procedure with error checking to be performed in the
//////Dialog''s constructor

if (!A.LoadBitmaps(
_T("AU", //Main Bitmap from the resource files (named "AU" in the resources)
_T("AD", //On Down Bitmap
_T("AF") //On Focus Bitmap
|| !B.LoadBitmaps(_T("BU", _T("BD", _T("BF")
|| !C.LoadBitmaps(_T("CU", _T("CD", _T("CF")
|| !D.LoadBitmaps(_T("DU", _T("DD", _T("DF"))
{
TRACE0("Failed to load bitmaps for buttons\n";
AfxThrowResourceException();
}

//////Subclass Dialog''s buttons to the CBitmapButton object and Size to fit the bitmap
//////To be performed in the OnInitDialog function

VERIFY(A.SubclassDlgItem(
IDC_A, //Resource ID for target Button
this)); //pointer to this object

A.SizeToContent(); //size to content

VERIFY(B.SubclassDlgItem(IDC_B, this));
B.SizeToContent();
VERIFY(C.SubclassDlgItem(IDC_C, this));
C.SizeToContent();
VERIFY(D.SubclassDlgItem(IDC_D, this));
D.SizeToContent();

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well, for some reason the " ) put together made " but yes, really. This is in MFC though.

Code Reuse is VERY popular. Just write it down once you figure it out.

Share this post


Link to post
Share on other sites