Go Back   AnandTech Forums > Software > Programming

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2014
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 12-16-2012, 07:16 AM   #1
lxskllr
Lifer
 
lxskllr's Avatar
 
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 37,936
Default One Each - Best Programming and Scripting Language

Hi all, I've had it in my head to try some programming, but outside of programming calculators 20 years ago, I have no experience. What I'd like to do is learn one scripting language, and one that's more dedicated to programming. This is all for personal amusement, but I'd like it to be useful also. My preferences are noted thusly..

Fairly easy for someone new to pick up.

Wide applicability. I primarily use GNU/Linux, and that's where my interests lie, but I'd like to be able to use what I do as much as possible. Windows and Android would be nice to add also. I'm not interested in Apple at all.

Able to use what I learn in a business environment. I'd like to get into IT in some capacity, and being able to use the skills I acquired would be a plus.

It would be a bonus if what I learned could easily apply to other languages also.

What I've come up with is Perl and Java, or maybe Python? Do any of you have ideas?
lxskllr is online now   Reply With Quote
Old 12-16-2012, 08:16 AM   #2
douglasb
Diamond Member
 
Join Date: Apr 2005
Posts: 3,163
Default

It totally depends on what you want to do. Java would cover all platforms, so that's not a bad choice.

For the scripting language, I would recommend PHP over Perl (and probably Python over both of those). You really don't see Perl too much any more and it's probably a little more difficult to pick up than PHP or Python. If you are more interested in client-side scripting, then Javascript is the obvious choice.
douglasb is offline   Reply With Quote
Old 12-16-2012, 08:54 AM   #3
Crusty
Lifer
 
Crusty's Avatar
 
Join Date: Sep 2001
Location: ATX
Posts: 12,316
Default

C++ and Ruby.
__________________
Consequences will never be the same!

/^1?$|^(11+?)\1+$/
Crusty is offline   Reply With Quote
Old 12-16-2012, 09:06 AM   #4
theevilsharpie
Platinum Member
 
Join Date: Nov 2009
Location: Southern California
Posts: 2,314
Default

Python for scripting, Java for cross-platform and Android application development.
theevilsharpie is offline   Reply With Quote
Old 12-16-2012, 10:40 AM   #5
Ken g6
Elite Member
 
Ken g6's Avatar
 
Join Date: Dec 1999
Location: Colorado
Posts: 8,736
Default

I'd go with Ruby and maybe C#. Ruby can really do quite a lot of things. It does scripting on its own. It does web apps with Rails (though you also need to know HTML, CSS, and maybe JavaScript). It can even work with C# via IronRuby.

Python can do a lot of the same things, via itself, Django, and Iron Python respectively. But it isn't quite as popular IMHO.

Theevilsharpie may have a point about Java if you want to do mobile development, in which case you'll want to look into either JRuby or Jython.
__________________
Look for really BIG primes with TeAm AnandTech PrimeGrid!
Next race: October 4-9
Ken g6 is offline   Reply With Quote
Old 12-16-2012, 01:15 PM   #6
beginner99
Platinum Member
 
Join Date: Jun 2009
Posts: 2,160
Default

What are your criteria for differentiating between scripting and programming language?

I would recommend Java to learn Object oriented programming. For some reason I feel it's much better to understand and actually use this principle in Java than say python or php.

Also you can use it for Android development.

For scripting the most practical use is obviously JavaScript. For beginners guide this site is pretty nice:

http://eloquentjavascript.net/

However for me JavaScript is a bit "funky" so I would suggest to start with java and then do JavaScript.
beginner99 is offline   Reply With Quote
Old 12-16-2012, 04:16 PM   #7
LumbergTech
Diamond Member
 
Join Date: Sep 2005
Posts: 3,623
Default

Java

I also recommend trying ruby on rails just because it teaches you a lot of things that you can apply elsewhere.
LumbergTech is offline   Reply With Quote
Old 12-16-2012, 06:01 PM   #8
lxskllr
Lifer
 
