Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.sinclair > #4149 > unrolled thread

Trying to learn OOP (for the MIILIONTH time!!!)

Started bybit-naughty@hotmail.com
First post2016-04-11 07:56 -0700
Last post2016-04-20 01:02 -0700
Articles 15 — 5 participants

Back to article view | Back to comp.sys.sinclair


Contents

  Trying to learn OOP (for the MIILIONTH time!!!) bit-naughty@hotmail.com - 2016-04-11 07:56 -0700
    Re: Trying to learn OOP (for the MIILIONTH time!!!) Guesser <alistair@zxnet.co.uk> - 2016-04-11 16:07 +0100
    Re: Trying to learn OOP (for the MIILIONTH time!!!) Volker Bartheld <news2016@bartheld.net> - 2016-04-12 08:14 +0200
    Re: Trying to learn OOP (for the MIILIONTH time!!!) AndyW <Andy@nojunqmail.com> - 2016-04-12 07:23 +0100
      Re: Trying to learn OOP (for the MIILIONTH time!!!) bit-naughty@hotmail.com - 2016-04-15 11:30 -0700
    Re: Trying to learn OOP (for the MIILIONTH time!!!) Calum <com.gmail@nospam.scottishwildcat> - 2016-04-12 12:54 +0100
      Re: Trying to learn OOP (for the MIILIONTH time!!!) Guesser <alistair@zxnet.co.uk> - 2016-04-12 13:37 +0100
      Re: Trying to learn OOP (for the MIILIONTH time!!!) bit-naughty@hotmail.com - 2016-04-15 11:33 -0700
        Re: Trying to learn OOP (for the MIILIONTH time!!!) Guesser <alistair@zxnet.co.uk> - 2016-04-15 20:38 +0100
    Re: Trying to learn OOP (for the MIILIONTH time!!!) bit-naughty@hotmail.com - 2016-04-15 11:35 -0700
    Re: Trying to learn OOP (for the MIILIONTH time!!!) bit-naughty@hotmail.com - 2016-04-15 11:36 -0700
      Re: Trying to learn OOP (for the MIILIONTH time!!!) Guesser <alistair@zxnet.co.uk> - 2016-04-15 20:35 +0100
        Re: Trying to learn OOP (for the MIILIONTH time!!!) AndyW <Andy@nojunqmail.com> - 2016-04-18 07:31 +0100
    Re: Trying to learn OOP (for the MIILIONTH time!!!) bit-naughty@hotmail.com - 2016-04-20 01:02 -0700
    Re: Trying to learn OOP (for the MIILIONTH time!!!) bit-naughty@hotmail.com - 2016-04-20 01:02 -0700

#4149 — Trying to learn OOP (for the MIILIONTH time!!!)

Frombit-naughty@hotmail.com
Date2016-04-11 07:56 -0700
SubjectTrying to learn OOP (for the MIILIONTH time!!!)
Message-ID<602be32e-1a4e-4d61-bb72-c15606d6ca5c@googlegroups.com>
...OK, so my OOP book says something right off the bat about the "requirements specification" for a piece of software, how OOP is about "programmers finding out that they're writing similar pieces of software", blah blah....

I wanna know - back then, who the fuck wrote things like OpWolf and Thundercats and Vindicator *IN Z80 MOTHERFUCKING ASM*, using fucking OOP? Like, if we dissassemble Vindicator, are we going to find OOP-y stuff deep in its innards? 

What was the "requirements specification" for Where Time Stood Still, say, LOL? That a hyperactive 15-yr old had to be kept entertained? 

All these softwares worked just fine, seems to me, and in fact, DID provide me hours and hours of fun (which, btw, modern games do NOT, but then I haven't tried them...)

What was "reusable" in um.... LightForce? (just being cruel, that's the 1st 48k software I've mentioned...) That many ships had to be moved around? So... if a ship has to move, and avoid collisions,... put it inside some code that does that, and Um... CALL IT??!! That's a SUBROUTINE!! Nice and simple....

All these softwares were HUGE pieces of code, well, for ME, cuz MY largest Z80 program was probably < 1K LOL! :) , but they worked just fine....? Without doing anything funny (OOP-y)?


So - what's all this OOP business, and why should I learn it?



I have a feeling that THIS is the place to ask this question in, not Quora or whatever, filled with cunt "industry people" who Did Not Cut Their Teeth On A Z80!! And know what it's like to optimize cycles in Asm! YOU guys know the answer! So tell me! (if there IS one!)
I wait to find out......

[toc] | [next] | [standalone]


#4150

