Wikibooks:Reading room/Archives/2011/June

Character replacement in a template parameter
I have a template that translates a string representing a page into a section number--see Template:Calculus/map page. The problem is that pages that contain spaces can have those spaces replaced with the underscore character (i.e. '_') and still indicate the same page. Currently my template fails to map the page to the correct section if the string is entered with underscores instead of spaces. I could make a separate case statement for every possible combination of spaces and underscores, but that could become unwieldy with pages with lots of spaces. Is there a better way? --Greenbreen (discuss • contribs) 12:49, 6 June 2011 (UTC)


 * "/". You can use  or   to be able to detect both spaces and underscores. Which one to use depends on the situation. I've already gone ahead and made the change to the map page template. --dark  lama  15:33, 6 June 2011 (UTC)


 * Thanks! That's just what I was looking for.  --Greenbreen (discuss • contribs) 15:56, 6 June 2011 (UTC)

"First Read" Pre-requisite on "Optimizing Code for Speed"
Hi,

I am User:Shlomif and I'm posting here after failing to get an answer on IRC or on a mailing list (as expected, I dislike the MediaWiki discussion list interface quite a bit, and find it even less usable than most web forums), and was told most people monitor these pages. In any case I have authored Optimizing Code for Speed which I've written instead of my usual "write-in-DocBook/XML-or-HTML-and-publish on my "personal web-site" as an experiment. In any case, I finished writing most of what I wanted to say there, and a few days ago split it into individual pages to follow the wikibooks convention. There may be some relatively minor changes I'll integrate there in the future, but I consider it a finalised project.

To get to the point, someone added a template there that "This book requires that you first read How to Write a Program. However, "How to Write a Program" is crudely written, extremely short, lacks enough coverage of most main "how-to-achieve-software-quality" methods and methodologies and I wouldn't recommend that anyone reads it in its current form, whether they know a thing or two about software engineering or not.

I tried to improve it a little but later chapters proved to be more difficult, in part because they don't match my personal software development style and in part because they are written in monolithic paragraphs.

I eventually had decided to start writing this book as an alternative: How to Achieve Software Quality which aims to be a more well-rounded coverage, but it: 1. will naturally take some time to write, and 2. At time seemed like it would be too heavy a reading material before my optimising code for speed essay. To add more to the confusion, a few days ago I added this:

http://en.wikibooks.org/wiki/Optimizing_Code_for_Speed/Introduction#Intended_Audience

Reading it, it seems that either the "How to Write a Program" pre-requisite is not needed, or should be replaced by the resources I pointed to over at http://teachingopensource.org/. I admit I'm the primary author of the wiki page I refer to there (but not of the book they are working on) so I may be a bit biased.

I'm reluctant to simply remove the pre-requisite because I hate deletionism and similar vandalism (however good-intentioned), and because a good coverage of software engineering philosophy should be considered as a pre-requisite for a book about code optimisation.

Now, I've also written "What Makes Software High Quality?" (CC-by and DocBook/XML - should be easily wikibookable) which aims to answer the question "What Makes Software High Quality?" but also covers some ways to actually makes them so. Personally, I am on the opinion that if your program is of high quality, then how this quality was achieved is not too important, as long as it did not take too much time, cost too much money, cost in too much unhappiness, etc. I know for a fact that some teams with poor or no software engineering can often achieve decent results.

Therefore, if we agree that a programmer should just be aware what makes a piece of software good, rather than of the myriad of ways to attempt to achieve it (which have been a topic of ongoing research and publications for many decades now, and are a topic of a lot of debate.), then we can just wikibookify and polish my "high quality software" article and make it a prerequisite. --Saf kakar (discuss • contribs) 20:55, 15 June 2011 (UTC) What are your thoughts?

Regards,

-- Shlomi Fish


 * You raise several points, and a lot of context. On the topic of pre-requisite, this was a trend initiated on Wikibooks more or less at the same time as the subject pages became available and so far there is not special guideline or even consistent practice on how to go about it, the greatest part of the work on the pre-requisite front was done by Wikibookians working on book the categories and subjects navigational schemes. In any case I think that any bookcommunity (people working on a specific book project) should be given a special consideration in any pre-requisite consideration as they have in-depth knowledge of the work and its direction. So I don't see a problem in being yourself an actor in setting that up on the works you participate and the ways to go about it are the same as in any edit. State your objections to the initial action, attempt dialog, provide time to a response on the proper forum and act on the results. Did you engage the person that added the pre-requisites ?   --Panic (discuss • contribs) 22:58, 15 June 2011 (UTC)

Query about licence issues
Hi!

I wanted to write a wikibook book about recreational figure skating based on information in an old Usenet FAQ of which I am a coauthor and the sole copyright owner. The FAQ currently resides at href="http://web.ncf.ca/aa508/SkateFAQ and the copyright notice there explicitly forbids to make copies of it for commercial purposes without permission. I thought that I could use parts of the FAQ and publish them in the wikibook under the CC-BY-SA license by including a note stating that the copyright owner (myself) has granted permission to do so. But then I read this in Policies_and_guidelines:

"If you want to import text that you have found elsewhere or that you have co-authored with others, you can only do so if it is available under terms that are compatible with the CC-BY-SA license."

