Slack sends Code Snippets to Hotel California

October 12, 2015
By

(This article was first published on data_steve, and kindly contributed to R-bloggers)

… We are programmed to receive.
You can check out any time you like,
But you can never leave. …

That’s what it feels like sometimes when trying to share code snippets
on Slack. Sure, it’s easy to drop some code on there; but getting it
out?

Caveat Coder

That inviting little question, “Create a Snippet?”… You know the one
that automagically appears when you go to paste in a code chunk into the
chatbox?

It’s a trap. You’ll be 3 steps into waiting for your browser to view the
code before you get that snippet back out.

Options

I think it’s easier to wrap your code in block-code markdown using a
pair of triple-backticks “`, like so :

```
fantastic_function(sth)
```

There’s still sometimes problems with selecting the code back out of a
markdown block (no matter how you stab at it with your steely …
touchpad), in that those trailing backticks can sometimes find their way
into your code. But it’s still faster than the snippet functionality (at
present) and more prettified than just dropping the code chunk in as raw
text.

Get In Line Here

Slack’s a great productivity tool, which I use all day, everyday at
work; and I’ve already sent them a comment regarding this. Their
customer service was super prompt, assuring me they’ll thinking about
this.

I’m taking this nod towards code snippets as the start of good things.
But I’m still exploring other options than current functionality for
sharing code. If you have any ideas, send ’em my way at @data_steve

Slack sends Code Snippets to Hotel California was originally published by Steve Simpson at data_steve on October 13, 2015.

To leave a comment for the author, please follow the link and comment on their blog: data_steve.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)