nikcho-kouhai
JCHJava Community | Help. Code. Learn.
•Created by i hate SQL so much its unreal on 2/19/2025 in #java-help
whats the point of OOP encapsulation?
and to make that point I will say that private data isn't private at all. Once it's all compiled it's just out there. It's simply a logical construct that's supposed to help you write less buggy code (whether it actually helps you do that is a different matter tho)
8 replies
JCHJava Community | Help. Code. Learn.
•Created by i hate SQL so much its unreal on 2/19/2025 in #java-help
whats the point of OOP encapsulation?
to answer briefly, you pretty much hide the data from yourself.
8 replies
JCHJava Community | Help. Code. Learn.
•Created by i hate SQL so much its unreal on 2/19/2025 in #java-help
whats the point of OOP encapsulation?
Generally speaking OOP has been frowned upon for a while now for a lot of reasons, encapsulation included. I suppose if I had to point out a positive at least in my book it's that it's easier to work with invariants and it just in general helps if you need to tie some logic to a certain state. For example:
There are of course other ways to do this. But having one and only one intersection where you can do something (like one setter method) can make it easier to follow the state of whatever you are modifying and. As a result of that tracking accesses to the field also becomes a lot easier since there is only once place from which you can do it from.
For the most part it's just typical java stuff though. Java is pretty much like a paranoid parent that takes away just about anything you can possibly shoot yourself in the foot with. It puts you in an inflatable house where the wall sockets are closed off, any sharp objects are kept strictly locked away somewhere, there are four bodyguards around every window and door and accesses to the dangers of the knife or the outside world are provided only under some specific circumstances.
8 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
*and don't get insecure because that's pointless. You aren't the best at programming and you will never become the best. Neither will I, neither will anyone ever because there is always someone better. Just take things at your own pace.
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
just try to develop a sense of recognizing what you can and can't (at least with reasonable effort) do and take action based on that.
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
that being said there should be a balance
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
you aren't gonna reinvent programming, and your solutions for a particular problem are probably gonna be worse than what someone has already made
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
if you are programming however being able to search for answers is a very important skill
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
if you are specifically aiming to solve some programming exercise like on leetcode then looking for answers kind of defeats the purpose
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
and you shouldn't think about it too much
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Jordan σ_σ on 2/16/2025 in #java-help
Overthinking?
LLMs (large language models) is AI's like chatgpt
20 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
I wish you good luck!
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
https://github.com/bytedeco/javacpp-presets/tree/master/ffmpeg
I used this for encoding and decoding
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
Only on mobile
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
I've mostly been through the wringer so I hope I can help you
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
If you have any implementation questions you can ask me
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
Well then it shouldn't be too difficult
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
You can probably do it without too much effort, but if you can't find such a player ( I couldn't ) it can be hard to implement
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
But if you can find like a media player that takes in raw decoded audio and video frames, displays the video and plays the audio frames and synchronizes them properly
114 replies
JCHJava Community | Help. Code. Learn.
•Created by Serkan Gülbol on 1/28/2025 in #java-help
Own video streaming
Especially if you have to do it from scratch
114 replies