Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 05-15-2009, 07:26 AM   #31
Solid State Member
 
NeedlessNeedles's Avatar
 
Join Date: May 2009
Posts: 8
Default Re: Where and How to learn Java and/or C++.

Quote:
Originally Posted by Sr.FattsAlot View Post
The Library is a good place, besides online, to go if you're just begining programing.
Nicly said.
__________________

NeedlessNeedles is offline   Reply With Quote
Old 08-29-2009, 06:51 PM   #32
Fully Optimized
 
eslfish's Avatar
 
Join Date: Sep 2008
Posts: 1,604
Send a message via AIM to eslfish Send a message via MSN to eslfish Send a message via Yahoo to eslfish
Default Re: Where and How to learn Java and/or C++.

One day I want to learn Java and C++ but I hate reading...oh one day my laziness will come to an end.
__________________

__________________
XFIRE: Lindmando STEAM: Lindmando
Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz (2 CPUs), ~3.0GHz
4094MB RAM 500 GB HD ATI Radeon™ HD 5850 8800 GT
Windows 7 64-bit Ultimate
eslfish is offline   Reply With Quote
Old 08-29-2009, 06:55 PM   #33
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Where and How to learn Java and/or C++.

Quote:
this is a good page to learn programing www.learn-programming.za.net it includes java, c++, pascal, d, c, c#, and vb and very well wrote instructions how to use and learn those programming languages
Very well wrote instructions? Hmm... that sets the tone correctly!

Sorry, but I'm going to pick the above apart a bit as an example of the type of guide that's the sort I WOULDN'T follow because it's not well written and most information in it is just wrong and/or confusing. Just on the first page:

Quote:
All class names must start with a capital letter.
No they don't. They SHOULD do, but they don't have to, there's no compiler rule enforcing it like it seems to be implying here - this is a very big difference and should really be explained!

Quote:
static means that it is unique.
Nonsense. Static means that a member belongs to a class, not instances of that class (objects.) Nothing to do with being unique in the slightest. Jumping over to the C# tutorial, we've got a completely different explanation for a static method (also utter tosh!)
Quote:
static means that the function must stay in memory.
Static CLASSES stay in memory for the lifetime of the application, but this isn't what we're talking about here, and anyway - this is a side product determined by the way the class loader works, not the reason for using it in the first place.

Quote:
The semi-colon is used to show that it is the end of your line of code. You must put semi-colons after every line like this.
Again, confusing at best and plain wrong at worst. Put a semi colon after something like:

Code:
for(int i=0 ; i<10 ; i++);
...and the compiler will let it through fine, the loop that's executed will just be blank - and the likely block of code following it will have nothing to do with the loop. You can't just say you need to put semi colons after every line of code!

Page 2 is even worse.
Quote:
There are 3 different types of data that can be stored in variables.
Rubbish. There's endless different object types that can be stored. There's a huge amount in the API, and since you can write your own... how does that make 3?

...it then goes on to give a table of the full primitive types (which is NOT the way to start someone off, that's just confusing and unnecessary not clever) and if that wasn't bad enough, it mixes String in the same table which is not a primitive type at all, and VERY different from the others. This is one of the key fundamentals of OO programming (and therefore Java) and should be explained at this stage pretty thoroughly. There's also no talk about the accuracy differences between float and double, which are arguably far more important than the range differences. And that's before it gets into the bulk of what the page is trying to say...

We've then got examples of code like this:
Code:
int myInteger;
      myInteger = 5;
I mean, what is the point?

Oh and I completely disagree with your examples of a constant - if someone told me to declare a constant that'd mean putting a static final field in a class, not declaring a local variable final. Yes, there are times when you should make local variables final, but your example isn't what most people would think of when they hear the term.

I had a bit more of a browse - I'm afraid it's pretty much all bad, but the "data type and input conversions" page really did make me laugh.

Quote:
To read a single character from the user you must use the System.in.read() method. This will return and integer value of the key pressed which must be converted to a character. We use (char) in front of System.in.read() to convert the integer to a character. After the user has pressed the key they must press enter and we must put a second System.in.read() to catch this second key press.
Code:
public class ReadChar
{
   public static void main(String[] args) throws Exception
   {
      char c;
      System.out.println("Enter a character");
      c = (char)System.in.read();
      System.in.read();
      System.out.println("You entered " + c);
   }
}
You will see that it says "throws Exception" at the end of the main method declaration. An exception is an error and "throws Exception" tells java to pass the error to the operating system for handling. Your program will not compile if you don't put this in.
First off, what's the point of declaring the variable separate from instantiating it in the above example? Secondly, your "throws Exception" explanation clearly shows you've got no knowledge of what exception is being thrown (it's an IOException, just putting that would've been far better) and probably no knowledge of try / catch blocks. You should only use the throws clause when you're actually developing a method that legitimately should throw an exception - not just tagging it onto everything when the compiler complains.

Lastly on this point, I was wondering why on earth we're dealing with individual character input instead of strings. I've been programming in Java in one form or another extensively for some years now and I can still count the number of times I've felt the need to do that as oppose to string input on one hand. Then I saw the next title, "reading strings." Then I saw we were using JOptionPanes and then it hit me - the author probably doesn't know!! True the initialisation code is relatively complex for a beginner:
Code:
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
...but that's no excuse to suddenly start talking about swing stuff. Perhaps provide a helper class, or even just a method until the student understands the above?

Oh, and stuff like this:
Code:
import javax.swing.*;
Really bugs me, especially for beginners. That's not good practice, you should be much more specific about what you're importing.
Stuff like this:
Code:
      if (i == 5)
         System.out.println("i is equal to 5");
      else
         System.out.println("i is not equal to 5");
Also really bugs me - again while it works, it's bad practice and not something that should be taught as an acceptable method of layout.

Oh and as an object oriented language, the whole point of Java is that you use it to create, um, objects and work with them. I didn't dare look at that page, but not covering it until the second to last topic in the tutorial is really missing the point somewhat. Your whole approach is wrong on that front.

I'm going to stop there (there's LOTS more wrong with it I could talk about) but in short this is one of the worst tutorials I've seen written on Java... I didn't dare look at the others. It's precisely the reason why I advise against googling for random tutorials online when you want to learn a programming language, and recommend going with trusted sources or reading a good book instead.


