Tutorial:Screen shots of text (please don't)!
0
11
Entering edit mode
6.0 years ago

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.
• ???

> 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

meta Forum Tutorial • 1.7k views
3
Entering edit mode

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

0
Entering edit mode

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

0
Entering edit mode

Added an example of gist embedding.

0
Entering edit mode

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

0
Entering edit mode

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.

2
Entering edit mode
0
Entering edit mode

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 :-)

0
Entering edit mode

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.

0
Entering edit mode

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.

0
Entering edit mode
<script src="&lt;a href=" https:="" pastebin.com="" embed_js="" 4pGfMsEj"="" rel="nofollow">https://pastebin.com/embed_js/4pGfMsEj"></script>
0
Entering edit mode

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>

1
Entering edit mode

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!)

0
Entering edit mode

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