• Forum
  • Lounge
  • How much will you forget in 1yr, 2yrs..e

How much will you forget in 1yr, 2yrs..etc?

Just curious if you guys have gone months without looking at C++ & how much do you forget? It is probably a function of how long you have been doing it in the first place.

Wonder how much others might have forgotten after stepping away for a few months & not touching C++ at all?

Also, there is just so much and one can't remember everything, so do you periodically cycle through your samples codes that teach you a particular lesson? How often do you cycle through & review, daily, weekly, monthly, yearly?

Are you organized & have good go to references at your fingertips, is that part of the big key to success?
The reference is:

Also read blogs:
https://www.fluentcpp.com/ (although not updated for 2 years)

The old saying applies "What you don't use you loose"
> Just curious if you guys have gone months without looking at C++ & how much do you forget?
Probably a lot of it.

> It is probably a function of how long you have been doing it in the first place.
Like riding a bike when you haven't for years.
A bit wobbly for an hour, then you're right back into it.

The biggest problem with stepping away too long is there's a new C++ standard to deal with when you get back to it.

> Also, there is just so much and one can't remember everything
C++ is so large that the 90/10 rule likely applies.
You use 10% of it, 90% of the time.
Focus on learning about features (like std::vector), not the gritty detail of what each function actually does.
Focus on learning about features (like std::vector), not the gritty detail of what each function actually does.

Yeah - that's what's cppreference.com is for. I always have it open when I'm coding.
Being a self-taught, still learning, C++ programming hobbyist and an official old fart I can forget things hours -- not just days or months -- after reading/using some language feature. Especially if it isn't something I normally would use and is a newer feature from C++20/23.

Constant repetition by coding example snippets is how I "remember" a feature, but that is no guarantee I will remember later when using it would be beneficial.

cppreference is an excellent reference online source, and Learn C++ is a good learning and refresher source. While neither is perfect they are better than ignoring what's available online.

Buying and reading programming books is a secondary source, if you can afford the space and expense. Even an out of date book can be useful to relearn something as long as you keep the fact it is outdated info in mind.
Let me give a couple of IRL examples. I remember enough to use std::string, std::vector (or even std::array) and a smart pointer vs. a char or other type of C-style array or a raw pointer. Especially when dealing with run-time memory management.

Even though I intellectually know about std::string_view and std::span<> I usually without thinking about it much use a ref or const ref when passing the string or vector as a function parameter.

Passing a C++ std::array into a function can get real annoying unless you use a template, so my fall back container is to use a vector.

Random access with a container's elements I know I should use .at() instead of [], not bounds checking with [] has bit me on the tuchus on occasion. That can happen when you downsize a vector and do not use the vector's iterators for access.
All helpful, thanks.

Sometimes when you look at others code, it looks like a foreign language all depending on what topics you skipped over from the books and what formulas are being worked on.

Do you guys use LeetCode at all? Any other good sources of smaller practice program assignments, with smaller daily chunk sized task to practice on?
George P wrote:
Random access with a container's elements I know I should use .at() instead of [], not bounds checking with [] has bit me on the tuchus on occasion.

You know you can get bounds checking for [] in "debug mode"?

I went 5 years in another language and only did about 1/2 page or less in c++ a couple times in that part of my life. Its not what I forgot, its what changed... learning the language updates, for me it was 11 & 17, was brutal coming back in. I got a ton of help here, reading responses more than asking...
I remembered most of what I knew before, but I had spent 20 years in it before this period.

And yes, if you did the math, that doesn't add up. 11 was out when I was using c++ but I didn't dive into it immediately when it came out, no great excuse other than my job wasn't using it yet, which isn't a good reason to not learn it. I have tried to keep more current since, and its changing faster than it did back then too.
Last edited on
Oh wow, I hear you. I am learning for myself & not for a job. I was doing so good but then I did not utilize some of the subjects for a few months and then because of circumstance I stepped away for a few months totally.

Coming back now, I definitely need a review & some of the subjects I had a false illusion of knowing, such as the lifetime returns from functions or I never really looked deeper into it until now.
What I find is that when I go into a book and I memorized a bunch of code snippets & even the variable names & function names and it seems like I know it. But then when I try to utilize the combo of these subjects I run into snags & it gets frustrating. I am like a parrot in the beginning & sometimes I don't even know the extent to which I don't know things. Sometimes you do learn harder & it stays with you for longer when you make mistakes though.

