Final Fantasy 2 based gamesource code

L

Lew

Arne said:
There were plenty of good objective advice based on evidence in your
post.

But as Fredrik pointed out, then there were also a few cases of
more colorful language.

"clumsy programming"

Clumsy: going through many steps in a way that obscures the logic, as opposed
to few steps that express the logic.

Not colorful, technical.
"antithesis of object oriented"

Object oriented means to collect behaviors into types with attributes, and operate
on objects of those types. The antithesis of that is to break up behaviors into multiple
extrinsically-related data structures with no correlations to each other but conventions
of integer index equality.

Not colorful, technical and precise. The OP's approach is exactly antithetical to
object-oriented programming.
"YECCCH!"

I'll give you that one.
"nasty variable name"

Nasty in that it promotes error, diminishes readability and opposes the Java Coding Conventions.

Again, technical.
These are neither objective, polite or technical.

Says you! Plptptpttthhh!
Communication is an important part of software development.

Maybe instead of scolding me you should focus on providing help.
Good communication includes using precise well defined terms for
clarity and terms that does not offend people and by that move
attention from substance to form.

Good pedagogy is to provide memorable and accurate memes and tropes.
So if you want to become a better developer, then you should
learn to communicate without "clumsy", "nasty" etc..

Thank you for your opinion.
 
A

Arne Vajhøj

On 3/20/2013 7:41 AM, Joerg Meier wrote:
[snip]
Don't begrudge seasoned programmers their air of superiourity. At best you

Ha! The programmers that I have seen with an air of superiority
are the ones who do not know so much.

Given my above statement, that would be a benefit.
That is not a pretty picture that you paint of seasoned/experienced
programmers.

I don't believe that in general they are so horrible.

People tend to notice jerks. The quiet, polite guy is generally
not noticed as much.

The combination of "air of superiourity" and "not know so much" is
typical not ignored in usenet groups - it will cause some sarcastic
comments when the opportunity arise.

Arne
 
A

Arne Vajhøj

Clumsy: going through many steps in a way that obscures the logic, as opposed
to few steps that express the logic.

Not colorful, technical.

Clumsy is a term expressing a negative value of something and not
providing any details or explanation.

It is not technical.
Object oriented means to collect behaviors into types with attributes, and operate
on objects of those types. The antithesis of that is to break up behaviors into multiple
extrinsically-related data structures with no correlations to each other but conventions
of integer index equality.

Not colorful, technical and precise. The OP's approach is exactly antithetical to
object-oriented programming.

To be that it would need to be as far away from OOP as possible,
so it would be impossible to write something less OOP.

I am pretty sure that is not the case. There are many options available
for "creativity".

Not precise and not correct.
I'll give you that one.


Nasty in that it promotes error, diminishes readability and opposes the Java Coding Conventions.

Again, technical.

It is a term that expresses value - extreme negative value - it has zero
technical meaning.
Maybe instead of scolding me you should focus on providing help.

It happens occasionally.
Good pedagogy is to provide memorable and accurate memes and tropes.


Thank you for your opinion.

Somehow I get the impression that you are not so convinced.

:)

Arne
 
A

Arne Vajhøj

"Fredrik Jonson" wrote in message


Sorry for mistaking you for the OP Fredrik - my bad.

Anyway, my point is simply that Lew's tone is probably not worth fussing
over. He contributes a lot to this group, has a high level of knowledge
and even admits when he is wrong (which admittedly is quite rare). I do
believe that he means no harm and that he's not a bully. My assessment
is that he practices a kind of "tough love" approach where he uses
colourful language and shows a bit of attitude in an attempt to motivate
the recipient of his advice to be a better developer.

If someone is offended by his remarks then they will most likely
struggle in the real world.

Sounds very likely.

But I don't think that makes it right.

Arne
 
L

Lew

Arne said:
Clumsy is a term expressing a negative value of something and not
providing any details or explanation.

I object to clumsy code.
It is not technical.

Says you.
To be that it would need to be as far away from OOP as possible,
so it would be impossible to write something less OOP.

