Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


[Java] My First Program filter_list
Author
Message
RE: [Java] My First Program #11
(02-22-2013, 10:39 PM)LightX Wrote: @Deque - I didn't learn any type of variables except doubles when i coded those. And I used the while loop cuz thats what I was told to use. I didn't know that about thenewboston...I thought he did know what he was talking about, but I didn't just use his code, I coded it myself and used the name of the variables he showed and that sort of stuff. I did his as an example, but I didn't use his code for those if he does even have them.


I really don't feel like starting all over again (this would be my second time starting over) so im just gonna accept im not supposed to be coding I guess. Its just not my thing. :p

A while back when I was watching one of the videos on either Python or C++ he mentioned that he was just learning Java and he was getting it confused with I think C++. Yea... it was C++. When I heard that I stopped using his videos. I then got a great book for both C++ and Java. Now I feel more comfortable learning C++/Java. If I want a lecture I want it from someone who knows the language and is not just learning it like myself.

Reply

RE: [Java] My First Program #12
What book are you using? I couldn't find one that did the same as videos. They were informative, but I jsut didn't get them as well. It was easier to learn from actual videos and doing.

Reply

RE: [Java] My First Program #13
What book are you using? I couldn't find one that did the same as videos. They were informative, but I jsut didn't get them as well. It was easier to learn from actual videos and doing.

Reply

RE: [Java] My First Program #14
(02-22-2013, 10:39 PM)LightX Wrote: @Deque - I didn't learn any type of variables except doubles when i coded those. And I used the while loop cuz thats what I was told to use. I didn't know that about thenewboston...I thought he did know what he was talking about, but I didn't just use his code, I coded it myself and used the name of the variables he showed and that sort of stuff. I did his as an example, but I didn't use his code for those if he does even have them.


I really don't feel like starting all over again (this would be my second time starting over) so im just gonna accept im not supposed to be coding I guess. Its just not my thing. :p

You don't have to start all over again.
Just use other resources to go on.

And the programs you did by yourself are in the same style as TheNewBoston. Like I said: It is not your fault, that you did them this way. You just did it the way you learned it by him.

I don't believe your are not supposed to be coding. That sounds stupid. Get a good book and code. Everyone with a brain can code and I believe you have one. Tongue
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [Java] My First Program #15
(02-22-2013, 10:39 PM)LightX Wrote: @Deque - I didn't learn any type of variables except doubles when i coded those. And I used the while loop cuz thats what I was told to use. I didn't know that about thenewboston...I thought he did know what he was talking about, but I didn't just use his code, I coded it myself and used the name of the variables he showed and that sort of stuff. I did his as an example, but I didn't use his code for those if he does even have them.


I really don't feel like starting all over again (this would be my second time starting over) so im just gonna accept im not supposed to be coding I guess. Its just not my thing. :p

You don't have to start all over again.
Just use other resources to go on.

And the programs you did by yourself are in the same style as TheNewBoston. Like I said: It is not your fault, that you did them this way. You just did it the way you learned it by him.

I don't believe your are not supposed to be coding. That sounds stupid. Get a good book and code. Everyone with a brain can code and I believe you have one. Tongue
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [Java] My First Program #16
You can goto any torrent site and get great deal of good books from the Ebook section Smile I can help you find some if you want
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply

RE: [Java] My First Program #17
You can goto any torrent site and get great deal of good books from the Ebook section Smile I can help you find some if you want
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply

RE: [Java] My First Program #18
(02-22-2013, 11:04 AM)Deque Wrote: Aw, TheNewBoston!

If you want to do yourself (and everyone who will maybe work with your code) a favour, you shouldn't learn from TheNewBoston videos. You will just learn shit that takes even longer to get rid of. He has no clue about Java, the code is bad and the things he says are often just plain wrong. I can give you lots of examples for every video that I have seen so far. There are so many people using his videos to learn Java, because he is funny and so on, but he does more harm than good.

First off it is very good that you didn't name your class "apples", because this name has nothing to do with the purpose of your program.
Nevertheless your classname needs correction. Every class name starts with an uppercase letter, the rest is camel case (i.e. CamelCase). There are Java code conventions I would like you to read briefly: http://www.oracle.com/technetwork/java/c...38413.html

I can't say the same about the variable name lightx for the Scanner and the classname LightX later on. Why the hell would it make sense to name it like that?

Code:
double fnum, snum, answer = 0, operation;

