
A Low Level Curriculum for C and C++ - nkurz
http://www.altdevblogaday.com/2011/11/09/a-low-level-curriculum-for-c-and-c/
======
mike-cardwell
There's a series of lectures on core C++ and the STL which you can download
for free from channel9.msdn.com from a guy called Stephan T. Lavavej who works
on the STL at Microsoft. I only wish my University lectures were half as good
as these. They're jammed full of useful information. They're still being
updated, the latest came out earlier this month.

~~~
interconnector
These look great, they can also be streamed from
[http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-
Lavave...](http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-
Core-C-/)

------
laichzeit0
If you're really interested in your subject you don't need people telling you
what to learn and not to learn. I mean most of University for me was a
juggling act between doing the prescribed courses and learning things I
thought was important because well, it was important, even though it wasn't
part of the course.

Like going through Knuth's and Steven's books, or learning assembler, or how
to use a debugger, or writing a 3d engine, or implementing some data
compression algorithms, etc.

None of these were prescribed but it's kind of intuitive that you should at
least know how to do these things if you're studying computer science, I would
think?

~~~
Nursie
>> If you're really interested in your subject you don't need people telling
you what to learn and not to learn.

You at least need someone to expose you to what is available to learn. It's
possible that without guidance a lot of people would never even think of going
to the lower levels, they can be nearly invisible to someone working on (for
instance) web apps with high level server frameworks and lots JS.

When it comes down to it, you need to know what you don't know, and some of
the low-level stuff (pointers, memory layouts, stuff...) really ought to be
part of CompSci 101.

Particularly in a country where pre-university computer education is
inadequate or absent. Most UK CompSci folks have mathematical and science
backgrounds but no formal education in computer science or programming.

~~~
lelandbatey
This is very true, and I can attest to it from personal experience.

I grew up in Redmond Washington, in the heart of Microsoft - land, surrounded
by programming and programmers. I learned a lot of the mental meta-skills that
go hand in hand with programming, but I didn't ever learn to program, even
though I thought it interesting and I wanted to understand it.

It was a challenge to even know what I wanted to know, and there wasn't anyone
around to answer my "but how, and why?" questions to begin learning. It took
till I was in college for me to start learning to program, because I had
excellent professors who would answer my questions for literally hours. As
well, I finally had problems that needed solving (if for no other reason than
I needed to turn them in).

