7 Replies - 284 Views - Last Post: 06 October 2011 - 11:23 PM

#1 jacobsnakob94  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 02-October 11

A Novice Java Programmer!

Posted 02 October 2011 - 07:16 PM

Hey guys! I just found this community a few minutes ago actually and would like to become involved with it! Here is a little bit about me:

I'm 17 years old. I'm a bit of a nerd (which is probably why I stumbled across this website to begin with :) )..I really, really like math and I'd like to think that I'm pretty talented at it. I also enjoy reading, but I scarcely have time for it during the school year. I'm also a novice chess player (so if any of you guys would like to give me pointers in that area as well, feel free! :D ). When I go to college, I'd like study Chemical Engineering (or possibly something within computer science if I decide that I am fond of this programming stuff)..

Uh..that's really all I can think of right off the top of my head. If you have any questions, feel free to ask! And maybe tell me a little about yourself in a reply to this thread if you'd like! I love meeting like-minded people.

-Jacob

Is This A Good Question/Topic? 1
  • +

Replies To: A Novice Java Programmer!

#2 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 583
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: A Novice Java Programmer!

Posted 02 October 2011 - 07:31 PM

Dont wprry Jacob, I'm only 13 and I haven't been here long either! You wont be a novice after a while at DIC, it's quite the vibrant learning community and its a VERY fun place to be

Wishing you the best,
J-Bo

And we don't discriminate against nerds either! I'm what you'd call a nerd but I take thar in my stride and continue my life.
Was This Post Helpful? 0
  • +
  • -

#3 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,056
  • Joined: 28-December 10

Re: A Novice Java Programmer!

Posted 03 October 2011 - 05:50 PM

Hey there, just like you I stumbled upon this site when I was a novice programmer(not that I've improved). This site has tons to offer, not just programming language. Hope to see you out here often, welcome! ^^
Was This Post Helpful? 0
  • +
  • -

#4 jacobsnakob94  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 02-October 11

Re: A Novice Java Programmer!

Posted 04 October 2011 - 04:58 PM

Thanks everyone! :)

I'm slowly making progress. I'm currently doing problems on Project Euler to help me learn the basics of the language. Although, I'm a bit concerned that my way of writing programs is not..the "accepted way". I kind of learn things as I go, but the programs that I write aren't always very..organized (or efficient for that matter). Sure they solve the problem and get me an answer, but I worry that I'm going to get into the habit of being sloppy and it's going to cause problems down the road..Is it normal to have poor "technique" at the beginning? Does learning how to program efficiently and "neatly" come with time or is there something I should read so I learn it now?

Sorry for sneaking another question into this thread! Programming is still pretty new to me and I don't have many other resources other online communities such as this! :D
Was This Post Helpful? 0
  • +
  • -

#5 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,056
  • Joined: 28-December 10

Re: A Novice Java Programmer!

Posted 04 October 2011 - 09:39 PM

What do you mean poor technique? Could you site some examples? Habits are hard to break. For example, I have trouble indenting my code. You should try following good coding practices early on your career! ^^
Was This Post Helpful? 0
  • +
  • -

#6 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 343
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

Re: A Novice Java Programmer!

Posted 05 October 2011 - 05:30 AM

Hey jacobsnakob94, welcome to Dream In Code!

Often when replying to welcome posts I try to remind the new person that how they type has an affect on how they are welcomed into the community. Most of us do not like answering questions starting with "i nd dis for hmewk" (which is very common, and in fact not allowed).

However, your introduction was extremely good and so I think you will settle in very well. I am not sure if any one here is doing Chemical Engineering, but a lot of us are doing Computer Science or Software Development so do not be afraid to ask questions that you think the answers might be rather hard. We always get questions like "which language should I use for xyz" so I rather like interesting questions!

I think good advice for entering our community would be to ask questions, but also answer questions. Contributing is the best way (in my opinion) to learn as well as of course improving the site and the community even further.

What kind of subjects are you planning on starting with? Are you already familiar with a language? Have a project in mind, or one to share?
Was This Post Helpful? 0
  • +
  • -

#7 jacobsnakob94  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 02-October 11

Re: A Novice Java Programmer!

Posted 05 October 2011 - 12:30 PM

