Helping people learn Java

Hello,
I am just about to go into my third year of a Applied Computing degree at dundee university. Over the summer I have been part of a project to develop an e-learning course for people that have not used Java before.
I was really wondering if it would be possable for the people in this forum to have a quick play about with a small online tutorial I have been working on and give me any feedback (good or bad) on it.
You can find it at
http://vegeta.computing.dundee.ac.uk/t22/jq/text.asp?id=1
Javascript is required

This was the first example I got.
private float average3(int a, int b, int c)
     double sum;
     sum = a+b+c;
     sum = sum/3.0;
     return(sum);
}Ok, apart from the obvious error of calling the average a sum, I have the following comments:
Whatever your personal choice of {} placement, if you are giving a tutorial, then you should be encouraging the use of the java coding standards (if you don't know what they are, then you shouldn't even be involved in teaching others.
The use of a, b, c as parameter names should again be frowned upon (but I guess in this instance they would be excusable)
The declaration of a variable on one line and its initialisation on another line, while may seem like a correct verbose method of teaching, is actually enforcing bad habits for the future. If a variable can be initialised where it is declared, then it should be....
        double sum;
     sum = a+b+c;
// Why notNow we come to a complete bug in the code. You are declaring sum (I have already given out about the name of that variable, so I won't go into it again) as a double, and you are returning a float as stipulated by the functional specification. Yet you don't cast it to a float... This code won't even compile.
Correct code would include:
    private float average3(int first, int second, int third) {
        return (first + second + third) / 3.0f;
    }or alternatively:
    private float average3(int first, int second, int third) {
        return (float) ((first + second + third) / 3.0);
    }I would suggest that you test any code snippets that you intend to use as teaching aids.

Similar Messages

  • Woot! Must read for people learning Java

    awesome anonymous inner classes :)
    import javax.swing.*;
    import java.awt.*;
    public class Main
         public static void main(String[] args)
              JFrame frame = new JFrame();
              frame.setSize(400,200);
              JPanel panel = new JPanel()
                   public void paintComponent(Graphics g)
                        super.paintComponent(g);
                        g.fillOval(0,0,40,40);
              frame.add(panel);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
    }wrote it myself

    Surely the access specifier isn't silently
    changed from private to package.
    Unless you can come up with very strong evidence,I
    am quire sure the presence of inner classes doesnot
    affect the accessibility of a class' fields. Noteven
    under the hood.This statement is correct.
    No modifier is changed.
    A package protected accessor (with the name
    access$nnn - where nnn is some number) is generated.
    This provides read-only access for the package, and
    as mentioned, if such data is critical, sealed
    packages and security manager should be used.
    If you find yourself doing this:
    if
    (foo.access$000(outerClassInstance).equals(GREEN))
    code]
    Then thats your own damn problem.And all these people in these articles are idiots who should ve contacted Schneider
    http://www.ftponline.com/javapro/2004_03/online/rule2_03_17_04/
    http://www.owasp.org/index.php/Publicizing_of_private_data_when_using_inner_classes
    http://www.javaworld.com/javaworld/jw-12-1998/jw-12-securityrules_p.html
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4097812

  • Learning Java proxies - landscape question

    Hi guys,
    I could use a little help to learn Java Proxies, I'm just starting to get familiar with Java, I'm coming from the ABAP side.
    First and foremost what do I need from the system point view?
    We have an XI box and using file/FTP/IDoc adapters and also ABAP Proxies, I wrote some Java (mapping)functions, I am familiar with these.
    But for a Java proxy, I would need a separate Java server(?) to run the application on, is this correct?
    Can I use my own PC for this? (for learning purposes), I have NWDS installed on my PC.
    What are the steps to write a small simple Java Proxy.
    I would very much appreciate some help, guys, how do I start?
    Thanks a lot,
    Viktor

    Hi Viktor,
    You can work from your own machine. Becuase in Java Proxy scenarios, you are deploying EAR files in the XI server, and thru XI , you are executing the method written in the Java Application.
    Just check these links-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    /people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
    Demo ~
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken]
    Hope this helps,
    Regards,
    Moorthy

  • Why learn Java Instead of C++ or...

    Why should people learn Java and use Java than C++ or other programming languages?
    Some of my personal reasons are:
    1. Java supports four look and feels without having to create them from scratch, they are already available for quick use.
    2. Java compiles fast, and runs fast. It's easy to understand. You can *.jar it into one file! No *.dll's!!!

    I like Java too (duh!), but...
    Why should people learn Java and use Java than C++ or
    other programming languages?
    Some of my personal reasons are:
    1. Java supports four look and feels without having
    to create them from scratch, they are already
    available for quick use.
    What? how is that an advantage over much of anything? OK, you could say that you can write a very complex GUI application and have it run on a number of very different applications using a common L&F or a platform-appropriate L&F.
    2. Java compiles fast, and runs fast. It's easy to
    understand. You can *.jar it into one file! No
    *.dll's!!!Before there were .DLL's and .so's there were big-ass executable files with everything linked into them. Oh wait, you can still do that on Win32 and Unix if you want to (except of course for the OS shared libraries which Java's JRE needs too).
    Chuck

  • How to learn Java!!(help me!)

    I am a beginner.I've learned Java for 6 months.But I still don't konw what is Java.Can somebody tell me how to learn Java step by step?For instance,which one should I learn first,and then what to learn next?Thank you!!!!

    I've learned Java for 6 months.But I
    still don't konw what is Java.I take it by "learned Java for 6 months" you don't mean programming with it. If you've done programming with it, you should have some idea of what you're actually doing. If not, here is a basic idea of what Java IS:
    1. Java is a virtual machine (it's kind of like a "fake" operating system running on top of your own operating system (like Windows XP).
    2. Any operating system that has a copy of the Java Runtime Environment ported to it can run Java programs. This allows Java programs to be cross-platform.
    3. Java is also the name of the language used to write programs for this virtual machine.
    4. Try clicking on the Documentation link at the left of this forum for more information about Java :P

  • Do week-long java courses help to understand java &  get a job?

    i tried searching for this topic before posting, but "courses" "classes" & "instruction" come up with a lot that has nothing to do with the topic at hand. :)
    like many others, i'm teaching myself out of a book (Deitel). so far i've been able to understand the material and create programs based on the exercises. however, i'm now into the meat of OOP with superclass, subclasses, how they interact and the like and i'm having a rough go of it. i can diagram and understand the abstract concept, but when i'm faced with an actual program example i have a difficult time following the interactions between classes.
    i'm considering taking one of those 5 day classes, but am wary of how much they will actually be able to cover in detail (not to mention the $$). has anyone here taken one of those classes and found them to be of great benefit to learning the OOP portion of Java? did it give you enough understanding to obtain an entry-level job?
    btw, i'm doing a pro bono project for a small company to get some real world experience. (i've heard that suggestion many times in regards to obtaining one's "experience" w/o a job)
    thank you all very much for your help.

    I took a week long course to learn Java. It worked I did learn the basics of Java but I did already know how to program in C and VB at the time. I found the AWT section of the class to be very valuable,cosidering I mostly write GUI. And the concepts of AWT mostly all apply to swing so that didn't set me back at all. Depending on the school it may help you to understand OOP. But be careful because most schools progress the class at the skill level of the majorty. So if you have 15 people in the class and 9 of them know nothing about programing your probably going to spend the week learning what a variable and a while loop do, you all pay the same tuition and they would rather 6 of you leave then 9 of you leave. If you have some prior programming knowledge I would recomend finding a class that caters to that.

  • For all the newbies who wants to learn Java

    I was a newbie like 4 months ago. i have some skills of OOP in C++ like 2 years back but since then i did'nt took any of programming language courses. I have experience in MSaccess and MYsql. i did my internship Last summer with Tennessee Education Lottery as a Database Analyst. At that time i realized what a Corporate Enviorment looks like. Trust me it was a formal interview and i passed it and they placed me in the IT department to write some scripts for the GUI terminal and at the same time create a Company Security Database. i did completed my project but i had to Learn Mysql. and then i realized Java was getting very popular. alot of people told me in the forums to go Java tutorial but i will not agree to start from the sun tutorial. you can do it only if you have a good or may be medium experience of OOP. it was really tough for me and then this magic guy came on the forum and told me to go on this website if you want to learn Java.
    http://chortle.ccsu.edu/java5/cs151java.html
    This site is a brilliant site specially the exercise problems and the quizes really attracted me to Java alot and now i came to realize how easy it is to program in Java rather than C++. Java forums have helped me alot in solving those exercise problems (not with the code but with a good explanation) which was very helpful for me. out of my 210 post i guess i have helped 30 people out and the rest of the questions are regarding those exercises. i came to know encapsulation, inheritance and all that stuff. though i am still not very perfect like i am still having trouble with ComparTo thing but it takes more practice. the more you practice the more you learn. so all the newbies if you really want to learn java even if you dont have any experience in OOp this is the site where you need to start. Hope this will definitely help you alot. thanks to all the Senior members navycoder, captain, paulcw, duffy, turingpest and others also who have helped me in the past. without you i would have not achieved the goal of learning java. now my next step is going to be learn GUI programming Swing. looks fun to me. but at the same time i have my final project for this semester to make on ONline Testing program which will have a database, php scripting and html and xml.
    I will post if i have any problems

    I was a newbie like 4 months ago. i have some skills
    of OOP in C++ like 2 years back but since then i
    did'nt took any of programming language courses. I
    have experience in MSaccess and MYsql. i did my
    internship Last summer with Tennessee Education
    Lottery as a Database Analyst. At that time i
    realized what a Corporate Enviorment looks like.
    Trust me it was a formal interview and i passed it
    and they placed me in the IT department to write some
    scripts for the GUI terminal and at the same time
    create a Company Security Database.Wow they really must like to gamble if they put you in charge of a security database - no offense meant, but that isn't the sort of thing you would want a brand new person working on, unless of course they were giving really high odds ;-)

  • Help? Learning coding for iOS/Mac

    Hello,
    I want to start learning coding, primarily for iOS and Mac applications. I know my way around computers pretty well, but as of now, I have essentially zero knowledge of coding. My question is, how should I start? What language do I learn first? Is iOS or Mac OS a better starting point? etc.
    Any help and advice is greatly appreciated. Thanks!

    What do you want to build for? That's the first question you should ask.
    Building for iOS essentially requires you to learn Obj-C, which hopefully you know is a superset of C. Building for iOS also requires knowledge of other tools, such as Cocoa, a framework built by Apple. Additionally, you should be familiar or be prepared to be familiar with XCode, Apple's IDE. You'll also need to review guidelines for publishing to the iOS App Store.
    Building for Mac can be done in many, many ways. You can distribute Mac applications yourself in almost any language you want, such as Java, C, C#, Ruby, Python, etc. All have IDE's (IIRC) that work with OS X. If you want to build for the Mac App Store, (IIRC) most apps are in Obj-C, and have stringent requirements like that of the iOS App Store.
    Keep in mind, I've barely scratched the surface here. There's a lot more to development than just langauges, frameworks, classes, IDE's, etc. While both iOS and Mac have their own program (at $99/year), you may find that you may not want anything to do with coding, or may want to build for both.
    You mention that you don't have any coding experience. If I were you, I would take very gradual steps, to see if this is something you want to get serious about. There's nothing wrong with diving right into a langauge like C, but you may feel overwhelmed. I plan on building iOS apps myself, but I didn't dive right in. I started learning Javascript two years ago (as well as HTML and CSS), and progressed to a bit of Java and Python. This summer, I plan on learning PHP and RegEx. So, two years in, and I don't feel ready to build with C just yet. However, people learn differently, so heck, you might even start building in 3 months.
    TL;DR, give it a shot. You have nothing to lose. If you want to dive right in, start with C. Being verbose with that language will give you the upper hand when it comes to Obj-C.

  • Can Someone Please Help With A Java App.

    A while back, I had a program that I was working on, while taking Java in a Web Design & Development course -- this was back in 1999 -- not having the mindset of a programmer I failed that part of the course misrably. I had to do the following program, but you can see why I failed, I only managed to write to lines of code. I am wondering if there is anyone who can write it to the following criteria, maybe even make it graphical...I am hoping to try and write an XML backend to it like I wanted to do in 1999; unfortunately I lost the code that someone was nice enought to supply after I failed that part of the 6 month course...so if anyone can help please let me know. I want to try learning Java again, but it would be cool to see the following in working order again. If you're wondering why I still have the following, I just found it again while going through my Experts Exchange postings.
    import java.awt.*;
    public class CourseMarks extends Applet {
    Of course I think this is wrong, but here is what I need done:
    Define a class (data structure) to represent the people taking a course. For each person, you should record their name, their mid-term mark, their final mark, and any other information you think is relevant (hint: how do you find all the people in the class?)
    A) The Applet/Program must be called CourseMarks
    B) Write the class in Java
    C) Create a variable called courseList to record students of a specific course, then write code to initialise it with information about three students.
    D) Letter grades are to be awarded to the people taking the course, and you have to write a method to translate the final mark to a letter grade for each person. Letter grades are awarded as follows: 0-49.99 = F, 50-59.99 = E, 60-69.99 = D, 70-79.99 = C, 80-89.99 = B, 90-94.99 = A, 95 and up = A+. Write a method in Java and show how you would invoke it on courseList
    E) Write a method to compute the class average for the mid-term mark (hint: follow your links), and show how you would invoke it on courseList.
    Thanks,
    Michael Lauzon, Founder
    The Quill Society
    http://www.quillsociety.org/
    [email protected]

    Here is a quick and dirty implementation. I think I have everything in there. :-) import java.util.*;
    public class CourseMarks {
        private ArrayList courseList = null;
        /** Constructor for class */
        public CourseMarks() {
        /** Populate course list with students */
        private void initList() {
            Student s1 = new Student( "Gweedo", 100.0, 100.0, 101 );
            Student s2 = new Student( "Sally", 70.4, 65.3, 101 );
            Student s3 = new Student( "Michael", 56.0, 45.0, 101 );
            courseList = new ArrayList();
            courseList.add( s1 );
            courseList.add( s2 );
            courseList.add( s3 );
        /** Returns the list of students */
        public ArrayList getCourseList() {
            return courseList;
        /** Compute and return the letter grade for the passed mark */
        public String computeLetterGrade( double mark ) {
            String grade = null;
            if( mark <= 49.99 ) {
                grade = "F";
            } else if( mark >= 50.0 && mark <= 59.99 ) {
                grade = "E";
            } else if( mark >= 60.0 && mark <= 69.99 ) {
                grade = "D";
            } else if( mark >= 70.0 && mark <= 79.99 ) {
                grade = "C";
            } else if( mark >= 80.0 && mark <= 89.99 ) {
                grade = "B";
            } else if( mark >= 90.0 && mark <= 94.99 ) {
                grade = "A";
            } else if( mark >= 95 ) {
                grade = "A+";
            return grade;
        /** Print out the letter grades for all the students in the passed list */
        public void printLetterGrades( ArrayList studentList ) {
            if( studentList != null && studentList.size() > 0 ) {
                Student aStudent = null;
                Iterator it = studentList.iterator();
                while( it.hasNext() ) {
                    aStudent = (Student)it.next();
                    System.out.println( aStudent.name + " had final mark " + aStudent.finalMark +
                        " and letter grade " + this.computeLetterGrade( aStudent.finalMark ) + "." );
        /** Compute the average mid term for the students in the passed list */
        public double computeAverageMidTerm( ArrayList studentList ) {
            double average = 0.0;
            if( studentList != null && studentList.size() > 0 ) {
                double total = 0.0;
                Student aStudent = null;
                Iterator it = studentList.iterator();
                while( it.hasNext() ) {
                    aStudent = (Student)it.next();
                    total += aStudent.midMark;
                average = total / studentList.size();
            return average;
        /** Main method so this class can be run */
        public static void main(String[] args) {
            CourseMarks app = new CourseMarks(); // Create new CourseMarks instance
            app.initList();     // Init it's list of students
            app.printLetterGrades( app.getCourseList() );   // Print letter grades for all students
            System.out.println( "Average mid term: " + app.computeAverageMidTerm( app.getCourseList() ));
            System.exit(0);
    /** Simple class that just holds a few values */
    class Student {
        public String name = null;
        public double midMark = 0.0d;
        public double finalMark = 0.0d;
        public int classNum = 0;
        public Student( String aName, double aMidTerm, double aFinal, int aClassNum ) {
            name = aName;
            midMark = aMidTerm;
            finalMark = aMidTerm;
            classNum = aClassNum;
    }

  • Is it worth to start learning Java

    Today I saw a post in JavaRanch (http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=33&t=017317). A guy asked a question for his friend about STARTING to learn Java NOW. Actually, I heard quite same question from people around myself.
    For myself, I've been working on Java more than 7 years(already SCEA, hehe). However, the Java passion is getting away ;-((, I am looking around for other stuff like Ruby.
    I have same confusion as that guy, and I'd like to learn from you guys for same question - for the current market situation, it is late/okay to touch Java?

    thank for all the input.
    my concerns are, particularly for newcomer, the
    learning curve and the market trend.
    my understanding is Java is losing its powder in web
    application development comparing with other emerging
    language like Ruby/Python, conversely, Java's powser
    is going to server side(business/integration layer).Don't be so sure about that.
    Java's not losing powder [sic] in web app development. It's mature and considered a standard for enterprise scale problems. Ruby and Python are gaining traction for smaller CRUD-like Web apps, but neither is up to snuff in the areas of security and transactions. Ruby is gaining popularity because of Rails, which makes creating simpler web apps easy.
    Criticism of Java for complexity and a dearth of tools is fair. But are Trails, Grail, and AppFuse strong enough answers to Rails such that Java EE can be more agile for smaller apps? Time will tell. I think Spring and Hibernate are helping a great deal, more than EJB 3.0 will.
    everybody knows it is hard thing to learn java,It's hard to learn anything, period. Programming in any language is a long learning curve, because it's so much more than just language syntax. You don't do enterprise apps just by learning Java, even if you stick to the EE platform. You have to know SQL and relational databases, messaging, XML, HTML, JavaScript, HTTP...the list is pretty long. All those technologies carry over to .NET and Ruby and anything else, so it's not just Java that's complex. Enterprise problems are complex.
    And once you know all that, there's the problem of designing elegantly. It's a long climb no matter which language is on top.
    regarding to server side programming for a java
    newbie, it would be much harder to learn, further, it
    will take you long long time to learn server side
    java programming.
    however, the job market (java) is still hot, and
    seems to keep hot. and people still wanna jump in.It's still good, just not crazy like it was at the end of the 90's. There is the problem of competition from China, India, Vietnam, etc. that won't go away. But what field hasn't been affected by global competition? Only those areas where you have to touch the client, like auto mechanics. Even medicine has been affected - x-rays can be read anywhere in the world.
    So, still confused to tell people whether or not to START java...;-((If you like programming, jump in. Learn Java, but it's more important to learn those bedrock technologies (e.g., data structures, compilers, parsers, finite automata, decomposition, relational databases, etc.) and learn how to learn. Languages will come and go. When I jumped into this field ten years ago C++ and Corba were the rage and Java didn't exist. Now I make a living writing Java. I'm reading about Ruby and Rails now, just dipping my toes into the water.
    None of us are any better prophets than you are. I don't know what will happen or if Java will still be here ten years from now. COBOL and FORTRAN were born in the 50s, and both are very much with us today.
    Just stop whining about it. Do what makes you happy, and stop worrying about what other people think.
    %

  • About learning java 3d

    hi dear,
    I am doing a java 3d learning website. I need to get some information form 3d learners. Could you help me to answer three questions below? Thank you so much.
    1)Did you have any problem in set up 3d working environment? What are they?
    2) When you learn java 3d which part do you think is the most difficult part?
    3) What information would like to see in a java 3d learn website?

    1) Du have any problem in set up 3d working environment? What are they?
    Done it many times over the last few years, so I don't, but from what I can tell a lot of people don't understand the basic Classpath stuff.
    3) When you learn java 3d which part do you think is the most difficult part?
    Learning to do things the Java3D way seems to throw a lot of people - explaining why you should only update the scene using behaviours, how the scenegraph works and so on would, I think, be very useful to a lot of people.
    Vectors, Matrices and the underlying mathematics would also be very useful, although I don't know they can ever be made simple.
    3) What information would like to see in a java 3d learn website?
    I need to know more about model and animation importing and management, but I'm probably not your typical user.
    I'd find a comprehensive set of links to tutorials would be very helpful too- there are a lot of them around the place, but I've not found anywhere that authoritatively lists all the available tutorials - maybe with a bit of information on what they cover and how up to date they are.

  • Tips on learning java.....

    Hi,
    I have been learning java for quite some time now (i learned it in school as well but that was simply theory and fundamentals). I want to ask the experts that how did you people proceed to master this language or any language in general. I mean sometimes i get stuck at problems and spend hours on it. Can you all share your experiences and the strategies that you followed (learning by doing, creating new programs on your own) and the things that you did that helped you understand the subtleties of the language ?
    Edited by: roaan on Jul 21, 2009 8:20 AM

    The way I see it, there are a few steps to really mastering a language. Some of them are overlapping for multiple languages, but generally, no matter how good you are at another, there are a few things you end up doing in order. And by you, I mean me:
    1) Learn the basics. Work out how the language operates. There are going to be some syntax issues that look like things you know but work differently. Write a Hello World and then get it to loop. Write some basic programs based on the introductory tutorials.
    2) Learn what sets the language apart. No language is the same, even if they look similar. The more languages you know, the more you'll be able to tell them apart, but if you only know one or two make sure you understand what it is makes people use this language. In Java's case, maybe it's the memory management, or the object-oriented principles. Learn the basics of that power. Write some programs and play around with it. Take one of your basic programs and think about whether it can be improved by applying what makes the language special. This is the point where you should really be making sure you understand OO, if you're learning Java.
    3) Build a reasonably complicated program at your level. Design an application that you can think of how to do 80% of, but that you'll have to research the other 20%. Make it something you'd really like to use, if you can, or at least something you'd show off. It doesn't have to be perfect. You may not even finish it, but you'll try. Make it something that you can get working in some way, even if it doesn't end up doing everything you wanted it to do. Get comfortable with an IDE and get to know the debugging features.
    4) In the course of writing your app from step 3, find some article or tip that points out that your entire design was wrong. That's okay. This is a learning experience. There is always a better way to do something. If you're still early on in the process, see if you can incorporate what you've learned. If you're far along, finish what you can and apply your newfound knowledge to your next project.
    5) Now you've written some things you're proud of, and they work. (Trust me: There are bugs. But don't worry about them so much.) You're convincing yourself you're a good programmer. Let it sink in. Now read up on techniques. Study Design Patterns. Look at other people's sample or production code (open source helps). Realize that half of the things they talk about make no sense to you.
    6) Keep building stuff. Keep applying something new. Look up Best Practices in your language and make sure you're following a clean, maintainable style. Run into a problem you didn't expect in your design and then have a flash: "So THAT'S what the Factory pattern is good for!" Get really comfortable with your IDE. Fix a bug in someone else's code because you're able to follow their logic even though it's not your own.
    7) By now, there's a new release of Java out or a new hot technology that makes all the nifty tricks you got good at obsolete. Embrace it. Consider the new technology the best thing for development that you've ever seen.
    8) Use the hot new technology for a while, then realize it's still crap. In fact, it's just the same crap wrapped in a neater package. Start learning the underground technology that's not hot yet, still has a lot of bugs, but is going to be so cool when it's done.
    9) Go back and finish your project from step 3. And by finish, I mean rewrite from scratch, after you realize your original code can't be saved.
    10) Discover that there's another language that does everything you've been trying to do, but much more easily. Repeat at step 1, and start recognizing that every language has its place.
    So, to recap:
    * Program.
    * Read about programming.
    * Program.
    * Ask people for help.
    * Program.
    * Realize that everyone gets stuck on problems and it doesn't mean they're bad programmers, just still learning.
    * Get some sun to prevent vitamin deficiency.
    * Program.
    Then again, your experiences may vary. But you specifically asked for procedures on mastering programming. To which the answer is, it's just like anything else. Always be learning something new and always be pushing yourself. Don't be afraid to fail, because you will sometimes, but that's the only way to improve. And this is where I really wish I'd learned this earlier: Remember that your code can always be improved, and you're always going to be horrified by the code you wrote even months ago. Let it be, unless it really prevents you from getting it to do what you want.

  • Im Trying To Learn Java :o(

    Hey All,
    I have decided to get my mind active and randomly learn Java. I say randomly because i am going to be a student again in IT but i like the kinda 3D side and modelling and nice pictures and flash actionscript lol not all this stuff.
    Anways i would just start by saying that Java offends me massivly, i know something happened with M$ and Sun and ever since then all i have had with the sun download is problem after problem and crashing and all iw as tryin to do was play some Jippii games. This aint a recent problem, it always happens and i must have reformatted xp around 7 times. So i stay away from applets!!!
    Anyways in 2002 when i started learning Flash it was because i seen a site i liked and wanted to do that. The equivelent is kinda like me saying "OK GUYS I HAVE JAVA NOW HOW DO I MAKE DOOM" anyways 2 and a half years later im happy with what i can do and have used alot of different apps and learned alot from 3dsmax to aftereffects etc.
    Anyways my goal out of this whole Java thing is to make a game like one i used to play when i was younger on the Amiga 500. No where has this game and a modern one would be great to play. The graphics suck but the physics were really nice.
    So my questions are:
    1) Java. Ok im going to be honest, i know nothing about Java, i dont even know if it can do what i want and what i really dont want is to spend a while learning this to be stuck with no effects for my game, ie are small particle effects possible in Java? I know Java is pretty slow for a proper language compared to C/C++ but how slow? Can you shift a hundred particles around the screen and still add physics in the background?
    2) Java. The whole thing confuses me massivly. Im not a big posting person as i tend to prefer searching but i dont even know where to begin. I will bite the bullet and say i aint going to have alot of problems with the syntax of the language itself. It all looks kinda how i expect it, obviously i dont mean i aint gonna have problems and lot of them but it is not REALLY alien to me to look at a bit code. At the same time it is. I need to know alot of stuff, things that the 2 ebooks i have just ignored. For example, when i compile something, i thought that meant it compiled to the EXE but infact it turned my "heyworld.java" into a "heyworld.class" file. This just makes no sense to me atall because i HATE command line stuff, i see it as reinventing the wheel so im trying to follow through on first of all netbeans (an that went off almost instantly) and a free one that got my hey world to work (well, class). I need to know if a compiler dont make a exe then whats the class for and what exactly is a class file. You know just stuff like that? Does anyone know i kinda dictionary so to speak? baby talk i mean, so far all i seem to get is explainations with words i dont understand.
    3) How difficult is it to make a 2D game in Java? To make this plainer, i aint having an applet run somewhere, i want a nice downloadable exe. Of course i will need to start at the beginning but i mean to get a ship on the screen with keys to move it and a "cave" roof to crash into, is this going to take a long long long time to get to that stage? You see, as i said before unless after a few days i have a object on screen to work with, i just get too bored to continue. for example "the object of this is to make a red circle move across the screen" REALLY interests me where as "today we are going to make a mock system for a small business user" sends me back to 3Dmax and the lighting i was reading about lol I tend to look at a piece of code and be devestated by its complexity then try and make it make sense over time. Is this possible with Java? It does work for me this, i was picking apart a isometric code in actionscript before i knew what a tween was.
    4) Theres so many different J*** J"EE things floating around that i dont actually know what one i am meant to use? I got 1.4.2 i think but thats all i know. Id like any other things that helped yourselfs start off in Java?
    Sorry to go into a bit detail here, its just that with this degree im starting, it soon branches off into 2 groups. Programmers and Designers. I feel i know the design side well enough to make a comparison but it would be rude to leave this side of the things out and write it off without atleast giving it a shot.
    Thank you very much for your time :o)
    Kind regards,
    Clarky.

    If you want an idea of what's possible with Java, do a google search for "java games" or something like that. I've seen occasional postings of what are supposed to be pretty cool games that have been written in Java, but I'm not into games, so I've never bothered to check 'em out personally.
    As to whether you can do it, well, you'll have to figure that out. Learning Java well enough to create a video game is not a trivial task. I don't just mean the syntax of the language, I mean the many APIs you'll be using, concepts like multithreading and exception handling, good OO principles, etc. Without a good handle on that stuff, your code will quickly turn into a morass that will be difficult to enhance, maintain, or debug.
    I suspect that the code to make a particular graphical event occur will be more verbose and complex in Java than in ActionScript, given that Java is a general purpose language and AS is more geared to GUIs. Nonetheless, I'm sure there are APIs out there (some free, some not) that will provide some higher level constructs than the core APIs to make some of that easier. You'll still be operating in the idiom of a general programming language though.
    There may also be a hybrid solution available--where you use Java to express the game logic and another language to express the graphics. I don't know anything about this kind of stuff though, so that's just speculation.
    You may get more precise advice in the GUI Building forums on http://forum.java.sun.com/ than here.
    Here are some resources to get you started on Java in general.
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.

  • How did YOU learn Java?

    Ok, two part question and a bunch of help for this Java newbie:
    1. How did you learn Java? Online tutorials, books, discussions, a game, or a class? Be specific and think back to when you looked at a Java program and went "wtf?"
    2. How do you keep up the new versions and therefore, useless older classes? I am reading the list on JDK 1.4 and just thinking, how could I remember all of this? If I'm used to programming one way, how can I relearn for every version?
    If I could just get some honest answers and opinions, it'd be greatly appreciated, Thanks!

    Get this:
    I originally 'learned' Java from "Java Made Simple" by Peter McBride. "Made Simple" is right: having finished this book, I had no idea that you could design your own classes for use by other classes! All my methods were static, I'd never written a constructor or instantiated one of my own classes, and my applications were all contained in a single class! I had only the vaguest notion of what "object oriented" meant, and I wondered why, for example, you had to say
    Integer x = new Integer(4);
    but not
    int x = new int(4);
    The book was intended, I think, for non-programmers who have been given some free space by their ISP to design a web page, and want to add some v. simple applets for decoration. Beware of books like this if you want to learn Java in a serious way.
    For a more positive tip, I recommend Sun's very own online Java Tutorial. It covers all the key topics thoroughly and clearly, so at the end you have a good understanding of Java (More than just the basics, I'd say). If you want to move on to more advanced topics this tutorial will probably stand you in good stead (I can't be certain as I haven't moved on from here yet myself), but if you don't you will still be able to write good amateur programs.

  • Hi, where are some good places to learn Java?

    Hi all,
    I'm beginning to learn Java, with a background in c. Can anyone point out a few good web sites or books that would help make the transition? thanks.
    John
    p.s. -- is Java's pass by reference the same as pass by address? or by value?

    Here are a few good ones:
    http://developer.java.sun.com/developer/onlineTraining/new2java/
    http://java.sun.com/docs/books/tutorial/
    Welcome to Java!
    p.s. -- is Java's pass by reference the
    same as pass by address? or by value? Wherever it says "reference", think that it says "pointer".
    You'll get out of much trouble (especially what comes to passing references (pointers) to methods and reference (pointer) variables).
    Java is 100% pass-by-value, where "values2 are either primitive types (ints, floats, chars) or references (pointers). You can never have 'direct' access to objects like in C++.