------
nkurz
It's not well linked from this first page, but this is the introduction to an
excellent 12 part series: [http://www.altdevblogaday.com/author/alex-
darby/](http://www.altdevblogaday.com/author/alex-darby/)

Part 1: A Low Level Curriculum for C and C++
[http://www.altdevblogaday.com/2011/11/09/a-low-level-
curricu...](http://www.altdevblogaday.com/2011/11/09/a-low-level-curriculum-
for-c-and-c/)

Part 2: Low Level Data Types [http://www.altdevblogaday.com/2011/11/24/c-c-
low-level-curri...](http://www.altdevblogaday.com/2011/11/24/c-c-low-level-
curriculum-part-2-data-types/)

Part 3: The Stack [http://www.altdevblogaday.com/2011/12/14/c-c-low-level-
curri...](http://www.altdevblogaday.com/2011/12/14/c-c-low-level-curriculum-
part-3-the-stack/)

Part 4: More Stack [http://www.altdevblogaday.com/2011/12/24/c-c-low-level-
curri...](http://www.altdevblogaday.com/2011/12/24/c-c-low-level-curriculum-
part-4-more-stack/)

Part 5: Even More Stack [http://www.altdevblogaday.com/2012/02/07/c-c-low-
level-curri...](http://www.altdevblogaday.com/2012/02/07/c-c-low-level-
curriculum-part-5-even-more-stack/)

Part 6: Conditionals [http://www.altdevblogaday.com/2012/03/07/c-c-low-level-
curri...](http://www.altdevblogaday.com/2012/03/07/c-c-low-level-curriculum-
part-6-conditionals/)

Part 7: More Conditionals [http://www.altdevblogaday.com/2012/04/10/cc-low-
level-curric...](http://www.altdevblogaday.com/2012/04/10/cc-low-level-
curriculum-part-7-more-conditionals/)

Part 8: Looking at Optimized Assembly
[http://www.altdevblogaday.com/2012/05/07/cc-low-level-
curric...](http://www.altdevblogaday.com/2012/05/07/cc-low-level-curriculum-
part-8-looking-at-optimised-assembly/)

Part 9: Loops [http://www.altdevblogaday.com/2012/09/04/cc-low-level-
curric...](http://www.altdevblogaday.com/2012/09/04/cc-low-level-curriculum-
part-9-loops/)

Part 10: User defined types [http://www.altdevblogaday.com/2013/01/05/cc-low-
level-curric...](http://www.altdevblogaday.com/2013/01/05/cc-low-level-
curriculum-part-10-user-defined-types/)

Part 11: Inheritance [http://www.altdevblogaday.com/2013/05/03/cc-low-level-
curric...](http://www.altdevblogaday.com/2013/05/03/cc-low-level-curriculum-
part-11-inheritance/)

Part 12: Multiple Inheritance [http://www.altdevblogaday.com/2013/05/22/cc-
low-level-curric...](http://www.altdevblogaday.com/2013/05/22/cc-low-level-
curriculum-part-12-multiple-inheritance/)

------
yoodenvranx
Does anyone know similar blog entries, articles or tutorial?

~~~
nly
Nicolás Brailovsky did a great exploration in to the internals of one modern
implementation of structured C++ exception handling:

[http://monoinfinito.wordpress.com/series/exception-
handling-...](http://monoinfinito.wordpress.com/series/exception-handling-
in-c/)

He went so far as to reimplement his own handlers, which is totally awesome.

For other important things, like the memory layout of the inheritance graph
(generally optimal for single, non-virtual inheritance), virtual table
layouts, the structure of member pointers and RTTI, the Itanium C++ ABI
(followed by GCC and Clang on open OS's but not MS) is a good place to glean
some insight:

[http://refspecs.linuxbase.org/cxxabi-1.83.html](http://refspecs.linuxbase.org/cxxabi-1.83.html)

For instance, you may be surprised to learn that member pointers aren't even
pointers in this implementation, but a pair of offsets (one for the object,
one for the vtable) used to find the function to call.

------
revskill
The author uses Visual Studio. Hm, he doesn't use gcc ?

~~~
stinos
Doesn't matter.. Even if he would, most low level stuff would be almost equal
(like the assembly generated) or at least very similar. Yes both are different
compilers and do some things different (vtables/stack layout for instance if I
remember correctly), but in the end if you know how the assembly generated
from one works you'll have no problem understanding the other one. Besides,
the screenshots from VS's mixed source/asm debugging do look nice and are
really clear and helpfu for beginners.

~~~
lgeek
> Besides, the screenshots from VS's mixed source/asm debugging do look nice
> and are really clear and helpfu for beginners.

gdb can print the same sort of thing using disas/m. Here's an example:
[http://i.imgur.com/toKq8pd.png](http://i.imgur.com/toKq8pd.png)

------
SuddsMcDuff
I was interested in this until it became obvious it was going to be very games
programming centric. That's too niche to be useful to me.

~~~
FreezerburnV
And for everyone like you, who does not fit into that niche, there is likely a
person like me, who needs deeper information in that niche :) This looks like
it will be very useful for people who are in that niche, even if it starts out
simple. I'm (and I'm sure many others are) glad this was put on the front page
and am looking forward to the other posts, hoping to broaden my knowledge of
game development/C++.

Don't be so negative about things that seem like they aren't useful to you.
Sometimes things like this are useful to many others.

~~~
SuddsMcDuff
My issue is that the title of the article suggests it's much more general in
scope than it actually is.

"And for everyone like you,... there is likely a person like me" \- That would
mean the article is applicable to 50% of C++ developers, which is not a niche.
I'd say your estimation is way off.

~~~
Narishma
These articles aren't games-specific at all. They're pretty general. What made
you think they wore games-specific?

