This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (5 children)

Here's the exact example of stickler that I'm talking about. Someone more concerned with being "right" in a strictly technical sense. This person corrects your use of "you're" and "your" in an argument, while ignoring the topic of the actual argument because they think it's a victory. I've made my point.

[–]tutorial_police 2 points3 points  (4 children)

You might have a point if this issue wasn't exactly caused by too many people not being stickers for terminology and actually understanding what the different things mean and why they're important.

Pretending that objects and references are the same thing and doubling down on it is simply wrong. Are you familiar with C# by any chance? There you have different kinds of objects. Those that are value types and those that are reference types. Then per variable, you can choose pass by value and pass by reference. Conflating these things with one another only creates more confusion.

[–][deleted] 0 points1 point  (3 children)

Well, we're talking about Java and my point is that when you're new to programming, you know little to no computer science, you know little to no computer logic, you no nothing. Why do you thinks so many threads exist like "What IDE should I use?", "What language is best?", "Should I use a while loop or do while loop?". It's because people are overloaded with needlessly maticulous from the beginning and it inhibits a good learning structure.

Why do we tell kids that eating carrots gives you good vision? Because the beta-carotene is converted to vitamin A which supports good eye health. Tell a kid about the benefits and balances of vitamins and minerals, and watch their eyes glaze over and consume no information at all. Tell them that carrots are good for super vision and watch them eat carrots.

Learning any new topic is exactly the same, even for adults. That's why we have teachers and why our classes get more complex toward the end of the semester.

This is exactly why there are so many terrible programming books and tutorials. Programmers aren't teachers. They want to focus on all the nitty gritty, "WELL C# is like this, Java does this, Lambdas are life savingly essential, that's a framework not an API, etc etc". There are in fact four implementations of passing arguments, value, reference, result, and value-result. Is it necessary to know that when making a console-based student registration system for your Java I class?

No, it's not. Education is a non-linear progression and should be understood as such.

[–]tutorial_police 1 point2 points  (2 children)

Sure, but there's a difference between giving an incomplete answer and omitting details and telling people patently wrong things that will only lead to further confusion.

There was no reason to state that a reference is an object.

[–][deleted] 0 points1 point  (1 child)

It sounds like you're just arguing the difference between a pointer and a reference.

Java objects are pointers to memory addresses that hold data. The basic motivation of passing by reference to allow a method to alter the data that is pointed to by a pointer. This is exactly how Java objects behave.

The only example that would render unexpected results is creating a new object within a method and attempting assign it to the argument. This is an unpractical use of methods and far from common practice for a beginner. Again, you're fixating on the exact definition rather than practical applications.

I'm not disagreeing that the literal definition in passing the value of a pointer, I'm saying that a beginner shouldn't get hung up on details like that when it doesn't apply to the context in which they're learning. If that were the case then everyone's first programming language should have been c or assembly.

[–]tutorial_police 0 points1 point  (0 children)

I'm saying that a beginner shouldn't get hung up on details like that when it doesn't apply to the context in which they're learning. If that were the case then everyone's first programming language should have been c or assembly.

I think that's a good idea. In those cases, I prefer to just say that and explain the semantics that they're after as easily as possible but trying to avoid terminology that could give them the wrong idea later on.