Live data from Hacker News

Doom3 is the proof that “keep it simple” works

gamedev.net

101–110 of 111 posts

Re: Doom3 is the proof that “keep it simple” works

#101
post #81

As someone who wants to learn modern c++, what are some good resources/books to learn from ? I have python and java experience and I have been reading Accelerated C++ since a while now.

As an addendum, I highly recommend not reading decade old source code like this as an example of modern C++. C++11/14 have changed the language so much for the better that anything targeting C++03 should be ignored for new projects and especially for new learners. Also, avoiding Boost and Qt early on is also a good idea. Both have tremendous stylistic and design differences from ISO C++ and while the language support…

I disagree because writing a Qt program is often the end goal.

Re: Doom3 is the proof that “keep it simple” works

#102
post #97

Earlier quoted context omitted.

> Let's go inside its source code using CppDepend and discover what makes it so special. And the article is written by the creators of CppDepends

But as somebody with zero experience, I wasn't aware when reading that this was a tool and not a part of the language itself. I read articles like these because I have an interest and a lack of knowledge, and I'm learning all kinds of things today. I've been a longtime fan of Carmack, and I wish I could read and understand his work for myself!

>But as somebody with zero experience, I wasn't aware when reading that this was a tool and not a part of the language itself.

That's the very problem he tries to address I believe...

Re: Doom3 is the proof that “keep it simple” works

#103
post #97

Earlier quoted context omitted.

> Let's go inside its source code using CppDepend and discover what makes it so special. And the article is written by the creators of CppDepends

But as somebody with zero experience, I wasn't aware when reading that this was a tool and not a part of the language itself. I read articles like these because I have an interest and a lack of knowledge, and I'm learning all kinds of things today. I've been a longtime fan of Carmack, and I wish I could read and understand his work for myself!

>But as somebody with zero experience, I wasn't aware when reading that this was a tool and not a part of the language itself.

That's the very problem he tries to address I believe...

Re: Doom3 is the proof that “keep it simple” works

#104

Earlier quoted context omitted.

You should try a Perl codebase. In just this one module I'm looking at, there's methods with 505, 880, and 995 lines.

A popular VoIP product has switch statements that are in the thousands .

Is it automatically generated?

Re: Doom3 is the proof that “keep it simple” works

#106
post #65

Earlier quoted context omitted.

Well, don't forget about exceptions, unless you decide to ban them like many people do. So add: Exceptional C++ by Herb Sutter More Exceptional C++ by Herb Sutter Exceptional C++ Style by Herb Sutter And Templates: C++ Templates: The Complete Guide by Josuttis & Vandevoorde And of course you need some background in generic & metaprogramming, so add: Modern C++ Design by Alexandrescu Advanced C++ Metaprogramming by Ge…

All of that is hardly prerequisite for using modern C++ on a day-to-day basis. You can get away with just reading "A Tour of C++" and the Effective C++ books. If you want to start writing highly generic libraries with the intention of submitting them to boost, then absolutely you should be reading everything in your list and more. But how many C++ programmers are writing boost libraries?

Yeah and the Exceptional C++ series is not 'about exceptions' either. It looks like he just googled 'c++ exceptions book', and the same for templates and metaprogramming, probably.

Re: Doom3 is the proof that “keep it simple” works

#107

Earlier quoted context omitted.

Over 150 lines of code in a simple method? C-style declaration of all the variables in the beginning? (Yes, I know what Carmack said about how he written the project; this explains it, but doesn't make it good C++ code.) Unclear flow with just one comment, which doesn't really explain anything?

Why do you say it's a simple method, if it is 150 lines long? Are some lines not necessary? There is a logic to keeping logic together if it is isolated: http://number-none.com/blow/john_carmack_on_inlined_code.htm... Context is important, to anyone developing D3 code, this code might be obvious and comments would be unnecessary. Considering 'geterdone' attitude of many game projects, with high levels hackery, this i…

Thanks for the link, it's a very fascinating read! By the way, I discussed this issue on Programmers stack exchange a while back, you might find this interesting: http://programmers.stackexchange.com/questions/277098/method...

Re: Doom3 is the proof that “keep it simple” works

#108
post #99
post #98

Earlier quoted context omitted.

"You shouldn't have to include any libraries" "you shouldn't have to rewrite some code that does something that's already available and well-written" How are those not contradictions?

You tell the compiler what data type you're trying to use, and it finds a high-performance implementation for you over the internet.

That sounds incredibly safe.

Re: Doom3 is the proof that “keep it simple” works

#109
post #108
post #99

Earlier quoted context omitted.

You tell the compiler what data type you're trying to use, and it finds a high-performance implementation for you over the internet.

That sounds incredibly safe.

Compile time never sounded so fun

Re: Doom3 is the proof that “keep it simple” works

#110
post #108
post #99

Earlier quoted context omitted.

You tell the compiler what data type you're trying to use, and it finds a high-performance implementation for you over the internet.

That sounds incredibly safe.

Have you tried it? Or are you just imagining an extremely terrible implementation of the idea so you can write short quips about how bad it must be?
Post reply on HN