• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Am I supposed to feel this stupid? Is James Gosling toying with us?!

 
Ranch Hand
Posts: 41
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been learning/writing Java for three days now. I have been using the Java Tutorials at the Oracle website, and much of this seems to presuppose some level of understanding of machine language and coding familiarity.

Granted, before I started this, "public static void main(String[] args) {" was a baffling string of characters and punctuation, so I'm making progress. But then I come across a line like this in the Tutorials...

"The default implementation creates an early-binding spliterator from the iterable's Iterator. The spliterator inherits the fail-fast properties of the iterable's iterator."

This sounds like a Dr. Suess rhyme, or the start of a dirty limerick.

Am I supposed to feel so stupid while learning this? Are Generics and Type Inference and Iterables supposed to make even a modicum of sense to me at this point?

I'd really love it if someone smarter than me could tell me that Java made them feel stupid too at some point.
 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where are these Java Tutorials you have mentioned? Have you looked into these tutorials https://docs.oracle.com/javase/tutorial/?
To answer your question. Learning a new programming language will hopefully not make you feel that you lack intelligence.
However things will probably seems foreign to you at least in the beginning.

What is your point of reference/background regarding programming? Different people may benefit from different tutorials.
Why have you chosen to learn Java programming?
 
Aaron McCarthy
Ranch Hand
Posts: 41
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pete Letkeman wrote:Where are these Java Tutorials you have mentioned? Have you looked into these tutorials https://docs.oracle.com/javase/tutorial/?
To answer your question. Learning a new programming language will hopefully not make you feel that you lack intelligence.
However things will probably seems foreign to you at least in the beginning.

What is your point of reference/background regarding programming? Different people may benefit from different tutorials.
Why have you chosen to learn Java programming?



I am using the ones you mentioned on the Oracle website, yes.

I've never done any kind of programming/CS, or anything like it, my degree and background is in biz management and sales. So, my point of reference is non-existent... This is my first language.

I've chosen it because it's what my company will be writing our AWS Lambda functions in, and it's what I have to learn. So it kind of chose me... lol

I'm aware that many folks say Java is a really tough intro into the world of programming and machine language, but I have to get through it, heck or high water.

I've just never felt incompetent at something before, so it's a very foreign feeling. Hopefully it dissipates soon.
 
Sheriff
Posts: 16933
285
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I know, Gosling has not been actively involved in any of the new development of features of the Java language. According to the Wikipedia article on him, he left Oracle in 2011.

The text you quoted appears to be from the JavaDocs for the Iterator.spliterator() method. Even with 15 years under my belt working with Java, I have had neither the opportunity to study nor need to work with this method. Your mileage may vary but I doubt it's something that anyone trying to learn Java needs to worry about too much.
 
Junilu Lacar
Sheriff
Posts: 16933
285
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Aaron McCarthy wrote:I've just never felt incompetent at something before, so it's a very foreign feeling. Hopefully it dissipates soon.


As the Man in Black said, "Get used to it."  The Java Platform and related technologies is so vast that it's highly unlikely any one person can be competent in all of it. Feeling stupid is something developers do all the time, especially when they mess up in ways they shouldn't have. That happens to the best of us but it comes with the turf. You just have to roll with it and realize that it's a journey of constant learning.
 
Sheriff
Posts: 7113
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might benefit from a different kind of learning, so a book like Head First Java could work for you.  It's old now, but still gets the basics right.  You can usually kind it used on amazon, but you may want to get a new one as there are exercises that you may want to do that are filled in.
 
Aaron McCarthy
Ranch Hand
Posts: 41
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:

Aaron McCarthy wrote:I've just never felt incompetent at something before, so it's a very foreign feeling. Hopefully it dissipates soon.


As the Man in Black said, "Get used to it."  The Java Platform and related technologies is so vast that it's highly unlikely any one person can be competent in all of it. Feeling stupid is something developers do all the time, especially when they mess up in ways they shouldn't have. That happens to the best of us but it comes with the turf. You just have to roll with it and realize that it's a journey of constant learning.



Thanks Junilu! This is precisely the kind of encouragement I was hoping for...

At least I know I'm not alone.
 
Aaron McCarthy
Ranch Hand
Posts: 41
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Knute Snortum wrote:You might benefit from a different kind of learning, so a book like Head First Java could work for you.  It's old now, but still gets the basics right.  You can usually kind it used on amazon, but you may want to get a new one as there are exercises that you may want to do that are filled in.



Thanks, I was actually looking at this very book earlier today. I'll bite the bullet and order it now.
 
Pete Letkeman
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can tell you have I have not come across the name James Gosling before your posting Aaron.

If you are looking for other tutorials aside from the official Oracle Java Trails then you may want to look into some of the resources found here https://coderanch.com/c/books.
Some of these resources have been reviewed but not all of them.

These two books seem to have fairly good/postive reviews:
- https://coderanch.com/wiki/683057/books/Murach-Java-Programming-edition-Joel
- https://coderanch.com/wiki/687381/books/Learn-Java-Easy-Hands-Introduction
 
Marshal
Posts: 27211
87
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On my last vacation we stayed at a place where it took three of us to figure out how to turn on the shower. Java's a lot more complicated than turning on a shower, so if you feel totally baffled (as we did with the shower) then it's not surprising.
 
Paul Clapham
Marshal
Posts: 27211
87
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pete Letkeman wrote:I can tell you have I have not come across the name James Gosling before your posting Aaron.