I am pretty sure that is not the case. There are many options available
for "creativity".

I disagree. I don't think the code could have been written in Java and been
more antithetical to O-O programming priniciples.

You have a different opinion. But are you saying that this code is within the
bounds of style and creative variation and still acceptably object oriented?

Because I say otherwise.
Not precise and not correct.

Maybe not perfectly precise, but within epsilon, and certainly correct.
It is a term that expresses value - extreme negative value - it has zero
technical meaning.

Maybe you are a fan of nasty variable names. I am not.

Don't promote bad programming practices.

The OP presented code that is of very amateurish quality, lacking in fundamental
object-oriented structure, barely acceptable as a student project in a first-semester
programming course with Java. It is not at a level where one could pitch a product.

As I said in my response, I don't know how to evaluate it as a beginner project, but
a beginner project it most assuredly is. The code is badly structured (to the extent that
it is structured at all), does not use the strengths of the language, uses nasty variable names,
not all of which are even needed, eschews generics in favor of raw types (YECCCH!) and is
in total quite unsuitable for productization.

Deal with it.
 
J

Joerg Meier

On 3/20/2013 7:41 AM, Joerg Meier wrote: [snip]
Don't begrudge seasoned programmers their air of superiourity. At best you
Ha! The programmers that I have seen with an air of superiority
are the ones who do not know so much.

In the world of programming support groups and fora, I can not confirm that
experience. While in general, it is easy to see the Dunning-Kruger effect
in action, I found it to be less prevalent surrounding places like here.
Maybe the relative ease at which someone can be outright proven wrong in
discussing programming issues plays a part in this.

Liebe Gruesse,
Joerg
 
A

Arved Sandstrom

Arne said:
Lew wrote:
Fredrik Jonson wrote:
[snip]

Not colorful, technical.
"antithesis of object oriented"

Object oriented means to collect behaviors into types with attributes,
and operate
on objects of those types.

This is a very poor description of OO.

In C I can do something like

struct node{
int value;
struct node *next;
};

struct stack{
struct node **sp;
void (*push)(int i);
int (*pop)();
int (*top)();
};

void foo(){
struct stack *notOO = malloc(sizeof(struct stack));
}

According to you then this is Object Oriented ... interesting
interpretation.

[snip]

lipska
It doesn't have to be implemented the way you did it, with function
pointers as struct members. You could have function pointers in a
separate dispatch table, or use "regular" functions which have an object
pointer as an argument etc.

A starting point for simple inheritance in C (perhaps more of the
prototype approach) would be a pointer to a parent object. And so forth.

But all this *is* object-oriented, actually. I don't know what more you
think object-oriented is, at the basic level.

AHS
 
J

Joshua Cranmer ðŸ§

Arne said:
Lew wrote:
Fredrik Jonson wrote:
[snip]

Not colorful, technical.
"antithesis of object oriented"

Object oriented means to collect behaviors into types with attributes,
and operate
on objects of those types.

This is a very poor description of OO.

In C I can do something like

struct node{
int value;
struct node *next;
};

struct stack{
struct node **sp;
void (*push)(int i);
int (*pop)();
int (*top)();
};

void foo(){
struct stack *notOO = malloc(sizeof(struct stack));
}

According to you then this is Object Oriented ... interesting
interpretation.

It is object-oriented, just very messy since C doesn't support the OOP
paradigm very well.

