re: The Importance of Quality Comments VIEW POST

FULL DISCUSSION
 

Document/save any changes you make to a library. A must if you’re building a project.

This is why we use source control. Why do we need to save a copy of the unmoified code? In Visual Studio and Git, with Code Lens you can actually see for each function who was the last person to modify it, you can see the commit history for the file and see all the versions of the file and diff it with the version you are currently working on. So why would I need to take a copy of the code I am working on and post it to GitHub? Also many devs work at companies where doing something like that is a violation of company policy. So they would get in trouble for following that advice.

 

The main problem is that we only have the binary version of the library, so there's no way to fix bugs on it. We know it's based on an open source library that has already fixed some bugs but as we don't know what was changed in our version we cannot use any new version of it.

 

So are you commenting the work arrounds you have put in place to get the library working? That is a valid use of code comments, but in your article I don't remember that you mention that. I would be very careful using such a library since it has known bugs and could easily become a security problem.

But still does not answer the question of why do you need to take the orginal source code and put into a public repo in GitHub and then put a link in a code comment in the code you modify. Why do you think that is needed? With good source control tools you can look back at version of the code that was modified that you want to look at. I have never needed to do this nor have I have seen others do it. In fact if I did this at work with out approval I could lose my job.

I haven't said to upload it to GitHub, but put it somewhere. It can be a zip file in GDrive or on a private repo in Bitbucket. You are right that publishing something to Github without permission can be dangerous.

The problem we have is that there's a modified library in the project and we don't know how to update it or change it.

code of conduct - report abuse