View PostfromTheSprawl, on 04 October 2011 - 10:39 PM, said:

What do you mean poor technique? Could you site some examples? Habits are hard to break. For example, I have trouble indenting my code. You should try following good coding practices early on your career! ^^


By poor technique, I mean the way that I organize my code when I write it. Half of the time, when I approach a problem on Project Euler, I come up with a method for solving the problem rather quickly, but when I try to translate it into java, it gets sloppy.
Here's an example..

package find.a.prime.number;
import java.util.Scanner;
public class FindAPrimeNumber {

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);
        int N = 2;
        int which;
        
        System.out.println("Please enter the number of Prime Numbers you'd like to find: ");
        
        which = scan.nextInt() + 1;
        
        System.out.println("----------------------");
        while(0 < 1){   

        boolean[] isPrime = new boolean[N + 1];
        for (int i = 2; i <= N; i++) {
            isPrime[i] = true;
        }


        for (int i = 2; i*i <= N; i++) {


            if (isPrime[i]) {
                for (int j = i; i*j <= N; j++) {
                    isPrime[i*j] = false;
                }
            }
        }

        // count primes
        int primes = 0;
        for (int i = 2; i <= N; i++) {
            if (isPrime[i]) primes++;
        }
        if(primes == which){
            for(int h = 0; h < N; h++){
                if(isPrime[h] == true){
                    System.out.println(h);
            }
         }
            break;
        }
        else{
            N = N+1;
        }
        }
}
}



While this program works, it doesn't seem readable compared to some of the snippets that I have examined on here. I've noticed that (and I'm sorry if I sound ignorant in trying to describe this..) people who write java tend to write several chunks of code (I assume these are functions or something similar..) and then use them by referencing their name in the main method (as opposed to what I do, which is write everything out IN the main method..). And this way of writing programs seems much more structure/readable than mine.

View PostShane Hudson, on 05 October 2011 - 06:30 AM, said:

Hey jacobsnakob94, welcome to Dream In Code!

Often when replying to welcome posts I try to remind the new person that how they type has an affect on how they are welcomed into the community. Most of us do not like answering questions starting with "i nd dis for hmewk" (which is very common, and in fact not allowed).

However, your introduction was extremely good and so I think you will settle in very well. I am not sure if any one here is doing Chemical Engineering, but a lot of us are doing Computer Science or Software Development so do not be afraid to ask questions that you think the answers might be rather hard. We always get questions like "which language should I use for xyz" so I rather like interesting questions!

I think good advice for entering our community would be to ask questions, but also answer questions. Contributing is the best way (in my opinion) to learn as well as of course improving the site and the community even further.

What kind of subjects are you planning on starting with? Are you already familiar with a language? Have a project in mind, or one to share?


Thank you! I appreciate that. I HATE reading "sentences" that are nothing more than a string of acronyms and abbreviations. I also don't understand why people think it is so much more efficient to remove vowels from their writing (e.g. Writing "Cn u hlp me" instead of "Can you help me?").

I am not familiar with another language, unfortunately. I chose Java because that is what we are learning in my Introduction to Computer Programming class. I found the class rather boring at first, to be completely honest, but then my interest was sparked when were given our first project. It was nothing extraordinarily complicated, but the process of writing it was sooo much fun for me. So I came home, downloaded Netbeans, found Project Euler and this website, and began coding in my free time :bigsmile: .

At this point, I don't have any project in mind. I'm just learning because I find it enjoyable and interesting to do/read about. I think I'm drawn to it, in part, because I've always excelled in math, and problem solving is something that I find satisfying (which means there is probably PLENTY of satisfaction waiting to be found by me in the programming world :bigsmile: ).

What about you? How long have you been doing this computer science stuff? :bigsmile:
Was This Post Helpful? 0
  • +
  • -

#8 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,056
  • Joined: 28-December 10

Re: A Novice Java Programmer!

Posted 06 October 2011 - 11:23 PM

You're right that snippets are smaller, and I guess in time you'll learn to snip away on your code. You should just remember that if a block of code is reusable, make it a method. Or, you could just make the program work first, then dissect it to smaller parts. That's what I used to do. Before you know it, you'll be separating your methods in no time and programming in OO without even thinking you're doing it. It all comes with practice, and research too. ^^
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1