Identical scripts???

I am just starting to learn to script. So, i was thinking if you create a script to do anything in a game, wouldn't that script be written just like another persons script to do the exact same thing. So how would you tell if your script is original or not?
Many scripters have different ways / methods of coding the exact same product result in the end. It may or may not be more efficient than another scripter's version.
I'm sure once you get into scripting a bit more you will start to realize that there are many ways to achieve the same thing. The results may end up being the same but how you do it and what methods you use to get there will be different. An example of this would be at work (I write software as my current job) our apprentice once wrote a script to create a dynamic menu list based on a file. He wrote the whole thing within about 100 lines of code. I then looked at the code (at the time I had 3 years experience) and changed it to work within 50 lines of code just by changing the way he was doing it. Then the boss came along and rewrote the whole thing in about 20 lines of code (he has more than 15 years experience in programming). The end results were the same for all three but the way we got there was different based off of how we think. In the end the way you write the code will be what makes it original.

EDIT: Sorry about the long post I just thought it might be interesting 🙂
There are good ways and bad ways to solve a problem. How one would measure "good" depends on the actual problem, but I usually go with performance, flexibility, reusability, and readability.


Your solution is generally based on a number of factors, including


-Experience. Some people do what has worked for them in the past. Others like to try new things. However in general, the more experience you have, the more you are likely to stick to certain approaches.


-Knowledge. Of Ruby. Of RGSS API. Of general design principles. Of performance constraints. Of hardware and software considerations. Of the problem at hand. The more you know, the more likely you will approach things from a particular angle.


-Preference. Maybe you just like certain things (eg: note-tags vs configuration options)


There have been a number of times where I've written a script, and it was basically the same approach as someone else's script. But there have also been a number of times where my scripts were completely different but achieved the same thing. And these differences were important because they were more or less compatible with other scripts, or more or less efficient.
Have 3 people watch the same news story and have them all write a 10-line summary about it. They will all differ... well... with a 99.9999% chance or something. The same applies to code (programming), unless the script is only a few lines in size of course.

Just don't copy 1:1 and your script will almost always be original.

Just printing Hello World:

p 'Hello World'print 'Hello World'p "Hello World"TEXT = 'Hello World'p TEXTetc.There are too many ways leading to Rome for 2 scripters to code exactly the same thing for any serious script without stealing.

Original thread: https://forums.rpgmakerweb.com/threads/identical-scripts.18132/