LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Similar question about programming languages (https://www.linuxquestions.org/questions/linux-software-2/similar-question-about-programming-languages-748786/)

xiqtem 08-19-2009 01:08 PM

Similar question about programming languages
 
As a teen around 20 years ago I used QBASIC to write small programs and have fun. Now as an adult I am way way WAY behind the rest of the world as far as my programming knowledge goes. I would like a language that is easy to pick up with lots of tutorials, how-to's, and examples. I would also like what I learn to not be wasted. I would like to have the beginning knowledge be relevant to a more powerful and complete language. I hope I don't sound to naive or ignorant here, but alas that's what I am at this point. Thanks in advance.

johnsfine 08-19-2009 01:20 PM

I think Java is the best fit based on what you described.

As you seem to understand already, the quality of available tutorials is a big factor beyond the inherent characteristics of the language.

I just did a google search for java tutorials and the results look very good, such as
http://www.freejavaguide.com/corejava1.htm
http://java.sun.com/docs/books/tutorial/
http://www.loirak.com/prog/java.php
http://www.javamex.com/tutorials/java/

Java has been criticized as a language because it requires more than a typical language amount of "boilerplate" meaning stuff a beginner has to put in a program before even starting to understand why it is there. That would only be a problem without good tutorials. With good tutorials you can copy the basic form of a simple program from the tutorial and change just the meaningful parts.

C++ is a more powerful and general purpose language than Java, but so far as I have found the tutorials aren't nearly as good. Java also leads into C++ fairly well as much of the syntax and many of the concepts are the same.

I think Python is too unstructured. That can feel a lot easier when you want to slap together a really trivial program. But that leads to a style of programming that can't scale up to serious projects. In theory you could write well structured code in Python that could scale up to serious projects. I'm sure many here will claim that is how they code Python and maybe it's true. I've never seen any well written large Python programs. I've done enhancements to big projects written in C++, Java, and Python and the Python code has been by far the worst and the abuses of good programming practice I've seen in Python code are things Java or C++ make almost impossible, so it isn't just a difference programmer skill. There is a real difference in what the language design encourages.

C is a very popular language on its own and as an introduction to C++. I think it is a poor choice compared to C++ for either of those purposes. The fundamental advantage of C over C++ is it makes much less work for the compiler. But that is insignificant with modern computers. The right subset of C++ would be easier to learn than C and more effective as a language. C++ also is easier than C to push to the limits of run time efficiency.

b0uncer 08-19-2009 01:23 PM

I'd vote for Python or C++, whichever is more "you". But it depends a lot on what you're going to do with the language..there are quite a few languages and they're all good, depending on which way you look at them.

salasi 08-19-2009 01:46 PM

I'm in the python camp as a good beginner's/easy/scripting programing language.

when you say 'powerful', i don't think that you'll easy find stuff that the languages like python (and Java, in this case) can't do.

There is certainly stuff like real time data capture for which the pythons and javas of this world aren't the obvious choices, so choosing a language like python, which is similar structurally to c++ is a good idea, so the step up to c++ isn't a massive leap.

chrism01 08-19-2009 07:31 PM

You could look at Perl; its easy to pickup and the lang docs here http://perldoc.perl.org/ explain everything with examples, as well has having many tutorials (see top left menu).
More tutorials http://www.perlmonks.org/?node=Tutorials
Runs on most OSes.

xiqtem 08-20-2009 12:04 AM

Thanks for your opinions.
 
Thank you all for your opinions. I was interested in programming small amusing programs for fun and entertainment just for me and maybe some of my friends. I don't know that I would be writing anything big, I just don't want to spend the time learning only to find out later that it would have been better spent with a different language. Is C++ something I can do for free? I am pretty sure java is.

mynameisflorian 08-20-2009 12:28 AM

I would suggest javascript. Think of it as a "stepping-stone". It's not the destination, but a stop along the way.

easy to learn
- All you need to get going is a text editor and a web browser.
- MANY MANY MANY free on-line guides and tutorials
- doesn't take long to learn enough to make something useful

It leads nicely into c, c++, or java.

To use javascript in a browser environment, you have to know a little HTML, but that's really easy stuff.

check out http://www.w3schools.com/
and, if you use windows, download notepad++ (I have to use it at work)

I recently picked up o'rielly's "Javascript: The Definitive Guide" -- and would recommend it.

I think skipping straight to c++ is like skipping algebra and going strait to calculus. You'll probably get it eventually, but you'll be much more confused along the way (unless you're some sort of genus, in which case you'd only be a little more confused)

- Florian

p.s. I learned c, then c++. I guess that's the old-fasioned way :-D

mynameisflorian 08-20-2009 12:30 AM

and yes, c++ is totally free, just like linux. I would get a good book, though -- no matter what your final choice is

johnsfine 08-20-2009 07:18 AM

Quote:

Originally Posted by xiqtem (Post 3650373)
Is C++ something I can do for free? I am pretty sure java is.

All the languages mentioned here are available free in Linux and in Windows. There are also non free versions available, but there is no significant advantage to buying a non free version.

Quote:

Originally Posted by mynameisflorian (Post 3650393)
I would get a good book, though -- no matter what your final choice is

To a large extent that depends on how you like to learn. I prefer to learn from online resources rather than from books. It also depends on what resources you can find each way.

When I was learning Python, I didn't find good enough online resources (which doesn't prove they don't exist) so I borrowed a book.

I work every day with advanced details of C++ that I don't always remember, and I haven't found great online resources, so I keep two books handy all the time:
The C++ Programming Language by Bjarne Stroustrup
The C++ Standard Library by Nicolai M. Josuttis
I don't think either is suitable for learning C++, but those two are quite good for reminding an advanced C++ programmer of forgotten details.

When learning Java (and later when I forget details) I used resources online at java.sun.com. It is hard to imagine a book being as convenient for that as the website is.

jschiwal 08-20-2009 07:28 AM

25 or 30 years ago, Pascal was the teaching language. I believe today that Python has taken it's place. I do miss Pascal however. What happened to it, and why didn't it's decedent Modula-2 take off?

brianL 08-20-2009 07:42 AM

Quote:

Originally Posted by jschiwal (Post 3650767)
25 or 30 years ago, Pascal was the teaching language. I believe today that Python has taken it's place. I do miss Pascal however. What happened to it, and why didn't it's decedent Modula-2 take off?

It's still alive, I think. There's GNU Pascal and Free Pascal compilers available.
http://www.freepascal.org/


All times are GMT -5. The time now is 10:03 AM.