Talk:Wikicode
Add topicWhat do you guys think? Any changes necessary?
--Mauricio Rodriguez Alcala 16:03, 27 Mar 2005 (UTC)
Perhaps we can have different pages for each language, and have all of those pages use the same template, which will include the code itself. That'll make it easier to manage the different languages. And we could enable subpages for the main namespace, so that we can use subpages for each program's modules, documentation, etc.
I like the idea, and it'll really help with a project that the Vietnamese Wikipedia may start in the near future, which will be to develop a client-side IME for the Vietnamese language wikis.
Also, if you use MediaWiki's category system, you don't have to categorize by language first and then by program type: simply include both types of categories on the page. Wiki software is very suitable for this type of collaboration, because it already has very good features available. With the upcoming validation features, that'll work even better. (Even branching would work well: you can branch a project by copying it to the subpages under your userpage.)
– Minh Nguyễn (talk, blog) 23:51, 28 Mar 2005 (UTC)
Thanks for the feedback guys :) Im glad you liked my idea. At the moment I am learning advanced mediawiki editing and such because i am fairly new to wikis so I am practicing at wikipedia. I like the idea of templates for the languages I just need to learn how to do that. Ill start practticing and get some examples of pages on this article later.
--Mauricio Rodriguez Alcala 21:36, 30 Mar 2005 (UTC)
I think this would be great. I was thinking of something like this for the MenuetOS wiki. It would really help with the OpenSource Development process and the open Documentation :)
My own attempt at it without modifing MediaWiki source can be found here... http://menuet.homelinux.net/Code:Documentation
I would eventually like to be able to able to click on a variable/function and be sent to a page that has the documentation about that variable/function but I think that is something that will have to be worked on within our community (the Menuet Community). --69.11.129.4 02:40, 3 Apr 2005 (UTC)
I am somehow sceptical whether such thing could catch on.
a) There are already dozens and dozens sites/groups/discussion forums having this functionality.
b) The field is huge and wide.
The (a) means that people who contribute are already engaged.
The (b) means that technology specific sites are easier to manage, read and update. Wiki may not be enough advanced technologically to allow end users to pick just what he needs and ignore the rest.
Pavel Vozenilek, programmer. 83.148.62.233 22:43, 3 Apr 2005 (UTC)
diversity
[edit]Sure there are many other sites out there telling you how to write your code, actually far too many, and most filled up with 'business bullshit' and commercials. This is the platform we have to build, if there are any technical problems or shortcomings we can unite and build solutions, together. Flame wars will occur, knowledge will spread, from academia to poor people. Tobias Bengtsson, programmer, currently student, --83.227.95.46 12:44, 4 Apr 2005 (UTC)
- I agree about too many sites of low quality. This says two things: (1) it is hard to create high quality site, (2) such sites are target for junk/commercials/spammers/etc. Wikipedia is irrelevant to most businesses so it didn't fell down yet but Wikicode may not be so lucky. Pavel Vozenilek, 83.148.62.155 19:51, 7 Apr 2005 (UTC)
This project would be pretty different from the rest of wikimedia of course. For one, programs/code will be hard to find if a deatailed categorizing system is not put into place. We should encourage descriptive names to make programs easier to find (maybe even have a small summary put in by the author in the category view). I still beleive it will be highly supported and helpfull. A great open-source community can be developed, and people might start developing projects right here in the wiki. It will also be a learning community. Commenting source code will be encourage and those who don't will have them fixed by some other experinced people who view the source :). And finally, the number one reason why a wiki will be much greater than what is already in place (i.e. planet source code) is fixing of errors. How many times have you found those in public source code? Another opportunity is presented here, people can write instructions for compiling with different OS's/Compilers as well to reduce errors and encourage portability. Anyways sorry for my horrible grammar, im to lazy to read it over :). Hope you understood and if you support this then please sign your name here under the wikicode part.
--Mauricio Rodriguez Alcala 01:32, 5 Apr 2005 (UTC)
If the functions were also written in PDL or language specific PDL (PDL that is specifily organized to handle the nuances of a language, but not the general syntax) people could see the steps of a piece of code and from there tailor the code to their needs or to their enviroment --Mitrebox 13:48, 8 Apr 2005 (UTC)
How would you guys handle the multi-language (natural language, not programming) issues that arise with program comments and variable names? I wouldn't like to read code that has identifiers in Catalan. Separate versions of code for each natural language or code only for English with internationalized page titles and outside of code text? jni 16:34, 7 Apr 2005 (UTC)
Separate versions for each language would be best although it will be WAY easier to translate source code than to translate a wikipedia article.
--65.10.48.82 04:19, 8 Apr 2005 (UTC)
Division into functions, languages, function categories
[edit]I believe that the best way to handle navigation of wikicode is to divide the articles into functions. I believe this is better than by program( games,opearating systems,applications) because all programs generally have the same functions (open a file, read, write, close) Also developers are writing their own programs and usually are looking for a function just to do one step of that program (convert a number from decimal to binary). A function that does that can be used by many more people than a calculator application for windows that can convert from decimal to binary. Functions would be placed into categories both by language(VB,C++,Java) and by type or purpose (Time/Date, File input/output,) There could even be subcategories. Math -> Fractions ->Addition of Fractions. One could reach these functions by either selecting a language or a function category.
The great thing about this methodology is by adding a function in one language VB I am encouraging people recreate the function into C++. Functions could even call other functions i.e. DiffWeekDays a custom function I once had to write that counts the number of week days between two dates calls DiffDays a standard vb function that counts the number of days between two dates. Other people could then write the functions DiffDays and DiffWeekDays for C++ --Mitrebox 13:44, 8 Apr 2005 (UTC)
Languages
[edit]A fairly fundamental decision is whether this is localized for each language, or whether all languages use the same code (as seems to be the suggestion). I think Wikicode's a great idea, but having one body of code for all languages is terrible. By way of illustration, some Lisp code I recently wrote looks like:
(defun retrieve (type) (let ((name (symbol-name type))) (gethash (intern (subseq name 1 (length name))) *words*)))
I think that's pretty clear (at least if you know Lisp). Imagine if that was:
(defun foo (bar) (let ((baz (quux-enn bar))) (gethash (intern (subseq baz 1 (length baz))) *qux*)))
You might as well just read the disassembled object code! "Programs should be written for people to read, and only incidentally for machines to execute". Especially if Wikicode is to be used for pedagogical purposes, variable and function names need to be in the reader's language. (A related question is whether all code should be "in" English altogether -- this is realistic, since so much documentation in English-only. Anyone seriously interested in programming already has to learn English.) --217.159.81.198 22:42, 10 Apr 2005 (UTC)
Previous proposal
[edit]This is a similar informal proposal from Talk:Proposals for new projects that I'm merging here. -- Beland 21:28, 30 May 2005 (UTC)
Wikisoftware
[edit]A directory where anyone can put software that they have made and others can edit it, fix bugs, improve it, etc. Eventually, software programs could reach a state of near-perfection, and they will be available for free, for everyone!
- This already exists many times over, and is the heart of open source. -- user:Zanimum
- www.sourceforge.net.. Ozzyslovechild 12:05, 28 Jan 2005 (UTC)
- No, SF doesn't use a wiki-structure yet, so I think doing the coding in a wiki is really sth. new Ahamay 15:40, 11 Feb 2005 (UTC)
- www.sourceforge.net.. Ozzyslovechild 12:05, 28 Jan 2005 (UTC)
Code Comparison
[edit]The problem is that someone could bury a virus or something else in the code.
We are worried about qualtiy-assurance.
The solution is to have a program look for the changes in the code, compared to the "clean" most recent version you have, so you can see what the person contributed, be it a virus or just changing the font to red.
Also automatically running Norton Antivirus, anti-spyware, etc. would not be a bad idea before code is posted on the website.
This would make WikiCode worthwile compared so Scourgeforce or anyone else, because people would know that when they went to WikiCode, as they do with Wikipedia, they are getting quality-assurance, and they can trust Wiki, because:
When you Google something you always get some junk websites out to steal everything you have (there is always the risk that you click one of those websites), and the best websites are buried in hundreds of results. With Wiki you don't get the junk, even though you don't get so many results for your query.
Some General Ideas
[edit]- Hey I had this idea! Anyways some suggestions that I have are the following
- Have unit tests and a unit testing framework on the source codes site such that edits are only permitted to code if the code passes the unit tests and also runs through the interpreter/compiler
- Unit tests should be written collaboratively as well and maybe testdriven or extreme programming practices can be used but this is also something that should be decided collaboratively
- Requirements for software projects can be created collaboratively just like the wikipedia. Thus a whole software project including documentation, requirements, features etc could be done collaboratively
- Code should be discussed and criticized just like on wikipedia. This is probably better that open source because the discussion is written down
- Tools need to be added to wiki to support things like automatic builds, unit tests, maybe even regression tests, as well as versioning etc
Wiki style code is really collaborative programming and this is what the project should be rather than only sharing source code. This is like open source except better since there are no barriers to entry and the whole development process is far more collaborative and transparent. Currently in open source there are barriers to entry since you have to be a developer to submit code or you need to gain approval from the leaders of the project. This is a hierarchal method of quality control. But it is necessary otherwise people would submit crap and there would be no way t ensure quality. However this method of control limits the number of people who participate and the speed of development since all changes need to be approved by a small set of people. The wikipedia ensures quality through open debate and consensus. Instead of hierarchal control everybody hashes things out until a consensus emerges. Another thing that enables quality control on the wikipedia is the development of group social norms through collaboration. For instance NPOV is a group norm that has emerged from the wikipedia
To ensure quality on wikicode we will also need similar methods. One way to ensure quality is through consensus. Lines of code should be debated and argued about. The structuring of the software should be discussed. It is also necessary to have group norms. One norm that should exist is that major changes should first be proposed before they are programmed and they should be discussed just like on the wikipedia. Also people should write unit tests for any features they implement and they should ensure the features they implement eventually pass the unit tests. Also the code that is submitted should be properly documented and this will probably emerge as a norm since people will complain about lines of code that are not understood. Certain unit tests may need to be turned off until a feature is implemented but in general the idea of writing unit tests and then programming code to pass the unit tests should be an important social norm. It is probably a good idea to organize the whole thing by software project like on source forge. It is a good idea in my belief to include automatic compilation and unit testing so that people do not submit code that does not compile and or create changes that fail already written unit tests. It will be difficult to include many languages so my suggestion is to start with some prominent ones that have unit testing frameworks like Python, Java, Perl, Ruby.
All documentation attached to the software project should also be collaboratively edited like the tutorials, books, manuals, etc associated with the software. Some of these things will probably belong in wikibooks like for instance a book about the software.
Many things associated with the software project also need to collaboratively discussed like coding style, architectural ideas, naming conventions, etc. A norm that will emerge is that things like coding style, architectural ideas etc that have been agreed upon should be followed by any people who submit code.
Documenting code, too
[edit]This is a great idea, but could it be used for documenting languages and APIs, too? You would need to be sure to link to the actual documented path, too. I could imagine it having a custom template, similar to the PHP documentation, http://us3.php.net/manual/en/ (Browse through it for a second, especially the function refrence). You could link to samples of code (in Wikicode) as examples.
Code languages
[edit]I think it should be usefull to set many wikicodes in different programming languages. For exemple, you have en.wikipedia.org, fr.wikipedia.org, is.wikipedia.org for wikipedia. For wikicodes it would be c.wikicodes.org, cpp.wikicodes.org, php.wikicodes.org, etc ... -- Sajasaze 12:56, 30 November 2005 (UTC)
Multilingual documentation
[edit]The same code usually needs to be documented in many languages, so Wikicode should support adding code comments and documentation in any language and selecting the language for reading comments/documentation --Mrblack 21:22, 19 February 2006 (UTC)
Reusable Implementations?
[edit]Wikicode should provide implementations of many different algorithms for use in different circumstances. Much like what has been started at http://en.wikibooks.org/wiki/Algorithm_implementation. It could also then include ways to do tasks on different operating systems and generally become a wiki full of subroutines that could just be lifted out and used by anyone.
WikiCode is not sourceforge
[edit]Wikipedia/Wikicode might accomplish many things which sourceforge cannot, since the barrier to entry is far lower. This is particularly true if Wikicode is seamlessly integrated into Wikipedia (I make no distinction in the user stories below) and the subject of the work is non-trivial algorithms (which rightly deserve Wikipedia entries).
Some barriers to collaboration may seem trivial to the open source movement and include the need to download software or use source control. Ultimately however we should seek input from people and academics whose programming experience may be non-existent and whose comfort zone might scarcely extend to editing a Wikipedia entry, referencing a paper or making a suggestion online. That does not mean that they cannot make substantial contributions in a line or two if they know a lot about the field, where to find the right papers, and who to ask.
I am especially interested in this model for developing new applied mathematics algorithms in finance. It is as important to know what the important problems are as it is to solve them. So don't scare away all those professors just because they haven't heard of sourceforge. Here's what might happen:
1. An investment banker makes a Wikipedia entry entitled “Hybrid Equine-Linked Note” describing in broad terms a new and popular product which is taking off in China. Investors are flocking to the product for its combination of tax efficiency and entertainment value.
2. A finance professor notices some similarities to a previous product, supplies a link to a paper and some suggestions for how the financial model previously employed might be augmented.
3. A student writes up some thoughts, scans some rough working and provides a link to her equations.
4. A passer by is kind enough to typeset the mathematics and enhance the entry.
5. A fund manager is interested in the product but has no internal resources to look at the problem. He adds an external link to data, some encouraging words, and emails the link to his former academic adviser who is looking for problems to work on.
6. A student cuts some code for valuing the product by Monte Carlo. Somewhat unfamiliar with the method for embedding code directly in the wiki page, he provides a link to his zipped source which is posted at Matlab Central.
7. An open source advocate comments on the one line of code which is incompatible with Octave.
8. A kindly volunteer embeds the code directly in the wiki-page. Users may now click a “run” link at the bottom of the page to verify the output. Computationally challenging code is brokered by a supporting organization or company providing sufficient servers and bandwidth.
9. A code Nazi edits the script to conform to published “style guidelines” but fails to verify that the code still runs.
10. An overnight job finds the faulty page and appends a message. The syntax error is quickly fixed by a passer by.
11. A practitioner notices the page, runs the code and leaves a few comments regarding the inefficiency of the Monte Carlo implementation. Annoyed, he includes a link to the entry on antithetic sampling.
12. A student clicks the “download” link (sucking in all dependencies), works on the code locally and improves it. In the process she creates a second dependent function which is scientifically interesting in its own right. She uses a utility to edit and test the new wikipedia entry and also create a second page for the dependent function.
13. A numerical expert suggests some further criteria.
14. A programmer writes some regression testing code and embeds it in another page. The code is designed to break if statistical tests fail. It takes a long time to run. On the first such run, the priority of the page is reduced. It will be run weekly thereafter.
15. A programmer writes a utility which runs in the background on any windows machine, helps serve up solutions to the brokering servers and tells the user the local temperature.
16. As the amount of code embedded in wikipedia pages grows, new utilities emerge. One allows a user to easily download code from a given page together with the most recent stable versions of all dependencies. It becomes very popular, and after discussions in the wikibot forum, the utility is added to the bottom of all conforming pages.
and so it goes. I'm not saying that's how it should work precisely. Just illustrating the different levels of contribution which are possible. I don't see this happenning at Sourceforge, though of course links should be made and code could migrate.
68.161.202.201 05:16, 24 January 2007 (UTC)EightiesRocker