This doesn't comply with the code conventions.
Put every declaration on a new line and use proper names. The operation shouldn't be a double. Your choices given are integers and the user input is always a String, never a number.

Things like:
Code:
fnum = lightx.nextDouble();
For a system.in scanner will produce exceptions if the user enters something that is not a number and the program breaks. You should get the console input with scanner.nextLine() instead and compare the strings or try to convert the strings to numbers and act with an appropriate output to the user if it isn't convertable (i.e. "Enter a number, you douche!").

And why not input and compare the operator (/,+,-,*), instead of a magic operation number?
Everyone will have to guess what the values 1,2,3,4 mean in that context (or look for the explanation string given to the user, which becomes tedious in bigger programs), but /,+,-,* are immediately clear.

Code:
while (lightx <= num){
            System.out.println(lightx);
            lightx++;
        }

This cries for a for-loop.

That's it for now, I have to go, but I might add some comments about thenewboston later.

PS: It is great that you do some coding. I hope I didn't discourage you. Don't be, it is TheNewBoston's fault. Wink
You will go your way and get better soon.

You pretty much covered it. I started learning through Bucky and all I can say is I'm glad I stopped after 30 videos, lol.

@OP, don't give up, ever. If you want to be a programmer then be one! It's just the TNB generally sucks for teaching programming because he usually learns the basics then afterwards learns himself as he teachers others. (my assumption as it seems, lol). Look around here and other places for sources you can read through and get the idea behind.

Reply

RE: [Java] My First Program #19
(02-22-2013, 11:04 AM)Deque Wrote: Aw, TheNewBoston!

If you want to do yourself (and everyone who will maybe work with your code) a favour, you shouldn't learn from TheNewBoston videos. You will just learn shit that takes even longer to get rid of. He has no clue about Java, the code is bad and the things he says are often just plain wrong. I can give you lots of examples for every video that I have seen so far. There are so many people using his videos to learn Java, because he is funny and so on, but he does more harm than good.

First off it is very good that you didn't name your class "apples", because this name has nothing to do with the purpose of your program.
Nevertheless your classname needs correction. Every class name starts with an uppercase letter, the rest is camel case (i.e. CamelCase). There are Java code conventions I would like you to read briefly: http://www.oracle.com/technetwork/java/c...38413.html

I can't say the same about the variable name lightx for the Scanner and the classname LightX later on. Why the hell would it make sense to name it like that?

Code:
double fnum, snum, answer = 0, operation;

This doesn't comply with the code conventions.
Put every declaration on a new line and use proper names. The operation shouldn't be a double. Your choices given are integers and the user input is always a String, never a number.

Things like:
Code:
fnum = lightx.nextDouble();
For a system.in scanner will produce exceptions if the user enters something that is not a number and the program breaks. You should get the console input with scanner.nextLine() instead and compare the strings or try to convert the strings to numbers and act with an appropriate output to the user if it isn't convertable (i.e. "Enter a number, you douche!").

And why not input and compare the operator (/,+,-,*), instead of a magic operation number?
Everyone will have to guess what the values 1,2,3,4 mean in that context (or look for the explanation string given to the user, which becomes tedious in bigger programs), but /,+,-,* are immediately clear.

Code:
while (lightx <= num){
            System.out.println(lightx);
            lightx++;
        }

This cries for a for-loop.

That's it for now, I have to go, but I might add some comments about thenewboston later.

PS: It is great that you do some coding. I hope I didn't discourage you. Don't be, it is TheNewBoston's fault. Wink
You will go your way and get better soon.

You pretty much covered it. I started learning through Bucky and all I can say is I'm glad I stopped after 30 videos, lol.

@OP, don't give up, ever. If you want to be a programmer then be one! It's just the TNB generally sucks for teaching programming because he usually learns the basics then afterwards learns himself as he teachers others. (my assumption as it seems, lol). Look around here and other places for sources you can read through and get the idea behind.

Reply

RE: [Java] My First Program #20
(02-23-2013, 09:17 AM)Jacob Wrote: @OP, don't give up, ever. If you want to be a programmer then be one! It's just the TNB generally sucks for teaching programming because he usually learns the basics then afterwards learns himself as he teachers others. (my assumption as it seems, lol). Look around here and other places for sources you can read through and get the idea behind.
Well Said, He's totally right!
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply







Users browsing this thread: 1 Guest(s)