Maybe you are looking for

  • IMessage not selecting my phone number, its "greyed" out.

    I have an iPhone 4S and it was on a monthly 02 contract but I have not terminated my contract with O2.  I had my iPhone unlocked so I could use it on any network.  I now have a Vodafone sim card in the phone and am on PAYG.  However my iMessage is no

  • Using Mail with GMAIL (Pop)

    Has anyone experienced the following issue? I have set up my two gmail accounts to work with Mail on my new MacBook and for some reason the Mail program is not receiving all the mail. I know I am getting more mail than what is showing up because GMAI

  • Accessing typed dataset in SQL Server Compact Toolbox in VS 2013

    I am a novice with coding so this could be a very simple answer. I am coding an application in Visual Studio 2013 with VB. I included a Compact SQL Server database using the SQL Server Compact Toolbox add in. The database shows up in my solutions exp

  • Does this work for anybody?

    Man this is a slow forum... seems not too many using FlashBuilder? If anyone has Builder 4 and the Facebook library with AIR connect v3.4 for Flex installed - could you please check out this simple script. This will just open a NativeWindow containin

  • Please help!!! trouble using UI Roadmap on a PDK application for EP 7.0

    Hello all, I'm developing a PDK application in wich I would like to use a roadmap UI control. Is this possible to do?. At this moment i'm trying to do this by using the source code generated by webdympro, this works on a EP 6.0 server but, it doesnt