# Add an overview of ways to use Java

**URL:** https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782
**Category:** Site Feedback
**Created:** [October 23, 2018, 3:25pm UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782 "2018-10-23T15:25:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)
#### Post date: [October 23, 2018, 3:25pm UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782/1 "2018-10-23T15:25:09Z")

</div>

The Description might be a bit off, but what i mean is, add a page where one can see how code should be written and some „hidden“ things. What i mean would look like this for example :  
How to set up a Class :

```auto
class MyClass {
  int x = 0; // You can place variables contained in your class here
  int y = 0;

  MyClass(int x_, int y) {
    x = x_; //try not to use same variable names
    this.y = y; // or add this. //this. does the following : ...
  }

  void ... 
  int ...
}

```

This could help some to get cleaner Code and also understand some characterristics of classes they didn‘t know for example.  
And „hidden“ things :

```auto
If (a == 0) {
a = 5;
} Else {
a = 20;
}
//can be written as : 
a = a == 0 ? 5 : 20;

```

It took me some months of programming to find that… Would be nice if there was a place you could find such things.

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [October 23, 2018, 4:19pm UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782/2 "2018-10-23T16:19:24Z")

</div>

that is in the

> **[Reference](https://processing.org/reference/)**
>
> Find further documentation of the Processing language

> How to set up a Class :

> **[class / Reference](https://processing.org/reference/class.html)**
>
> Keyword used to indicate the declaration of a class. A class is a composite of fields (data) and methods (functions that are a part of the class) which may be instantiated as objects. The first lette…

> [@Lexyth](#):
>
> And „hidden“ things :
> 
> ```auto
> If (a == 0) {
> a = 5;
> } Else {
> a = 20;
> }
> //can be written as : 
> a = a == 0 ? 5 : 20;
> 
> ```
> 
> It took me some months of programming to find that… Would be nice if there was a place you could find such things.

> **[?: (conditional) / Reference](https://processing.org/reference/conditional.html)**
>
> A shortcut for writing an if and else structure. The conditional operator, ?: is sometimes called the ternary operator, an operator that takes three arguments. If the test …

---

<div class="post-metadata">

### Author: ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)
#### Post date: [October 23, 2018, 5:41pm UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782/3 "2018-10-23T17:41:12Z")

</div>

The class link you Sent is a good example of what i mean. There is no mention of the use of „this.“ which is a pretty important Feature to use in classes. And in any case, the references within the page are, Even though they are very useful if you know what you are looking for, very difficult to find what you are looking for. Thats why i would suggest a page where you can See all not so known features and how a „good“ code Would Look like.

Edit: Another example is the use of … . I‘m using processing for over 2 years now and Even looked actively for the use of … because that was a Feature i really needed some Time ago in a Project i made, But the only thing about this that i could find, was that it was the ‚same‘ as []. Which it isn‘t… And to avoid such things which can‘t be searched for easily it Would be useful to have it all in one page with short snippets of code, that Demonstrate the use of those Parts with Name for reference, so that they can be looked up in more Detail if needed, But to Mainly get what possibilities you really have with processing, not only what you found thus far online, or learned from your teacher (if you are studying with processing).

Edit2: Another difference to the current references would be the amount and usage and accessability. While the references may be very useful and detailed, that also causes the problem, that you can’t find easily what you are looking for, if you don‘t know how it is called, and that you have to go through a lot of pages if you want to learn the basics and the Pages aren‘t sorted. So you‘ll have to look up multiple things at once, if you don‘t know what something does while looking through a reference you are trying to understand. What i mean Would be one page with just the Basics, to help People understand how the basics work.

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [October 24, 2018, 12:45am UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782/4 "2018-10-24T00:45:13Z")

</div>

ok, i can support you insofar as it would be a nice added feature for the  
“reference”  
to contain links to  
“examples” and “tutorials”  
( wow, lots of work… )  
and to help with the search might need one more feature…  
so how about a modern “tag” system over all 3 “know how collections”  
or the whole site.

//\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
looks like the forum (Discourse 2.2.0.beta3) can “tag”

> **[discourse/discourse-tagging](https://github.com/discourse/discourse-tagging)**
>
> Tagging functionality for Discourse Forums. Contribute to discourse/discourse-tagging development by creating an account on GitHub.

  
but is disabled?  

> **[Tagging support is now part of Discourse](https://meta.discourse.org/t/tagging-support-is-now-part-of-discourse/43334)**
>
> The discourse-tagging plugin had a good run, but the time has come to make it a core part of Discourse. @eviltrout and I spent the last few days pulling that plugin into core and merged it today. If you’re using the discourse-tagging plugin, it will...

---

<div class="post-metadata">

### Author: ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)
#### Post date: [October 24, 2018, 7:53am UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782/5 "2018-10-24T07:53:10Z")

</div>

Thats not quite what i meant 😅. As you said, Connecting to the references, examples and Tutorials is a lot of work, and this means that looking them through is too. But what i‘m Talking about should Contain only around 1-200 Lines of code, to Show the very basics. Because, as far as i know, there is no place to really have them all in one place… Sure there are places like reference, But there is much more than just the basics and it is not sorted, so you might See stuff you don‘t know about.

---

<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: [October 28, 2018, 3:30pm UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782/6 "2018-10-28T15:30:17Z")

</div>

Hi @Lexyth – it sounds like you have an idea for something that could be added to the Tutorials section of the website. You might want to try drafting it and then propose that it be added, for example as a pull request – the Processing documentation / website is also open source.

One problem with learning tips and tricks is that they are often situationally driven – until you are in a situation where you need one, it is hard to learn it because you don’t have a context that makes its use apparent. Walking through situations in a narrative style isn’t just for the Tutorials section – it is also the approach of several websites that use Processing for their examples. A couple examples from forum members – I believe these are by @hamoid and @Kevin:

> **[Tutorials](https://happycoding.io/tutorials/)**
>
> The Bob Ross approach to learning how to code.

[https://funprogramming.org/](https://funprogramming.org/)

For a more focused and topic-driven approach to narrative tutorials on programming, see for example @quark’s Geometry Cookbook

[http://www.lagers.org.uk/how-to-ps/ht-geom-01/index.html](http://www.lagers.org.uk/how-to-ps/ht-geom-01/index.html)

or Jeffrey Thompson’s Collision Detection

> **[Collision Detection](http://www.jeffreythompson.org/collision-detection/)**
>
> An online book about collision detection using Processing.

---

<div class="post-metadata">

### Author: ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)
#### Post date: [October 28, 2018, 3:31pm UTC](https://discourse.processing.org/t/add-an-overview-of-ways-to-use-java/4782/7 "2018-10-28T15:31:39Z")

</div>

Thanks, i think that‘s gonna be what i‘ll do 😅