FromGuesser <alistair@zxnet.co.uk>
Date2016-04-11 16:07 +0100
Message-ID<negecr$v4j$1@dont-email.me>
In reply to#4149
Given the level of NIH syndrome exhibited by several of the old 
programmers who have popped up on WoS and alienated people in the last 
ten years I'd say not much of anything was ever re-used :)

That doesn't mean that software libraries are worthless. :p

[toc] | [prev] | [next] | [standalone]


#4151

FromVolker Bartheld <news2016@bartheld.net>
Date2016-04-12 08:14 +0200
Message-ID<1aaev099jjb3j$.dlg@news.bartheld.net>
In reply to#4149
On Mon, 11 Apr 2016 07:56:35 -0700 (PDT), bit-naughty@hotmail.com wrote:
> So - what's all this OOP business, and why should I learn it?

If Z80 assembler is all you ever need, you don't have to. Paper, pencil,
Rodnay Zaks "Programming the Z80" and any Sinclair computer of your choice
(or even a Zilog evaluation board) plus last millennium tube TV will do.
At least it was fine for me, 30 years ago. OK, the luxury of two
microdrives, a Multiface One, 80k of bank switching memory and Hisoft
Gens/Mons "IDE" as folks would call it nowadays.

I notice, you're using Google groups - would you like to share the web
browser, you've developed for 1k Z80 memory? Just being curious.

-- 
@:  W E B 2 0 1 6 at B A R T H E L D dot N E T
3W: www.bartheld.net

[toc] | [prev] | [next] | [standalone]


#4152

FromAndyW <Andy@nojunqmail.com>
Date2016-04-12 07:23 +0100
Message-ID<Zv0Py.176064$OB.25348@fx11.fr7>
In reply to#4149
On 11/04/2016 15:56, bit-naughty@hotmail.com wrote:
> ...OK, so my OOP book says something right off the bat about the "requirements specification" for a piece of software, how OOP is about "programmers finding out that they're writing similar pieces of software", blah blah....
>
> I wanna know - back then, who the fuck wrote things like OpWolf and Thundercats and Vindicator *IN Z80 MOTHERFUCKING ASM*, using fucking OOP? Like, if we dissassemble Vindicator, are we going to find OOP-y stuff deep in its innards?
>
> What was the "requirements specification" for Where Time Stood Still, say, LOL? That a hyperactive 15-yr old had to be kept entertained?
>
> All these softwares worked just fine, seems to me, and in fact, DID provide me hours and hours of fun (which, btw, modern games do NOT, but then I haven't tried them...)
>
> What was "reusable" in um.... LightForce? (just being cruel, that's the 1st 48k software I've mentioned...) That many ships had to be moved around? So... if a ship has to move, and avoid collisions,... put it inside some code that does that, and Um... CALL IT??!! That's a SUBROUTINE!! Nice and simple....
>
> All these softwares were HUGE pieces of code, well, for ME, cuz MY largest Z80 program was probably < 1K LOL! :) , but they worked just fine....? Without doing anything funny (OOP-y)?
>
>
> So - what's all this OOP business, and why should I learn it?
>
>
>
> I have a feeling that THIS is the place to ask this question in, not Quora or whatever, filled with cunt "industry people" who Did Not Cut Their Teeth On A Z80!! And know what it's like to optimize cycles in Asm! YOU guys know the answer! So tell me! (if there IS one!)
> I wait to find out......

I cut my teeth on 6502 on an Acorn Atom and a home built hex machine 
built from Elektor magazine before moving onto BASIC, Forth (Speccy 
White Lightning) Z80, Pascal, C, C++, Java and now Python.

There is a trade-off as you move from assembler to OOP; you delegate 
more of the mindless donkey work to the compiler/interpreter which makes 
things easier and less prone to things like memory clashes but you also 
create code with a lot less efficiency.

I use OOP almost exclusively now except for some scripting stuff and for 
complex systems it works fine (although "Hello World" can be several 
megabytes depending on the language you are using).

Why use it? Extensibility - if you want another bad guy just instantiate 
a new object and the routines and variables are there.
Inheritance - If you need to create a new type of bad guy just extend 
the generic BadGuy Object and override/add the relevant routines it 
makes for a common codebase, a logical data structure and easier 
development.
Interfacing with the hardware. With the speccy you could easily 
interface directly with the video memory or the sound. Moving a 
character was a matter of changing some bits in memory. Computers have 
advanced massively (some would say in a backwards direction) and it is 
rare for you to be able to directly interface with the hardware, now you 
have to go through abstraction layers and various interfaces and 
libraries that are all geared toward OOP. You could write stuff on 
assembler but the first things you would need to do would be to write 
all the interface libraries.

