LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Requirement for Beginners (https://www.linuxquestions.org/questions/programming-9/requirement-for-beginners-44194/)

jcornel7 02-05-2003 11:46 AM

Requirement for Beginners
 
OK After some advice from others...it has been recommended that I learn C before Java as a complete rookie to programming. Now that I know that...What do i need softwarewise on my linux box to start learning. Is thier an IDE? Sorry for all the dumb questions.

GtkUser 02-05-2003 11:54 AM

Type: whereis gcc

If you get a path as a result than you have gcc installed. That's the compiler to use. As far as editors go, I use emacs. I type in: emacs filename.c

To exit emacs and save the file: Hold down ctrl -> press x -> press s -> press x ->press c

To exit without saving: Hold down ctrl -> press x -> press c

To make the font bigger: Hold down shift -> press and hold left mouse button (it brings up the menu).

To compile your source code, say you named it prog.c
type: gcc prog.c

Than to run the application type:
./a.out

crabboy 02-05-2003 12:03 PM

I think you got some bad advise. Learn Java dude. Don't get me wrong, I Iike programming in C much better, but as a first programming language and if you're out to make any money, Java offers more.

As for a C/C++ IDE, I just use vi, but I've used Anjuta once or twice before and it's ok.

GtkUser 02-05-2003 12:27 PM

Corporations llike to use Java because they can find specialization of information needs though massive (hopefully generic) vendor middleware framework libraries and not have to do their own research and development. They can also preserve their solution applications through changes in the system architecture. If you are out to get a job as a programmer in a company that does not sell software, than middleware is popular (java or .net). On the other hand, C and C++ are the the most powerful system implementation langauges. They are used at the level of the software and hardware architecture.

corn 02-05-2003 12:47 PM

Also you must know how to program sequentially in order to make objects in object oriented software... objects are base on sequential code..
C is a good language to start with... but id suggest a more recent language since C is pretty near assembly languages with powerful but complex keywords. Go for C++ sequential coding :D

Dark_Helmet 02-05-2003 04:12 PM

Everybody has a personal preference toward this, and I'm not different. I would go standard C first. The reasons?

1) It's been out there for a long time and it's been analyzed to death. You can find snippets of code to do just about anything, and that's exactly what people learning code liek to do: take someone else's and poke/massage it. That's not to say you can't find code for other languages, but I believe C is the most prevalent.

2) Again, since it's been out there for so long, there are quite a number of books on the subject. I learned C using the "C By Dissection" textbook. It seemed to be pretty well designed for beginners.

3) You learn the fundamentals of programming without the complexities of object-oriented design to confuse you (inheritance, polymorphism, etc.). Those are powerful and very useful techniques, but I don't believe they're necessary for someone beginning to learn programming from the ground up.

4) After learning C, you can jump to C++ which, for me, was simply learning to "package" code differently. Then it's a short hop, skip, and jump to learn Java as it borrows heavily from C++.

If you're curious (and I know nobody is), my first language was Pascal. It is an excellent learning language because it is EXTREMELY "strongly typed". Unfortunately, the only people who use it are those that program in Delphi these days. C is much more flexible, but doesn't look over your shoulder so to speak.

moeminhtun 02-05-2003 07:54 PM

Quote:

Originally posted by crabboy
I think you got some bad advise. Learn Java dude. Don't get me wrong, I Iike programming in C much better, but as a first programming language and if you're out to make any money, Java offers more.


I'm the one who advice him to learn C first. It is not bad advice moderator.
I'm a Java programmer and I like programming in Java much better.
I'm not talking about the making money. I'm talking about the most suitable language for the absolute beginners. I've seen a lot of beginners who start learning the programming in Java and have got a lot of trouble. How can they learn the object-oriented concepts before they don't know what the programming is like and feel quite confortable with it? Java is not like C++. It's purely object-oriented. If you learn Java, you can't avoid objects.

I'm not saying that it can't be start with Java. Yes you can start with Java if you want. But you won't have fun at first. And you won't know what is going on. Why? See this,

System.out.println("hello");

