Tutorial: Screen shots of text (please don't)!
11
gravatar for Michael Dondrup
3.9 years ago by
Bergen, Norway
Michael Dondrup48k wrote:

I have seen several posts now that contain screen shots of console output or data in text. Is it a new trend? Whatever, it's not a good thing to do in general, so please don't.

Cons:

  • Costs a lot of bandwidth
  • Cannot be copy-pasted into google (which might resolve it in 99%of cases) or for use in testing
  • uses crappy image hosters (adds, data disappears after a while renders the post imcomplete)
  • hard to see what is relevant in a large window or full desktop
  • reveals information you didn't intend to share
  • low accessibility / (screen reader, contrast)
  • ...

Pros:

  • Some rare Java/JavaScript apps don't allow to copy-paste text from error messages.
  • ???

Instead:

> Copy paste your error message and format it as  code (101010 button) or ``

post the output of head mydata.txt.

Or post longer code, output, or data as a gist (e.g.: http://gist.github.com). Even then you should try to embed the most relevant portion in the post by just adding the link to it:

One should not need much more space, if one focusses on the relevant portion of the data. Complete datasets need to be uploaded to some cloud storage service anyway, if people like to share those at all.

Posting FASTA files

copy pasting fasta content will immediately render like this, because the > is markup for 'cite':

mygeneid ACGT ACGT

Mark your Fasta content as code when embedding it:

>mygeneid
ACGT
ACGT

Gists -edit- could once be easily embedded into Biostars: like so ....

     \gist 2059

But this has changed, just in case you find the old post New Feature: Using Shortcuts To Embed Content Such As Gist Or To Display Biostar Specific Links

tutorial forum meta • 1.3k views
ADD COMMENTlink modified 3.9 years ago • written 3.9 years ago by Michael Dondrup48k
3

Or if the output/code is very long, maybe copy it into a GitHub gist to share (https://gist.github.com)

ADD REPLYlink written 3.9 years ago by James Ashmore3.1k

Indeed, and that's often also more convenient for indentation and rendered nicely on biostars.

ADD REPLYlink written 3.9 years ago by WouterDeCoster45k

Added an example of gist embedding.

ADD REPLYlink written 3.9 years ago by Michael Dondrup48k

Perhaps make this a tutorial on post formatting (I see you added fasta) so we can always refer to this for new users?

ADD REPLYlink written 3.9 years ago by WouterDeCoster45k

Changed the type to Tutorial. It would be nice if Tutorials that are intended as site documentation could be aggregated somewhere. I remember that Ram made a lot of posts about that, but now I can hardly find them.

I think this post deals with 'embedding' or 'sharing' code, data aspect. If you have any opinion on

  • sharing larger data sets (pros/cons of google drive, dropbox, google doc, github, gitlab)
  • acceptable image providers

, let me know.

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by Michael Dondrup48k

That would be useful indeed, I'll bookmark it for myself to refer new users to this whenever needed. Perhaps the title could be changed to "How to use biostars: properly formatting code and data" or something similar if you agree.

I think most often sharing an example of your data should do the trick. I'm not going to click random dropbox links :-)

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by WouterDeCoster45k

An idea was to pin these posts to Biostars Homepage (so that new users can find easily before posting). But it didn't happened yet.

ADD REPLYlink written 3.9 years ago by venu6.8k

What is the concensus about using pastebin for code/input files? I've always used it in the past, and there is an option for the paste to remain permanently I believe.

ADD REPLYlink written 3.9 years ago by Joe19k
<script src="&lt;a href=" https:="" pastebin.com="" embed_js="" 4pGfMsEj"="" rel="nofollow">https://pastebin.com/embed_js/4pGfMsEj"></script>
ADD REPLYlink written 3.9 years ago by Michael Dondrup48k

I think it is ok as a last resort, but it has adds and can only be embedded using javascript <iframe src="&lt;a href=" https:="" pastebin.com="" embed_iframe="" 4pGfMsEj"="" rel="nofollow">https://pastebin.com/embed_iframe/4pGfMsEj" style="border:none;width:100%"></iframe>

ADD REPLYlink written 3.9 years ago by Michael Dondrup48k
1

And as you see if you try to use iframe html code, weird things happen!

This post is not editable because of an iframe! Contact if you must edit it (sic!)
ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by Michael Dondrup48k

Yeah I would normally just paste a link directly to it, especially if it was a reallt long file

ADD REPLYlink written 3.9 years ago by Joe19k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1425 users visited in the last hour
_