Category talk:Solutions by Programming Task: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(MW supports redirecting categories, but not as much as I'd like)
 
(23 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Kinda messy ==
I think these need to be organized/categorized somehow. For example there's tasks that are meaningless for anything other than SQL-alikes. Or tasks that expressly require object-orientation. Or we could have a section that deals with GUI'ish programming stuff. That kind of thing... [[User:Sgeier|Sgeier]] 01:01, 24 February 2007 (EST)
:Yeah. I've been thinking about how to do that. I think the solution will be to add tasks to subcategories without removing them from this category. --[[User:Short Circuit|Short Circuit]] 12:24, 26 February 2007 (EST)


I just wanted to use RC to check whether Python has a "while"-type statement and what the syntax is. I figured this would be the place to start looking. As far as I can tell, it is not. The closest I came was going through "Basic language learning" which gets me to a sub-category "control structures" in the task description of which I find a link to "loop structures" which informs me that it is a "former task" and that I should now look for "Iteration" tasks. Which, in turn, do not appear to exist, or at least not on this page or on a page linked from here. To me, at least, this all looks confused and disorganized. [[User:Sgeier|Sgeier]] 23:02, 14 September 2009 (UTC)
== Suggestion for sub-categories ==


: Nothing is perfect, but my path was: Basic Language Learning → Iteration → Loop/While. While, for and so on are "control structures", but first they are iterations; so the old path gave you to Flow Control Structures, which points to Loop Structures, which was the page holding loop structures in general, it is kept since some iterations still might be uncategorized (if you look at Iteration, you see Loop/While, Loop/For and similar... not all Loop Structures fit those categories) or code still need to be moved. It's a wiki, nothing happens automagically. --[[User:ShinTakezou|ShinTakezou]] 09:07, 15 September 2009 (UTC)
I think the following sub-categories would make sense in addition to the existing Control Structures category (there are probably better names for some of them):
:I had wanted to see if we could get the [http://www.mediawiki.org/wiki/Extension:CategoryTree category tree extension] installed a long time ago. Maybe that would help. For this particular case, one of the best things to do would be to finish the migration of the old [[Loop Structures]] task. That doesn't seem to be getting a lot of attention from people who understand the examples that are left, though. --[[User:Mwn3d|Mwn3d]] 17:32, 15 September 2009 (UTC)
* '''Basic Data Operations:''' Here go all the fundamental operations on basic data types.
: ''Articles:'' [[Address Operations]], [[Basic pointer and reference operations]], [[Function as an Argument]]
::Add <nowiki>{{basic data operation}}</nowiki> below <nowiki>{{task}}</nowiki> to appropriate articles. --[[User:Short Circuit|Short Circuit]] 18:09, 21 March 2007 (EDT)
* '''Data Structures:''' Anything covering data structures and how to create and read them. Only the most basic algorithms should be here.
: ''Articles:'' [[Assigning Values to an Array]], [[Classes]], [[Collections]], [[Compound Data Type]], [[Create a Sequence of unique elements]], [[Creating an Array]], [[Creating an Associative Array]], [[Data Representation - Controlling Fields in a Structure]], [[Data Representation - Getting the Size]], [[Data Representation - Specifying Minimum Size]], [[Defining Primitive Data Types]], [[Enumeration]], [[Introspection]], [[Polymorphism]], [[Retrieving an Element of an Array]], [[Singly-Linked List (element insertion)]], [[Singly-Linked List (element)]], [[String Byte Length]], [[String Character Length]], [[Table Creation]], [[Table Creation - Address]], [[Two-dimensional array where both dimensions are given at run time]]
::This category needs to be further parted out into categories representing actual structures, operations inherent to them, and possibly their representation. I did create <nowiki>{{data structure}}, though. It should be placed before {{task}}</nowiki>. --[[User:Short Circuit|Short Circuit]] 19:17, 21 March 2007 (EDT)
* '''Basic algorithms:''' For all other "pure" algorithms. Those algorithms of course often will make use of the data structures above, but then their point should not the data structure itself, but some operation of it (e.g. sorting, combining two data structures into another one, etc.).
: ''Articles:'' [[Apply a callback to an Array]], [[Bubble Sort]], [[Change string case]], [[Copy a string]], [[Creating a Hash from Two Arrays]], [[Increment numerical string]], [[IsNumeric]], [[Product of Array]], [[Regular expression matching]], [[Select from Array]], [[Sorting Using a Custom Comparator]], [[Sorting an Array of Integers]], [[Sum of Array]]
* '''Input/Output''': Everything related to I/O, serialization or the file system
: ''Articles:'' [[DOM XML Serialization]], [[File I/O]], [[Object Serialization]], [[User Input]], [[User Output]], [[Walk Directory]], [[Walk Directory Tree]], [[Zero fill]]
* '''Program execution environment:''' Everything which relates to the environment the program executes in (except that strictly speaking, File I/O also relates to the program's environment).
: ''Articles:'' [[Command Line Arguments]], [[Discover the Hostname]], [[Execute a System Command]], [[Fork Proccess]]
* '''Concurrency:'''
: ''Articles:'' [[Metered Concurrency]], [[Simple concurrent actions]], [[Synchronous Concurrency]]
* '''GUI:'''
: ''Articles:'' [[Creating a Window]]
* '''Complex algorithms and applications:'''
: ''Articles:'' [[Creating a SOAP Client]], [[SQL-Based Authentication]], [[Towers of Hanoi]], [[XML and XPath]]


I think this page should be entitled "Solutions by Programming Category", because the list is by category, rather than by task.
Any thoughts?


[[User:Markhobley|Markhobley]] 13:49, 7 May 2011 (UTC)
:Thank you! Thank you! Thank you! I've been wanting to do this for a couple months, but I just haven't had the time to think through the categories.


It might also be useful to add a tasks by category link to this page in the left hand main menu of rosetta code.
:I would suggest creating a template structurally and organizationally modeled after the <nowiki>{{Task}}</nowiki> template, that would be added to each page depending on its subcategory. More on this later. -[[User:Short Circuit|Short Circuit]] 15:55, 21 March 2007 (EDT)


[[User:Markhobley|Markhobley]] 13:49, 7 May 2011 (UTC)
:I like this as a first cut. There's a bit of uneveness, where about half the articles are in one category - needs a bit of cleanup. I guess I'm not sure about the whole "data structure" thing - in the end a string can be a data type - or it can already be seen as a data structure. (In some languages it'll be the one and in some the other). Is "function as an argument" really about data types? "Introspection" should probably be more 'programming environment' than 'data structures'. "simple windowed application" should go under GUI, I suppose. It might also be beneficial to have a category dealing with SQL type things, as their general use lies in a somewhat different domain than more general-purpose computer languages; this could be kinda overlapping with the other categories, I suppose...
:As far as I can tell, that categorization that I tried to do a long time ago didn't really work. It pretty much only made sense to me. I don't think these categories are ready for primetime. We shouldn't give it a link until we're sure it'll be useful for newer users. We need to make sure the categorizations make sense and also rmove the old ones that don't. --[[User:Mwn3d|Mwn3d]] 15:44, 7 May 2011 (UTC)


There is a discussion of category grouping over at [[Rosetta_Code:Village_Pump/Grouping_tasks]] --[[User:Dgamey|Dgamey]] 11:18, 18 May 2011 (UTC)
:: A string is always a data structure, even if it's a built-in type. Being a data structure is a conceptional property; a string is a data structure because it is decomposable into individual "data elements" (the characters). The same is true for arrays (which for most languages are built-in as well), lists (which are quite seldom built-in), etc. Especially being a data structure is in no way the opposite to being a data type; quite the opposite: In a strongly typed language, you'd always try to make each data structure to a data type (or a set of related data types, e.g. for each data type, there's usually the corresponding array type, which is another data type, and at the same time a data structure).
:: About function as an argument, that's clearly debatable. It's clearly a corner case, because some languages have data types for this (like function pointers in C and C++), while others don't (for example Standard Pascal allows functions as arguments, but doesn't define a data type for that), and in functional languages even the function itself is a data type (closures). There are other debatable cases as well (that's a general problem with categories: Real world categories are almost always fuzzy at their borders).
:: About introspection: I don't see how you could put that into "Program execution environment". The program execution environment is everything ''external'' to the program. Introspection, OTOH, is about things ''internal'' to the program, namely its own objects.
:: "Simple windowed application" quite clearly belongs under GUI.
:: About SQL: That's an interesting border case. On one hand, SQL can be seen as a language on its own (and would therefore be adequately be treated through the language categorization); OTOH database specific things might well be worth their own category. This would of course give yet another fuzzy border, because not everything you do in SQL is database specific (simple example: adding two numbers is nowhere database specific, even if you use it in a database context).
:: A note about the unevenness: I'm quite sure that the other categories will grow. Especially I'd be surprised if in the long run, the GUI category (which at the moment is ''very'' small) will not be one of the biggest categories.
:: BTW, you forgot to sign your discussion entry (<nowiki>--~~~~</nowiki>). --[[User:Ce|Ce]] 06:39, 26 March 2007 (EDT)


Would this be better named as "Solutions by Programming Category", rather than "Solutions by Programming Task"? --[[User:Markhobley|Markhobley]] 20:13, 5 June 2011 (UTC)
== Regrouping? ==
: Yes. Originally, this category was organizationally identical to [[:Category:Programming Tasks]], but evolved to what it is now. Sadly, MediaWiki doesn't support redirects in categories, and there are a ''lot'' of outside-world links to this page, so renaming the category properly is non-trivial. --[[User:Short Circuit|Michael Mol]] 23:16, 5 June 2011 (UTC)

::We could probably get most of them by editing the link in {{tmpl|task}}. I haven't looked in to any other direct links. --[[User:Mwn3d|Mwn3d]] 00:45, 6 June 2011 (UTC)
Would it make sense to combine many of those file-system kinda things into a single task? In many languages, testing for the existence, readability and size of a file uses effectively the same mechanism/s (E.G. in TCL it would be "file exists $fname" and "file readable $fname" and "file size $fname" etc). I'm not sure it really warrants a "category" if most(?) languages will deliver the answers to all these questions by invocation of the same underlying mechanism. (In IDL you'd call result=file_info(fname) and the result is a structure with elements "result.exists" and "results.read" and "result.size" and so forth; thus all of these are the same task and you simply look at a different elements in the returned structure).
::: It's the outside-world links I'm mostly worried about. I was passing out links to this category for a couple years. --[[User:Short Circuit|Michael Mol]] 14:08, 6 June 2011 (UTC)

::MediaWiki does support redirects in categories: [[:Category:Basic]]. It doesn't support members of redirected categories being placed in the new destination category (you may have seen me correct some headers from "Javascript" to "JavaScript" even though Category:Javascript is redirected to Category:JavaScript). The members of the categories we can fix in {{tmpl|task}}. The external links we can fix with a redirect. --[[User:Mwn3d|Mwn3d]] 17:14, 14 June 2011 (UTC)
Just a thought ... [[User:Sgeier|Sgeier]] 18:37, 4 October 2007 (MDT)

:Well, instead of regrouping, another idea would be to make a "bigger" task which would re-use all the other codes. If I understand what you're saying, you want to make a page which would list almost *everything* you can do with say, file interaction. Would you mind creating a post on the Village Pump to discuss this ? --[[User:CrashandDie|CrashandDie]] 01:16, 5 October 2007 (MDT)

Latest revision as of 17:14, 14 June 2011

Kinda messy

I just wanted to use RC to check whether Python has a "while"-type statement and what the syntax is. I figured this would be the place to start looking. As far as I can tell, it is not. The closest I came was going through "Basic language learning" which gets me to a sub-category "control structures" in the task description of which I find a link to "loop structures" which informs me that it is a "former task" and that I should now look for "Iteration" tasks. Which, in turn, do not appear to exist, or at least not on this page or on a page linked from here. To me, at least, this all looks confused and disorganized. Sgeier 23:02, 14 September 2009 (UTC)

Nothing is perfect, but my path was: Basic Language Learning → Iteration → Loop/While. While, for and so on are "control structures", but first they are iterations; so the old path gave you to Flow Control Structures, which points to Loop Structures, which was the page holding loop structures in general, it is kept since some iterations still might be uncategorized (if you look at Iteration, you see Loop/While, Loop/For and similar... not all Loop Structures fit those categories) or code still need to be moved. It's a wiki, nothing happens automagically. --ShinTakezou 09:07, 15 September 2009 (UTC)
I had wanted to see if we could get the category tree extension installed a long time ago. Maybe that would help. For this particular case, one of the best things to do would be to finish the migration of the old Loop Structures task. That doesn't seem to be getting a lot of attention from people who understand the examples that are left, though. --Mwn3d 17:32, 15 September 2009 (UTC)

I think this page should be entitled "Solutions by Programming Category", because the list is by category, rather than by task.

Markhobley 13:49, 7 May 2011 (UTC)

It might also be useful to add a tasks by category link to this page in the left hand main menu of rosetta code.

Markhobley 13:49, 7 May 2011 (UTC)

As far as I can tell, that categorization that I tried to do a long time ago didn't really work. It pretty much only made sense to me. I don't think these categories are ready for primetime. We shouldn't give it a link until we're sure it'll be useful for newer users. We need to make sure the categorizations make sense and also rmove the old ones that don't. --Mwn3d 15:44, 7 May 2011 (UTC)

There is a discussion of category grouping over at Rosetta_Code:Village_Pump/Grouping_tasks --Dgamey 11:18, 18 May 2011 (UTC)

Would this be better named as "Solutions by Programming Category", rather than "Solutions by Programming Task"? --Markhobley 20:13, 5 June 2011 (UTC)

Yes. Originally, this category was organizationally identical to Category:Programming Tasks, but evolved to what it is now. Sadly, MediaWiki doesn't support redirects in categories, and there are a lot of outside-world links to this page, so renaming the category properly is non-trivial. --Michael Mol 23:16, 5 June 2011 (UTC)
We could probably get most of them by editing the link in {{task}}. I haven't looked in to any other direct links. --Mwn3d 00:45, 6 June 2011 (UTC)
It's the outside-world links I'm mostly worried about. I was passing out links to this category for a couple years. --Michael Mol 14:08, 6 June 2011 (UTC)
MediaWiki does support redirects in categories: Category:Basic. It doesn't support members of redirected categories being placed in the new destination category (you may have seen me correct some headers from "Javascript" to "JavaScript" even though Category:Javascript is redirected to Category:JavaScript). The members of the categories we can fix in {{task}}. The external links we can fix with a redirect. --Mwn3d 17:14, 14 June 2011 (UTC)