You cannot avoid objects just to print a line in Java. How can you explain the above object-oriented concept to the beginners? You have no choice but to tell them memorize by hard at first. Things are not clear and how can they get fun? I didn't get fun with Java until I become very clear about the object-oriented concepts.

In C, it's very clear,

printf("hello");

They can get much fun with it and mush easier to play around in the beginning.
I'm not saying that you should learn C until you become an expert. I'm just saying that you should learn C first until you are quite confortable with the programming and have quite fun with it. Then you may move on to any other object-oriented languages.

(All i'm saying is the same as the fact "Dark_Helmet" pointed out at No.(3) in the above post)

log 02-05-2003 08:17 PM

Id say that java is easier to learn at first, But thats what i learnt first (well, actually, i learnt VB first....hmm, M$ flames coming on...)

Anyway, Java is a "nice" language with a good design, thats the main reason I like it. I guess it depends what you want to do with the language, or maybee you need to know both. In that case, id take C++ first.

moeminhtun 02-05-2003 08:32 PM

Yes. Java is the easiest language and very well designed. But as I said earlier, it's not suitable for thouse who's never programmed before. You shoud consider to move on to Java after you become quite confortable with C. Anyway, you have nothing to loose. All the C syntax and basic programming concepts are the same as Java's and C++'s.

moeminhtun 02-05-2003 09:19 PM

Ok. Here it is. This is the standard way to receive a string from the user and print it back on screen in Java. You can see that it is very much object-oriented. There is no simpler way other than this. Compare this with the C code doing the same. How should a beginner who's never programmed before start learning programming with this code and objects?

try {
String in = (new BufferedReader(new InputStreamReader(System.in))).readLine();
System.out.println("your input: " + in.toString());
} catch (IOException e) {
e.printStackTrace();
}

jhorvath 02-05-2003 10:28 PM

i think C is pretty easy to learn...

assuming that you are dead serious about programming, you could learn the basics of C and structured programming in general in a few months...(lot's of reading and experimenting)...more advanced stuff may take awhile, not to understand concepts, but to implement what you learned in a precise manner (you can do anything sloppily and it'll work 'most' of the time)...

it seems though that a starting language has a lot to do with preference. people understand and look at things differently. think about what your 'goal' is with learning a language, find the easiest way to fully understand how to reach that goal and go from there.

i have this thing for video games, playing them, rules....but the thought of developing one of my own some day KICKS A$$ :)

which ever one you pick...just have fun.

i know i will

thanhnx 02-07-2003 07:11 AM

hey, hey.
You seem to digress out of the question ah?
In my opinion, there is no better or easier language here. A language chosen have to suit with the work we do. For example, when you do the low level program (ie program for an IC), the suit language is ASM or somewhat like that. ok
I've done both Java and C (unfortunatedly, not in Linux). Each of them interests me as its distinctive character.
It'd better to introduce the free useful tutorial documents to program in Linux.
Could you do that for me. thanks

JStew 02-08-2003 09:35 AM

C, C++, Then Java... also, it doesnt hurt to play around with VB or Delphi while you're doing all this. Forget all about the macho which compiler, platform, os roolZ garbage (gcc vs m$ vs borland vs sun) if you're wanting to get into programming professionally. Different companies for whatever reason they choose use whichever they think is best. This usually isn't up to the programmer until you're in charge of the department, then that becomes a different situation.

C is a good low level language still used for low level stuff (then again, so are other languages), C++ will introduce OOP (which once you learn it helps a lot and makes things simpler and run smoother), Java is a different revamped C++. C# is Microsoft's version of Java -- funny how they got pissed at sun for not wanting anyone to change source, but I digress. Once you get a good idea about these, trying learning other new and improved languages are a breeze.

Try to learn how your operating system works concerning system calls. Programs are usually not useful without disk I/O or getting the system to do what you want it to do. And... always... ask questions about the simplest stupidest things no matter how bad you get flamed. People that flame are having a bad day or have personal problems.

Good luck, bro.

JStew 02-08-2003 09:37 AM

See... I just flamed.... I flamed the flamers heh


All times are GMT -5. The time now is 01:48 PM.