Data structures and algorithms or design pattetns?
I'm working in java, can anyone recommend me any particular books? thanks.
These are a couple books I'm planning on getting.
They are theory books and thus not specific for Java
Data structures and algorithms
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
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!
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.
irregardless of language.
Ahh, my favorite non-word, irregardless.
It just sounds smarter than regardless, don't it? (incorrect grammar on purpose)
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:
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>
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.