Does that mean that I would have to change the copyright notice in the FAQ page before I can use material hosted in that site? It seems kind of absurd, but that is the way I interpret the policy... Or have I got it wrong? --XanaG (discuss • contribs) 03:26, 20 June 2011 (UTC)


 * If you are sure that you, as you state, have the sole copyright ownership of the work. Implying that others that have worked on it with you have granted all rights over the work to you (not limited in some way, note that CC-BY-SA permits commercial use). You can do whatever you wish with your work, including relicensing and/or making it into a Wikibook. Remembering however that if anyone opposes that view here you will have to provide some form of proof of your claim. Failing to do so will get the work summarily deleted from the Wikibooks project.  --Panic (discuss • contribs) 06:07, 20 June 2011 (UTC)
 * Please send an email to permissions-en@undefinedwikimedia.org using the form at WP:CONSENT. There must be some way to associate the email you send from with the site, either because it ends in the same domain or because the email is listed as a contact address for the site.  Otherwise there's no way to be sure you are the copyright owner and thus able to relicense the content at will. – Adrignola discuss 12:31, 20 June 2011 (UTC)


 * Thanks Adrignola and Panic2k4 for clarifying the policy and pointing out the consent form. --XanaG (discuss • contribs) 17:28, 20 June 2011 (UTC)

blogspot
Hi,

I don't understand why blogspot is black-listed MediaWiki:Spam-blacklist. There are some interesting blogs on blogpost. For instance, we would like to refer to http://gettinggeneticsdone.blogspot.com/search/label/R in R Programming. PAC2 (discuss • contribs) 06:15, 21 June 2011 (UTC)


 * People probably repeatedly tried to use Wikibooks to spam their personal blogs. Also most blogs probably are not considered a reliable source to cite for people to verify facts. I would guess those two reasons are why blacklisting blogspot was not considered harmful. --dark lama  13:15, 21 June 2011 (UTC)


 * Darklama pulled the content straight from my brain. A whitelist is available for blogs that truly provide educational content and not comments from someone pushing their point of view.  I refer you to to Wikipedia's list of links to avoid. – Adrignola discuss 14:09, 21 June 2011 (UTC)


 * It is true that some blogs are not a reliable source to cite. However, blogs about programming provide some tricks and handout which could be cited in wikibooks. My point is that a programming tricks is always verifiable since anyone can check on his computer if it works or not. Therefore if some blogs provide some useful tricks, they should be cited on wikibooks. --PAC2 (discuss • contribs) 14:42, 21 June 2011 (UTC)


 * If you have particular ones in mind please request their addition here or at MediaWiki talk:Spam-whitelist. – Adrignola discuss 15:01, 21 June 2011 (UTC)

Changing the way page history is displayed?
Is it possible to make a page history display the number of characters added or removed by each edit (rather than or in addition to the total number of characters in each revision), as happens when recent changes or watchlists are viewed? I'm asking because I want it to be easier to identify significant blankings when perusing a page history. Belteshazzar (discuss • contribs) 21:41, 8 June 2011 (UTC)


 * Yes that can be done using JavaScript. I believe there may be a gadget that does just that somewhere. --dark lama  22:45, 8 June 2011 (UTC)
 * Indeed. You can copy it from pt:MediaWiki:Gadget-HistoryNumDiff.js. Helder 16:17, 15 June 2011 (UTC)
 * Am I supposed to copy it into my monobook? If so, it doesn't seem to have worked yet, but perhaps the effect is delayed. Belteshazzar (discuss • contribs) 05:24, 17 June 2011 (UTC)
 * Indeed. But since that is a script, the code should go to /monobook.js instead of /monobook.css. After that, it is necessary to clear the cache of your browser. Helder 21:01, 17 June 2011 (UTC)
 * I did that, and it still doesn't seem to have worked. Belteshazzar (discuss • contribs) 04:04, 18 June 2011 (UTC)
 * Are you using monobook ([ example])? If not, you will need to move the code to the js page of the skin you are using or to your /common.js.
 * If this is not the problem, I don't know what it could be, since the script works for me. In this case, please check if there is any error in the console of your browser when you try to acess the history of some wikipage. Helder 01:08, 21 June 2011 (UTC)
 * No, I was not using Monobook. I just changed it, and the script is working now! Thanks. Belteshazzar (discuss • contribs) 17:42, 21 June 2011 (UTC)

Unified Account
Hi. I'm trying to make a global account so that I can use the smae username on Wikinews and Wikiversity, but another user on ja.wikipedia.org already has this username. I don't need an account on wikipedia, and was planning on putting a redirect on it if I did recieve one. I want to just not have this username on wikipedia. Any way to do this? Fountain Pen (discuss • contribs) 22:41, 24 June 2011 (UTC)

The problem has been resolved. Thank you! Fountain Pen (discuss • contribs) 00:48, 25 June 2011 (UTC)

Spacing Between Paragraphs
Dear ,

For typographical reasons, I find that the very small amount of white space between separate paragraphs is aesthetically unpleasing, and I believe that it would be advantageous for the administrators or whoever to increase this in order to facilitate reading.

Thank you,

TOstojich (discuss • contribs) 02:52, 27 June 2011 (UTC)


 * You can change the amount of spacing between paragraphs in your personal /common.css file. You can style the margin or padding for the "p" (paragraph) element in there. --dark lama  12:53, 28 June 2011 (UTC)

Hosting sample source-code related to wikibooks
Hello, i'm from french Wikibooks project where i write some books about computer science. I'm writing a book about software testing and for the reader convenience, i wrote sample code (Java code with Junit, Maven and others libs). At french wikibooks, we are wondering what is the best way to host and provides those code to our readers. Do english-speaking Wikibooks already stated on this question ? What solution will allow us to share code between all project (the commons: way). What about using an open-source forge ? What about using something like Git-based SCM to allow reader to provide new content the wiki-way ? What do think ? Sub (discuss • contribs) 13:40, 12 June 2011 (UTC)
 * Any source code here is simply placed between  tags in the wiki. You can use Sourceforge.net to host your code if you so desire and then link to it from a book. – Adrignola discuss 14:59, 12 June 2011 (UTC)