# Friendly names for Processing Sketches like the p5.js web editor

**URL:** <https://discourse.processing.org/t/friendly-names-for-processing-sketches-like-the-p5-js-web-editor/20986>\
**Category:** Development\
**Created:** [May 17, 2020, 10:13pm UTC](https://discourse.processing.org/t/friendly-names-for-processing-sketches-like-the-p5-js-web-editor/20986 "2020-05-17T22:13:43Z")\
**Posts on this page:** 2\
**Page:** 3

<div class="post-metadata">

**Author:** ![KartikSoneji](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@KartikSoneji](https://discourse.processing.org/u/KartikSoneji)\
**Post date:** [May 28, 2020, 4:39pm UTC](https://discourse.processing.org/t/friendly-names-for-processing-sketches-like-the-p5-js-web-editor/20986/41 "2020-05-28T16:39:58Z")

</div>

> [@](#):
>
> programming editors in general don’t have a sense of “non-project data” in this way

This would work like the `PVector` class that would be included in the core jar.  
But I do understand that it can cause compatibility issues.

> [@](#):
>
> create a FriendlyWords library package

The only reason that I wanted to allow users to use the `FriendlyWords` class directly is because it seemed wasteful to include it in the app and not allow access. (I mean the data is sitting right there.)

If the user HAS to download a library anyway, then it might be easier to get it directly from the [text files provided by Glitch](https://github.com/glitchdotcom/friendly-words/tree/master/words).  
It is trivial to read the txt file and split by newline.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 28, 2020, 8:37pm UTC](https://discourse.processing.org/t/friendly-names-for-processing-sketches-like-the-p5-js-web-editor/20986/42 "2020-05-28T20:37:00Z")

</div>

> [@KartikSoneji](#):
>
> directly from the [text files provided by Glitch](https://github.com/glitchdotcom/friendly-words/tree/master/words).

This sounds like a great idea. `loadStrings()` has automatic line splitting built in.

```auto
String[] predicates = loadStrings("https://raw.githubusercontent.com/glitchdotcom/friendly-words/master/words/predicates.txt");
String[] objects = loadStrings("https://raw.githubusercontent.com/glitchdotcom/friendly-words/master/words/objects.txt");

for(int i=0; i<5; i++) {
  int p = (int)random(predicates.length);
  int o = (int)random(objects.length);
  println(predicates[p], objects[o]);
}

```

> insidious smell  
> seasoned animal  
> possible custard  
> bittersweet wound  
> inconclusive creator

[Previous page](https://discourse.processing.org/t/friendly-names-for-processing-sketches-like-the-p5-js-web-editor/20986.md?page=2)