I'm sure it won't be, but said tutorials really need to be taken offline until the author can go away and learn how to program properly, then rewrite the whole thing. I entirely accept people make mistakes every so often, but this isn't a mistype or 2, it's misleading and clearly written by someone with a very poor understanding of the subject. And even if the content was correct, there's no exercises to work through, nothing we're working towards - just a whole load of stuff cobbled together. Whilst I genuinely applaud the enthusiasm shown for teaching others and passing on knowledge, this needs to be done in a correct and logical manner - either properly, making sure you know your material thoroughly or not at all.
berry120 is offline   Reply With Quote
Old 09-01-2009, 01:17 PM   #34
Beta Member
 
Join Date: Aug 2009
Posts: 3
Default Re: Where and How to learn Java and/or C++.

i want to lurn about computer leaguages
Hamzi is offline   Reply With Quote
Old 09-04-2009, 10:34 PM   #35
Beta Member
 
B.M.A's Avatar
 
Join Date: Sep 2009
Posts: 1
Default Re: Where and How to learn Java and/or C++.

Did you hear about the Sun Academic Initiative for students? I am doing a course in J2SE, J2EE and J2ME with them and I must say that it is one of the best. It's online and you have at your disposal hundreds of lessons. If your university has signed a collaboration agreement with SUN I can tell you are lucky and you have to take advantage of it.
B.M.A is offline   Reply With Quote
Old 11-23-2009, 07:45 AM   #36
Beta Member
 
Join Date: Sep 2008
Posts: 3
Send a message via MSN to Tareq Diab Send a message via Yahoo to Tareq Diab
Thumbs up Re: Where and How to learn Java and/or C++.

GREAT !!!!!
thank u so much
Tareq Diab is offline   Reply With Quote
Old 12-23-2009, 01:21 PM   #37
Baseband Member
 
thevil1's Avatar
 
Join Date: Dec 2009
Posts: 36
Default Re: Where and How to learn Java and/or C++.

Quote:
Originally Posted by Mal View Post
The C++ compiler I use isn't a hugely common one, but it is one of the few that are available freely for download and are updated with useful features, and it is called Dev C++.
A lot of schools use it to teach with.
__________________
An optimist is someone who falls off the Empire State Building, and after 50 floors says, ''So far so good!''
thevil1 is offline   Reply With Quote
Old 12-23-2009, 01:40 PM   #38
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Where and How to learn Java and/or C++.

Just to correct the above to avoid confusion, Dev C++ is actually an IDE, not a compiler. There's a huge difference! It uses MinGW as its compiler, which is the windows port of the standard GCC compilation used on unix (GCC really is the de-facto standard in terms of C/C++ compilation.)

What's the difference between a compiler and an IDE then?

An IDE (integrated develoment environment) is an application you use to write your code. It usually comprises of an editor with code highlighting, panes to manage all your source files and sometimes things like refactoring options. It also usually includes functionality to call a compiler externally and sometimes it includes other things like chat functionality, code libraries - that sort of thing.

A compiler on the other hand is usually just a tiny command line program. You pass it a plain text file (which is your source code) and it compiles your code, giving you a machine executable program to run.
berry120 is offline   Reply With Quote
Old 02-14-2010, 05:20 AM   #39
In Runtime
 
samueleen's Avatar
 
Join Date: Feb 2010
Posts: 127
Send a message via MSN to samueleen
Default Re: Where and How to learn Java and/or C++.

http://math.hws.edu/javanotes/

That was really really helpful

Thanx
samueleen is offline   Reply With Quote
Old 02-26-2010, 01:20 AM   #40
Solid State Member
 
Join Date: Feb 2010
Posts: 15
Default Re: Where and How to learn Java and/or C++.

Through books you can understand
__________________

rosyolivia is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0