Almost 4 years later - people are still watching your videos. You’re one of the best programming teachers I’ve ever had. I’m IT student from private IT academy and you are better than my lecturer - and your lessons are free. Within couple of weeks I’ll link your videos to my friends that are learning Java too. Stay awesome and make more videos!!! ❤️
I take a moment to recognize your great work. I'm not a full time programmer but I've been doing a couple of web apps for my company and your javascript tutorial were always of great use, especially that p5.js is used a lot for visual animation and one can see directly the practical meaning behind the code. Now I'm taking up Java and I always have a look at your videos to assimilate the key principles. Thanks a lot !
Thanks Dan. Fed up with working with predefined size arrays, following you on neural network stuff and trying to implement that in a arduino robot, i got to come back to this usefull video. As usual when stuck, I got to get back to fondementals, and so thanks for this usefull piece. Have a great day.
When I learned Processing, I ditched any tutorials and only studied the reference. Now I regret doing that. Not because I learned something the bad way or don't know something, but because I missed this beautiful, energetic man. ._.
Hi Dan, I'm really hoping you will revisit this subject in your new Nature of Code and maybe explain how to sort an ArrayList because I'm having a hard time understand this and implement it in processing. Love.
Daniel, Thanks a lot for your awesome videos. Quick question: I am using Processing in Python mode and I can't find a Python version of ArrayList. Do you know if there is some class that can substitute it? Or is it in the making? Thanks!
+Michele Zaccagnini You can just use a regular array in Python which is exapandable. See the Python Mode examples (Particle System or Flocking) for how it's done. Thanks for watching!
Wait, lists have types o.O JavaScript isn't even obnoxious AND consistent. It's just obnoxious. Great video btw, I have done some coding in c# but wanted to try something different, and your videos are as interesting even if it reintroduces things I recognice from c#. Perfect balance between efficiency and clarity.
Hi Daniel! First of all, thank you for your everything, giving to us! I really enjoy watching you, explaining things to us with such an enthusiasm! Second, I have a question. In your example, you use particles.add(new Particle()); which in my case does not work. I had to use particles.add(new Particle(new PVector(width/2, 20))); like in the example with only one particle. I'm using Processing 3. Regards!
Hey if I wanted to multiply a 2 dimensional array by a value like 10 that has 3 rows and 4 columns with initial values present in each location, why would I set the "setw(5)" with the 5 argument instead of a (4) argument in this manipulator function.
Hi Daniel, you're such a great teacher. I write a "basic game" using processing and what you taught in ArrayList videos, but I got a weird behaviour that I'd like to help with. How could I share you my code to get comments from you or your java programmers followers?
I would suggest discourse.processing.org/! It's a good platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
I managed to add and place objects from an array list and delete objects after clicking a button and then the object I want to delete, how in the world can I change the position of ONE object after clicked...? best regards ^^
I don't think I fully understood the .get() method. When you write Particle p = particles.get(4); p.update(); it means you're declaring a copy of the 5th particle and you're naming the copy "p", right? so with p.update() you're updating the copy, not the array itself, right? what am I missing here?
Also, in the description, the link for github location is outdated, you have used a 0 prefix in the new folder structure. Please update the same for other viewers :)
my particle is a star shape but it is too big. what's a good way to resize the particle? edit: i couldn't do it with scale(), the stars would go crazy and all over the screen. it works with ellipse or rect, weirdly. so i eventually did it by tweaking the vector values and it's sort of okay but it's not the same thing.
+Daniel Shiffman i got the star particles in the right place with this method but they fall more slowly, as if the vector has been affected by scaling the shape down. this is bothering me a little because i don't know what is it that i'm doing wrong, but later in the chapter you showed how to inherit stuff from the main particle and use it for other particles so i got it going eventually and it looks spot on, so it doesn't really matter all that much. thank you.
Sorry, I didn't gave the particular reason of sketch bug. Somewhere in "particles.add(new Particle());", the program returns a error: "The constructor "Particle()" does not exist".
Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
It is not very clear in the documentation but as far as I understand, .get() is deprecated and should be replaced by the .copy() function, e.g. for copying a PVector named loc: location = new PVector(); location = loc.copy(); however, for a particle, the get() function still works - I don't know why
Almost 4 years later - people are still watching your videos. You’re one of the best programming teachers I’ve ever had. I’m IT student from private IT academy and you are better than my lecturer - and your lessons are free. Within couple of weeks I’ll link your videos to my friends that are learning Java too. Stay awesome and make more videos!!! ❤️
Maybe because its private academy....
And people are still learning Java...
World's best Java Teacher.
I take a moment to recognize your great work. I'm not a full time programmer but I've been doing a couple of web apps for my company and your javascript tutorial were always of great use, especially that p5.js is used a lot for visual animation and one can see directly the practical meaning behind the code.
Now I'm taking up Java and I always have a look at your videos to assimilate the key principles.
Thanks a lot !
Thanks Dan. Fed up with working with predefined size arrays, following you on neural network stuff and trying to implement that in a arduino robot, i got to come back to this usefull video. As usual when stuck, I got to get back to fondementals, and so thanks for this usefull piece. Have a great day.
I was in bed, watching this, and sort of falling asleep, imagine my shock when he said 'don't fall asleep, wake up' !!! :O
This guy is great :) Quite fun to follow...
+Volkan Tuncay Thanks!
When I learned Processing, I ditched any tutorials and only studied the reference.
Now I regret doing that. Not because I learned something the bad way or don't know something, but because I missed this beautiful, energetic man. ._.
hey just wanted to give you a massive thank you, you've been a great help to me in this video :)
So glad to hear!
Thank you 😁
That really really helped me out
Huge respect to your programming and explaining skills 👏
it is what I was looking for... and the number of this video is 42... it couldn't be only a coincidence :P
That was a very good explanation just like the lag in it.
Dude this Prof took so much Kaffee, he is kind of crazy! haha I loved it
Thanks so much, I need this for my game project :)
Hi Dan, I'm really hoping you will revisit this subject in your new Nature of Code and maybe explain how to sort an ArrayList because I'm having a hard time understand this and implement it in processing. Love.
when his get looks like a cross between get and set, perfect for instruction
and the fact that his semicolon looks like a j
this is really awesome!
Daniel, Thanks a lot for your awesome videos. Quick question: I am using Processing in Python mode and I can't find a Python version of ArrayList. Do you know if there is some class that can substitute it? Or is it in the making?
Thanks!
+Michele Zaccagnini You can just use a regular array in Python which is exapandable. See the Python Mode examples (Particle System or Flocking) for how it's done. Thanks for watching!
Hi, I was wondering... why not use Java's Set, like HashSet, TreeSet or LinkedHashSet?
Wait, lists have types o.O
JavaScript isn't even obnoxious AND consistent. It's just obnoxious.
Great video btw, I have done some coding in c# but wanted to try something different, and your videos are as interesting even if it reintroduces things I recognice from c#. Perfect balance between efficiency and clarity.
1:24 The way he made that noise 🤣🤣🤣🤣
Hi Daniel! First of all, thank you for your everything, giving to us! I really enjoy watching you, explaining things to us with such an enthusiasm! Second, I have a question. In your example, you use particles.add(new Particle()); which in my case does not work. I had to use particles.add(new Particle(new PVector(width/2, 20))); like in the example with only one particle. I'm using Processing 3. Regards!
why i cant create array of particles with :
Particle[ ] particles = new Particle(50);
i missed something? or something has changed in JS?
Thanks.
A lot to take in but explained brilliantly
Hey if I wanted to multiply a 2 dimensional array by a value like 10 that has 3 rows and 4 columns with initial values present in each location, why would I set the "setw(5)" with the 5 argument instead of a (4) argument in this manipulator function.
Hi Daniel, you're such a great teacher. I write a "basic game" using processing and what you taught in ArrayList videos, but I got a weird behaviour that I'd like to help with. How could I share you my code to get comments from you or your java programmers followers?
I would suggest discourse.processing.org/! It's a good platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
Hey so if anyone is following this but using p5.js, you don't have to worry about ArrayList, since p5.js' array data structure is dynamic :)
I managed to add and place objects from an array list and delete objects after clicking a button and then the object I want to delete, how in the world can I change the position of ONE object after clicked...? best regards ^^
Hi Dan, great vid! Do you have the working github link?
(Fixing! github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp04_systems/NOC_4_02_ArrayListParticles)
I don't think I fully understood the .get() method.
When you write
Particle p = particles.get(4);
p.update();
it means you're declaring a copy of the 5th particle and you're naming the copy "p", right?
so with p.update() you're updating the copy, not the array itself, right?
what am I missing here?
He said it passed the reference of the object. That means it is accessing the object itself and updates it.
Hey Dan! Could you make a video about string lists and text input from user? That would be super useful, thanks!!
Man I really need to thank you
dude youre the best!
Hey when I try running this, I get:
build.pde:7:0:7:0: The constructor build.Particle() is undefined
Good fun watch, thanks. Is this Java ? chrz
Yes indeed it is! (Using Processing as an IDE)
IM SO HAPPY IT VHRISTMAS DAY!!!
what programming language is this in?
Also, in the description, the link for github location is outdated, you have used a 0 prefix in the new folder structure. Please update the same for other viewers :)
my particle is a star shape but it is too big. what's a good way to resize the particle?
edit: i couldn't do it with scale(), the stars would go crazy and all over the screen. it works with ellipse or rect, weirdly. so i eventually did it by tweaking the vector values and it's sort of okay but it's not the same thing.
+Daniel Shiffman i got the star particles in the right place with this method but they fall more slowly, as if the vector has been affected by scaling the shape down. this is bothering me a little because i don't know what is it that i'm doing wrong, but later in the chapter you showed how to inherit stuff from the main particle and use it for other particles so i got it going eventually and it looks spot on, so it doesn't really matter all that much. thank you.
Wait, I wrote EXACTLY the same code as you done, but it didn't work.
What's going on?
Sorry, I didn't gave the particular reason of sketch bug. Somewhere in "particles.add(new Particle());", the program returns a error: "The constructor "Particle()" does not exist".
Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
3:46 Hooray!!!
🤣🤣🤣🤣🤣
Wish I could find out how to get past the get(0) to the values of the objects. Without 50 lines of code
It is not very clear in the documentation but as far as I understand, .get() is deprecated and should be replaced by the .copy() function, e.g. for copying a PVector named loc:
location = new PVector();
location = loc.copy();
however, for a particle, the get() function still works - I don't know why
Thank you so much!
That "for" changed me
Gracias!
In the beginning you wrote Particle [] particle = new Particel [100];
love
2:49 "blue" "giant"🤣🤣🤣
In Java, I've always declared and initialized my arrays like this:
float[] numbers = { 1.76, 1.68, 1.89, 1.72, 1.54,
1.78, 1.34, 1.78 };
7:24 is the biggest lie ever told in the history of mankind. That too again and again!
OOPS i mean CHRISTMAS
I want to see you without beard.
that would be really weird