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

WTF is object oriented programming good for?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 48
Thread images: 5

File: 0 (1).jpg (30KB, 480x360px) Image search: [Google]
0 (1).jpg
30KB, 480x360px
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 (152KB, 1948x858px) Image search: [Google]
1426357554598.png
152KB, 1948x858px
>>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
>>
File: tacobell_demolitionman.jpg (69KB, 935x500px) Image search: [Google]
tacobell_demolitionman.jpg
69KB, 935x500px
>>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
>>
File: fox.png (112KB, 688x1434px) Image search: [Google]
fox.png
112KB, 688x1434px
>>52433650
>>52433945
>>52434652
>>52434696
>>52434883
>>52435040
>>52435473
>>52435495
>>
>>52433650
Polymorphism
Inheritance
Encapsulation
>>
File: Memes were a mistake.png (142KB, 537x416px) Image search: [Google]
Memes were a mistake.png
142KB, 537x416px
>>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 posts: 48
Thread images: 5


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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 content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.