Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25

Thread: Any Java 2 gurus around?

  1. #16
    Hit By Ban Bus! DisruptiveHair's Avatar
    Join Date
    Oct 2005
    Location
    UK, soon to be home in the USA
    Posts
    1,338

    Default

    Quote Originally Posted by moocow View Post
    That's.. interesting. And wrong-headed of them. It's actually better in many ways NOT to consider the programming itself when you're performing analysis and upper level design. Better to have the black box/magic cloud idea when it comes to how things are done, rather than trying to design the underlying functionality.

    I hate it when systems designers try to build in the program design. I don't even think they should decide for the programmers ahead of time what language to use.

    Sometimes, knowing some syntax and how the languages work helped me in my work; I think a combined white- and black-box approach can be effective, but not if it ties up all of your QA people with learning programming languages. I'm looking to get certified in three different areas when I get back to the states: ASQ, PMP, and DBA. That way I'll have three things I'm qualified to do, yay! And none of them are programming!

  2. #17
    Gold Member moocow's Avatar
    Join Date
    Oct 2005
    Posts
    717

    Default

    Quote Originally Posted by disruptivehair View Post
    Sometimes, knowing some syntax and how the languages work helped me in my work; I think a combined white- and black-box approach can be effective, but not if it ties up all of your QA people with learning programming languages. I'm looking to get certified in three different areas when I get back to the states: ASQ, PMP, and DBA. That way I'll have three things I'm qualified to do, yay! And none of them are programming!
    Oh, I was thinking a different analyst.

    I had to do QA work for 3 months. The language was ADA. I never learned the language, didn't know anything about it that I didn't know from other languages, and I was excellent at the QA work. I'd have stuck to the QA except there was no career future in it for me.

  3. #18
    Hit By Ban Bus! DisruptiveHair's Avatar
    Join Date
    Oct 2005
    Location
    UK, soon to be home in the USA
    Posts
    1,338

    Default

    Quote Originally Posted by moocow View Post
    Oh, I was thinking a different analyst.

    I had to do QA work for 3 months. The language was ADA. I never learned the language, didn't know anything about it that I didn't know from other languages, and I was excellent at the QA work. I'd have stuck to the QA except there was no career future in it for me.
    QA is essentially a career dead-end because most companies don't have QA managers, and a lot of moron managers think that everyone in QA wants to be a programmer. I don't consider becoming a programmer to be a step up; it's a step sideways! Systems analysis is better because you don't get stuck, but I think I'd rather be a PM or a DBA. Money's better anyway.

  4. #19
    Hit By Ban Bus! DisruptiveHair's Avatar
    Join Date
    Oct 2005
    Location
    UK, soon to be home in the USA
    Posts
    1,338

    Default

    OK, this is another example from my book. I want to understand what they're doing here, because they NEVER ACTUALLY FUCKING EXPLAIN IT.

    import java.util.Random;
    public class RandomNumbers {
    public static void main(String arguments[]) {
    Random r1, r2;

    r1 = new Random();
    System.out.println("Random value 1: " + r1.nextDouble());

    r2 = new Random(8675309);
    System.out.println("Random value 2: " + r2.nextDouble());
    }
    }
    OK...we're importing the java.util class...I assume this "Random" is part of it though they never tell us that. Now we're creating a class called "RandomNumbers."

    Then we create two objects in the RandomNumbers class called r1 and r2. Where does "Random" come in? I'm guessing it's a method that generates a random number because we're assigning a 'random number' to r1 and another to r2. And what is this r1.nextDouble() shit?

    What the FUCK.

  5. #20
    Hit By Ban Bus! DisruptiveHair's Avatar
    Join Date
    Oct 2005
    Location
    UK, soon to be home in the USA
    Posts
    1,338

    Default

    What the fucking hell is this?

    import java.awt.Point;

    public class SetPoints {
    public static void main(String arguments[]) {
    Point location = new Point(4, 13);

    System.out.println("Starting location:");
    System.out.println("X equals " + location.x);
    System.out.println("Y equals " + location.y);

    System.out.println("\nMoving to (7, 6)");
    location.x = 7;
    location.y = 6;

    System.out.println("\nEnding location:");
    System.out.println("X equals " + location.x);
    System.out.println("Y equals " + location.y);
    }
    }

  6. #21
    Silver Member
    Join Date
    Oct 2005
    Posts
    478

    Default

    Quote Originally Posted by disruptivehair View Post
    OK, this is another example from my book. I want to understand what they're doing here, because they NEVER ACTUALLY FUCKING EXPLAIN IT.



    OK...we're importing the java.util class...I assume this "Random" is part of it though they never tell us that. Now we're creating a class called "RandomNumbers."

    Then we create two objects in the RandomNumbers class called r1 and r2. Where does "Random" come in? I'm guessing it's a method that generates a random number because we're assigning a 'random number' to r1 and another to r2. And what is this r1.nextDouble() shit?

    What the FUCK.
    Okay....so you are correct when you said that we're assigning random numbers. nextDouble returns a double value between 0.0 and 1.0, so if you wanted a random number between 0 and 50, for instance, you could do
    50 * r1.nextDouble().
    Keep in mind that the Random class only returns pseudo-random numbers; in other words, the Random class has a sequence of numbers that it "chooses" in order (see this page for the algorithm: http://www.particle.kth.se/~lindsey/...aRandNums.html). The reason it looks random is that it can start anywhere in the sequence. When you declare a new Random(), the Random class automatically provides a seed value (which is usually taken from the system clock). A seed value merely tells the Random object where in the sequence to start. So theoretically if you ran a Random number generator one day at 1:11 am and the next day at the same time, you will get the same sequence of numbers because the generator is using the same seed value.
    You can also provide a seed value, as in r2.

  7. #22
    SVZ
    SVZ is offline
    Do fish have boogers? SVZ's Avatar
    Join Date
    Oct 2005
    Location
    Venus
    Posts
    1,000,003,609

    Default

    dragonlady, do you know PHP MySQL by any chance?

  8. #23
    Silver Member
    Join Date
    Oct 2005
    Posts
    478

    Default

    import java.awt.Point;

    public class SetPoints {
    public static void main(String arguments[]) {
    Point location = new Point(4, 13);

    System.out.println("Starting location:");
    System.out.println("X equals " + location.x);
    System.out.println("Y equals " + location.y);

    System.out.println("\nMoving to (7, 6)");
    location.x = 7;
    location.y = 6;

    System.out.println("\nEnding location:");
    System.out.println("X equals " + location.x);
    System.out.println("Y equals " + location.y);
    }
    }

    Quote Originally Posted by disruptivehair View Post
    What the fucking hell is this?
    The awt package in Java is usually used in conjunction with Swing, a set of graphics tools. So Point is just that; a point, or a location in a graphical window or component with an x and a y coordinate.

    So initially Point location has coordinates (4, 13). The program then prints out the coordinates to the console for the user to see. The key to this example is to know that in the Point class, x and y are declared public, which means that if I want to, I can go back and change x and y, as the program does above with this statement: location.x = 7, and similarly for y. If x and y had been declared private, I could not do this, as the fields are "hidden" from me. In that case, the Point class may have provided a method that allowed me to change the coordinates, but I couldn't do it directly. The last two lines just print out the new coordinates.

    It seems that your book doesnt always do a good job of explaining what some of the classes do. In that case, I recommend checking Sun's website for documentation. For instance, how did I know that the Point class declared x and y to be public? The documentation for Point is at
    http://java.sun.com/j2se/1.5.0/docs/api/. Just look at the scroll pane on the bottom left of the page, and you'll find that documentation for all of the official Java classes are available. Hopefully that should help clear some things up for you if you run across an unfamiliar class

  9. #24
    Silver Member
    Join Date
    Oct 2005
    Posts
    478

    Default

    Quote Originally Posted by SVZ View Post
    dragonlady, do you know PHP MySQL by any chance?
    Unfortunately I don't. I'm mostly just Java, some C++, and a smidgen of Python. Sorry

  10. #25
    Hit By Ban Bus! DisruptiveHair's Avatar
    Join Date
    Oct 2005
    Location
    UK, soon to be home in the USA
    Posts
    1,338

    Default

    dragonlady, I'm going to give up on it. Nothing matters anymore anyway. Thanks for your help.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Anybody know Java?
    By burnt_toast in forum Computers and Technology
    Replies: 3
    Last Post: June 19th, 2006, 10:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •