Rosetta Code:Village Pump/My code is better than existing one: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(Yep.)
Line 24: Line 24:
Thanks for explanation! Unfortunately, I did a poor decision of not waiting for replies and blatantly replaced the code here: [http://www.rosettacode.org/wiki/Abbreviations,_automatic#Functional http://www.rosettacode.org/wiki/Abbreviations,_automatic#Functional]. <br />
Thanks for explanation! Unfortunately, I did a poor decision of not waiting for replies and blatantly replaced the code here: [http://www.rosettacode.org/wiki/Abbreviations,_automatic#Functional http://www.rosettacode.org/wiki/Abbreviations,_automatic#Functional]. <br />
Should I make a roll-back and start a discussion now?--[[User:Georgy|Georgy]] ([[User talk:Georgy|talk]]) 12:00, 4 November 2018 (UTC)
Should I make a roll-back and start a discussion now?--[[User:Georgy|Georgy]] ([[User talk:Georgy|talk]]) 12:00, 4 November 2018 (UTC)

: At least start a discussion pointing-out why. [[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 12:30, 4 November 2018 (UTC)

Revision as of 12:31, 4 November 2018

My code is better than existing one
This is a particular discussion thread among many which consider Rosetta Code.

Summary

I wrote a code for one of the problems that in my opinion is more concise and easier to read. What should I do? Should I replace previous version by mine? Or the fastest gun wins? I couldn't find the rules on this matter. -- Georgy (talk) 05:58, 4 November 2018‎ (UTC)[[Summary::I wrote a code for one of the problems that in my opinion is more concise and easier to read. What should I do? Should I replace previous version by mine? Or the fastest gun wins? I couldn't find the rules on this matter. -- Georgy (talk) 05:58, 4 November 2018‎ (UTC)| ]]

Discussion

It depends. If your version uses substantially different algorithms to accomplish the same goal, it may be worth adding as a second, alternate version. If it is essentially the same process, just clearer, my inclination would be to replace. Note that Rosetta Code is mostly geared toward demonstrating how your language works to people who may no be familiar with it, so extremely dense code to the point of obfuscation isn't really the goal. Some languages can really help it though... (lookin' at you, J) Conciseness bringing clarity is a win though.

Since you are a new user, my gut reaction would be to say: add as an alternate version and watch the reaction from the community.

BTW, It is a good idea to sign your comments, I retroactively added your signature above. Just put --~~~~ at the end of your edit and the wiki will transform that into a signature. --Thundergnat (talk)


One way.

(quick edit conflict resolution as Thundergnats answer above preceeded mine).

One could move the discussion to the talk page by leaving a short note to that effect on the page. In the section of the talk page you could put your code and why you tink it should replace what is shown. Is it more idiomatic? More readable? ...

RC isn't really about the fastest. There are really no good ways to judge speed, and speed is not usually mentioned in the task. One would expect answers to work in a "reasonable" time, and people have been known to note solutions they found quite slow; for example, a few languages might have implementations of "big" integers that make some calculations slow and have stated that their language took tens of minutes to perform task. (Especially if they got the feling that it was orders of magnitude longer than other languages).

If you have an innovative approach to solving the task as stated, then there can be two examplesfor a language. If you think that an existing example is poor/un-idiomatic then best to follow my first suggestion, giving a wider section of your languages community a say, or quote better adherence to the languages published quidelines.

Paddy3118 (talk) 11:38, 4 November 2018 (UTC)


Thanks for explanation! Unfortunately, I did a poor decision of not waiting for replies and blatantly replaced the code here: http://www.rosettacode.org/wiki/Abbreviations,_automatic#Functional.
Should I make a roll-back and start a discussion now?--Georgy (talk) 12:00, 4 November 2018 (UTC)

At least start a discussion pointing-out why. Paddy3118 (talk) 12:30, 4 November 2018 (UTC)