ProgrammingThis 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.
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.
not really sure what you mean by 'online'. sure, you can read references and write programs on your computer at your own pace--or even do online courses.
theres not really such thing as a single source (unless maybe 'the internet' as a whole). what i mean by this is that even if you go study this, or any other topic, you will have to seek another reference, at one time or another, opposed to an instructor or single text book.
also one cant really say whats the most useful programming language, which is a pretty heated topic. every programming language is made for a purpose (of course), and each one has its ups and downs. there are websites that collect data from surveys to give an idea of how popular/used one is, though.
to recommend a language to start with, there are some factors, such as: your current knowledge of 'programming'/design/abstraction, the level of knowledge your seeking to learn, etc. for example, if you want to just start making pretty programs, an open source 'Visual Basic'-like language may be suggested. if you want to start off from the very ground up, you could try assembler language. a few levels up from assembly would be C, i think. if you want to start programming with OOP, i would recommend C++ or Java.
of course my opinion is biased towards the languages i know, and is personal preference. there are easily hundreds, if not thousands, of languages, so my scope is very limited.
Yeah, choose a language you'd like to start with first (it REALLY doesn't matter that much ). I'll suggest Python (or Ruby or VB work too), since you can start with a structured approach, then learn object orientated programming (OOP) later, all in the same language. They'll all also let you program some pretty nifty programs fairly quickly. Now search for some beginners tutorials in whatever language you chose. You'll probably go through a few of these. You'll find other stuff to read while you're doing this.
As nadroj said though, there is no one, most useful language. The ones I suggested are just my personal suggestion. On another day I may even have suggested something else, like C. Point is, the language doesn't matter so much.
My first program was eight lines long, took me six months to write and had a bug in it.
The way that I learned was simple: I wrote stuff. Sub-war, space-war, all those very-fun games you write for a 24x80 video terminal that only had upper-case characters and no backspace.
I've gotten somewhat better at it since then, of course, but "the way to learn how to do it is to do it."
And here's why: the hard part of programming is not the syntax of a particular language or tool! It's how to think procedurally. For example, what's the bug in this program?
Code:
10 REM CROSS-THE-ROAD
20 IF <THERE IS A CAR WITHIN 50 FEET> THEN GOTO 20
30 <CROSS-THE-ROAD>
40 END
(It's all com-in' back to me now-w-w-w-w...)
What's the bug?
Answer: a parked car.
(In revision 2.0 the robot crossed the road and got smooshed: there was a parked-car within 35 feet, which was ignored, so the robot stepped right out into traffic...)
(In revision 3.0 the robot was destroyed by a two-way street.)
(In revision 4.0 the robot failed when placed at an intersection, because it considered both directions and therefore hung.)
(In revision 5.0 an error was found in the "cross the street" algorithm at that intersection, as the robot attempted to cross diagonally.)
(In revision 6.0 the entire Windows-based system was replaced by Linux, which has worked flawlessly ever since. The robot now simply rides in an elegant rickshaw pulled by four intelligent penguins.)
Last edited by sundialsvcs; 05-23-2008 at 08:25 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.