Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
10-24-2005, 04:41 PM
|
#16
|
|
Member
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340
Rep:
|
In my opinion, beginners should be less focused on trying to write games or GUI's, and alot more focused on learning to program. Its a little dry at times, and you might not see the need for learning about arrays, strings, control structures and loop constructs, but they're all very important subjects, much more important in my opinion than learning one languages implementation of a GUI rendering library, or "object oriented" principles. OO has its place, but learning to program is much more important than learning to program in a particular style.
For example, the Bash programming HOWTO's might be a little dry and boring to the beginner, so they'll often say "forget this, this isn't what I want, I want to learn how to write games". So they go out and buy a game programming book or something, and in the end it just flies right over their head. If they only realized that all the pieces start to fit together after a certain amount of time, and the boring stuff gets much more exciting, they could become better programmers much much faster. Heck they could even become better game and GUI programmers much much faster. But if you rush into it, without knowing the complexities of your language (for instance, pointers to pointers in C, function pointers, data types), the experience you get from writing those games or GUI's will be minimal.
So I say it doesn't even matter which language you start with, just pick any decent language and learn the guts of it. Bash is an excellent choice, because you'll become a more efficient shell user while in the processing of learning programming.
Last edited by lowpro2k3; 10-24-2005 at 04:45 PM.
|
|
|
|
10-24-2005, 06:55 PM
|
#17
|
|
Member
Registered: Jul 2005
Distribution: ubuntu5.04, ubuntu5.10, suse9.3, mandrake10.1, mandriva2006(beta), FC1-4, redhat9.0, debian sarge
Posts: 519
Original Poster
Rep:
|
i have started dabbling in C and to tell the truth i dont expect to beable to write my own program for a long while ive been pretty much using the book as i go along to learn what each "command" does like take "printf" it prints what you put in the "". i am learning i just dont see myself being able to think of a whole program myself maybe after i learn it more ill take a simple source code and change it to be "mine" i figure thats the best place to start
|
|
|
|
10-24-2005, 07:33 PM
|
#18
|
|
Member
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987
Rep:
|
I feel alot like you. I also started with C, following examples in a book. I got bored and frustrated(hard to understand) with it. I later wanted to automate a small task, so i got a book on bash shell scripting. I liked the fact I could do so much with a few lines of code.
Since then I have started with python. I have written some really useful stuff with python: a simple gui program that generates random sentences for my six year old, using words he already learned in school, I wrote a program that searches mininova.org and automatically downloads torrents of tv shows I watch. I have also done many short little scripts the copy and rename stuff. Python is great :-) here is a short little piece someone wrote about using python as a first language
http://www.greenteapress.com/thinkpy.../foreword.html
|
|
|
|
10-24-2005, 08:47 PM
|
#19
|
|
Member
Registered: Feb 2004
Posts: 140
Rep:
|
I think the 1st thing to do is think of a project. Then choose a language.
|
|
|
|
10-25-2005, 01:30 AM
|
#20
|
|
Member
Registered: Jun 2005
Location: Pretoria, South Africa
Distribution: Ubuntu, Fedora Core, RHEL
Posts: 37
Rep:
|
Quote:
Originally posted by lowpro2k3
In my opinion, beginners should be less focused on trying to write games or GUI's, and alot more focused on learning to program. Its a little dry at times, and you might not see the need for learning about arrays, strings, control structures and loop constructs, but they're all very important subjects, much more important in my opinion than learning one languages implementation of a GUI rendering library, or "object oriented" principles. OO has its place, but learning to program is much more important than learning to program in a particular style.
|
Agreed. I am not suggesting that a person start by programming a game or GUI. After all most introductions to a language come in the form of printing a line to a screen such as the infamous "Hello World". Then you have to learn all the basic control structures, etc. As you get more profficient you learn the nuances of the language you are working in for example exceptions and templates in C++. I have found that one also builds up a data base of resources (I have been writing simulation code in C++ for quite a while now but only started using this forum recently). Once you have become fairly profficient in a language then consider making your hello world jump around in 3d in your own custom gui...
|
|
|
|
10-25-2005, 01:45 AM
|
#21
|
|
LQ Newbie
Registered: Jan 2004
Distribution: Fedora
Posts: 28
Rep:
|
McGrew: Java has been extended with a lot of classes since you last used it:
Code:
import java.util.Scanner;
Scanner sc = new Scanner(System.in);
String s = sc.next();
That one was added for everyone who feels that input from a terminal is important enough to require a "quick" syntax. Java's huge class library is great to get to know. I've used a lot of languages, but I return to Java when I'm trying something I haven't done before. Especially Collections is great, and now they are generic as well.
|
|
|
|
10-25-2005, 03:03 AM
|
#22
|
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
I'd say python is really good for beginners. It syntax is simple and you can start writing complex programs after a short learning curve.
|
|
|
|
10-26-2005, 01:39 AM
|
#23
|
|
Member
Registered: Jun 2005
Posts: 542
Rep:
|
C isn't really hard. If you're new to programming, maybe the book if the book concentrates more on the language rather than programming. Pascal is good in the sense that it's more pseudo-code alike than any other but it's outdated. I started with it and then the transition to C wasn't that hard because of the similarity of concepts (modular programming) and syntax. Start right from the first example to write your own programs and keep them with you. I have used C for everything I've done and I haven't learned C++ yet because I haven't felt the need. I flirted with OOP just some time because the theory catched my atention, but it isn't that great and I could implement many object-like ideas in C (and they're possible even with Pascal!). Pointers to functions in a structure is the most classic, and at the same time the encapsulation can be the same thing. The remaining features of C++ that I seen are most language-oriented, but languages aren't ends in themselves: they should be used. With C you can almost re-invent pascal with #define's and typedef's. I don't like perl too much (it's a write-only language as R.W. Stevens himself said, it's impossible to read), nor I like Java nor python because they're too slow, but they come handy for portability sometimes. I've seen crypto libraries rewritten in these languages when there's no need. Why not just link to the tried & tested libraries available? Another feature from C & C++ is that you can plug in assembler. This code may be as 3-4 times faster.
|
|
|
|
10-27-2005, 01:10 AM
|
#24
|
|
LQ Newbie
Registered: Jan 2004
Distribution: Fedora
Posts: 28
Rep:
|
I'd avoid C as a beginning language. There are a lot of traps, and you could pick up bad habits. Also, manual memory management (malloc/free) is just plain hard, even experts get it wrong sometimes, and then they need days, if not weeks, to track down the errors.
The newest Java, 1.5, is smoking fast, and there is an experimental partial-evaluating JIT-compiler which apparently makes python really fast too, at the cost of memory usage. (I can't remember it's name, but I read about in when looking up Bram Cohen's versioning system)
If any language can give you good habits, it's java. Although if you feel you can pick up this object-orientation stuff easily enough later on, I might recommend the language scheme and the book "Structure and Interpretation of Computer Programs". Learning programming from the functional/mathematical way has suited many clever people.
|
|
|
|
10-27-2005, 04:12 AM
|
#25
|
|
LQ Newbie
Registered: Oct 2005
Posts: 16
Rep:
|
Hi..
To be a programmer you should have the basic knowledge of coding. You can start with C language. Don't expect to become well versed in any language as soon as you start.
After getting an over all view, you can move to Java, C++, .NET or PHP as your work demands. The basic for web designing is HTML.
All the Best
|
|
|
|
All times are GMT -5. The time now is 06:02 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|