This content originally appeared on DEV Community and was authored by Pavel Morava
I am usually supportive (at least I hope so) when I see beginners trying to learn by teaching. There is nothing wrong with writing an article to help yourself understand what you think you know.
But lately, it is getting almost dangerous. Just today, I saw potentially very harmful code that can mess and delete your files. In the comments, I saw a clueless guy wanting to use this code to organize his photos.
And what is worse? The author of the article not only did not warn that guy about not using his code but even encouraged him to do so, probably because he felt acknowledged.
So if you are a beginner here or anywhere else, be very cautious when trying someone else's code, especially when a filesystem is involved. Never copy and never run the code, even if you think you understand it.
The potential danger can be hard to spot. In this particular case, I suspect the code deletes files after re-run. Not all of them, just a few. I would not see it myself if I did not try to re-create the program in a more fancy way.
In general, programming tasks that cause no side effects should not endanger your data. But the problem is that beginners would probably not be able to identify potential side effects nor understand what a side effect is.
I have to repeat: stay alert. I saw a discussion in which an idiot offered a "valuable piece of advice" to a newbie on how to fix a Linux production server:
rm -rf /
Don't do this! It may delete all your data. You can read more here
If you are curious, the newbie thought it was serious advice and did it! The so-called expert defended himself, saying he didn't believe someone could have been so stupid to do it!
This content originally appeared on DEV Community and was authored by Pavel Morava
Pavel Morava | Sciencx (2022-04-25T19:53:17+00:00) Dev.to is getting dangerous!. Retrieved from https://www.scien.cx/2022/04/25/dev-to-is-getting-dangerous/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.