Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 07-13-2018, 08:18 AM   #26
TB303
adept
 
Join Date: Sep 2008
Location: not dead yet
Posts: 750
Re: I really can't get my head around OOP

Quote:
Originally Posted by antialias View Post
Not to mention that spaghetti coders are less than useless in any kind of team environment.
Thats ok, stand up meetings are gay, design patterns are for retards, libraries are for pussies (except maybe STDLIB) and git was invented by one of the biggest wankers in the world. Cowboy coders of the world unite!
TB303 is offline   Reply With Quote
Old 07-13-2018, 09:36 AM   #27
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,289
Re: I really can't get my head around OOP

TIL there is just "OOP" and "spaghetti code"
RustyBrooks is offline   Reply With Quote
Old 07-13-2018, 01:59 PM   #28
codeartisan
centurion
 
codeartisan's Avatar
 
Join Date: Jun 2008
Posts: 153
Re: I really can't get my head around OOP

Quote:
Originally Posted by TB303 View Post
Cowboy coders of the world unite!
Narrator: And they did unite. 3 years later they gave us Windows ME.
codeartisan is offline   Reply With Quote
Old 07-13-2018, 02:58 PM   #29
antialias
journeyman
 
Join Date: May 2018
Posts: 280
Re: I really can't get my head around OOP

Quote:
Thats ok, stand up meetings are gay, design patterns are for retards, libraries are for pussies
I actually agree with some of this to a degree.

Use standups where they make sense - not just because the scrum handbook says so.
Use patterns where they make sense - not just because they exist.
Using libraries ties you to those libraries (which can lead to support nightmares) - so use them when they add value not just because they give you that one thing you really like

But going the other way and never using any of those is a sure fire way to create a team that is coding for the garbage can.

Quote:
TIL there is just "OOP" and "spaghetti code"
Nowadays there's also aspect oriented programming.
Use what's best for the task. If you're just coding an internal tool that will do one thing (and which will not jeopardize the project if it is no longer maintained) then spaghetti code is perfectly fine for, say, 50 lines of code or less.

But as soon as you get what OOP brings you you'll never be going back - even in smallish projects you code for yourself at home. What you spend in thinking about in design you vastly more than make up in debugging/maintenance time.
antialias is offline   Reply With Quote
Old 07-14-2018, 01:19 AM   #30
waffle
Pooh-Bah
 
waffle's Avatar
 
Join Date: Jul 2004
Posts: 3,728
Re: I really can't get my head around OOP

OOP is really easy to screw up. I've noticed increasing backlash against it among my programming friends over the past few years.
waffle is offline   Reply With Quote
Old 07-15-2018, 06:26 PM   #31
jukofyork
Carpal \'Tunnel
 
jukofyork's Avatar
 
Join Date: Sep 2004
Posts: 11,364
Re: I really can't get my head around OOP

Quote:
Originally Posted by waffle View Post
OOP is really easy to screw up. I've noticed increasing backlash against it among my programming friends over the past few years.
It's interesting that the games industry has moved towards "data-oriented design" (eg: Entity-component pattern); partly for performance reasons but mainly to get away from deep/impenetrable inheritance hierarchies.

Here's a couple of bookmarks I've saved:

http://www.dataorienteddesign.com (just updated after 5+ years of of dormancy)
https://github.com/dbartolini/data-oriented-design

Juk
jukofyork is offline   Reply With Quote
Old 10-22-2018, 11:05 AM   #32
jukofyork
Carpal \'Tunnel
 
jukofyork's Avatar
 
Join Date: Sep 2004
Posts: 11,364
Re: I really can't get my head around OOP

Quote:
Originally Posted by jukofyork View Post
Here's a couple of bookmarks I've saved:

http://www.dataorienteddesign.com (just updated after 5+ years of of dormancy)
https://github.com/dbartolini/data-oriented-design
Not read it yet, but there is a hard copy version now too:

Data-oriented design: software engineering for limited resources and short schedules

Juk
jukofyork is offline   Reply With Quote
Old 01-12-2019, 03:33 AM   #33
Ryanb9
Carpal \'Tunnel
 
Ryanb9's Avatar
 
Join Date: Aug 2006
Location: NEVA!
Posts: 7,086
Re: I really can't get my head around OOP

Quote:
Originally Posted by Ovalman View Post
Learned ZX Spectrum BASIC in the early 80's and spaghetti coded my way.

Things like
10 Let a=1
20 a=a+1
30 If a=30 Gosub 100
40 Print a
50 Goto 10
100 Print "a is 30"

I recently came back to programming and find many things so alien. I think my problem lies with the Object Orientated Programming method. I understand what it is (sort of) but I can't seem to apply it with any code I've written. I seem to go back to spaghetti coding which is what I understand.

Most if not all programming courses on Youtube are geared towards the newbie programmer but I've learnt many bad habits that I can't shake off. I'm trying to learn Android (Java) but I've also dabbled in Python and C#. It's not the actual language that's the problem as I understand about loops and variables but it's the actual structure of a program.

If you were creating a program from scratch, how would you go about it?

Can someone explain to me how to break things down from an idea into actual code?

I'm pretty frustrated BTW.
We are all trying to get the most done with the least investment of time, energy, and money. If OOP works then we will use that. If something else works better then we will all switch to using that. This is not dogma.
Ryanb9 is offline   Reply With Quote
Old 05-15-2019, 02:04 PM   #34
cpauer
stranger
 
Join Date: Feb 2017
Posts: 7
Re: I really can't get my head around OOP

OOP has its place, functional (spaghetti!...never write spaghetti code, call it functional, or stateless programming) has its place.

OOP really had a lovely match with the robust APIs (Application Programming Interfaces) or standard libraries needed to give access to service layers, such as those found in Graphical User Interfaces.

When doing hard core algorithms for calculating, OOP makes no sense...(hello "static"! for you programmers out there)

Use the tool that works, be able to leverage both. Anyone who says you absolutely should do this in all cases or that in all cases is WRONG.

Take Android for instance. It is in the Jave language (ok you can use Kotlin now) but it's the LIBRARY of Types and Objects that ABSTRACT (sorry, had to say it, but it is precisely correct) the screen elements, events and activities of your mobile app that make it android. Other non-android apps also are Jave of course, they just don't have the libraries specific to android.

If i've cleared at least 1 thing up, my work here is done.
cpauer is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 12:06 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online