This book is timeless, it is abstract and the topics apply to Java or the latest fad language.
One good thing about HN is quality material can be reposted. The rules say once per year the same topic can be discussed.
Given the absolutely dismal state of higher education and how shittily it prepares students for the workforce, posting books like this regularly for the next generation is very helpful.
- the content is covered more succinctly by the Wikipedia page on programming patterns.
- the content is out of date and doesn’t apply to most modern game engines (yes, it really doesn’t; yes, if you’re implementing flyweight or component yourself you’re writing a game engine not a game).
- it doesn’t cover actual game programming patterns like gpu kernels or blackboards (see for example Ai for Games by Ian Millington for a comparison of a book that gives actually useful advice).
Yes, it’s free.
Yes, it covers basic trivial programming patterns.
I think people can make their own minds up if they think it’s worth their time…
…but, regardless, I think it’s pretty fair to put 2014 into the title.
> The goal of this book is not to teach you C++. The samples are kept as simple as possible and don’t represent good C++ style or usage. Read the code samples for the idea being expressed, not the code expressing it.
>
> In particular, the code is not written in “modern” — C++11 or newer — style. It does not use the standard library and rarely uses templates. This makes for “bad” C++ code, but I hope that by keeping it stripped down, it will be more approachable to people coming from C, Objective-C, Java, and other languages.
So what? Smart pointers are not a superior alternative to raw pointers. They are a memory management device that you may or may not want to use.
For example a pattern that I think is common in low level game programming is to allocate a big chunk of memory containing a many objects and deallocating them all at once when you are done with them, let's say a level with its maps, textures, entities, etc... It doesn't really make sense to pass individual objects (ex: a single texture) using smart pointers because you can't delete them individually, in fact, unless you have overloaded the delete operator, it will crash if you do.
In fact, if you never use raw pointers, I think that you are better off using another language than C++ if you can. Manual memory management is a big part of what gives C and C++ its performance (at a cost). If you don't do that, there are languages with well optimized garbage collectors that will outperform you.
This is a solid book. It isn’t even really about game programming, it’s more about data structures and code organization IMO. Someday I need to post my Ultimate Programming Book list - this will be on it.
I love this book and it's inspired me at least twice that I recall to find a different way to approach solving a difficult problem. Highly, highly recommended, as well.
I used the Command pattern in LibreOffice to create a “filter” for animations and bitmaps.
I created a BitmapFilter class [1] it just has an execute abstract function which you override to create your own objects.
For convenience I created a static Filter function that takes a command object and then executes it to return a bitmap.
It means I never have to modify the Bitmap or BitmapEx classes to implement functions that modify the bitmap. Just derive from BitmapFilter’s class and you are up and running!
This is the standard way to implement Undo in editors. You have operations that are put onto stack and applied one after another on the original data. You can cache intermediate results for optimization. And when you undo - you just pop the last operation from the stack.
Is he on the Flutter team, or just working on Flutter-based things independently? Had a quick scroll through his website/Twitter feed and couldn't find anything specific - I work with Flutter pretty closely too so I'm keen to follow people who are also down in the weeds.
You can tell a book is good when, at various points you stop and think 'but what about...?', only for the author to answer the exact question in the next paragraph. Brilliant stuff.
- https://news.ycombinator.com/item?id=23203699
- https://news.ycombinator.com/item?id=14475489
- https://news.ycombinator.com/item?id=6004885
- https://news.ycombinator.com/item?id=24233229
- https://news.ycombinator.com/item?id=17845334
- https://news.ycombinator.com/item?id=7543158
- https://news.ycombinator.com/item?id=7634734
...
Can we at least get (2014) put in the title when this gets reposted again?