lxskllr's Avatar
 
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 37,936
Default

Thanks guys. It looks like Java is a winner for programming, but there's no consensus for scripting. To answer a couple questions; in my head I differentiate between scripting and programming by use. Scripting to me is a quick, and sometimes dirty solution to a problem, where pretty and polish aren't immediately necessary. Programming OTOH is more fleshed out, with more thought going into the final product, which may have a fairly wide scope.

To clarify what I mean by "best"(wasn't the best choice of words) is more like a Swiss Army knife, rather than a surgeon's scalpel. Something that may not even be the best tool for any job, but has a wide range of application, and good functionality.

Thanks for the ideas. I'm gonna hit up Wikipedia, and try to get a feel for the languages mentioned. I have a little familiarity with Java and Python, but that's about it.
lxskllr is online now   Reply With Quote
Old 12-16-2012, 06:04 PM   #9
Cerb
Elite Member
 
Cerb's Avatar
 
Join Date: Aug 2000
Posts: 15,223
Default

How about 2 each? Though, both the top two are equally good for serious programming as scripting, so long as you aren't ALU-bound in performance.

Python
+on about every distro
+easy to use ad-hoc polymorphism
+tons of libs
-not OO in the way languages made to be OO from the start are (no encapsulation, FI)
-requires too much work to apply type-checking, sometimes (GvR likes the idea of type decorations, so maybe one of these days it'll make its way to CPython)
-GIL in the standard implementation (need to go to Jython, Pypy, or use multiple processes, to gain speed from more CPU threads)
-no TCO (GvR still doesn't seem to get where, much less how, continuations can help, and it's unfortunately a good solution to complicated problems, that are hard to come up with simple contrived examples for)

Ruby
+code blocks (who needs explicit lambas/funs?)
+mixin-style ad-hoc polymorphism
+good string handling right out of the box (good, as in, "oh, it's that easy, huh...")
+Rails
+implements a good security model, almost by accident
-GIL in the standard implementation
-Often slower than even Python
-Less popular outside of Japan, but growing rapidly, thanks to Rails

Java
+runs everywhere
+sometimes performs well
+used everywhere
-inclusion-only semantic polymorphism
-parametric polymorphism implementation too focused on structural typing to be as useful as it aught to be (C++ templates > Java generics)
-every wheel has been re-invented 100 times in it, because they went with a, "primitives not solutions," mindset for the standard libs
-awkward iterator implementation
-checked exceptions
-GC can often cause temporarily hung programs, especially when throwing away a lot of strings

C++
+runs everywhere, after a fashion
+usually performs well
+good parametric polymorphism
+/-no integrated GC
-derived from C, has a lots of weird syntax
-sometimes too many options for doing something
-aliasing and/or not cleaning up your memory will come back to bite you. Not might, will.
__________________
"The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows." - Frank Zappa

Last edited by Cerb; 12-16-2012 at 06:07 PM.
Cerb is offline   Reply With Quote
Old 12-16-2012, 06:14 PM   #10
Cogman
Diamond Member
 
Cogman's Avatar
 
Join Date: Sep 2000
Location: A nomadic herd of wild fainting goats
Posts: 9,778
Default

Pick any language you like.

C and C++ will give you a good background which can transfer to nearly any language. They make you do most things the hard way while being pretty popular.

Java and C# are both fairly popular languages. I prefer C# over java for niceties, however, java has a big more industry support (and a HUGE amount of 3rd party libraries/tools to play with).

Ruby and Python are good languages to learn. I personally like ruby's syntax and style over python, but choose whichever you like they both do a good job of high level abstractions. Python has a larger following, and ruby tends to have a somewhat smaller following with less experience (a large portion of ruby developers are RoR only and have a somewhat lacking knowledge of the language itself in my experience).

Javascript is a useful to learn language. I don't like it as a language, but it is pretty much all we have for the web. Its popularity is only going to grow as the web becomes further and futher ingrained. Sure, some techs allow different languages to be translated into javascript, however, I don't see them ever fully replacing the language. A caution, there are far too many ways to do the "wrong" thing in javascript. It would be helpful to pick up a good book on clean javascript ("Javascript: the good parts" comes to mind).

Dart and Typescript are both promising languages IMO. I personally think that Dart is taking the right approach towards web languages and I'm rooting for its success. Typescript looks good and should help to bridge the gap between emcascript 6 and 5.

Honestly, the only languages that I would not recommend are PHP and Perl. The two are poorly thought out languages with bizarre, confusing, and hard to maintain syntaxes. Perl has a pretty big following of zealots which will claim it has no faults (The only other language that I've seen with similar zealotry is python). Don't be fooled. Perl wasn't originally a programming language, it evolved into one... That is like having XML evolve into a programming language, it just isn't a good place to come from.

PHP isn't really loved by many except for the inexperienced. It is somewhat of a mismatched collection of ideas. Not to perls extent, but to a significant one none the less.

Google's Go is interesting. It has some nice ideas, and some not so nice ones. The Go community and team are extremely opinionated on what makes a good language, so if it lacks a feature you think would be nice there isn't much of a chance that it will be adopted.

There are certainly other languages out there (D, groovy, pascal, haskell.. etc) go exploring, see what is there. You'll only gain from exposing yourself to new languages and ideas. What ever you do, it is really more important that you program. The language is not all that important in the long run.

That is just my opinion on the state of things. Take it or leave it.
__________________
CogBlog - Random Babblings of Cogman mainly focused on software.
Cogman is offline   Reply With Quote
Old 12-16-2012, 06:19 PM   #11
Cerb
Elite Member
 
Cerb's Avatar
 
Join Date: Aug 2000
Posts: 15,223
Default

Quote:
Originally Posted by Cogman View Post
Honestly, the only languages that I would not recommend are PHP and Perl. The two are poorly thought out languages with bizarre, confusing, and hard to maintain syntaxes.
To be more precise, neither language was thought out at all, until several iterations had come out, and people were already dependent on existing behavior.
__________________
"The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows." - Frank Zappa
Cerb is offline   Reply With Quote
Old 12-16-2012, 06:36 PM   #12
excommie
Junior Member
 
Join Date: Dec 2012
Posts: 11
Default

No one mentioned ksh/bash yet - these are the backbones of scripting, especially since you're into Unix/Linux - might even get you a high paying job in a Financial world as I've seen several large corporations using Unix systems for trading and backoffice accounting. Korn Shell is very powerful when used correctly.
excommie is offline   Reply With Quote
Old 12-16-2012, 07:42 PM   #13
Cogman
Diamond Member
 
Cogman's Avatar
 
Join Date: Sep 2000
Location: A nomadic herd of wild fainting goats
Posts: 9,778
Default

Quote:
Originally Posted by excommie View Post
No one mentioned ksh/bash yet - these are the backbones of scripting, especially since you're into Unix/Linux - might even get you a high paying job in a Financial world as I've seen several large corporations using Unix systems for trading and backoffice accounting. Korn Shell is very powerful when used correctly.
I have a hard time recommending them. They do a lot of good one off stuff, however, they are less programming languages and more "Run a bunch of programs" things. Most scripting languages (python, ruby, and perl) have the ability to do the same thing in just about as clean a syntax as bash or ksh while providing lots of useful and interesting features.
__________________
CogBlog - Random Babblings of Cogman mainly focused on software.
Cogman is offline   Reply With Quote
Old 12-16-2012, 08:01 PM   #14
lxskllr
Lifer
 
lxskllr's Avatar
 
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 37,936
Default

Quote:
Originally Posted by Cogman View Post
I have a hard time recommending them. They do a lot of good one off stuff, however, they are less programming languages and more "Run a bunch of programs" things. Most scripting languages (python, ruby, and perl) have the ability to do the same thing in just about as clean a syntax as bash or ksh while providing lots of useful and interesting features.
bash is a given since I run GNU/Linux exclusively. I haven't utilized it as much as I should due to lack of need, but I've been meaning to open a book, and look for creative ways to use it.

Thanks for the detailed replies guys. I still haven't read up on everything, but I'm leaning towards Java and Python. Java should be good for Android, and I have lots of examples to pull apart, and some things I'd like to do. Python seems robust, and popular. A good Swiss Army knife.
lxskllr is online now   Reply With Quote
Old 12-17-2012, 09:27 AM   #15
excommie
Junior Member
 
Join Date: Dec 2012
Posts: 11
Default

Quote:
Originally Posted by Cogman View Post
I have a hard time recommending them. They do a lot of good one off stuff, however, they are less programming languages and more "Run a bunch of programs" things. Most scripting languages (python, ruby, and perl) have the ability to do the same thing in just about as clean a syntax as bash or ksh while providing lots of useful and interesting features.
Learning curve with perl vs learning curve with ksh is different (I think it is a natural progression to learn ksh, then learn perl)?
excommie is offline   Reply With Quote
Old 12-17-2012, 09:28 AM   #16
nickbits
Diamond Member
 
nickbits's Avatar
 
Join Date: Mar 2008
Location: Southeast Michigan
Posts: 3,678
Default

c# and no scripting
nickbits is offline   Reply With Quote
Old 12-26-2012, 04:52 PM   #17
Dissipate
Diamond Member
 
Dissipate's Avatar
 
Join Date: Jan 2004
Posts: 6,826
Default

Scripting: Perl and Python (I put both for scripting. Python has clean syntax and it is easier to get up and running with it, but Perl can be extremely powerful if used properly and Modern Perl with things like Moose have cleared up a lot of things missing from Perl 5).

Compiled: C# or Go

Java is a terrible language, as is C++. Stay away from these as much as possible. They will ruin your brain. Java is plagued with a horrible implementation of generics, and C++ is a huge language that has all kinds of clunkiness and gotchas.
Dissipate is offline   Reply With Quote
Old 12-27-2012, 04:36 PM   #18
Dravic
Senior Member
 
Dravic's Avatar
 
Join Date: May 2000
Posts: 887
Default

Python for scripting all day

It replaced Perl for me, and is becoming the default scripting/admin language for most modern Linux distros post Perl. Many of the system admin tools have been written in python, and its usually installed by default.
__________________
Gamer/Workstation: FX 8150 @ 4.55Ghz, Crosshair V 990FX, H100 , 7970, 120GB SSD, 16 gig DDR3 @ 1600, Haf 932

Linux Workstation: Phenom II 1055T, MSI 790FX, Nvidia GTX 460, PC Power & Cooling 610W, 16 gig DDR3 @ 1600, Antec Titan 550
Dravic is offline   Reply With Quote
Old 12-28-2012, 02:22 AM   #19
Dissipate
Diamond Member
 
Dissipate's Avatar
 
Join Date: Jan 2004
Posts: 6,826
Default

Quote:
Originally Posted by Dravic View Post
Python for scripting all day

It replaced Perl for me, and is becoming the default scripting/admin language for most modern Linux distros post Perl. Many of the system admin tools have been written in python, and its usually installed by default.
If we are talking about devops/system administration, it looks like Ruby may be winning over Python, at least according to this: http://devopsanywhere.blogspot.com/2...in-battle.html
Dissipate is offline   Reply With Quote
Old 12-28-2012, 05:42 AM   #20
BrightCandle
Diamond Member
 
BrightCandle's Avatar
 
Join Date: Mar 2007
Posts: 4,559
Default

There is no magic right answer, there are so many languages. Picking something big and popular will ensure you can get lots of books and high quality tutorials which is the really important part for a beginner. So avoid languages outside of the top 10.

Beyond that it doesn't matter much, to be good you'll still need to learn them all.
__________________
i7 3930k @4.4, 2xMSI GTX 680, 16GB Corsair 2133 RAM, Crucial m4 500GB, Soundblaster Z
Custom watercooled by 2x MCR 320 and 1 MCR 480
Zowie Evo CL EC2, Corsair K70, Asus Rog Swift PG278Q
BrightCandle is online now   Reply With Quote
Old 12-28-2012, 06:47 AM   #21
Broheim
Diamond Member
 
Broheim's Avatar
 
Join Date: Feb 2011
Location: with my auntie and uncle in Bel Air
Posts: 4,569
Default

"There are only two kinds of programming languages: those people always bitch about and those nobody uses."

I'd say your choice of Java and Python is pretty solid, but it's not about the language it's about learning to program.

btw, I get all my e-books from o'reilly, keep an eye on their daily deals and whatever other deal they're running, you can usually find something interesting and useful.
__________________
Quote:
Originally Posted by free ipod View Post
It's Diffiult Process but you handle easily. I am Appriciate with your Perforamances...
Broheim is offline   Reply With Quote
Old 12-30-2012, 09:35 AM   #22
TheRyuu
Diamond Member
 
Join Date: Dec 2005
Posts: 4,857
Default

Remember, if you're not learning it the hard way, you're doing it wrong.

It may be beneficial to start with C regardless of what you actually want to use in the end.

Last edited by TheRyuu; 12-30-2012 at 09:46 AM.
TheRyuu is offline   Reply With Quote
Old 12-30-2012, 02:31 PM   #23
cytg111
Golden Member
 
Join Date: Mar 2008
Posts: 1,345
Default

what the hell? Screw ruby/python/scala/groovy/whatnot, hippies smoke it, it is not for you.

For widest adaoptation and alignment with the industry at large : Java or C#, either one or both, no substitute... well, depending on what industry, put in C++ as a second.
__________________
404
cytg111 is offline   Reply With Quote
Old 12-30-2012, 02:36 PM   #24
cytg111
Golden Member
 
Join Date: Mar 2008
Posts: 1,345
Default

Quote:
Originally Posted by Dissipate View Post
..Java is a terrible language
No? Terrible generics? Yes if you're an academic writing your Ph.D on .. generics, then perhaps.. for everyone else who just want to build houses and cars, it's a wonderful language, a language that stretches sooooo far across platforms and frameworks.
Performance rocks too, the JVM is a rockstar. (and if you're gonna smoke that hippie crap, do it on something that lights up in the JVM, JRuby ex.)
__________________
404
cytg111 is offline   Reply With Quote
Old 12-30-2012, 03:01 PM   #25
Dissipate
Diamond Member
 
Dissipate's Avatar
 
Join Date: Jan 2004
Posts: 6,826
Default

Quote:
Originally Posted by cytg111 View Post
No? Terrible generics? Yes if you're an academic writing your Ph.D on .. generics, then perhaps.. for everyone else who just want to build houses and cars, it's a wonderful language, a language that stretches sooooo far across platforms and frameworks.
Performance rocks too, the JVM is a rockstar. (and if you're gonna smoke that hippie crap, do it on something that lights up in the JVM, JRuby ex.)
Quote:
No? Terrible generics? Yes if you're an academic writing your Ph.D on .. generics, then perhaps.. for everyone else who just want to build houses and cars, it's a wonderful language,
No, issues with generics do not just come up for people writing an PhD. I was working on a project at my previous job where we had to use Java and an issue with generics came up very quickly.

Quote:
a language that stretches sooooo far across platforms and frameworks.
How popular a language is has nothing to do with whether or not it is a good language. In fact, I would say that Java is probably a lot less popular outside of corporate environments. It is a terribly verbose language for one thing, and not very fun to program anything in outside of work. This is especially true since it is almost always used in some kind of heavily configured IDE like Eclipse.

Quote:
Performance rocks too, the JVM is a rockstar. (and if you're gonna smoke that hippie crap, do it on something that lights up in the JVM, JRuby ex.)
Java != JVM

What 'hippie crap' are you referring to?

I don't have a problem with the JVM, I have a big problem with Java. In fact, I'm quite interested in other languages that run on the JVM such as Clojure and Scala, but I haven't had time to investigate them.
Dissipate is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.