top | item 36798677

(no title)

anon35 | 2 years ago

Great to see. More generally: I feel like playgrounds are grossly underused in our industry. It's possible the issue is in the name -- it immediately connotes that whatever you're doing isn't real work, it's just a place to, well, "play".

But really these kind of playgrounds are at least a cousin, if not a direct descendant, of the immediate feedback principle that underlies everything from a REPL to the kind of systems (Symbolics, etc) that allow you to edit running code. Their potential is beautifully illustrated in Brett Victor's famous 'Inventing on Principle' talk: https://www.youtube.com/watch?v=PUv66718DII

Three areas that I'd love to see playgrounds mature beyond teaching beginners CSS:

1) Integrated directly into developer documentation. You can see some of that in systems that are documenting services -- for example, the Google Sheets API documentation has a 'Try this Method' box that lets you post a request to the service on the same page that describes it, but what I really want is something like that when I'm reading the man page of a destructive disk command, or a complex database query, or a low-level C graphics library. That'll require a playground wired to something as big as a VM, maybe.

2) Integrated into textbooks: for the last couple years the astonishing posts from Bartosz Ciechanowski ([Sound](https://ciechanow.ski/sound/), [Bicyle](https://ciechanow.ski/bicycle/)) have demonstrated just how much better a textbook could be if you could interactively play with the concepts you're reading about. Unlike dev docs, the thing you're interacting with doesn't even have to be "real".

3) Most ambitiously: integrated into the input form of bug/issue tracking tools. This is the opposite of play: it means a running system would need to be in cahoots with a playground, so that mature apps could let you record and playback what you saw as a user, allow you to edit irrelevant parts of input and output out and submit a complete here-look-see-it-is-busted asset for analysis. A Stackoverflow of the future would be orders of magnitude more interesting if each question was posed as a broken playground.

discuss

order

fastball|2 years ago

I would pay a monthly subscription for a playground that makes it very easy for me to quickly prototype and test across different browsers.

For quick JS prototyping I use RunJS a fair bit, but it is purely for JS so I can't test HTML/CSS. I've also tried Quokka for the same use case but it didn't work very well for me either (having to create files in my editor actually felt kinda annoying somehow).

I also do a decent amount of performance benchmarking, but all the websites for that right now are pretty meh (takes a while to figure out how to get libs imported, assuming they actually work, seems many JS benching sites are abandoned). And most of all they only test in my browser. While building the test suite that's good, but once I'm happy with it I'd like to be able to click a button which will bench my suite in Chrome / Firefox / Safari.

chrisweekly|2 years ago

Great comment.

Related thoughts: "design systems" / UI component libraries often have interactive documentation sites (e.g. built with Storybook), showcasing variants and providing "knobs" / controls to edit props and see the results in realtime, so lib consumers can see a component working (in isolation) and generate a code fragment copy/pasteable into their own downstream app.

Also, extending your item (3), project maintainers often ask people reporting bugs to provide an MRE (Minimum Reproducable Example) in a standalone repo. I've noticed a few such cases where the maintainers make this much easier by sharing a link to a basic preconfigured codesandbox or stackblitz for exactly this MRE purpose. I think this idea will catch on and become much more common.

evandale|2 years ago

I work at ${bigCorp} and am not allowed to use playgrounds :(

Additionally my company won't run their own playground because they can't figure out how to store and audit code people put into it.

recursive|2 years ago

You could make your own out of a static file. You could even give it a "boss key" to make it show some very corporate looking spreadsheets or something.

razodactyl|2 years ago

It's called find a new job and never look back.