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,221
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: 277
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,083
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

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 11:31 PM.


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