Add an overview of ways to use Java

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 :

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 :

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.

that is in the

How to set up a Class :

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.

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”


but is disabled?

Thats not quite what i meant :sweat_smile:. 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.

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:

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

or Jeffrey Thompson’s Collision Detection

2 Likes

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