He's one of the original designers of the Java language. (He has an Order of Canada btw, check out his Wikipedia page.)
 
Marshal
Posts: 75653
354
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:. . . how to turn on the shower. Java's a lot more complicated than turning on a shower . . .

. . . and there was neither a tutorial about how to get hot water, nor a diagram indicating how to run the pipes so there would be hot water in that shower. Unfortunately it would appear that the OP has stumbled upon the piping diagram (the API documentation), which is intended to be read by those experienced, rather than the tutorials.
Yes, some parts of the API documentation are difficult to understand; at your stage you might do well simply to read those parts you can understand and ignore the parts you can't.
 
Aaron McCarthy
Ranch Hand
Posts: 41
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Paul Clapham wrote:. . . how to turn on the shower. Java's a lot more complicated than turning on a shower . . .

. . . and there was neither a tutorial about how to get hot water, nor a diagram indicating how to run the pipes so there would be hot water in that shower. Unfortunately it would appear that the OP has stumbled upon the piping diagram (the API documentation), which is intended to be read by those experienced, rather than the tutorials.
Yes, some parts of the API documentation are difficult to understand; at your stage you might do well simply to read those parts you can understand and ignore the parts you can't.



All of this is so accurate it hurts...

I'm not even sure what I understand completely and don't at this point as my bandwidth is so overloaded (not in a useful way like overloading methods)...

The tutorials are in depth enough for someone with zero background and experience in Computer Sciences, let alone the API docs.

I'll keep trudging through and hopefully learn what to ignore sooner rather than later. Thanks again!
 
Ranch Hand
Posts: 316
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Programming is difficult
 
Greenhorn
Posts: 1
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The default implementation creates an early-binding spliterator from the iterable's Iterator. The spliterator inherits the fail-fast properties of the iterable's iterator



Dude, I've been programming for 40 years. I've professionally coded in assembly languages, C, C++, C#, Java, Javascript and Typescript. I'm currently employed as a Senior Software Engineer. Also, I have a B.A. in English. And I really don't know what those sentences mean. Yeah, I have a vague idea that I could firm up if I spent the time, but I'm pretty sure that iterating through collections doesn't require an in-depth understanding of the inner workings of iterators.

I'm pretty confident that you don't need to understand what they mean either.

Generally speaking, programmers aren't awesome because they know how the inner workings of how iterators are constructed. That's insane - you should be ignorant on any number of details so you can keep your focus on the bigger picture. Programmers awesome if they take time to think through a problem and write a clear and well-structured solution. They should know their basic data structures. They should know how and when to use Google.

Good luck to you, and IMO if you ever see a sentence like that in a beginner's guide or tutorial, find another one.
 
Author
Posts: 13
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to echo some of the earlier comments in this thread. Java documentation is notorious for sometimes being quite cryptic, even to experienced hands.

Personally, the best book I've found for introducing Java is Objects First with Java (https://www.bluej.org/objects-first/). I've used this as the coursebook to teach programming novices. I can testify that it will not make you feel stupid... quite the opposite!
 
Saloon Keeper
Posts: 13864
313
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

"The default implementation creates an early-binding spliterator from the iterable's Iterator. The spliterator inherits the fail-fast properties of the iterable's iterator."


Just in case you are interested what this sentence means, let me explain.

Spliterators are similar to iterators, except that they have the ability to split the sequence of elements they are supposed to iterate over in two, and spawn another spliterator that will recursively handle one of the sub-sequences concurrently.

"Binding" refers to at what point a spliterator starts to inspect the underlying data source. For instance, for a certain spliterator implementation to work correctly, it may need to inspect the size of a collection. A spliterator that is "early-binding" inspects the underlying data source when the spliterator is created. A "late-binding" spliterator inspects the underlying data source when it actually starts iterating. This is important, because the underlying data source may change between the time the spliterator is created and the time the spliterator starts doing work. In general, late-binding is preferred because it gives the most up-to-date view of a collection, but some spliterators simply can not be implemented that way.

A "fail-fast" iterator throws a ConcurrentModificationException when the underlying collection has been modified between two calls to the next() method. It does this to notify the programmer as soon as possible that the iteration might yield inconsistent results. If an iterator doesn't do this, the inconsistency may manifest at a later point in time when it is much harder to debug. A spliterator that "inherits the fail-fast properties of the iterable's iterator" simply behaves the same way as the iterator it was created from: If the iterator throws an exception upon modification between iteration steps, so does the spliterator.

Imagine you have a collection that supports concurrent reads and writes. The iterator is NOT fail-fast, because concurrent modifications are to be expected. The spliterator might use the size() method of the collection to determine where it needs to split the collection in two, and use another spliterator to iterate over the second half. It also inherits the property of the iterator that it doesn't throw an exception when elements are added to the collection during the iteration. If the collection has 8 elements when the spliterator is created, it may spawn a child spliterator that handles all elements starting at index 4. Just before the iteration, 6 more elements are added to the collection. The spliterators happily start iterating without throwing an exception, but because they bound early, the first spliterator handles 4 elements and the second spliterator handles 10 elements, which is less efficient than handling 7 elements each.
 
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Iterator spliterator didn't even exist until Java version 1.8. This was the first I'd heard of it.

As others have said, Gosling left the Java project long before the spliterator was invented.
 
He was expelled for perverse baking experiments. This tiny ad is a model student:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic