...

View Full Version : Need help with first step



Genie1
06-18-2007, 02:21 PM
Can some one here tell me where i should start from for example i am learning Java, should i stop it and go to C++ as alot people are saying that is the best thing to learn first?

Also if you are not experianced programmers, can you tell me your views on what worked best for you?

Thank you

Genie
Have a good day

ghostdog74
06-18-2007, 03:24 PM
Can some one here tell me where i should start from for example i am learning Java, should i stop it and go to C++ as alot people are saying that is the best thing to learn first?

Also if you are not experianced programmers, can you tell me your views on what worked best for you?

Thank you

Genie
Have a good day

And if you are learning C++ halfway, and you heard a lot of people say Python is the best thing to learn first, or Perl is the best thing to learn first, or blah blah...are you going to stop C++ and jump ship without acquiring even half of the C++ knowledge that you should have had?

So my suggestion is, stick with what you are doing now. Learn to the fullest of what Java can offer you. And after that, if you feel invincible and can concur even more, you can start to learn other languages.

Genie1
06-18-2007, 04:51 PM
Thank you for your time and your reply, i understand completely what you are saying and agree with it.
If you or anyone else give me some answers on these questions, would be nice

1. what do people mean by "Object-oriented" what is that?

2. what has been made with Java which is very usefull and is it worth learning Java?

Thank you
Have a good day

ghell
06-18-2007, 09:16 PM
If you are learning to program, particularly with object orientation, java lays it out quite nicely. C++ has a few more pitfalls that you dont have to worry about in java such as memory management and pointers. I think learning java first is a good idea because it is well structured and pretty academic, but i know people who have learned java first and prefer python because you can be a little lazier when writing things. C++ has the advantage of having good performance when run. If you want to get into programming you will probably need a few languages to suit any task. Once you have learned one, the rest get easier.

Object orientation is just coding real world objects, with their attributes and behaviour, then using them. It can neaten code a lot and let you reuse code because of similarities between certain objects, you only have to write the code that makes them different.

For example a car and a truck both have wheels, mirrors and can move around. There is no sense writing all of this twice so you just write it once for one and then write the differences for the other (a truck will have more wheels and behave a little differently). They are both types of vehicle so you put everything that a vehicle is, has and does in a vehicle class then derive cars, trucks, trains, planes etc by adding what makes them different from any old vehicle. Now whenever you need to write some code that handles any vehicles movement, you already have a representation of a vehicle to use and dont have to rewrite it. The exact same code could be used in a racing game, a first person shooter, a driving simulation for learner drivers.. etc, because you have (in theory) completely captured the object in the code. You dont need a different class for every single possibility. For example you could have a class for car, then an attribute of that car would be its colour. You dont need a bluecar class and a redcar class.

the easiest way of getting a grip on object oriented programming (OOP) is to try using it.

Again, java flows quite nicely with object orientation. Classes that are too abstract to actually use are given the keyword abstract, when you extend something's functionality into a subclass, you give it the keyword extends followed by the superclass etc.

it career
06-20-2007, 08:31 AM
It depends on what kind of project you will be working, for distributive stuffs java is far better than C++

Mhtml
06-20-2007, 06:24 PM
2. what has been made with Java which is very usefull and is it worth learning Java? - Nothing. J/k - obviously you know where I stand on the subject.

I typically find that people who program in Java don't fully understand how to program properly in C++. People like to say that Java is more portable:


It depends on what kind of project you will be working, for distributive stuffs java is far better than C++

I mean, truly - since when?

It all depends on what you want to do. If you're looking to write high performance software (3d games for example), C++ is the way to go without a doubt. If you need to knock something simple and dialog based and you haven't discovered the beauty of WxWidgets or similar - go for Java.

I recommend starting with Java, it's a lot higher level than C++ so if you don't understand a lot of how programming, processors and the underlying APIs work you won't have such a hard time.

Spookster
06-20-2007, 07:51 PM
I would also have to say that Java is a good starting language especially for learning OOP. Just keep in mind that each langugage has it's purpose. Although one language might work well for the task at hand it doesn't mean it will be the best choice for every task.

Also if your intent is to learn how to program try not to focus on the language so much. Learn the concepts. Once you learn the concepts of programming you can apply it to other languages. The programming language is a tool just like a screwdriver for example. You know that a screwdriver is for turning screws and in general you know the concept of what the screwdriver is for no matter which screwdriver you use. The same holds true for programming languages. You know there are many different languages but if you know the concepts in general you can apply those concepts to many different languages.

Mhtml
06-21-2007, 07:37 PM
Also if your intent is to learn how to program try not to focus on the language so much. Learn the concepts. Once you learn the concepts of programming you can apply it to other languages. The programming language is a tool just like a screwdriver for example. You know that a screwdriver is for turning screws and in general you know the concept of what the screwdriver is for no matter which screwdriver you use. The same holds true for programming languages. You know there are many different languages but if you know the concepts in general you can apply those concepts to many different languages.I couldn't agree more, well said. Once you know you understand the fundamentals you can jump into almost any language without much more than a few hours studying the specifics.

Spookster
06-21-2007, 08:08 PM
I couldn't agree more, well said. Once you know you understand the fundamentals you can jump into almost any language without much more than a few hours studying the specifics.

I think that's the key to becoming a very good programmer. All you need to know is the basics of the language and anything beyond that you can just use reference books to look things up. No need to memorize everything about it.

oracleguy
06-21-2007, 08:38 PM
- Nothing. J/k - obviously you know where I stand on the subject.

I typically find that people who program in Java don't fully understand how to program properly in C++. People like to say that Java is more portable:



I mean, truly - since when?

It all depends on what you want to do. If you're looking to write high performance software (3d games for example), C++ is the way to go without a doubt. If you need to knock something simple and dialog based and you haven't discovered the beauty of WxWidgets or similar - go for Java.

Quite true, I've written several C++ programs on Windows that were easily cross compiled under Linux. And for GUIs, wxWidgets makes it easy to make it portable.

ghell
06-21-2007, 11:57 PM
Well I wouldn't say that java is only for those who haven't discovered wxWidgets. Each popular language has its pros and cons. If C++ was the only one worth learning, all the rest would have died out.

The first bittorrent client was written in python, azureus is one of the most popular clients and it is written in java with swt, a lot are written in C++.

Mobile phones often use java for their games etc.

Just don't learn C++ and then expect to be able to write Haskell or something :)

oracleguy
06-22-2007, 12:44 AM
Well I wouldn't say that java is only for those who haven't discovered wxWidgets. Each popular language has its pros and cons. If C++ was the only one worth learning, all the rest would have died out.

The first bittorrent client was written in python, azureus is one of the most popular clients and it is written in java with swt, a lot are written in C++.

Mobile phones often use java for their games etc.

Just don't learn C++ and then expect to be able to write Haskell or something :)

I never said that much; I was just agreeing that it is a misconception that Java is the language to use if you want to have a wide distribution of your program.

Mhtml
06-25-2007, 09:54 AM
Well I wouldn't say that java is only for those who haven't discovered wxWidgets.

I was trying more to make the point that a well written C++ program is easily very portable. If you are wanting portability than you can't write garbage code, so it also enforces decent programming practices - generally.

ghell
06-26-2007, 10:35 AM
In my opinion, the biggest problem with C++ is MSVC :p Seems a lot of people learn C++ with it and then can't write portable code afterwards.

They should make it easier to get eclipse working with mingw and cdt. Even after you have it working it blasts you with messages about cygwin all the time (unless you use cygwin + gcc, then it blasts you with messages about mingw I think) and constantly asks you questions like which debugger to use. I find it quite hard to convince people to switch to eclipse, cdt and mingw on windows because its just too much hassle getting it all working. Visual Studio works out the box so it's all they want to use (I'm including Express and copies free from MS Academic Alliance so money isn't always an issue). I like Visual Studio for C# and ASP.NET though :p



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum