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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
|
View Poll Results: The best languages?
|
|
PHP
|
  
|
23 |
18.40% |
|
Perl
|
  
|
33 |
26.40% |
|
Python
|
  
|
43 |
34.40% |
|
Ruby
|
  
|
13 |
10.40% |
|
C
|
  
|
86 |
68.80% |
|
C++
|
  
|
53 |
42.40% |
|
Java
|
  
|
37 |
29.60% |
|
Lisp
|
  
|
14 |
11.20% |
|
Erlang
|
  
|
4 |
3.20% |
|
Smalltalk
|
  
|
4 |
3.20% |
|
Haskell
|
  
|
9 |
7.20% |
|
C#
|
  
|
10 |
8.00% |
|
Lua
|
  
|
6 |
4.80% |
|
COBOL
|
  
|
3 |
2.40% |
|
Scheme
|
  
|
6 |
4.80% |
|
Go
|
  
|
1 |
0.80% |
|
Groovy
|
  
|
2 |
1.60% |
|
Fortran
|
  
|
10 |
8.00% |
|
R
|
  
|
6 |
4.80% |
 |
|
06-26-2010, 03:57 AM
|
#31
|
|
Member
Registered: Jun 2010
Distribution: Fedora
Posts: 289
Original Poster
Rep:
|
Quote:
|
Java is compiled (contentious, but I believe it is because you must run the *java compiler* to *compile your code* before you run it).
|
So are Python and Perl.
http://openbookproject.net/thinkcs/p...sh2e/ch01.html
http://perl.about.com/od/programming...pretedlang.htm
From http://docs.python.org/glossary.html:
Quote:
|
Python is an interpreted language, as opposed to a compiled one, though the distinction can be blurry because of the presence of the bytecode compiler. This means that source files can be run directly without explicitly creating an executable which is then run. Interpreted languages typically have a shorter development/debug cycle than compiled ones, though their programs generally also run more slowly.
|
The distinction is blurry, but they're compiled into bytecode first like Java... *shrugs*
http://www.computer-dictionary-onlin...7s%20dichotomy
Last edited by pr_deltoid; 06-30-2010 at 08:27 AM.
|
|
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
06-30-2010, 08:29 AM
|
#33
|
|
Senior Member
Registered: May 2005
Posts: 4,397
|
Quote:
Originally Posted by carmelapples
|
????
http://en.wikipedia.org/wiki/ColdFusion :
Quote:
|
ColdFusion is a commercial rapid application development platform invented by Jeremy and JJ Allaire in 1995. Originally designed to make it easier to connect simple HTML pages to a database, by version 2 it had become a full platform that included an IDE in addition to a full Scripting Language. Current versions of ColdFusion, sold by Adobe Systems, include advanced features for enterprise integration and development of rich internet applications. ColdFusion primarily competes with PHP and ASP.
|
|
|
|
|
06-30-2010, 08:45 AM
|
#34
|
|
Member
Registered: Jun 2010
Distribution: Fedora
Posts: 289
Original Poster
Rep:
|
ColdFusion doesn't seem very impressive to me... 
--------------------------------------------
"Java is compiled (contentious, but I believe it is because you must run the *java compiler* to *compile your code* before you run it)."
Right... I read some more about it and thought about it some more and I can see how the way Java does things would be better to a lot of people.
Last edited by pr_deltoid; 06-30-2010 at 08:51 AM.
|
|
|
|
06-30-2010, 08:58 AM
|
#35
|
|
Member
Registered: Aug 2006
Location: Pretoria, South Africa
Distribution: Linux Mint 13 Cinnamon
Posts: 66
Rep:
|
I personally see no reason to preferring C to C++ except that a lot of projects seem to choose C for some reason. Depends on what you want to work on.
Python and perl are both good, and bash is useful. Realising of course that this is just repeating what a lot of other people have said.
|
|
|
|
06-30-2010, 01:10 PM
|
#36
|
|
LQ Newbie
Registered: Jan 2008
Location: Cordoba, Argentina
Distribution: Fedora, SuSE, Ubuntu, Mandriva
Posts: 21
Rep:
|
C and Python: Great combination
Quote:
Originally Posted by prdeltoid
I'm voting for Python/C just as an "overall" opinion.
|
That is my choice also, based on my experience and current work.
If you learn C, learning other languages will be easy. Besides, C is perfect when you need efficiency.
Python is perfect for most of the tools I need to develop, specially because you can program VERY fast. It's great for fast prototyping also. Amazing for data manipulation, analysis and visualization. When efficiency is needed, I go back to C.
But of course, every language has its benefits and you should choose based on the project you are working on. The important thing is to know the basics, be a good programmer and then (with time) you'll probably end up using different languages.
|
|
|
|
06-30-2010, 11:44 PM
|
#37
|
|
LQ Newbie
Registered: Jul 2008
Posts: 1
Rep:
|
I think the de-facto language till date is C/C++
So I prefer to vote C/C++... 
|
|
|
|
07-01-2010, 12:22 AM
|
#38
|
|
Senior Member
Registered: May 2005
Posts: 4,397
|
Quote:
Originally Posted by ash_fds
I think the de-facto language till date is C/C++
So I prefer to vote C/C++... 
|
Write this:
Code:
sergei@amdam2:~/junk> cat -n replace_eval_demo.pl
1 #!/usr/bin/perl -w
2
3 my @input =
4 (
5 "one, two, three #####",
6 "hello, world @@@@@@",
7 "just a line"
8 );
9
10 foreach my $line(@input)
11 {
12 $line =~ s/^(.)([^\@\#]*)(\#|\@)*/uc($1).$2/e;
13 warn "\$line=$line";
14 }
sergei@amdam2:~/junk> ./replace_eval_demo.pl
$line=One, two, three at ./replace_eval_demo.pl line 13.
$line=Hello, world at ./replace_eval_demo.pl line 13.
$line=Just a line at ./replace_eval_demo.pl line 13.
sergei@amdam2:~/junk>
in C/C++, and then we'll see how much effort it took from you.
|
|
|
|
07-01-2010, 08:58 AM
|
#39
|
|
LQ Newbie
Registered: Jul 2010
Posts: 2
Rep:
|
ColdFusion
First off, ColdFusion is a web language used to build web based applications like php. My only point is that if your going to add a web based language to your list that you should at least add the best language of them all, ColdFusion.
Want to see some code examples? I'll show you how robust ColdFusion really is.
The PHP code below, will return the columns firstname, lastname from the Friends table.
<?php
//
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
$result = mysql_query("SELECT friendId,firstName,lastName,nickName FROM friends");
while($row = mysql_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
}
mysql_close($con);
?>
Now look at the Coldfusion Example
The ColdFusion code below, will return the columns firstname, lastname from the Friends table.
<cfquery name="getMyFriends" datasource="peter">
SELECT friendId,firstName,lastName,nickName
FROM friends
</cfquery>
<cfoutput query="getMyFriends">
#firstName# #lastName#
</cfoutput>
Isn't the ColdFusion code just so straight forward to the point and easy to read? Because ColdFusion requires 2 to 4 times less code, it enabled programmers to write applications 2 to 4 times the speed. Also it should be noted that I've written PHP longer than ColdFusion and I know both languages extremely well.
All I want is for ColdFusion to be added to this list, that's my vote. 
|
|
|
|
07-01-2010, 09:07 AM
|
#40
|
|
Member
Registered: Jun 2010
Distribution: Fedora
Posts: 289
Original Poster
Rep:
|
That is a real nice comparison. The main problem I have is your choosing it as your sole choice. I don't think many people would want to just learn ColdFusion and forget about everything else. I definitely wouldn't.
EDIT: I can't change the poll.  I would also add assembly, and a couple of others mentioned... like OCaml. A few others also.
Last edited by pr_deltoid; 07-02-2010 at 09:39 AM.
|
|
|
|
07-01-2010, 09:17 AM
|
#41
|
|
Member
Registered: Jun 2010
Distribution: Fedora
Posts: 289
Original Poster
Rep:
|
The more I think about it, my personal decision of C/Python sounds better and better to me. (Plus Bash/utilities). I don't know what my I.Q. is, but I definitely wouldn't say I'm below average intelligence. But learning about computers and programming and math has so far been a real hassle for me. I don't remember everything. I have to read it twice. I have to come back to it later on in a book or tutorial. Etc. For me, C/Python/Bash/utilities seems very balanced and not a bad combination at all. 
Last edited by pr_deltoid; 07-02-2010 at 04:03 AM.
|
|
|
|
07-01-2010, 09:36 AM
|
#42
|
|
Senior Member
Registered: May 2005
Posts: 4,397
|
Quote:
Originally Posted by paulalkema
...
Isn't the ColdFusion code just so straight forward to the point and easy to read? Because ColdFusion requires 2 to 4 times less code, it enabled programmers to write applications 2 to 4 times the speed. Also it should be noted that I've written PHP longer than ColdFusion and I know both languages extremely well.
...
|
A language controlled by single commercial entity - no, thank you.
|
|
|
|
07-01-2010, 10:04 AM
|
#43
|
|
LQ Newbie
Registered: Jul 2010
Posts: 2
Rep:
|
CF is not contolled by a single entity
Quote:
Originally Posted by Sergei Steshenko
A language controlled by single commercial entity - no, thank you.
|
Actually Sergei, there are several Open Source options for ColdFusion. Railo and BlueDragon are 2 I can think of off the top of my head. I am not familiar with Railo, so i cannot comment it, but BD is one that I beta'd and it is on par with the Adobe version, with the exception of the ability to integrate flash. BD actually drove some of the new features that were implemented in versions 8 and 9. Also, one of the other posters commented on people who do CF don;t learn other languages, which is not correct. CF is nicely intertwined with Java, so most CF'ers are also familiar with Java. You can actually use Java code directly in your CF code without having to compile it first. The most recent version, 9, allows for integration with other languages, like .NET, so you can utilize modules that were written in other languages in CF. This has been available since version 8. The integration with Java occurred in version 5 when they changed the underlying engine from C++ to Java.
I have been a CF developer since 1998. I have been using it since version 3-version 4.5. I find it to be the best web development language there is. Combine this with products like Adobe Air and you can do desktop apps as well. To stick with the discussion, I would say the combo of Java and Cf is the best and most efficient development language out there.
Eric
|
|
|
|
07-01-2010, 10:06 AM
|
#44
|
|
LQ Newbie
Registered: Jul 2010
Posts: 2
Rep:
|
Quote:
Originally Posted by prdeltoid
That is a real nice comparison. The main problem I have is your choosing it as your sole choice. I don't think many people would want to just learn ColdFusion and forget about everything else. I definitely wouldn't.
EDIT: I can't change the poll.  I would also add assembly, and a couple of others mentioned... like OCaml. Probably a few others also.
|
Are you programing for the web, then ColdFusion makes the most sense. I started with PHP 10 years ago, did a few things here and there, but as a whole, the language is still ugly. After 2 years, I came into a position where the companies website was ColdFusion. I was skeptical at first, but after 6 months working on this site, I was totally amazed.
Writing cfml is like writing html, it is so intuitive it makes the perfect language to learn for website development, and it can do ANYTHING you want.
Throw any web application at a ColdFusion Developer, and we will develop it in less time, with 1,000's less lines of code.
Since CFML is straight forward; html the same, you can spend more time writing good SQL queries. Javascript is about as ugly as php so frameworks take care of that.
In the end, I probably spend the most time on any application actually writing SQL
|
|
|
|
07-01-2010, 10:07 AM
|
#45
|
|
LQ Newbie
Registered: Jul 2010
Posts: 2
Rep:
|
Quote:
Originally Posted by JohnGraham
I only voted for C, as it's basically the lingua franca of programming. For anything else, learn what'll be useful to you and what you'll learn. C is the only language I'd say would be useful* for all programmers to know.
* Note the deliberate use of useful, not necessary.
|
I would agree. It is great to learn as a base language since all of the other modern languages are based on it. It also teaches you the logic and proper structure that is needed to produce good clean code.
Eric
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:40 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.
|
Latest Threads
LQ News
|
|