Programming Paradigms

Started by
13 comments, last by Ledneh 21 years, 6 months ago
I''m a budding video game programmer. As might have been evidenced by a couple of other threads I''ve been writing in (or not, I don''t remember anymore ), I''m working on a Tetris clone, based on 2D rendering D3D (simply because I know a small amount of D3D stuff, and wish to learn more). I got the project going along to a certain point, but after reading a few threads here and examining my own progress, I realized something of no small importance: I have no f***ing clue what I''m doing. Sorry to swear, even censored, but that''s the only good way to sum it up. My program is a ridiculous, jumbled mess; I use certain things I know about just because I want to, without reason (Singletons comes immediately to mind), and other things are definitely being used incorrectly. So, in a nutshell, are there any books or anything like that that discuss different programming paradigms, strategies, etc. (like OOP, procedural, etc) that I can refer to? Or is this something that I''m just going to have to learn on my own? Thankful (and stupid), Ledneh
-=-=-=-=-=-=-=-"We are the Dyslexia of Borg. Your ass will be laminated. Futertility is resistant.""SWEET LADY FREEDOM! LET'S MAKE OUT!!"
Advertisement
Design Patterns (common solutions known to work well)
Antipatterns (common solutions known to work badly)
Refactoring (turing common solutions that work badly into ones that work well)
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
I would definitely say that the best way to learn "what" (as opposed to "how") is trial-by-fire.

That being said, just keep learning, and use the approach that you''re most comfortable with (and can actually get something done with). Remember, when all is said and done, ugly jumbled code that works is better than pretty code that doesn''t.
daerid@gmail.com
Here''s the most absolutely important thing: keep going. Finish the project, and make it work. Then put it away for a while, do something else. Then return to the code, and think about what could have been better. If you''re really bored, rewrite it to be better; otherwise, just funnel the new ideas into your next design.

You learn from your mistakes. If you refuse to make any mistakes (by not finishing, it''s never a mistake; it''s a project in progress), you''ll never learn.
quote:Original post by Ledneh
I have no f***ing clue what I''m doing.

Don''t worry. The vast majority of IT workers earn a good living on such a basis.
I cant speak for everyone, but i know i had exactly the same problem about 2-3 years ago. I realised this (just like you have now) and started some serious reading. These books most definitely helped me along the way to tidier code:

Design Patterns, Gamma et al
Effective C++, Meyers
More Effective C++, Meyers

And it sounds like have yet to ''discover'' the STL - there are various online tutorials and books on it. You wont regret learning about it.
sounds a bit like the problems i''m currently having

if i''m not mistaken, it''s so usual that they even invented a term for it: spaghetti code :D
I had the same problem with Java, writing an app that I wanted "extensible" and with a lot of cool features. I finally get somthing but the code was quite awful as I was a beginner.

But I learned a lot from it and rewrote it completely : it was better but still not smart enough to my taste. So one more time I rewrote all the thing and now I think I reached a key milestone, where I just need to give some polish to my code instead of rewriting completely each time...

This project took years of spare time, thus beneficiying of increasing knowledges in design and programming, and a huge amount of thinking.

----
David Sporn AKA Sporniket
quote:Original post by SabreMan
Don''t worry. The vast majority of IT workers earn a good living on such a basis.


Especially in government.

(I know I work for the government and run into a lot of "IT" people)


Make it work.
Make it fast.

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
Jester, you need a 3rd line for your sig: "In that order"
daerid@gmail.com

This topic is closed to new replies.

Advertisement