For more examples of object-oriented programming in C, you could look at
the GObject libraries, or feast your eyes on libmime
(<http://mxr.mozilla.org/comm-central/source/mailnews/mime/src/>). They
both support all the salient features of OOP: implementation hiding (to
a degree), polymorphic message dispatch, centralization of behaviors in
types, overriding, and even advanced features akin to C++ RTTI or (a
subset of) Java's reflection. It just makes your eyes boil due to
relying on an abundance of magic macros and function pointers.
 
D

Daniel Pitts

On 21/03/13 19:29, Lew wrote:
Arne Vajhøj wrote:
Lew wrote:
Fredrik Jonson wrote:

[snip]

Not colorful, technical.

"antithesis of object oriented"

Object oriented means to collect behaviors into types with attributes,
and operate
on objects of those types.
[snip]
It doesn't have to be implemented the way you did it,

Not sure what your point is here. I did it this way as it's the nearest
I can get to encapsulating a stack in C.

If the criteria for calling something OO is something that

<cite>
collect behaviors into types with attributes, and operate
on objects of those types
</cite>

Then my C code is OO ... except we both know that is isn't.

It sure looked OO to me.

A program can be OO without having the language support OO inherently.
You're snippet is a perfect example of that.
What do you mean 'basic level' do you think there are different measures
of 'objectness'?
You've attempted to deflect the question.

What, to you, is the definition of Object Oriented Programming?
 
J

Joshua Cranmer ðŸ§

"I don't know what more you think object-oriented is, at the basic level"

One of the key ideas behind OO is the concept of information hiding. We
hide the state of an Object and restrict the available interactions on
that state by publishing a contract. Simply put, the contract is the set
of methods that clients can call. I see this as absolutely fundamental
to the idea of an Object. My C code did not exhibit this property,
anyone can directly manipulate the state (the pointer to pointer to
struct node) bypassing the published interface of push() pop() and
top(). My example does however meet the following criteria

If you don't elaborate the struct in a header file, then people can't
bypass the interface. Your complaint boils down to "C doesn't provide
access control, so it can't be OOP"--by that logic, languages like
JavaScript, Ruby, or Python can't be object-oriented.

What I consider the core of OOP to be is the ability to specify an
abstract interface. allow multiple independent implementations of that
interface, and the ability to inherit implementation. The C code does
fit under that paradigm, but I will concede that C is not a good
language for implementing the OOP paradigm, which is why it's generally
not considered to be an "Object-oriented language."
 
D

Daniel Pitts

On 22/03/13 10:15, Arved Sandstrom wrote:
On 03/22/2013 06:18 AM, lipska the kat wrote:
On 21/03/13 19:29, Lew wrote:
[snip]

What, to you, is the definition of Object Oriented Programming?

I've responded up thread, why don't you read that before jumping in gob
first.
"Up thread" has no reference to the definition of Object Oriented
Programming. You provide what you consider a counter-example, but that
doesn't make a definition.

How about you answer the question still on the table.

What is your definition of Object Oriented Programming?

If you've answered this elsewhere, please quote the relevant text to
keep the context together.
 
D

Daniel Pitts

On 22/03/13 17:25, Daniel Pitts wrote:
On 3/22/13 6:54 AM, lipska the kat wrote:
On 22/03/13 10:15, Arved Sandstrom wrote:
On 03/22/2013 06:18 AM, lipska the kat wrote:
On 21/03/13 19:29, Lew wrote:

[snip]

What, to you, is the definition of Object Oriented Programming?

I've responded up thread, why don't you read that before jumping in gob
first.
"Up thread" has no reference to the definition of Object Oriented
Programming. You provide what you consider a counter-example, but that
doesn't make a definition.

How about you answer the question still on the table.

What is your definition of Object Oriented Programming?

Programming is what you do to your washing machine.
I suggest you stick to that if you can't find the relevant text
Ad hominem attacks won't win arguments here. You know nothing of my
background or capabilities. Don't presume to.
I'm not about to repeat myself.
Copy and paste isn't exactly repeating, but what ever. I did find your
discussion (on a different fork of the thread) of what you say is a "Key
Concept" of OO, but no definition.

Information hiding is a technique used in OO design. It is not a
requirement, nor definition of OO programming. You still have not
defined OO.
 
L

Lars Enderin

2013-03-22 22:50, Qu0ll skrev:
"Daniel Pitts" wrote in message


Haven't you worked it out yet that lipska the kat == Paul?

No way lipska could be Paul Derbyshire.
 
J

Jim Janney

Qu0ll said:
"Fredrik Jonson" wrote in message

[Apologies for the lack of indentation, reply at end of post]
Turtle said:
Final Fantasy 2 based game written in Java : source code GPLv2 :
http://code.google.com/p/angels-destiny-rpg/

[Snip Lew's code review]

Lew, I want to start with a thank you for conducting a code review on
Turtle's project. Technically it is mostly resonable advice.

The problem is - and I'm not sure you are aware - the tone in your review
could be perceived as rather hostile, you even shout at one place. Do you
think people are more prone to listen to your advice when you shout? Also
you needlessly use negative adjectives, like "clumsy" and "strange", where
it would suffice to describe the technical problem with the code.

Could it be possible that people would be more inclined to take your advice
to heart if you took another approach?

This is usenet, and obviously you are free to post in whatever tone you
like. However, there is something to be said for being kind to others,
especially newbies and people you do not know.

-----------------------------------

Let me offer you some advice Fredrik.

I have observed Lew's comments and behaviour in this group for several
years. While he may come across as "hostile" or "rude" on first
impression, I believe he is not trying to be either of those things.
There is no doubt that Lew has excellent skills and knowledge in Java
and you can do far worse than to follow his advice or learn from him.
He reviewed your code and provided some feedback because he wanted to
help you, not to get his jollies belittling you or showing how clever
he is. He didn't have to do that (it takes time and effort) and he
gains nothing from it other than the satisfaction of helping people.

The other thing to remember is that the world is a tough place and to
succeed as a developer you need to be able to compete on the world
stage and amongst talented peers. Had Lew delivered a "softer"
response you may have been less likely to react in a positive,
motivated way. Prospective employers would most likely be much harder
on you than Lew has been. Programmers competing with you for a
position or trying to get ahead of you in the workplace will also not
be so generous and are unlikely to be as courteous.

I strongly suggest you accept the (constructive) criticism and strive
to be a better developer.

I also wanted to add something along the lines of "If you can't stand
the heat then get out of the kitchen" but I struggled to frame that
analogy in the terms of software development.

Back when the Second Iraqi War was just getting started, I used to know
a guy who insisted that the U.S. was not, repeat not invading Iraq. He
had all kinds of complex legalistic arguments to back this up and there
was no chance of convincing him otherwise. And yet he completely missed
the real point: to the people on the ground, watching the tanks roll in,
it looked like an invasion, and that was what ultimately made the
difference in the outcome. Learning not to give offense unnecessarily
is an important professional skill, as much as knowing an API or being
able to write clear grammatical English. Most of us are not naturally
good at these things, which is why we continually work at honing our
abilities.

Another useful skill is learing to spot and avoid rationalizations.
When I point out that many people perceive Lew as rude, I am doing no
more than making an objective statement of fact :)
 
A

Arne Vajhøj

On 21/03/13 19:29, Lew wrote:
Arne Vajhøj wrote:
Lew wrote:
Fredrik Jonson wrote:

[snip]

Not colorful, technical.

"antithesis of object oriented"

Object oriented means to collect behaviors into types with attributes,
and operate
on objects of those types.
[snip]
It doesn't have to be implemented the way you did it,

Not sure what your point is here. I did it this way as it's the nearest
I can get to encapsulating a stack in C.

If the criteria for calling something OO is something that

<cite>
collect behaviors into types with attributes, and operate
on objects of those types
</cite>

Then my C code is OO ... except we both know that is isn't.


No - we don't.

It is possible to write OO code in C.

And you code example is pretty OO'ish.

The fact that the C language is not designed for OOP does
not make it impossible to write OO code - it just make
it a little bit harder.

Arne
 
A

Arne Vajhøj

On 03/22/2013 06:18 AM, lipska the kat wrote:
On 21/03/13 19:29, Lew wrote:
Arne Vajhøj wrote:
Lew wrote:
Fredrik Jonson wrote:

[snip]

Not colorful, technical.

"antithesis of object oriented"

Object oriented means to collect behaviors into types with attributes,
and operate
on objects of those types.

[snip]


It doesn't have to be implemented the way you did it,

Not sure what your point is here. I did it this way as it's the nearest
I can get to encapsulating a stack in C.

If the criteria for calling something OO is something that

<cite>
collect behaviors into types with attributes, and operate
on objects of those types
</cite>

Then my C code is OO ... except we both know that is isn't.

It sure looked OO to me.

A program can be OO without having the language support OO inherently.
You're snippet is a perfect example of that.


Yes.

ISA's are practically never OO, so OO can be done using PP
language constructs only.

And in fact the first C++ compilers (cfront) did not generate
object code - it generated C code.

Arne
 
A

Arne Vajhøj

2013-03-22 22:50, Qu0ll skrev:

No way lipska could be Paul Derbyshire.

Maybe he is - maybe he is not.

Does it matter whether it is him or somebody similar?

I don't think so.

Arne
 
A

Arne Vajhøj

On 21/03/13 19:29, Lew wrote:
Arne Vajhøj wrote:
Lew wrote:
Fredrik Jonson wrote:
[snip]
According to you then this is Object Oriented ... interesting
interpretation.

It is object-oriented, just very messy since C doesn't support the OOP
paradigm very well.

For more examples of object-oriented programming in C, you could look at
the GObject libraries,

All very interesting I'm sure.

However

I've been thinking about Arveds question

"I don't know what more you think object-oriented is, at the basic level"

One of the key ideas behind OO is the concept of information hiding. We
hide the state of an Object and restrict the available interactions on
that state by publishing a contract. Simply put, the contract is the set
of methods that clients can call. I see this as absolutely fundamental
to the idea of an Object. My C code did not exhibit this property,
anyone can directly manipulate the state (the pointer to pointer to
struct node) bypassing the published interface of push() pop() and
top(). My example does however meet the following criteria

"... to collect behaviors into types with attributes, and operate on
objects of those types.

To write OO code I need an OO language.

No.

OO is a style that can be done in practically any language.

The syntax may be more elegant if the language was designed
to make OOP easy.
Of course that's not to say that
just because you use an OO language your code is OO and that you can't
approximate OO in a non OO language ... of course ultimately you may
argue that everything that can be done can be done in assembler, well
OK, you write your next business system in assembler, I'll use Java.
Would you like to bet who would finish first

That is not the issue under discussion.
The bottom line is that an Object Oriented language like Java provides
me with the tools to write code that exhibits the three main properties
desirable of Object Oriented Software

Encapsulation (supported by information hiding), inheritance and
polymorphism.

Anything that doesn't exhibit these properties isn't OO IMHO

You can do that in C.
That is why I believe that the statement

"Object oriented means to collect behaviors into types with attributes,
and operate on objects of those types"

doesn't even begin to cover what "Object oriented means"

It certainly begins to cover it.

I may need some additions to be complete.

Arne
 
A

Arne Vajhøj

"Jim Janney" wrote in message news:[email protected]...
Agreed. Personally I don't especially like the way Lew treats people,
especially newbies, and do believe that it's better to be positive and
encouraging without resorting to colourful (offensive?) language.
I guess what I am trying to say is simply that I don't believe Lew is
inherently nasty and that I often learn from him regardless of his
attitude. I have encountered far worse in the "real world".

What is offensive varies by culture and persons.

Lew do not go after the person.

But he can go after the code in a let us continue to use that
term colorful way.

That is seen as offensive by many people.

I truly believe that Lew do not consider it offensive and
did not intend to be offensive.

But Lew should realize that some people non the less will
consider it offensive.

And IMHO let that realization impact his actions (posts).

Arne
 
A

Arne Vajhøj

It wasn't a complaint it was an observation,

Whether it is a wrong complaint or a wrong observation does
not really matter much.
I don't see it I'm afraid

That you do not know how to do OO in C does not mean
that it can not be done.
Java is implemented in C but that's missing the point.
Java is in effect an abstraction over C and C pointers, as are most
languages up to a point <snicker>.

This doesn't alter the fact that my C code is not Object Oriented

No.

But Joshua's may be.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top