For examples, I have not touched templates/unique_ptr in months after learning about it. So I go in without looking and oddly I remembered everything except where the "new" is to be placed and my brain was screaming I remember there was a parenthesis in there somewhere, so close:
unique_ptr<int> pNum new(int); //nope
unique_ptr<int> pNum = (new int); //nope
unique_ptr<int> pNum = new int; //nope
unique_ptr<int> pNum (new int); //Then after looking it up
cout << *pNum << endl;

I had practiced that sample code many times back then and I should know it even months later, but nope. Gotta go back to my tuples too.
Also, curious as to what year into your studies did you feel confident & feel like a programmer? How long does it typically take? How long did it take you and how many daily hours did you put in?
Re the unique_ptr. There is also make_unique which is 'easier' if you don't already have the raw pointer to be managed. See https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique

#include <memory>
#include <iostream>

int main() {
	const auto pNum { std::make_unique<int>(27)};

	std::cout << *pNum << '\n';

	*pNum = 99;

	std::cout << *pNum << '\n';

How long does it typically take?

If you are using C++ pretty much daily, then we consider around 2 - 3 years to become reasonably proficient. If you are reasonably proficient in another language (say VB.net) then about 2 otherwise nearer 3 years. Anyone with less than 2 years of solid C++ experience we call a junior programmer, then moving to programmer after about 3 years (depending upon the person) then to senior programmer after about 5 - 6 years.

But that is just for C++. Then there are the 3rd party libraries to learn and use (C++ doesn't do gui, graphics, sound, networking etc etc etc). Getting familiar with these can take as much effort as learning C++. When people have experience of libraries as well as c++ we call them developer as opposed to programmer (don't ask!). Some take around 5 years to become a developer and about 8 to become a senior developer (added - in total).
Last edited on
Thanks, I did not know about make_unique as I am sure about tons of things & libraries.

So 5 years MORE on top of the 2-6 years for junior/programmer/senior?
Not really. Most start using 3rd party libraries after a few months of learning C++. Some start learning both together (that's a steep learning curve). 5 - 8 years was in-total not added-on. But a lot depends upon the abilities of the person.
Last edited on
I felt like a programmer after 6 months, my first class which I had in high-school. Arrogance of a youngling, but I sure THOUGHT I knew a lot after making a BST, writing a file to disk, and some other similar intro stuff.

One of the most important concepts I learned not in a programming class but in a class on the internet (it was beyond new, text based and nothing like today, and people were required to take classes in how to use it). That is the principle of near information, and you should take it to heart. Outside of school or very rare circumstances, where you may have to rely on memorization to function, you can LOOK STUFF UP. You don't need to know how to write shellsort. Its 10 lines and you can copy it off the web, because you know it exists and you know what its good for. You don't need to know a unique ptr vs a shared ptr vs a raw pointer etc, because you know they exist, and you can look up the details if you need to use them, and do a quick review. The things you do frequently, you will look up frequently, and by sheer exposure from doing it many times you will remember those, and thus the building blocks you need will become innate while the stuff you only use once in a rare while can remain in cyberspace. what you need to know is not every little detail, but WHAT IS AVAILABLE to work with. If you know its out there, you can look for it, find it, and use it within minutes.
Six months seems like record time, wish I was exposed to C++ starting at 8-10 years old.

Has anyone gone to university recently & how are they teaching it there? Seems like I am past the point of a school helping, unless it specializes in a field such as files, databases, STL..etc. I know enough to get myself into trouble! Sometimes I come across something that does not work, but I am not happy until I know why exactly it does not work, more of a need to know what is behind the scenes.

Sometimes I will watch one of the C++ videos on Youtube, but I know a lot of it & every now & then pickup a new way, method/function, or STL method that I have not seen before or sometimes the older C formatting in cout. But you have to go through a lot to get to the stuff you don't know. I still have gaping holes in the stuff I know, but it is not until I go and experiment more away from the book that my lack of full understanding shows up.

Is there any intro-to-intermediary class lectures/videos that you know of that you consider really good? I would love to hear what they are teaching in a C++ class though, just to gauge where I am at.
Last edited on
Registered users can post here. Sign in or register to post.