I was a procedural programmer for ages but then I took an Open Uni 
course on OOP, it was tough changing my way of thinking from procedural 
to OOP but it made sense (even if all through the course they were 
talking about customers, account numbers and account balance and I was 
translating it in my head to character name, hit points and gold)

Bottom line - if you want to learn it then learn it otherwise don't. 
Unless you need OOP I would ignore it.

Andy


[toc] | [prev] | [next] | [standalone]


#4157

Frombit-naughty@hotmail.com
Date2016-04-15 11:30 -0700
Message-ID<8ce23ba3-6572-40f3-9ae1-0496272261df@googlegroups.com>
In reply to#4152
On Tuesday, April 12, 2016 at 11:53:56 AM UTC+5:30, AndyW wrote:

> > ...OK, so my OOP book says something right off the bat about the "requirements specification" for a piece of software, how OOP is about "programmers finding out that they're writing similar pieces of software", blah blah....
>but you also 
> create code with a lot less efficiency.


Aaah! - THIS is the vital info I wanted to know!!! Some straight talk!!
Not aaaall the books I tried to read about this and all the people I asked on the net cared to drop THIS little gem, this nugget of information on me!

THIS is the first thought which struck me when I first heard about "new" - Doesn't that take an awful lot of memory, not to mention some, maybe good, amount of CPU???!!!
THIS is probably the reason that a modern Grand Theft Auto or whatever takes a fucking 3 Ghz chip with latest Nvidia card or whatever to run!! I doubt that _these_ guys (Rockstar, right?) ever had a Spectrum when they were young!! :) (of course it's not that GTA is the same thing as Vindicator etc., not at all!...)




>(although "Hello World" can be several 
> megabytes depending on the language you are using).


I hope you mean the executable, not source! LOL :)



> Computers have 
> advanced massively (some would say in a backwards direction) 

Ain't nothing wrong with progress or better hardware. But POKE 16384, 255, and seeing the little bar on screen is where my computing life took off!! :) Without that, I wouldn't be coding today!
Oh - the JOY of that!! :) sigh!


>(even if all through the course they were 
> talking about customers, account numbers and account balance and I was 
> translating it in my head to character name, hit points and gold)
>

Awwww - you're a GOOD MAN, Andy! :) YOU'RE the guy who can probably teach me this stuff, instead of that idiot up there making catty comments....

 
> Bottom line - if you want to learn it then learn it otherwise don't. 
> Unless you need OOP I would ignore it.
> 


I want to make websites, and someday I wanna make browser games. Because of that little thing called the Real World. :( I don't think I have an option! :(

... And it also irks me when someone else knows something I don't.



Take care of yourself, man! :)

[toc] | [prev] | [next] | [standalone]


#4153

FromCalum <com.gmail@nospam.scottishwildcat>
Date2016-04-12 12:54 +0100
Message-ID<neinme$176e$1@gioia.aioe.org>
In reply to#4149
On 11/04/2016 15:56, bit-naughty@hotmail.com wrote:

> What was the "requirements specification" for Where Time Stood Still,
> say, LOL? That a hyperactive 15-yr old had to be kept entertained?

As with any software, the requirements spec details what the software 
should do, and the functional spec details how it should be done.

For a game, the requirements spec often includes docs like a level map 
or a storyboard, and they were certainly used back in the Spectrum days 
just as they are now.

> What was "reusable" in um.... LightForce? (just being cruel, that's
> the 1st 48k software I've mentioned...)

Plenty of stuff was re-used in Spectrum games. Look at different games 
by the same programmers and you'll see plenty of examples of re-using 
the same sprite drawing routines, interrupt-driven music players, etc.

> moved around? So... if a ship has to move, and avoid collisions,...
> put it inside some code that does that, and Um... CALL IT??!! That's
> a SUBROUTINE!! Nice and simple....

OOP is partly just about structuring your code in such a way that 
behaviour (subroutines, usually called 'methods' in OOP) and state (all 
the variables those subroutines manipulate) live together in bundles 
called 'objects'.

So a "Ship" object would consist of the subroutines required to make 
that ship spawn, move, fire, explode, etc., along with all the variables 
(or even other objects) that describe its current state: size, shape, 
colour, position, speed, direction, damage level, etc.

> So - what's all this OOP business, and why should I learn it?

Unless you have a pressing desire to learn an object-oriented language 
such as Objective-C, Java or C++, probably no real reason other than 
idle curiosity.

If you're specifically interested in how it applies to games, these 
might be interesting:

http://gamedevelopment.tutsplus.com/tutorials/quick-tip-intro-to-object-oriented-programming-for-game-development--gamedev-1805

http://inventwithpython.com/blog/2014/12/02/why-is-object-oriented-programming-useful-with-an-role-playing-game-example/

[toc] | [prev] | [next] | [standalone]


#4154

FromGuesser <alistair@zxnet.co.uk>
Date2016-04-12 13:37 +0100
Message-ID<neiq0t$v8d$1@dont-email.me>
In reply to#4153
On 12/04/2016 12:54, Calum wrote:
> If you're specifically interested in how it applies to games, these
> might be interesting:

Also a recent Computerphile tried to explain OOP via the example of a 
simple computer game a month ago https://www.youtube.com/watch?v=KyTUN6_Z9TM

[toc] | [prev] | [next] | [standalone]


#4158

Frombit-naughty@hotmail.com
Date2016-04-15 11:33 -0700
Message-ID<7ffe61dd-c2dd-4bd3-a4ae-000db9b51a06@googlegroups.com>
In reply to#4153
On Tuesday, April 12, 2016 at 5:24:57 PM UTC+5:30, Calum wrote:
> 
> Unless you have a pressing desire to learn an object-oriented language 
> such as Objective-C, Java or C++, probably no real reason other than 
> idle curiosity.

I have a pressing desire to do things like paying bills :)

