Unless you want to reinvent the wheel, stick with ArrayList. Some abstraction makes life a little easier, though. But of course, it is helpful to understand its underlying implementation.
Hi Nelson. I enjoy most of your videos, but please can you reduce the effects? It's hard to listen to what you say with the constant ADHD interruptions.
He mentioned from the start its ment for beginners to learn datasturcture, and even if clickbait what the problem he is depending on himself to make money independent from enslaving software companies
I understand (and partially agree) with you, but here he's basically saying "learn the internals before you use them", which is correct. When we are senior devs we think of arraylists as arrays with decoration, but that's not the case for juniors.
This is where the importance of studying data structure lies, because in real life you will use native Java implementations already knowing how the structure works internally. I find it very difficult to have to implement a structure from scratch (unless it doesn't exist) to use it in your project since there are already native implementations of it, so if you understand data structure you can use them without any weight in consciousness.
Exactly. I remember back in my second year we had an investigation assignment of implementing abstract data structures it was actually eye opening to see how they were implemented.
I'm a programmer for 13 y now, I work mostly with C#. Your channel is very good and very clear for newcomers. Congrats. That said, I would change the name of this video to "Prefer arrays over Lists if you are a beginner" And that's because in day to day programming one is not better than the other. You'll use one or another depending of your need. And even knowing it's essential for any programmer that want to be competent, to learn what's happening under the hood, this doesn't mean they should reinvent the wheel. I know you probably didn't mean that, but I can see a lot of beginners understanding the message this way. Well... Just thoughts. Keep up the good work
If you're a junior dev, you should absolutely be using List over arrays 99% of the time. You have to take into account that a senior dev will review your work and they will tell you to use a more reliable data structure like a List. The more you use lists, you will eventually have no choice but to delve into the underlying structure and learn how it works anyway.
When I was studying Collections, my mentor told us to create oour own List implementation using arrays and simple array methods to recreate ArrayList. That was fun and interesting for me as for learning and studying. However, I simply recommend you to proceed using already developed libraries and collections. Because this is just what Java creators want you to do and it simplifies evrything for you. If you want to know how a library works internally, you may just look inside it and read the methods. By the way, I have never used Binary Trees in my career (3 years). It would be super cool if you could show us a simple basics of using a binary tree in Java Development, Brother. Thanks for the video and for warm memories of being a student. As-Salam-u-Alaikum. Video title is a clickbait but a wise one :)
To the people saying 'clickbait' , 'misleading' etc: see he never said it was meant for advanced viewers,it is clearly for juniors/ beginners and please refrain from leaving any negative comments on this channel. You all have no idea how much this man has added value to many developers life, I am a testament to this. The way he teaches so selflessly and has created a valuable community that helps others learn. As far as I know Nelson is an absolute 💎 of a human being and so as a content creator , In each of his videos he tries to teach something new valuable and has never ever once tried to make clickbait video. Kindly be polite and be appreciative,thank you
I think this video does not apply to junior developers at all, as long as they know, what an array is. you usually look an implementation of a list up, if you need to.
And yet a title like "Prefer Arrays Over Lists. Seriously..." is pure clickbait and misleading if the content of the video then just says that one should learn the inner workings of Lists before using them. Probably every developer agrees with that approach anyways. But especially BECAUSE people likely assume that Nelson is a developer with a lot of experience, they also expected a more serious reason for that statement he used for the title and expected a downside of using Lists. But there is none, at least he didn't mentioned one. Which makes the title even more clickbait and misleading. He stated himself that lists are one of the most used datatypes in Java, so yet again another reason why the title is clickbait/misleading. And that's why its more than appropriate to downvote this video into oblivion. The overall quality of this one particular video is way below his usual content quality.
It’d be appreciative if you tell us about what your take on taking OCJP, the Java certification, is. I personally took OCJP in SE 11 version, and it helped me a lot to understand the basic concepts and syntax like the topic of this video.
I think this is brilliant! I was doing a coding challenge the other day, involving arrays, and found it really frustrating and difficult to figure out because I'm so used to just using list.add. Yes. It's easier to just use lists but you can't put a price on understanding how it all works. It will absolutely make you a better engineer/developer.
I agree as a form of learning. Actually knowing about data structures is what differentiates many professionals when selecting an employee these days. But from the moment we understand how it works, let's use what is already created and tested.
I agree that junior devs should start with Array before jumping to List. But, given that internal implementation understood, each class has their own use cases, ie if you want to store fixed size collection and not changes, stick with array, if you want to change and add elements don’t use array, list is your friend.
This is genius. Thank you for sharing your knowledge with us. I had no idea as I am a new java dev I run into the typical “copying code” and not knowing what I am truly using.
I think the topic's name may be misleading and some disagree with you. It always right to start with basics to learn something new, but use existing libraries and frameworks that make solving real-world problems much more efficient and less complicated. Inheriting inventions from our predecessors helps us to develop and create more value. That was my thought. An awesome video and very clear, pls continues
Akhi, when I first saw your face I said to myself "this man is probably a Muslim", then I opened the video and heard you saying "Assalamu Alaykum" 😃. May Allah bless you love you for the sake of Allah I'm your brother, Mohamed, from Egypt.
Obviously one should (must) learn data structures to become a good programmer and to have the knowledge of what happens under the hood then with experience, later you can shift to usage of Lists. Thanks.
Hi! This is a topic really close to me and I want to ask you a question. To be honest, I never get inside the ArrayList class to see how method are implemented (or maybe yes but not in deep). I am Java dev but first language I saw in my life at university was C. In C, the main difference between arrays and lists is that arrays have fixed size and each slot has a contiguous memory address to the next one; lists use a structure using pointers, they can grow dynamically and due of pointers they not have contiguouses memory address (this makes the search operation less efficient that in arrays). Now I see from this video that Java uses arrays inside lists... so ? There is not a real difference in Java between arrays and lists ? Are lists just a shortcut ?
Its ok to dive into libraries api used methods implmentations just to get a quick understanding but it becomes tirelessly when you are using several libraries in your application. If there is a library and a method that can ease your development life you should just use it without deep diving into it. Nonetheless great video!
I mean I get the idea of inducing Java beginners to get familiar with data structures. But this is like saying that you should prefer JDBC instead of JPA for basic database operations.
Your video makes perfect sense to me, i started with ArrayList with the uni study book i had then moved onto arrays but they never had anything in the study material about this.
Wow … used pure C to teach gifted grade 11 and 12 Programming classes for last 25 years…just changed schools and now I will be using Java … the way they teach coding using Java seems like an attempt to take the logic out of coding … yes I know OOP makes writing and maintaining larger programs easier but how many coders … like you are saying new coders should be getting some experience creating algorithms to solve problems rather than hunting for methods to do everything for them … say you want to delete all occurrences of a given character from a string … in C you could shift all chars one left every time you encounter the char to be deleted … but this solution is O(n^2) …there is an O(n) solution … give students a chance to solve this type of problem when learning to code!
Hey hi Nelson, I have one request pls make a complete session on spring cloud function so work with serverless programming like working with aws services and daily work like perform crud operation and if possible then working with video , image file upload and download pls it's my humble request ❤️❤️❤️
Not in agreement. Depending on the operations, you pick which one to use. If you know the max limit and if your operations are just traverse, add and remove (with no issues even if you remove somewhere in the middle) then you can prefer object array. Lists are more efficient and convenient for many operations.
You must learn arrays and you must learn lists. But there is no use of slowing down your learning process by using arrays instead of lists. Just explore the internals of ArrayList.
why should I fallback to arrays? any operations on the array, I have to reinvent the wheel again. When I want to optimize, I optimize somewhere else. How about concurrent list? how to use it in parallel stream? You give wrong advice here to newbies.
I'm graduated from uni, so basically I'm no longer beginner? I don't see any advantage using array over list, unless you're absolutely sure you just need to store data.
Wait... so the implementation creates a new array with size+1 every time you add ? I thought the optimal solution was to double the size every time it reaches maximum capacity.
Wow, I noticed Java has so many of the same built in methods Kotlin has but without all the boiler plating. I don't know if you know Kotlin? But I am guessing if you learn Kotlin well, you'll have a stronger understanding in Java and maybe be able to learn Java even quicker later on after you master Kotlin? I see so many similarities between the two programming languages.
@@DevlogBill I think you're good learning Kotlin first. While it builds on top of Java, you don't need an in-depth knowledge of Java to use it. Rather, it would be good to go back later after your comfortable to see how Java handles things such as variables. For example, where Kotlin uses var and val, Java requires that you specifically set each data type (String, int, boolean).
@@tyler8995 Thanks, I never used a strongly typed programming language before, Kotlin is my first. This is my second programming language I came from JavaScript. There is a different way in thinking with Kotlin. I was becoming over whelmed with JavaScript and the constant changes with the libraries and frameworks.
Bro just discovered that ArrayList is based on array :) Jokes apart - it's extremely important to know that, because the chance they will ask you about lists on interview is very high
All the visual and sound effects for zoomers degrade the quality. It's not a tiktok short. And sustained attention is a required skill for developers. The effects dont help retaining attention.
No you cannot 'prefer' arrays over 'arraylists'.. Abstractions are there for a reason. With abstractions we could visualize higher order functions much more easily. There could be small performance bottlenecks with ArrayList implementations but they will be next to unnoticeable with today's fast cloud compute instances. Therefore putting effort to optimize that level of detail with primitive datastructures is a waste of time and effort. If you think along this line, using SpringBoot will also be a waste due to its internal complexities.
Try to limit the use of add and remove from Lists, unless they stay local, like in unit tests. Stream immutable Collections (or Arrays!) to new immutable Collections as much as possible.
once you start thinking functional programming, you see everything as a collection where you perform an action. why is this better? you concentrate more on the real problem then on the small (almost not relevant details). that's why use library (3rd party jar files) instead solving those problem yourself
@@leandro-ds2vn Because that's how modern streaming works. Just like keeping regular Objects immutable, think the same way for Collections. Anyone can always make a copy constructor to get local mutable contents from it, and streaming made most of that even unnecessary, as one can always collect to a new Collection. I've seen many bugs happen because other programmers do mutable operations on Collections because they think it suits their immediate needs, failing to realize the contents will be needed as-is later on. Such things often even pass unit tests as the immediate functionality indeed functions as expected. This is why recent Java versions provided us with the record, the Collectors.toList, and the List.of functionality. This isn't a set in stone paradigm; by all means pass a mutable Collection if it suits your needs, but do it judiciously.
subtitles was a nice feature in this video. Special effects and sounds made the video kind of videos for babies. Also the title was more like a clickbait
He mentioned from the start its ment for beginners to learn datasturcture, and even if clickbait what the problem he is depending on himself to make money independent from enslaving software companies
It's an amazing videos because it's really important to know how the things work in order to know what data structure or anything else match your use case. For example I need to know how stack or deque work in order to choose the best data structure for certain requirement. Yes, we should learn arrays before arraylist and even arrays makes part of the fist data structure that came with java 1.0. I thinks it's the same process with spring boot and spring framework in a certain point , I mean you can learn spring boot without spring framework but i'm so sure you must read somenthing about the core when you face any issue.
I think this is absolutely useless. although I knew that in java/c# array size is immutable, I didn't even care for three years that lists use arrays internally, because it doesn't matter 99.9% of the time. I'd say, if you're interested in it or need to know, look it up.
@@giorgosterzis3331 i agree that there's tons of unnecessary editing effects, but why in the actual fuck would you use a list before an array in most situations? If anything, linear cases are far more common so what would the point of having a list be in most situations? go use some C, hippie. Once you cleanse your mind of perverted List thoughts you can come back and stop fucking around.
@@salehahmed8936 the video is bad, because it is missleading. You use lists all the time and it is very important to get familiar with them and Collections. I also think it is not neccessary to know how exactly it is working, when you are a junor dev. Get down with the basics (how to use stuff rather than how it works) and then dig deeper in the code. With more experience you will have more to refelct and pay more attention on details like the grow function. Even though I think it is good to teach people to dig deeper and check out the functions you are using, a much better approch would have been to do exactly that and use a honest title. Show some examples and what to look for. Maybe even add a showcase where you talk about the runtime or memory usage.
With all respect - instead of publishing this content you could focus on finishing the paid course on microservices, where still plenty of videos are missing
Unless you want to reinvent the wheel, stick with ArrayList. Some abstraction makes life a little easier, though.
But of course, it is helpful to understand its underlying implementation.
Sure, but when you are starting out, you should know the cost of each functions.
Hi Nelson. I enjoy most of your videos, but please can you reduce the effects? It's hard to listen to what you say with the constant ADHD interruptions.
Thank You...
Thank you, i was to type the same thing. I dont have ADHD, yet. I dont need those FX to contract it.
Yep….i agree 😊
Agreed!
Completely unneeded
Unnecessary effects are distracting😊
tbh the effects to emphasise on important parts but everyone has different cups of tea i guess
Totaly agree
@@salehahmed8936 vine boom vine boom vine boom fart huh metal pipe falling vine boom Danger Alarm Meme Sound Effect taco bell bababooey Android notification meme sound effect vine boom vine boom vine boom AMOGUS goofy aaaaaaahhh snort vine boom fart huh far metal pipe falling metal pipe falling fart fart vine boom Fart Meme Sound
What a clickbait title. Im sick of all this tech youtubers telling me that I do something wrong all the time.
He mentioned from the start its ment for beginners to learn datasturcture, and even if clickbait what the problem he is depending on himself to make money independent from enslaving software companies
I understand (and partially agree) with you, but here he's basically saying "learn the internals before you use them", which is correct. When we are senior devs we think of arraylists as arrays with decoration, but that's not the case for juniors.
True, title is very misleading, many people dont have the time to watch the video and they just keep the title in mind
This is where the importance of studying data structure lies, because in real life you will use native Java implementations already knowing how the structure works internally.
I find it very difficult to have to implement a structure from scratch (unless it doesn't exist) to use it in your project since there are already native implementations of it, so if you understand data structure you can use them without any weight in consciousness.
Exactly. I remember back in my second year we had an investigation assignment of implementing abstract data structures it was actually eye opening to see how they were implemented.
This was interesting for me, but the title is missing something like “If you are starting..” and maybe too much effects :)
I'm a programmer for 13 y now, I work mostly with C#.
Your channel is very good and very clear for newcomers. Congrats.
That said, I would change the name of this video to "Prefer arrays over Lists if you are a beginner"
And that's because in day to day programming one is not better than the other. You'll use one or another depending of your need. And even knowing it's essential for any programmer that want to be competent, to learn what's happening under the hood, this doesn't mean they should reinvent the wheel.
I know you probably didn't mean that, but I can see a lot of beginners understanding the message this way.
Well... Just thoughts. Keep up the good work
If you're a junior dev, you should absolutely be using List over arrays 99% of the time. You have to take into account that a senior dev will review your work and they will tell you to use a more reliable data structure like a List.
The more you use lists, you will eventually have no choice but to delve into the underlying structure and learn how it works anyway.
underrated comment. definitely agree 100%.
Why so many effects? Its not an adobe premiere tutorial, isnit?
Sorry grandpa
When I was studying Collections, my mentor told us to create oour own List implementation using arrays and simple array methods to recreate ArrayList. That was fun and interesting for me as for learning and studying.
However, I simply recommend you to proceed using already developed libraries and collections. Because this is just what Java creators want you to do and it simplifies evrything for you. If you want to know how a library works internally, you may just look inside it and read the methods. By the way, I have never used Binary Trees in my career (3 years). It would be super cool if you could show us a simple basics of using a binary tree in Java Development, Brother. Thanks for the video and for warm memories of being a student. As-Salam-u-Alaikum.
Video title is a clickbait but a wise one :)
To the people saying 'clickbait' , 'misleading' etc: see he never said it was meant for advanced viewers,it is clearly for juniors/ beginners and please refrain from leaving any negative comments on this channel. You all have no idea how much this man has added value to many developers life, I am a testament to this.
The way he teaches so selflessly and has created a valuable community that helps others learn.
As far as I know Nelson is an absolute 💎 of a human being and so as a content creator , In each of his videos he tries to teach something new valuable and has never ever once tried to make clickbait video.
Kindly be polite and be appreciative,thank you
I think this video does not apply to junior developers at all, as long as they know, what an array is. you usually look an implementation of a list up, if you need to.
And yet a title like "Prefer Arrays Over Lists. Seriously..." is pure clickbait and misleading if the content of the video then just says that one should learn the inner workings of Lists before using them. Probably every developer agrees with that approach anyways. But especially BECAUSE people likely assume that Nelson is a developer with a lot of experience, they also expected a more serious reason for that statement he used for the title and expected a downside of using Lists. But there is none, at least he didn't mentioned one. Which makes the title even more clickbait and misleading. He stated himself that lists are one of the most used datatypes in Java, so yet again another reason why the title is clickbait/misleading. And that's why its more than appropriate to downvote this video into oblivion. The overall quality of this one particular video is way below his usual content quality.
@@th33xitus yes very understandable. viewers should let the creator know what they don't like about a video.
It is the visual effects course that I have been searching for, thanks!
It'S totally making sence to satrt with arrays and stick with it a while! Thank you Nelson for you dedication!
I also have less than 2 years of experience with java, but I have studied data structures with other languages, so I'll stick with lists.
It’d be appreciative if you tell us about what your take on taking OCJP, the Java certification, is. I personally took OCJP in SE 11 version, and it helped me a lot to understand the basic concepts and syntax like the topic of this video.
I think this is brilliant! I was doing a coding challenge the other day, involving arrays, and found it really frustrating and difficult to figure out because I'm so used to just using list.add.
Yes. It's easier to just use lists but you can't put a price on understanding how it all works. It will absolutely make you a better engineer/developer.
idk bro your editor sometimes put unnecessary sound clips and its annoying.
I really appreciate your videos. Could you mix the sound effects a bit lower? They’re pretty loud compared to your voice. The graphics are nice!
Would you do separate video on Generics?
I'm diving into Java and your videos with slides are very helpful!
I agree as a form of learning. Actually knowing about data structures is what differentiates many professionals when selecting an employee these days. But from the moment we understand how it works, let's use what is already created and tested.
Mostly, I also use arraylist.. my senior said exactly what you've said 2 yrs ago..
I agree that junior devs should start with Array before jumping to List. But, given that internal implementation understood, each class has their own use cases, ie if you want to store fixed size collection and not changes, stick with array, if you want to change and add elements don’t use array, list is your friend.
This is genius. Thank you for sharing your knowledge with us. I had no idea as I am a new java dev I run into the typical “copying code” and not knowing what I am truly using.
وعليكم السلام ورحمة الله وبركاته ❤❤❤
I learned Postgresql From you. It was a really simple tutorial and covered many many things. Really thank you ❤
I think the topic's name may be misleading and some disagree with you. It always right to start with basics to learn something new, but use existing libraries and frameworks that make solving real-world problems much more efficient and less complicated. Inheriting inventions from our predecessors helps us to develop and create more value.
That was my thought.
An awesome video and very clear, pls continues
please don't include those weird sounds in he future videos
No One explains better than you this concepts on the tube.
Damn, this guy discovered the effects button XD J.J. Abrahms eat your heart out!
Hi, I agree with you. But at 8 second - ArrayLists vs Lists, not Arrays vs Lists
Akhi, when I first saw your face I said to myself "this man is probably a Muslim", then I opened the video and heard you saying "Assalamu Alaykum" 😃.
May Allah bless you
love you for the sake of Allah
I'm your brother, Mohamed, from Egypt.
Obviously one should (must) learn data structures to become a good programmer and to have the knowledge of what happens under the hood then with experience, later you can shift to usage of Lists. Thanks.
Hi! This is a topic really close to me and I want to ask you a question.
To be honest, I never get inside the ArrayList class to see how method are implemented (or maybe yes but not in deep). I am Java dev but first language I saw in my life at university was C.
In C, the main difference between arrays and lists is that arrays have fixed size and each slot has a contiguous memory address to the next one; lists use a structure using pointers, they can grow dynamically and due of pointers they not have contiguouses memory address (this makes the search operation less efficient that in arrays).
Now I see from this video that Java uses arrays inside lists... so ? There is not a real difference in Java between arrays and lists ? Are lists just a shortcut ?
Hi, i would like to see a tutorial on how to create a video call and chat functions using Java, Spring Boot and ReactJS. Would be much appreciated.
Walaikum Assalam Warahmatullhe brother amigos you are 100% right.
Its ok to dive into libraries api used methods implmentations just to get a quick understanding but it becomes tirelessly when you are using several libraries in your application. If there is a library and a method that can ease your development life you should just use it without deep diving into it. Nonetheless great video!
I mean I get the idea of inducing Java beginners to get familiar with data structures. But this is like saying that you should prefer JDBC instead of JPA for basic database operations.
Your video makes perfect sense to me, i started with ArrayList with the uni study book i had then moved onto arrays but they never had anything in the study material about this.
that sounds very weird, since arrays are some of the more basic types you can have and you should learn what arrays are in the first year.
@@BloodyScythe666 open uni for ya, I had to use bluej too. I very quickly switched to eclipse when the module finished
I think you mentioned a good point that we should first understand how things work, but the title of the video is not good.
which ide are you using?
Wow … used pure C to teach gifted grade 11 and 12 Programming classes for last 25 years…just changed schools and now I will be using Java … the way they teach coding using Java seems like an attempt to take the logic out of coding … yes I know OOP makes writing and maintaining larger programs easier but how many coders … like you are saying new coders should be getting some experience creating algorithms to solve problems rather than hunting for methods to do everything for them … say you want to delete all occurrences of a given character from a string … in C you could shift all chars one left every time you encounter the char to be deleted … but this solution is O(n^2) …there is an O(n) solution … give students a chance to solve this type of problem when learning to code!
we need a playlist that complete course includes spring boot and react
Someone is having fun while editing :)) Thanks for the amazing content as always!!
Hey hi Nelson,
I have one request pls make a complete session on spring cloud function so work with serverless programming like working with aws services and daily work like perform crud operation and if possible then working with video , image file upload and download pls it's my humble request ❤️❤️❤️
This is why when I solve coding problems in codewars I dont use built in Java data structures.
Not in agreement. Depending on the operations, you pick which one to use. If you know the max limit and if your operations are just traverse, add and remove (with no issues even if you remove somewhere in the middle) then you can prefer object array. Lists are more efficient and convenient for many operations.
You must learn arrays and you must learn lists. But there is no use of slowing down your learning process by using arrays instead of lists. Just explore the internals of ArrayList.
I found that following your channel is more worth
why should I fallback to arrays? any operations on the array, I have to reinvent the wheel again. When I want to optimize, I optimize somewhere else. How about concurrent list? how to use it in parallel stream?
You give wrong advice here to newbies.
Walekum assalam from India
Need to cut down on the animation by half. Use it just at points that you want to highlight. Otherwise it's more of a distraction.
What about arrays for enterprise applications where we deal a million records objects??
In this case arrays or list?? Can someone explain
"Shift + Esc" to close the "Structure"
you can use ANYTHING that helps you get your job done :D
I'm graduated from uni, so basically I'm no longer beginner?
I don't see any advantage using array over list, unless you're absolutely sure you just need to store data.
Wait... so the implementation creates a new array with size+1 every time you add ? I thought the optimal solution was to double the size every time it reaches maximum capacity.
You're right. It creates new array only if the size of list reaches current capacity. But capacity is not growing twice, only half.
Wow, I noticed Java has so many of the same built in methods Kotlin has but without all the boiler plating. I don't know if you know Kotlin? But I am guessing if you learn Kotlin well, you'll have a stronger understanding in Java and maybe be able to learn Java even quicker later on after you master Kotlin? I see so many similarities between the two programming languages.
Kotlin is built off of Java, so that logic would actually go the other way. Better knowledge of Java would help you more with Kotlin
@@tyler8995 Thanks I maybe I should re-think it and start off with Java and later learn Kotlin? I just started with Kotlin about 8 days ago.
@@DevlogBill I think you're good learning Kotlin first. While it builds on top of Java, you don't need an in-depth knowledge of Java to use it. Rather, it would be good to go back later after your comfortable to see how Java handles things such as variables. For example, where Kotlin uses var and val, Java requires that you specifically set each data type (String, int, boolean).
@@tyler8995 Thanks, I never used a strongly typed programming language before, Kotlin is my first. This is my second programming language I came from JavaScript. There is a different way in thinking with Kotlin. I was becoming over whelmed with JavaScript and the constant changes with the libraries and frameworks.
Bro just discovered that ArrayList is based on array :)
Jokes apart - it's extremely important to know that, because the chance they will ask you about lists on interview is very high
All the visual and sound effects for zoomers degrade the quality. It's not a tiktok short. And sustained attention is a required skill for developers. The effects dont help retaining attention.
any python videos for covering the internals
I´d like to think that beneath the surface of ArrayList there was an entirely new data structure =\
Bro if we start implementing each and every method the code can become too complex and huge. These inbuilt methods are provided for our comfort
its not about not using them, its about not using them until you understand how datastructures work, especially as a beginner.
so is bad practice using a cointains inside a loop? casuse is a loop insted of another loop
No you cannot 'prefer' arrays over 'arraylists'.. Abstractions are there for a reason. With abstractions we could visualize higher order functions much more easily. There could be small performance bottlenecks with ArrayList implementations but they will be next to unnoticeable with today's fast cloud compute instances. Therefore putting effort to optimize that level of detail with primitive datastructures is a waste of time and effort. If you think along this line, using SpringBoot will also be a waste due to its internal complexities.
Try to limit the use of add and remove from Lists, unless they stay local, like in unit tests. Stream immutable Collections (or Arrays!) to new immutable Collections as much as possible.
Why?
once you start thinking functional programming, you see everything as a collection where you perform an action.
why is this better? you concentrate more on the real problem then on the small (almost not relevant details). that's why use library (3rd party jar files) instead solving those problem yourself
@@leandro-ds2vn Because that's how modern streaming works. Just like keeping regular Objects immutable, think the same way for Collections. Anyone can always make a copy constructor to get local mutable contents from it, and streaming made most of that even unnecessary, as one can always collect to a new Collection.
I've seen many bugs happen because other programmers do mutable operations on Collections because they think it suits their immediate needs, failing to realize the contents will be needed as-is later on. Such things often even pass unit tests as the immediate functionality indeed functions as expected.
This is why recent Java versions provided us with the record, the Collectors.toList, and the List.of functionality.
This isn't a set in stone paradigm; by all means pass a mutable Collection if it suits your needs, but do it judiciously.
Hi Nelson.
The video is great as usual but, would you please lower the volume of the effects (Or even better, don't use it)?
It was really annoying :(
Title seems misleading, you are actually proposing a learning method for beginners....not suggesting a preference for arrays vs lists in general.
This video feels like a fever dream
Is it an intellij theme or is it other IDE you are using?
It's new UI of IntelliJ
Try writing your own array logic in a real Sprint and see the fire you'll get in your reviews. Learning the underlying structures is still fine tho
Assalamualaikum, great video amigos !
I like the effect of this video
Thank you so much excelent video! btw what plugins are you using to have those icons?
Amigoscode please use "pista de audio" in spanish ❤
Thanks for the advice but not every time an ArrayList needs to grow because it has a DEFAULT_CAPACITY of 10 elements :) and a load factor of 0.75f
Awesome explanation and helpful information
the audio effects are so annoying
but good content
True for beginners.
subtitles was a nice feature in this video. Special effects and sounds made the video kind of videos for babies. Also the title was more like a clickbait
You can’t use “List” because they are interfaces
Can we reduce the effects please, feels like an overdo
clickbait video without value
He mentioned from the start its ment for beginners to learn datasturcture, and even if clickbait what the problem he is depending on himself to make money independent from enslaving software companies
@@mohammadtoficmohammad3594 it's like I have 24 hours course where I explaine what is value in Java
@@mohammadtoficmohammad3594 Moreover, courses that I bough doesn't cost $10 because of lack of practise and people have been kpeople have been hooked
@@caffeinejavacode1475 So you're basically a hater trying to steal viewers to your little channel, cute
@@caffeinejavacode1475 If its up to me i will take amigocode course instead of yours
vine boom vine boom vine boom fart huh metal pipe falling vine boom Danger Alarm Meme Sound Effect taco bell bababooey Android notification meme sound effect vine boom vine boom vine boom AMOGUS goofy aaaaaaahhh snort vine boom fart huh fart metal pipe falling metal pipe falling fart fart vine boom Fart Meme Sound vine boom vine boom vine boom AMOGUS goofy aahh sound effect AMOGUS he's thicc boye dayumn son wow vine boom vine boom
It's an amazing videos because it's really important to know how the things work in order to know what data structure or anything else match your use case.
For example I need to know how stack or deque work in order to choose the best data structure for certain requirement.
Yes, we should learn arrays before arraylist and even arrays makes part of the fist data structure that came with java 1.0.
I thinks it's the same process with spring boot and spring framework in a certain point , I mean you can learn spring boot without spring framework but i'm so sure you must read somenthing about the core when you face any issue.
Provide me intellij liscence
I guess this is why we’re forced to use C in the first few years of comp sci.
This is the reason Arrays are a little faster than ArrayLists.
the effects are too much, too loud 😂
Too many effects. Very annoying while watching videos. Please don't do that again. Good luck! )))
Did you hire a new editor or something? The effects are unnecessary and distracting.
Hey
i wanna see the exact same video about every Collection and Map
Content TOP!
I think this is absolutely useless. although I knew that in java/c# array size is immutable, I didn't even care for three years that lists use arrays internally, because it doesn't matter 99.9% of the time. I'd say, if you're interested in it or need to know, look it up.
(When learning)
Hey Nelson, this video is one of your worst videos
Its for Beginners but anyway explain why
@@salehahmed8936 It's a clickbait title, most of the times you should use lists instead of arrays. Also, too many unnecessary sound and video effects.
@@giorgosterzis3331 video effects aside you give me junior dev vibes
@@giorgosterzis3331 i agree that there's tons of unnecessary editing effects, but why in the actual fuck would you use a list before an array in most situations? If anything, linear cases are far more common so what would the point of having a list be in most situations? go use some C, hippie. Once you cleanse your mind of perverted List thoughts you can come back and stop fucking around.
@@salehahmed8936 the video is bad, because it is missleading. You use lists all the time and it is very important to get familiar with them and Collections. I also think it is not neccessary to know how exactly it is working, when you are a junor dev. Get down with the basics (how to use stuff rather than how it works) and then dig deeper in the code. With more experience you will have more to refelct and pay more attention on details like the grow function.
Even though I think it is good to teach people to dig deeper and check out the functions you are using, a much better approch would have been to do exactly that and use a honest title. Show some examples and what to look for. Maybe even add a showcase where you talk about the runtime or memory usage.
With all respect - instead of publishing this content you could focus on finishing the paid course on microservices, where still plenty of videos are missing
Per aspera ad Astra
The effects are distracting and create unnecessary suspense... I found them quite funny but I don't think it's appropriate lol
nothing new lol
Is there a point in this video besides wasting our time?
These edits and transitions are a bit much. Totally distracting.