Data structures and algorithms or design pattetns?

Started by
9 comments, last by Chad Smith 10 years, 7 months ago
I'm interested in getting a new book in one of the previously stated topics. which one of these topics should I work on first? I already know basic data structures.

I'm working in java, can anyone recommend me any particular books? thanks.
Advertisement

These are a couple books I'm planning on getting.

They are theory books and thus not specific for Java

Data structures and algorithms

introduction to algorithms

"Talk is cheap. Show me the code."

- Linus Torvalds

probably better to learn data structures and algos first - they're more fundamental.

Patterns are about recurring themes of object organization in OO languages that tend to occur in certain circumstances.

IE a pattern is a common way to organize objects to solve a common problem.

but objects are merely a way to organize data structures and algo code.

programs are data structures and code.

everything else is just a wrapper.

irregardless of language.


Data structures and algorithms

this is the book i used in software engineering at Ohio State University. good stuff. the credits transfer anywhere - even MIT and CalTech. i'd recommend it.

also, data structures tend to be a bit lower level than algos. there are numerous complex algos that use basic data structures - partition trees for example - fancy stuff there, but based on the simple tree node data structure: a hunk of data and one or more child pointers.

so start by learning the basic data structures and the algos that go with them (queues, linked lists, trees, matrices, sparse matrices, hash tables, etc).

other useful books like that for game development:

numerical methods

linear algebra

physics

perhaps discrete math too

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

I'd recommend staying away from patterns until you have some experience dealing with larger projects. It is very easy for beginners to get overly excited about patterns, and often try to apply them to everything. Patterns are primarily for communication between developers, both in the code and in person or over IM, email, wikis, etc.

I'd recommend staying away from patterns until you have some experience dealing with larger projects. It is very easy for beginners to get overly excited about patterns, and often try to apply them to everything. Patterns are primarily for communication between developers, both in the code and in person or over IM, email, wikis, etc.

Yeah, nothing screams "good time" like sitting down at my desk with a cup of coffee and have 100 people tell me why I should use a Singleton pattern over IRC, only to have 100 more people tell me I should not be using a Singleton pattern on IRC! wub.png

Anyways, I second Data Structures and Algorithms. I was quite fond of this book. However, as Rip-Off said, don't get too wrapped up on patterns. Patterns serve a purpose. They are not a cure all solution to every problem. The real skill in using patterns is to learn when to use them, when not to use them, and what to use them for.

"The code you write when you learn a new language is shit.
You either already know that and you are wise, or you don’t realize it for many years and you are an idiot. Either way, your learning code is objectively shit." - L. Spiro

"This is called programming. The art of typing shit into an editor/IDE is not programming, it's basically data entry. The part that makes a programmer a programmer is their problem solving skills." - Serapth

"The 'friend' relationship in c++ is the tightest coupling you can give two objects. Friends can reach out and touch your privates." - frob


irregardless of language.

Ahh, my favorite non-word, irregardless.

It just sounds smarter than regardless, don't it? (incorrect grammar on purpose)

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

As we're in For Beginners, let's make a special effort to remain on topic.

Would the book still be a good resource to me if I know absolutley nothing about pascal(The language the book is instructed in)? I would consider myself an intermediate in Java, and have basic knowledge of C++, C# and Python. Or would a Java specific book be more beneficial to me? Such as:

This

it will probably be easier to use a book with examples in a language you're familiar with.

OTOH, pascal is pretty straight forward - about half way between basic and C.

really the thing do though is check the table of contents if possible, and get the one that covers the most topics. odds are that will be the best book, (ir) regardless of language.<g>

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

As I understand design patterns, they're really just templates from how other people have done things in the past. If you understand enough about the underlying logic of programming, you could even intuit some of these design patterns yourself without ever having technically learned them anywhere. That's because they are top down abstractions of the more concrete and systemic things like knowing the syntax, knowing which recipe to use and knowing how to access and store data in the right way.

I mean, clearly a program needs a program loop, because it's merely a set of pixels that keep updating on a screen at certain intervals - and the computer doesn't have the consciousness to figure out how to stop on its own. Inheritance, grouping and otherwise tightening up code is also just common sense. No serious developer wants to spend resources when they can be spared, writing 500 lines of a code they could've easily written in just 20 lines (and then instantiated instead).

Well, I'm just a noob so I may not be much help. But it makes perfect sense to me that Algorithms and data structures comes first.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -

This topic is closed to new replies.

Advertisement