Thanks for the link man, I 'll check it out :)

[toc] | [prev] | [next] | [standalone]


#4162

FromGuesser <alistair@zxnet.co.uk>
Date2016-04-15 20:38 +0100
Message-ID<nerfq6$49t$2@dont-email.me>
In reply to#4158
On 15/04/2016 19:33, bit-naughty@hotmail.com wrote:
> I have a pressing desire to do things like paying bills :)
>
How good are you at kneeling in puddles of water and soldering pipework? :)

[toc] | [prev] | [next] | [standalone]


#4159

Frombit-naughty@hotmail.com
Date2016-04-15 11:35 -0700
Message-ID<b4af84dc-8e8e-42e5-b093-4f31268eec05@googlegroups.com>
In reply to#4149
Wow! I'll check out that link Guesser :) (not right now tho). Thanks to both of you once again! ;)

[toc] | [prev] | [next] | [standalone]


#4160

Frombit-naughty@hotmail.com
Date2016-04-15 11:36 -0700
Message-ID<f6e6b32d-8638-46f5-bb79-524cab49b00e@googlegroups.com>
In reply to#4149
By the way, what's "NIH syndrome"?

[toc] | [prev] | [next] | [standalone]


#4161

FromGuesser <alistair@zxnet.co.uk>
Date2016-04-15 20:35 +0100
Message-ID<nerfiv$49t$1@dont-email.me>
In reply to#4160
On 15/04/2016 19:36, bit-naughty@hotmail.com wrote:
> By the way, what's "NIH syndrome"?
>
Not Invented Here

[toc] | [prev] | [next] | [standalone]


#4166

FromAndyW <Andy@nojunqmail.com>
Date2016-04-18 07:31 +0100
Message-ID<ob%Qy.845418$vw.195428@fx33.am4>
In reply to#4161
On 15/04/2016 20:35, Guesser wrote:
> On 15/04/2016 19:36, bit-naughty@hotmail.com wrote:
>> By the way, what's "NIH syndrome"?
>>
> Not Invented Here

Damn!
I was imagining knights in a forest looking for a shrubbery or a herring.

Andy

[toc] | [prev] | [next] | [standalone]


#4167

Frombit-naughty@hotmail.com
Date2016-04-20 01:02 -0700
Message-ID<661aaa80-29a5-4182-973a-20525e06202c@googlegroups.com>
In reply to#4149
Just thought I'd point out 1 more thing - Raffaele Cecco, who programmed Exolon (and so, obviously knows his way around the Z80, and low-level optimising etc.), wrote "Supercharged Javascript Graphics", a great book - and on the SECOND page of that book, talks about something to do with inheritance!

One MORE reason for me to get with this thing - if HE is evangelising its values, I gotta at least have a _look_..... :)

[toc] | [prev] | [next] | [standalone]


#4168

Frombit-naughty@hotmail.com
Date2016-04-20 01:02 -0700
Message-ID<e7dd38fa-8d4f-4ec0-85d8-a16b52d87d67@googlegroups.com>
In reply to#4149
Just thought I'd point out 1 more thing - Raffaele Cecco, who programmed Exolon (and so, obviously knows his way around the Z80, and low-level optimising etc.), wrote "Supercharged Javascript Graphics", a great book - and on the SECOND page of that book, talks about something to do with inheritance!

One MORE reason for me to get with this thing - if HE is evangelising its values, I gotta at least have a _look_..... :)

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.sinclair


csiph-web