Sunday, June 1, 2014

Skeptics continued ...

I've done more than my fair share of posting to Skeptics, enough to get a reputation of 599 which is an average of 30 points a day.  I haven't actually been working that hard since I got a bonus of 100 reputation points each for being a member of stackoverflow, and also superuser.  Actually I have another alias on stackoverflow as well ... but let's not get into that right now!

Anyway, the point of today's post is that it has become somewhat tiresome to reformat references to add to one's post.  Sure, one can inline them, but we don't do this when writing papers for publication so I think it's better to just stick with what's accepted.

To show what I mean, let's pick a reference I used in one of my answers.  The pubmed link is http://www.ncbi.nlm.nih.gov/pubmed/23648697.

Now if you go there, you see this:

Gastroenterology. 2013 Aug;145(2):320-8.e1-3. doi: 10.1053/j.gastro.2013.04.051. Epub 2013 May 4.

No effects of gluten in patients with self-reported non-celiac gluten sensitivity after dietary reduction of fermentable, poorly absorbed, short-chain carbohydrates.

However, I need to turn it into this:
Biesiekierski JR, Peters SL, Newnham ED, Rosella O, Muir JG, Gibson PR. [No effects of gluten in patients with self-reported non-celiac gluten sensitivity after dietary reduction of fermentable, poorly absorbed, short-chain carbohydrates.](http://www.ncbi.nlm.nih.gov/pubmed/23648697) Gastroenterology 2013 Aug;145(2):320-8.e1-3. doi: 10.1053/j.gastro.2013.04.051. PubMed PMID: 23648697.
 Now, we can get there part way by registering with NCBI from the pubmed pages.  Once you do that, you can then use the "Send to" link at the top right to send the reference to "My Bibliography".  You can then login to My NCBI which gives you nicely formatted references.  But, not in markdown format, which is what we need for stackexchange.

With an idle Sunday afternoon on the 1st day of the Southern Hemisphere winter 2014, I decided to script a tool to do this.  Rather than using the html, and parsing it, I decided to look at the XML.  Now, if you're on the pubmed page for the above you can change the display settings to XML using the display menu at the top left, which gives you http://www.ncbi.nlm.nih.gov/pubmed/23648697?report=xml&format=text but it's not really XML at all.  Just a text version of XML, so we have to massage it further.  And furthermore it doesn't contain the same data as their actual XML link which is at a completely different address: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&retmode=xml&id=23648697 Now, this is something we can work with.  And thanks to the blogger where I found this information.

The current working script is now at my github repository and written in Rebol3, and I used it to produce the output above.  I intend to turn it into a CGI script soon once I have it tested somewhat more.

In the end this script should also prove useful for any papers I write.  Some journals have their own peculiar requirements.  For instance The New Zealand Medical Journal want a maximum of 3 authors, with the remaining authors consigned to obscurity with an et al.  Pity really since the senior author is often one of those in the et al.

PS: CGI script is here http://www.rebol.info/cgi-bin/pubmed.cgi

Monday, May 26, 2014

Skeptics and stackexchange

The stackexchange network is an interesting phenomenon.  If you haven't visited there's now a plethora of stackexchange sites where you can get almost any question answered.  I cut my teeth on the first site, stackoverflow.com which is a site for answering questions on computer programming.  I joined in 2009 but have largely restricted my activities to the rebol and rebol3 tags as that is where my interest lies.  Reputation is obtained by providing good quality questions and answers so high ranking individuals generally are experts in their domains as they are upvoted by their peers.  And with computer programming, there is generally a way you can determine whether an answer is correct or not.  Afterall it's applied science.

Step forwards a few years, and we have skeptics.stackexchange.com.  I don't know what drove me to start posting a few answers there, but seeing some of the nonsense posted was somewhat incentivising.  Afterall, if the site is as highly regarded as stackoverflow.com, then possibly some of the mana of that site might just rub onto skeptics.stackexchange.com, and might mislead readers.

However, we now have a site where everyone has an opinion, and common misconceptions are held to be true. And providing proof of something can take a lot of research.  Seems most people now believe that saturated fats are not bad for you and eating eggs is okay. So, in this climate, how is it possible to get "correct" answers accepted and not downvoted?  It will be interesting to see how this site progresses, but at present I have my doubts.  It may just end up reinforcing misconceptions, especially in the health domain.