RE: Now I Know Why I'm Having Trouble With Objects

  • From: "Homme, James" <james.homme@xxxxxxxxxxxx>
  • To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 13 Apr 2011 14:38:05 -0400

Hi Korneels,
Yes, but you'd have some blind dude yelling at you for saying this rather than 
naming what you were talking about.

Jim

Jim Homme,
Usability Services,
Phone: 412-544-1810. Skype: jim.homme. NonVisualDevelopment.org: Blind people 
can drive computers<http://www.nonvisualdevelopment.org/>. Demonstration GUI 
Programs: You can program GUI's while blind.<http://www.fruitbasketdemos.org/>

From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Jacob Kruger
Sent: Wednesday, April 13, 2011 1:21 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Now I Know Why I'm Having Trouble With Objects

Instead of self, you could also use something like this - but that might relate 
more to the playing field, the stadium, etc. since they'd all fit in with the 
parent-child structure of the OO representation of a soccer/football 
game...<smile>

Suppose also since the ball would be passed from player to player, you might 
want to go for something like currentPlayer.kick(ball, [destinationObject])

Where the [] parameter would represent an overloaded method, and the fact that 
the target for the kick is an object, it could also be the goalposts, another 
player, the referee, etc. etc.?

LOL!

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
----- Original Message -----
From: Homme, James<mailto:james.homme@xxxxxxxxxxxx>
To: programmingblind@xxxxxxxxxxxxx<mailto:programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, April 13, 2011 1:15 PM
Subject: RE: Now I Know Why I'm Having Trouble With Objects

Hi Jacob,
So the self is me then? I like that.

Jim Homme,
Usability Services,
Phone: 412-544-1810. Skype: jim.homme. NonVisualDevelopment.org: Blind people 
can drive computers<http://www.nonvisualdevelopment.org/>. Demonstration GUI 
Programs: You can program GUI's while blind.<http://www.fruitbasketdemos.org/>

From: 
programmingblind-bounce@xxxxxxxxxxxxx<mailto:programmingblind-bounce@xxxxxxxxxxxxx>
 [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Jacob Kruger
Sent: Tuesday, April 12, 2011 5:47 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Now I Know Why I'm Having Trouble With Objects

Except that the ball is not the object making the action, so it would be more 
like:
self.kick(ball)

<smile> - think that relates to procedural approach or something - simple 
version is means to an end...

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
----- Original Message -----
From: Homme, James<mailto:james.homme@xxxxxxxxxxxx>
To: programmingblind@xxxxxxxxxxxxx<mailto:programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, April 12, 2011 9:19 PM
Subject: Now I Know Why I'm Having Trouble With Objects

Hi,
I found this humorous.

Understanding the Parts of VBA "Speech"

If you were going to play soccer using BASIC, the instruction to kick a ball 
would look something like

"Kick the Ball"

Hey-this is how we talk! It makes sense. You have a verb (kick) and then a noun 
(the ball). In the BASIC code in the preceding section, you have a verb
(print) and a noun (an asterisk). Life is good.

Here is the problem. VBA doesn't work like this. No object-oriented language 
works like this. In an object-oriented language, the objects (the nouns) are
most important (hence, the name: object oriented). If you are going to play 
soccer with VBA, the basic structure would be:

Ball.Kick

You have a noun-the ball. It comes first. In VBA, this is an object
. Then you have the verb-to kick. It comes next. In VBA, this is a method.

The basic structure of VBA is a bunch of lines of code where you have

Object.Method

Sorry, this is not English. If you took a romance language in high school, you 
will remember that they used a "noun adjective" construct, but I don't know
anyone who speaks in "noun verb" when telling someone to do something. Do you 
talk like this?

Water.Drink
Food.Eat
Girl.Kiss

Of course not. That is why VBA is so confusing to someone who previously 
stepped foot in a procedural programming class.

Let's carry the analogy on a bit. Imagine you walk onto a grassy field and 
there are five balls in front of you. There is a soccer ball, a basketball, a
baseball, a bowling ball, and a tennis ball. You want to instruct the kid on 
your soccer team to

Kick the soccer ball

If you tell him kick the ball (or ball.kick
), you really aren't sure which one he will kick. Maybe he will kick the one 
closest to him. This could be a real problem if he is standing in front of
the bowling ball.


Jim

Jim Homme,
Usability Services,
Phone: 412-544-1810. Skype: jim.homme. NonVisualDevelopment.org: Blind people 
can drive computers<http://www.nonvisualdevelopment.org/>. Demonstration GUI 
Programs: You can program GUI's while blind.<http://www.fruitbasketdemos.org/>


________________________________
This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.

Other related posts: