2 ms·
I remember taking a few C++ classes in high school. It would have helped if our teacher had spent even a few minutes explaining what version control is. Their i
by AdmiralAsshat 10y ago
I remember taking a few C++ classes in high school. It would have helped if our teacher had spent even a few minutes explaining what version control is. Their instructions never went beyond "You should make sure you save your work periodically." That brilliant piece of advice immediately yielded the following problems for us:
1) Sometimes after compiling under VisualStudio we would return to look at our source code and see that it had been replaced with Assembly. Teacher's response? "I guess you'll have to write it again."
2) Saving periodically to a single file is about as useful as not saving at all when you have borked your program somehow. Now you get to spend the next few hours commenting out random lines and inserting `cout<<"Here"` lines into the code to see how far along it got.
We in the class eventually decided that the "safest" way to do it was to continually save the files under new names in order to create a poor man's VCS. But that in itself was difficult to remember after more than a few days of working on it, as you'd have to remember which version you wanted to work on: assignment.cpp, Copy of assignment.cpp, assignment.bkup.cpp, assignment(Last version that worked).cpp, etc.
I would be appalled these days if CS classes don't spend at least a single lecture discussing how to use Git.