[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
WTF is object oriented programming good for?
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 48
Thread images: 5
File: 0 (1).jpg (30 KB, 480x360) Image search: [iqdb] [SauceNao] [Google]
0 (1).jpg
30 KB, 480x360
WTF is object oriented programming good for?
>>
ABSOLUTELY NOTHIN
Sayitagain
>>
>>52433650
>POOP
/thread
>>
Procedural PHP is is better and easier, oop might make it easier for...
>>
>>52433650
>POOP
really?
>>
>>52433650
saving code
>>
File: 1426357554598.png (152 KB, 1948x858) Image search: [iqdb] [SauceNao] [Google]
1426357554598.png
152 KB, 1948x858
>>52433650
nothing
>>
>>52433650
PHP OOP is fine, really its more of a PEBCAK problem.
>>
>>52433758
>Procedural PHP is is better and easier
are you being serious?
>>
Very sad that we were only taught OOP with Java in school.
It turned me off programming for a while.
>>
>>52434464
All programming is procedural in the end anyway
>>
>>52434517
>All programming is procedural in the end anyway
what is dynamic programming
>>
>>52433650
cleaner, reusable code??
>>
>>52433650
more bloat
>>
>>52434485

Same here, except it turned me off programming for good
>>
>>52433758
Have you compared the drupal source to the wordpress source?
>>
>>52433945
>subhuman fleas 14
always gets me
>>
>>52433650
A narrow subset of problems, like any other paradigm. If you try to cram everything into it you'll just make a mess.
>>
>>52433650
Large, modular projects
>>
>>52433650
It's so easy to structure and understand that even idiots can do it.

Makes it good for industry shit.
>>
OOP is good for the right problems, like large systems. You don't just write OOP code right away, you gotta do all the proper documentation too (user stories, use case diagrams, sequence diagrams, pre- and postconditions)
>>
>>52434737
drupal looks a lot better
>>
>>52433650
Projects that are suitably modelled into discrete objects that communicate by passing messages.
>>
>>52433945
oh god the fucking factoryfactoryfactory, brings me back
>>
PEOPLE
ORDER
OUR
PATTIES
>>
>>52434872
>Projects that are suitably modelled into discrete objects that communicate by passing messages.

Alan Kay would be proud of you
>>
to poo in loo, as the picture subliminally hints towards
>>
>>52434899
You shouldn't be doing OOP if you don't take this paradigm into OO design. If your paradigm to OOP is simply "C structs with functions inside them", it's best to avoid OOP.
>>
On a very basic example, if you create several different card games, you can have a single object that creates, shuffles, and deals the cards. That way you don't need to write it for every single game you do. The most interesting part is when you go back to fix some bugs. You only need to edit one object instead of every game. When working with bigger projects, the benefits are much greater.
>>
>>52433758
bait or WP fag
>>
>>52434929
>You shouldn't be doing OOP if you don't take this paradigm into OO design. If your paradigm to OOP is simply "C structs with functions inside them", it's best to avoid OOP.

I wish I knew when I was younger. C++ basically single-handedly destroyed my interest in programming.
>>
>>52434835
No you don't.
All you have to do is apply IoC and compartmentalization liberally, and make an interface each time you split out functionality.

Your way leads to factoryfactoryfactory
>>
>>52433945
Your pic related is because people go too deep into OOP with class A extends B implements C and D and shit tons of interfaczq. Then they realized they fucked up their design and they go into fucking singletons and staticpalooza to patch it. It then becomes slow and unreadable. OOP is best when kept relatively simple. Sometimes a small duplicate here and there can save you a lot of trouble. Also: >daily reminder that singletons equal no architecture
don't you dare using that shit
>>
>>52433721
>pH POOP
acidic poop
>>
Simplifying code maintenance and growth among large or disparate dev teams by manifesting the DRY principle and encapsulating functionality behind reusable interfaces.
>>
>>52434544
Get a Lisp.
>>
>>52433650
good for making CRUD apps which pack everything into JSON.

I fucking hate webdev though, so I stick to C
>>
>>52433758
I really have this opinion too. No jokes.
My whole company writes everything procedural. Also, no fucking joke. Easier, faster, just fucking better overall.
>>
>>52435455
How exactly does OOP aid CRUD?
>>
>>52435480
by using the same interface for everything while hiding string cleaning and stuff


see
>>52435351
>>
>>52435480
it does not, this anon is just spewing tech words.
CRUD + OOP = ORM and ORMs are shit
>>
>>52433650
Polymorphism
Inheritance
Encapsulation
>>
>>52433650
>create class OP
>it has a tiny dick and likes black men
>call it a faggot
vs.
>create data structure resembling OP
>it contains a byte resembling his cock size in nm and an octa containing the number of dicks it has sucked as of today
>create a function that calls that data structure a faggot

you don't have to use it and yet people keep bitching
stay classy /g/
>>
>>52436721
> create data structure resembling OP
> I DONT KNOW WHAT A DATA STRUCTURE IS
>>
>>52436763
Sorry but I know what it is
If you're already trying to look more intelligent than me, tell me where I'm wrong at least
and try not to make a fool of yourself
>>
Faster, less complicated, not so much room for mistakes, and a great overview
>>
(Semantic) errors are easier to track, Business logic and... and.... the majority of all programming is modification of existing code.
So if you, or some other $€-programmer has to extend/whatever some code/library (which is highly optimised, or shitty code or both!) then some structure can really save some big ass headache and pesos.
OP is a webplebe?
Thread replies: 48
Thread images: 5
Thread DB ID: 424904



[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at wtabusse@gmail.com with the post's information.