C++ From The Past – I found C++ and OOP lectures I wrote in 2008!

You can’t possibly imagine what I found today! ūüėć
Back in 2008 I wrote a set of lectures on C++ and OOP for my uni, and never published them anywhere. Until today.

It’s pure gold. 60 pages, so very detailed, with code samples and full source code files. It goes about incapculation, inheritance, polymorphism, const modifier (all these lovely int const * const), exceptions, memory management, reinterpret_cast’s! Pointers vs references! Templates!! Auto_ptr’s! Unicode support!! I was so smart :).

Here is the link. It is all in Russian. Enjoy! ūüôā

UPD: in August 2019 I have learned that the lectures are still in use in my uni! They don’t credit me, unfortunately, but i am still happy the lectures are useful to this day, 11 years later.

Okay, okay, why did I write any lectures at all? I wasn’t a professor or a teacher, I was just a 2-year nerdy student, very much a C++ fan.

Why I wrote OOP lectures

When the OOP course started, in my second year of the university, I was so excited. I already knew what it was, but hoped to learn so much more.

I found all lectures before the start of the semester, and read them.

First lecture went: let’s have a class to describe a point. It looked like this:

class Point {
  int x;
  int y;

Second lecture described a line. The line was inherited from the point class and had two extra fields: x2 and y2.

class Line: public Point {
  int x2;
  int y2;

I went: wait, whaaaat?..

Third lecture described a square, inherited from the line class, with four more fields: x3, y3, x4, y4.

At that point I started to suspect it¬†was¬†some sort of proof by contradiction. It wasn’t. The lectures went on.

I went and talked with the professor. I told her it wasn’t the best approach, and explained why. I offered to write new lectures for her, instead of homework. She said rather indifferently: yea, go for it. Why not.

That autumn semester in 2008 I wrote my own OOP lectures. I was so happy writing! I enjoyed the process, the result, and how I get to summarize my thoughts in a neat way.

To my classmates my lectures seemed to help much more than the original ones. That was a nice feeling too. I was helping!

In the end of the semester, I sent the finished lectures to the professor, got my A, and never heard back from her. I don’t know if she credited me. I don’t even know if she used them at all. I found¬†my first job right after these lectures, and didn’t have time to follow up.

I do hope she found them useful.

UPD: in August 2019 I have learned that the lectures are still in use in my uni! They don’t credit me, unfortunately, but i am still happy the lectures are useful to this day, 11 years later.

But how come I never published them anywhere else?

How toxic community discouraged me from publishing

While still in progress, I posted the lectures anonymously on a Russian developers’ forum and asked for feedback. Some developers answered and offered a couple of tips, but others asked why am I doing this: am I going to sleep with the professor? Is she young and beautiful? If not, why do I even bother?

When they discovered I am a woman too, the discussion went off on a tangent. They started discussing me instead, and how I possibly couldn’t exist. Women can’t code, everyone knows that. I must have pretended to be a woman to draw attention to my¬†weak lectures. Laughable, really. Or was I ugly?

This was when I decided I don’t want to post anything anymore.

It took me several (7? 8?) years to be not afraid to share my professional insights publicly. That’s why I didn’t have a blog for many years, and didn’t speak on conferences. I was afraid I will be laughed at again.

Okay, my story about writing C++ lectures somehow turned into a sad story about toxic developers community. But hey, I overcame this, and I’m posing here now :).

Feeling sentimental

Why am I publishing the lectures now? It’s been ten years, and they are¬†hopelessly¬†out of date. Since then, three new C++ standards were published. When I was writing them, the current standard was C++03, from 2003, and I thought the new standard will never ever be released.

So why now, in 2018?

Why, I am feeling sentimental, of course. And I don’t want them to disappear. When I’m old and gray, I will be telling my grandchildren this story, while sitting in a rocking chair and drinking orange juice.

There was a time, I’ll say, when your grandma was young…