Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why java is unknown

 
Steve Trigero
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've heard about java for a long time, but have yet to run across a java programmer in my almost 30-years of programming experience. Which seems odd. But so be it. So I finally have a need to learn java for a new project I have, and let me tell you, figuring out what one needs, to learn and develop a java app is no easy matter. The Sun web site is absolutely mind numbing. You can't find stuff, you can't figure out what of the umpteen downloads possible you really need. Nothing is intuitive or explained. And try finding documentation. And if you do, try to download it. And worse yet, try to find something in it. For example, You would think a simple built-in function like Math.random() would be fairly easy to find. Why, it must be in the math class, how hard could it be? Go look in the java.math class, 3-methods an no random. What gives. Where else would you put math functions? No other class indicates it would have math functions in it, at least based on the class name. So I start looking in individual classes. After some time I get to the java.util class. Look! a random() function. But I can see that it's a different random function. But at the bottom of the description is a little note with a link that says "math.random() may be simpler to use." So I click on the link and end up in what appears to be the java.lang.Object.math class. And lo-and-behold, there is the random function I've wasted half a day trying to find. I don't know why I didn't think to look there? Seems intuitive to me. NOT! And when I go look at the documentation index, in the list of what is called "All Classes", there is no java.lang.Object.math class listed, nor is there a java.lang.Object class listed. I wonder what "All Classes" really means? So I go back (thank god for the back button, or I could never find it again) to the java.lang.Object.Math class and click on the link to java.lang.Object. One would think that once in this class you would see "Math" listed there. And you would be wrong. So unless one already knows about the java.lang.Object.Math class, how does one find this obscure class? As far as I can tell, you have to stumble around until you stumble across it by accident. But if you don't know what is in it how will you know when you've found it. Ah!, the conundrum.
And this is but one small example. I now see why Sun is failing and why I don't run across java programmers. Java RIP.
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion the Java API is fairly easy to navigate and, for the most part, very clearly documented. If you follow the previous link the first thing you should see is a list of packages. The short description should provide some insight as to the kind of classes you will find in a particular package:

java.util
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).


One click away the Random class is listed. I wonder what that does?
Let's take a look. Why, its purpose is to is to generate a stream of pseudorandom numbers. The Javadoc also contains a reference to the java.lang.Math class (one of the fundamental classes) and its random() method. But wait, there's more! A direct known subclass is also specified here: SecureRandom - the go to class for all your security critical randomness needs.

That's wasn't too difficult, was it? Still it will take anyone unfamiliar with Java time to get familiar with its extensive core API. There's just no way around that. However, in most cases a Google search will provide the necessary clues to get you where you need to go fairly quickly.

With all this in mind, and that fact that you're a programmer with 30 years of experience, I find it hard to believe you stumbled around for half a day looking for this basic feature.
[ December 05, 2008: Message edited by: Jelle Klap ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So how would you have found a random number generator for C (or whatever language you usually work with) ?

(As an aside, the 30 years of experience aren't entirely relevant - Java wasn't released until 1996.)
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll find plenty of books on Java for beginners in the bunkhouse.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Y'all like pie?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I now see why Sun is failing and why I don't run across java programmers. Java RIP.

now that it's official, will the last person please turn off the lights.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Steve,

Welcome to JavaRanch.

If you've never had anything to do with Java then I can imagine that it can be difficult and frustrating to get started with it. It looks like you've found out that you need the JDK and you've probably written yout first Java programs already. Here are some links to get you started.

Sun has an elaborate set of tutorials - a great place to start for anyone who wants to learn Java.

Have a look around in a bookstore. Java is a very popular programming language which is very widely used (despite that you've never met a Java programmer), so there are thousands of books on Java. One popular book is Head First Java, for example. We have a list of book reviews here on JavaRanch.

The Java Beginners FAQ contains more information and links.

And JavaRanch is here to help you learn Java, so feel free to ask any questions you have here.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12097
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
step 1) Google search on "java random". First link is to java.util.Random. read page, finding comment that "Many applications will find the random method in class Math simpler to use."

step 2) Google search on "java Math random". First link takes me to java.lang.Math. Scroll down list of methods, and find random().

total time: < 1 minute.
[ December 06, 2008: Message edited by: fred rosenberger ]
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would agree with Jesper that the structure of the Sun website can be confusing for a newcomer.
 
Piet Verdriet
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to buy a new line character, please.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please, Piet

That sort of request is only permitted on 1st April.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic