Sharing code using Playground and Spotter

Playground offers a simple way to manage snippets of code locally on our machine. Nevertheless, from time to time we need to share these snippets of code with other people. We can do this using a pastebin like service or send the code through email/chat. This requires us to leave the image and do a lot of copy/paste. Copy/pasting code from the browser back into Pharo, for example, does not always work smoothly.

To ease sharing code between images Playground allows you to directly publish its current content to ws.stfx.eu, a pastebin for Smalltalk. With one click the code is published and a link to access that code is copied to the clipboard. You can send now only the link to the receiver.

Share code

Once the receiver has got the link she can open Spotter (shift+enter) and copy/paste the link. Spotter loads and displays the code. Pressing enter opens a Playground with that code.

Spotter_RemoteCodeLoading

This feature is already in Pharo 4. Below is a short screencast showing it in action:

Advertisements