
Ask Slashdot: Best Rapid Development Language To Learn Today? 466
An anonymous reader writes "Many years ago, I was a coder—but I went through my computer science major when they were being taught in Lisp and C. These days I work in other areas, but often need to code up quick data processing solutions or interstitial applications. Doing this in C now feels archaic and overly difficult and text-based. Most of the time I now end up doing things in either Unix shell scripting (bash and grep/sed/awk/bc/etc.) or PHP. But these are showing significant age as well. I'm no longer the young hotshot that I once was—I don't think that I could pick up an entire language in a couple of hours with just a cursory reference work—yet I see lots of languages out there now that are much more popular and claim to offer various and sundry benefits I'm not looking to start a new career as a programmer—I already have a career—but I'd like to update my applied coding skills to take advantage of the best that software development now has to offer. (More, below.)
Ideally, I'd like to learn a language that has web relevance, mobile relevance, GUI desktop applications relevance, and also that can be integrated into command-line workflows for data processing—a language that is interpreted rather than compiled, or at least that enables rapid, quick-and-dirty development, since I'm not developing codebases for clients or for the general software marketplace, but rather as one-off tools to solve a wide variety of problems, from processing large CSV dumps from databases in various ways to creating mobile applications to support field workers in one-off projects (i.e. not long-term applications that will be used for operations indefinitely, but quick solutions to a particular one-time field data collection need).I'm tired of doing these things in bash or as web apps using PHP and responsive CSS, because I know they can be done better using more current best-of-breed technologies. Unfortunately, I'm also severely strapped for time—I'm not officially a coder or anything near it; I just need to code to get my real stuff done and can't afford to spend much time researching/studying multiple alternatives. I need the time that I invest in this learning to count.
Others have recommended Python, Lua, Javascript+Node, and Ruby, but I thought I'd ask the Slashdot crowd: If you had to recommend just one language for rapid tool development (not for the development of software products as such—a language/platform to produce means, not ends) with the best balance of convenience, performance, and platform coverage (Windows, Mac, Unix, Web, Mobile, etc.) what would you recommend, and why?
Two languages (Score:2)
Coffeescript, compiles to JavaScript and obviously runs in any JavaScript environment
Groovy, an enhanced lazy typed Java, running on the JVM
Re: Two languages (Score:4)
So exactly what do you get with Groovy that you don't get with Jython [jython.org] (Python on the Java VM)? Apart from different syntax of course ...
One of the great things about Python is it runs just about anywhere. There are even embedded versions.
The only real problem with Jython is it doesn't implement Python 3 yet.
Clojure ? (Score:3)
Re: (Score:2)
How compatible are Clojure and ClojureScript? Can you expect a typical program to run in both?
Programming language in 2 hours ? Yeah, right. (Score:4, Insightful)
You have never been able to learn a programming language in a couple of hours.
It's just that some languages manage to trick you into thinking you can - and then those of us who actually do know what we are doing have to come along and fix the resultant mess.
In answer to your actual question, my first suggestion is Python. It's used everywhere, not only on the Internet, but also as the scripting language in a wide range of traditional type applications.
Re: (Score:2)
Re: (Score:2)
You can learn Snobol (the original, not Snobol4) in a couple of hours. Unfortunately, you probably can't actually do anything useful with it, but that was not required by your original post!
Re: (Score:2)
I've heard from a number of people that they could and every time, it only meant that they could learn to understand the syntax, not learn to code anything of any significance.
Re: (Score:2)
You can learn LUA pretty damn quick.
Python + Qt (Score:5, Informative)
With Qt you can develop for desktop or mobile, with a GUI or not. With Python you can do simple scripting all the way up to full-blown apps. Once you become familiar with Qt you can also fallback to C++ if you need the performance. You also have the option using Qt's GUI as traditional widget or Javascript based Qt Quick.
Re:Python + Qt (Score:4, Interesting)
I'd second the QtQuick recommendation. What I like about it is you can easily slap together a standalone UI prototype and worry about the backend later.
Re: (Score:2, Insightful)
Re: (Score:2)
C++ would be absurd for systems admin and operations scripting, however. Other langauges do all those things and also excel in the operations/admin/batch processing realm - Python, Perl, Ruby
Re: (Score:2)
Most ops/admin/batch processing can be done with sh, sed and awk. Perl and python are nice fourth and fifth languages after these, but proficiency with the first three tends to be more valuable for an admin than the latter two. It's a certainty that you will have to maintain other people's shell scripts, and expanding them with a well placed inline sed or awk program can be oh so helpful.
There's no question that perl gives you the most bang for the buck, but maintaining perl scripts can be painful. Like
Re: (Score:2)
I do all of those languages in my daily job, but awk/sed/sh is inferior because of the chances for bugs are greater in a script with any complexity due to the arcane rules and syntax, and topic is of languages good for "programs" not just dozen-liners. I don't see how maintaining Perl scripts is any more painful than effort required for any other scripting langauge. Note the built-in tools packaging and admin are already done in Perl and Python in most (most being all the dozen or so I deal with 8D ) BSD
Re: (Score:2)
There's no question that perl gives you the most bang for the buck,
In particular, any time you are considering using awk inside sh, you probably should be using perl instead, because of that complexity you mentioned. Why use two languages (plus an additional utility to handle regexps) when you can just use one?
Re: (Score:3)
For anything larger than a one-off, I'd go with python/pypy (ruby and lua are also fine choices).
$ time awk '{print $1}' < f4.txt >/dev/null
real 0m0.296s
user 0m0.288s
sys 0m0.004s
$ time perl -pale '$_="@F[0]"' < f4.txt
C + Lua (Score:3)
Since you already know C, you good get really fast Lua. Lua with C (and C-like) libraries will lead you fast to productivity.
Java in an IDE (Score:2, Insightful)
The only down-side is the learning curve. However there are lots of res
Re: (Score:2)
Sure, if you like typing stuff such as
Set s = new LinkedHashSet()
Just because the compiler needs to know advance every method of everything you are ever going to put into your container...
Java has its uses, and for certain hard-core back-end software it might be the most appropriate language; but for writing quick and dirty scripts to get stuff done, for prototyping, and for UI I would stay very far away from it.
(but then I'm an ex-Java developer so probably biased ;-))
Re: (Score:2)
(frigging slashdot ate my generics!)
Sure, if you like typing stuff such as
Set<? super TreeMap> s = new LinkedHashSet<TreeMap>()
Just because the compiler needs to know advance every method of everything you are ever going to put into your container...
Java has its uses, and for certain hard-core back-end software it might be the most appropriate language; but for writing quick and dirty scripts to get stuff done, for prototyping, and for UI I would stay very far away from it.
(but then I'm an ex-Java developer so probably biased ;-))
Re: (Score:2)
Re: (Score:2)
Set<Object> s = new LinkedHashSet<Object>();
Or, I believe in java 8 you can infer the type as follows:
Set<Object> s = new LinkedHashSet<>();
That's why I suggested in an IDE. It will generally help the coder. However, I take your point!
Re: (Score:2)
If you are doing any serious Java programming, buy an IntelliJ license (or apply for a free OS license). It is miles ahead of Eclipse and NetBeans.
Re: (Score:2)
For most cases Eclipse is sufficient.
So unless you are prepared to put up money Eclipse is not a bad choice.
I agree Python (Score:5, Informative)
My vote is for Python. My reasons are that it'[s very good for the rapid part. There's also tons of libraries to do darn near everything under the sun (see pypi.python.org). Finally, one thing in their mantra is that readability counts. This means that you can pick up your project several months later and know what it does... maybe even someone else's! Try doing this with Perl or Ruby, and it's much harder.
Python works quite well on the UNIX like systems, decently on Windows, has good command line helper libraries (argparse or optparse), and has several really good web frameworks. Heck, you can use IronPython or Jython and mix into your .NET or Java code!
The biggest weak point is probably full GUIs. It's not that there's not any good ones, there's just not a good default one. TkInter is built-in, but it's based on Tcl/Tk, the interface isn't very Pythonic, and the end result isn't great. WxPython is good for a basic GUIs, but adding custom widgets is hard. PyQt and PySidehas a more complete collection of widgets, but it again is tough to add new widgets. PyGTK has the large collection of widgets, and widgets can be written in Python and become first class widgets even in other languages. The new kid on the block is Kivy, which is kind of like QML for Python. Kivy defines very low level functionality that builds up widgets, but it makes it easy to combine them together to make a complete widget. This sounds like a lot of work, but it turns out to not be as bad as you'd expect.
Also, PyDev, PyCharm, and WingIDE are all pretty amazing IDEs for Python.
Finally, there's a good amount of jobs asking for Python, especially in big cities.
Re:I agree Python (Score:4, Informative)
I've gotten a lot of mileage out of Python for cleaning and pre-processing CSV and JSON datasets, using the obviously named "csv" and "json" modules. ... However, if you are doing very much manipulation of tabular data, I'd recommend learning a bit of SQL too.
You may want to look into pandas [pydata.org] as a middle ground. It's great for sucking in tabular or csv data and then applying statistical analysis tools to it. It has a native "dataframe" object which is similar to database tables, and has efficient merge, join, and groupby semantics. If you have a ton of data then a database and SQL is the right answer, but for a decent range of use cases in between pandas is extremely powerful and effective.
Scala (Score:5, Informative)
Re: (Score:3)
"Scala also runs on the JVM, so it's fast as opposed to Python."
This is so wide of the mark that I had to comment. The JVM is a fast virtual machine, but that is a poor benchmark. Java and Python run at roughly equitable speeds, but where Python wins out is that it has a much stronger interface to C or Fortran. For hard core number crunching, python wins because you can either call existing scientific or numerical libraries, or use tools like numpy which do the stuff that needs to be fast in C.
Phil
Re: (Score:3)
I'm presently reading Assholes: A Theory by Aaron James, a surfer-dude professor of philosophy from Harvard University trying to cash in on the On Bullshit surge, which sold surprisingly well for what it is. I don't totally agree with Mr James, but there are some great passages. We'll see after I finish the book.
Sorry, that screams asshole entitlement—but maybe just because I was reading that book yesterday evening, and having a shiny new book is a lot like havi
Re: (Score:3)
It's probably wan't your intention, but you make it sound like it is the running on the JVM part that makes Scala fast, rather than Scalas design and implementation eg static typing etc.
By itself, just running on the JVM is not some magic fairy dust that's enough to make highly dynamic languages run like Scala. ie most of the time Jython is actually slower than CPython.
Stop Stalling. Use Python. (Score:4, Interesting)
seems you missed the point of C (Score:4, Insightful)
i spent most of my working career in C, and as advised by my early mentors, over the decades, i have build, and have continued to hone my own little collection of useful functions.
i have learned interpreted languages, bash scripts, also postscript and forth along the way, various others...
in the end what remains best is C code, and my own little legacy collection of solutions to the problems i have encountered.
to answer your heads as best as i can:
archaic - C is not - underneath every "other" language you will almost always find C source and a C compiler.
text based - think AJAX if you want instant and easy access to gooey bling stuff. these days almost everything that can do GUI can also do an RPC text based interface of some form or another, and if you don't want the fuss off rolling your own interface, there are plenty of stock C libs out there will do this for you.
not a hotshot - you know C, you are not only hot, you are a rare breed, and an essential part of the future - as i said above, C lies beneath just about everything out there, and large parts of the Original Framework is now inscrutable to the script kids, despite their whole world would collapse, if there were no-one left to maintain it.
update your coding skills - in short please stick with C as much as you can, and think about building bridges - in my opinion your time would be best spent studying the C and text interfaces exported by other languages, and working out for yourself how best to leverage their abilities from within C - as opposed to jumping ships.
help out - get yourself a git account, share your work, if you can.
in all of these except the last i speak from 30 years experience, and in regard to the last - i'm working on it - most of my stuff is still bound in commercial licence, however i continue to hope this will change, eventually, and i continue to prepare for that day.
the best-designed choices, IMO (Score:2)
Python, Ruby, scsh--but the latter doesn't really have relevance to the web, while the first two have popular and well-designed web-app-serving frameworks built on them.
C# for Q&D (Score:3)
The learning curve for a C programmer isn't bad, you can self pace into some elegance if you get painted into a corner, it's very easy to bang out a console application or service, deployments are pretty easy, and it's pretty well documented how to interface web services and web applications from the console. Given the OP's background and the objective, it seems the best fit for me.
Re: (Score:2)
The best? Still Smalltalk! (Score:2)
I'm a Ruby guy but... (Score:5, Insightful)
sorry there is no one-size fits all solution. The *closest* is Javascript and client-side development isn't that painfull these days but its still Javscript and WILL bite you on the ass.
So I'd say it boils down to either Python or Ruby + Javascript and if I'm honest, I'd say Python has the edge in terms of general applicability. I *personally* prefer the Ruby language, but that's not what you're asking. Breaking it down:
Server side, backend = Python+Django OR Ruby+Rails if you want to get stuff done and stay sane. Ruby should be considered Linux only server side, but then server-side should be considered *nix only. Node works but...its javascript.
Server side Scripting = Python/Ruby are both sensible choices. I prefer Ruby as a language but Python is a safer choice given the library support and performance. The exception is server/cloud management for which Ruby still has an edge (debatable, I know).
GUI/Desktop Clients, Python + QT. Great combination. Its possible to use QT with Ruby, it just doesnt feel right though.
OSX/IoS/Android - Ruby/Rubymotion. Really, really nice if you're developing for the Apple side. Android support is early days.
Browser - Javascript + Framework + UI components of choice. Learn javascript, one framework and one set of UI components and you're set. Well, until you need something a bit different....but its Javascript.
BTW I said I'm a Ruby guy but I've 10 years of Python experience. If the project is suitable though I'm more productive with Ruby (with 18 months experience) but it really is a case of the right tool for the right job.
It's Ruby and here's why (Score:3)
There is no language that seems to have more web relevance these days. The community and available libraries are amazing. For rapid web dev you have Rails, pretty much "the" web framework.
It's great for quick shell scripts. It's excellent as a DSL language (think Vagrant, Puppet, Chef, Capistrano, Rails).
It's extremely flexible too. Just about every web start up that you've managed to hear of is a Rails shop. Rails programmers are in "write your own ticket" levels of demand too.
JRuby is under extremely heavy and active development, giving you access to do everything you can do with Java as well. Thanks to jRuby you get access to native threading, best of breed garbage collection, the insane library of Java tools that are out there and Java's JIT compiler. You can deploy to servers anywhere Java can too which even makes it viable for many enterprise shops and means you'll have access to excellent database drivers for...anything.
Lastly, thanks to RubyMotion you can write Ruby to code apps for iOS and more.
People love to hate on Ruby, but it's everywhere for a reason.
test drive a simple problem... (Score:3)
One of the scripting things I look for is portability. While Java itself is pretty awful for rapid development (at least for me Java is painfully verbose), if you want to piggyback on Java's virtual machines you can go a long way with Groovy, Clojure, and maybe Python (here's an interesting review of JVM languages [drdobbs.com]). It turns out for my day job there is always a JVM in the environments I need to work in, so I look for easier languages to work with in that regard.
My current personal favorite is Clojure [clojure.org]; great leverage, you get a lot of bang for your buck for a line of clojure vs. a line of Java or C.
Your problem (Score:3, Insightful)
Your problem is hidden in the list of requirements which have absolutely nothing to do with the programming language itself and all with the APIs. No matter how fluent you are in a programming language, if you don't know the specific APIs for GUI desktop, Web, mobile, etc, you will not succeed.
Frankly, I don't feel your question is serious given you are describing yourself as an occasional programmer which needs to be able to program code for almost all platforms and type of interfaces. Seems to me like a forged question to try to find a one-size-fits-all solution for your hypothetical needs.
Nobody learn all the APIs in the world in case. You learn them as you go along and some of them requires major time investment which you will surely avoid to do if you are really an occasional programmer without time to learn in detail the API for perhaps a one-time-shot usage.
Responsive CSS (Score:3)
Be very careful with the so-called "responsive CSS" that some people use. Sending a five megapixel JPEG to a cellphone and resize it via CSS is one of the stupidest thing I've ever seen.
People with no technical background who only know Photoshop and print media have no idea of the requirements they're pushing onto the hardware.
Re: (Score:2)
As soon as you want to do kore than C like programming in JavaScript it is a. hell to learn.
How many different ways does it support for OO programming defining inheritance, classes, higher order functions, prototype bases object systems etc. etc.?
If younlearned JavaScript in 17minutes you likely use less than 17% of its features.
Re: (Score:2)
read the original post again. he's looking for one-off tools. 17% of javascript is plenty for 70% of tools. the HTA (JScript) will provide the other 30%, no problem.
Re: (Score:3)
If younlearned JavaScript in 17minutes you likely use less than 17% of its features.
You're right about that. A big part of the "hate" seems to come from people unwilling to learn the language. I assume because they assume they already know it, due to it's familiar syntax.
I'd argue that it's rather easy to learn. Easier than, for example, Java or C# for a beginner. Prototypal OO is much simpler and more "powerful" than Classical OO. Half the problems people new to JS suffer seems to come from dragging all that classical baggage with them. I suspect it's why so many people seem to have
Re: (Score:2)
+11 Funny
Re: (Score:2)
the former for the original poster's skills-set, the latter for mine. I've got more equipment, and decades with perl.
Re:What's wrong with html and javascript? (Score:5, Funny)
javascript takes about 17 minutes to learn --
. . . and 17 hours to debug . . .
Re: (Score:2, Interesting)
only if you've never learned how to debug javascript. If you're using debugging tools, then yes, 17 hours is about right. If you've been debugging interpreted languages for decades, then it's no big deal.
Just keep running it as you code -- every time you type a semi-colon, hit F5. When it doesn't do what you expect, the problem is in the last line that you typed. There's no compiling, and there's no linking, and there's no delay. In an hour of coding, you should be executing it well over 30 times. Ada
Re: (Score:3, Informative)
Are you insane?
There is no way your shot-gun approach to debugging is ever faster or better than dropping JS into a debugger; having something like intellij hook into your browser and debug your code running in an IDE is by miles better and faster than what you suggest.
Especially if you are doing something difficult and not just trying to load an ajax request...
Re: (Score:2, Funny)
I've never listened to anyone who's attempted to teach me anything in this industry.
Wow! I'd hire you on the spot if I could. I'm off to check out some of your code [thedailywtf.com].
Re: (Score:2)
javascript takes about 17 minutes to learn
Learning the syntax of a language is the smallest step towards actually using it. If you want to do more than write "Hello World\n" you need to learn an IDE, and all the relevant libraries. That is what takes the years of experience. Especially in these days where people assume (incorrectly) that IDEs are "intuitive". There's nothing worse than having to waste a day clicking around in a piece od code trying to find the one, obscure, little windowy attribute that the guy before you used to set a feature.
Si
I strongly vote PERL/CPAN (Score:3)
That concept of multitude is completely foreign to a C programmer. It makes them fail every time. You simply cannot introduce a C programmer to Perl and expect them to have any kind of easy time with it. You might as well introduce a cyclist to a horse.
I disagree with this. I learned applebasic as a kid and learned c++ in college. I've never had formal
training in perl but I find it the quickest and easiest to pick up, use, and to teach others.
CPAN can't be beat and Perl is very mature, very modern, and still being developed as well as being cross-platform.
The OP stated he wanted to do quick and dirty and I don't think anything can beat PERL/CPAN for quick/dirty.
You can't do native apps for iphone/android with it but you can't with anything other than ob
Re:Python (Score:4, Insightful)
Python: 'Nuff said
+1
Python is quick to learn, portable, has great libraries, both the standard-library and frameworks such as django and sqlalchemy. You can use it OO or more "imperatively", and it has some great primitives for functional-style programming. It is easy to use in a command-line script sense and just as easy to use in a web (backend) role, from very lightweight flask to all-bells-and-whistles django. The documentation and community are also suberb, and you can find a good answer to almost every question online.
Re: (Score:2)
Javascript is the language from hell, I wouldn't recommend it to anybody.
Off the top of my head, here's the languages I've used enough to feel like I was good at: awk, sed, bash, C, C++, perl, python, java, javascript.
Re: (Score:3)
Yeah, although I understand the reasoning for the whitespace and don't object on principled grounds, it can be quite annoying practically if you are copy/pasting code, need to (de)indent a large block, and especially if you are forced to develop somewhere where your favourite editor/IDE that actually handles these cases well is unavailable and you have to work with something that actually inserts a tab when you press tab... *shudders*
It's also a shame that some of the things corrected in python3 were not co
Re: (Score:3)
http://compsoc.dur.ac.uk/white... [dur.ac.uk]
Re:Python - give reasons (Score:2)
A choice for a general purpose language for server scripting, web, client gui, non-web server apps,etc. should have mature set of libraries and frameworks for all those things. Most of the people here are posting their favorite or pet language rather than anything that has that property. Yes, Python has the libraries for all those uses, Perl 5 even moreso. Ruby does to lesser extent than those two.
Re: (Score:2)
Re: (Score:2)
Learning a language to accomplish this is a miss. Learn an architecture. The language is just there to make tweaks to RAD/XP/Agile designs.
Re:Python (Score:5, Informative)
There are two possible answers to the question: Python and Javascript.
Python is a general-purpose language, with a large number of user areas. It is your best bet for general applicability.
However, if you want to aim for the web market -- which, granted, is huge -- go with Javascript.
That's pretty much all you need to know to make your decision.
Re: (Score:2)
python.
after 30 or so yrs in C, I'm finally getting some time (at work) to learn python. I already know bash, but python is getting more popular by the year and shows no signs of fading.
groovy? are you kidding me. be serious. if you want java, run fucking java and not some bastardization of it that forces people who have to support your code to waste time on a variant of a language that is just not worth the short amount of expendable/spare time we have.
Re: (Score:2)
I'm not saying Groovy per se is a good choice (or not a good choice), just rejecting the general argument that we should stick to the core language of a system for support reasons. If that argumen
Re:Python (Score:4, Insightful)
the current craze of using javascript for other than embedded in web page is just passing fad, it does not have the mature libraries of other languages to be general purpose. No one is going to write Linux configuration/admin systems in javascript, nor making general purpose cron jobs. Python and Perl and Ruby excel at that sort of thing, on the other hand.
Re: (Score:2)
is just passing fad, it does not have the mature libraries of other languages
Considering how new it is on the server, I'm not surprised. It may very well be a passing fad, a point to which I'm inclined to agree, but that's not one of the reasons why.
Re: (Score:2)
link please to the mature libraries that let javascript be used for any purpose whatsoever? I see lots of amusing test / beta quality crap efforts on sourceforge, but they aren't production grade. X11 server in javascript, there's a cute one
Re: (Score:2)
https://www.npmjs.org/ [npmjs.org]
Re: (Score:3)
And if you are really claiming that packages here https://www.npmjs.org/browse/d... [npmjs.org] are not stable and dependable, you sir are an idiot.
Same with this http://stats.bower.io/ [bower.io]
Re: (Score:3)
I expect server side JS to be about as passing fad as writing operating systems in C.
It's not great for typical cron jobs or admin scripts. What it is great for, is small server damons. The single threaded everything-is-asynchronous model works so well for that, you don't want to go back once you get started.
Re:Python (Score:5, Interesting)
JavaScript, to me, is less worthy as a language. Yes, you "can do" pretty much anything in JavaScript (as you can with any Turing-complete language, meaning all of them), and yes, it has some desirable language features. But, it's typically hard to do simple things, at least if you want compatibility with older platforms. JavaScript has a substantial number of warts and language design problems. If JavaScript were a newly-introduced language, I think it would pretty much go nowhere. It's compelling because all the browsers use it, and because we now have some nice frameworks, like Node, that use it, and because of the browsers, some great debuggers and related tooling. Still, for quick programming of one-off tasks, I would not pick JavaScript.
I would give Ruby strong consideration. Although you can write complex, large programs in Ruby, including web apps using frameworks like Rails, the language is very well-suited to small text-processing tasks as well. Check out Practical System Administration Using Ruby [amazon.com].
None of these languages have a lot of the cool new language features that are coming out (it seems like) on a weekly basis lately. By this standard, they all seem a little backward. But these newer languages are almost always immature in important ways -- either the language is evolving too much, the docs are weak, there's not much community yet, they have no module system (gem/egg/CPAN) or a weak one, they're only good at a small subset of tasks, etc. In a few years, these languages might displace Python or Ruby, just as Python and Ruby largely displaced Perl. But the newcomers are not yet strong enough for that. In the meantime, Ruby or Python would make better here-and-now answers.
Re: (Score:2, Interesting)
This is written by someone who clearly doesn't really get the power of JS (Object oriented, Event driven for free, functional at will for free). It's got warts, yes, but the power of the language and the ability to pick almost any paradigm you want and have it built in easily is phenomenal.
Ruby isn't worth it. You still have to learn JS to do anything with the web (which, if you are using Ruby you probably are). If you are writing just desktop applications then fuck it - go Groovy/Grails and get access to
Re:Python (Score:4, Interesting)
Certainly Ruby and Python have beautiful OO models, much more attractive and natural than JavaScript's. And like JavaScript, both Python and Ruby can be programmed in a functional manner if you choose to do that; indeed, their libraries support functional behavior out of the box much better than JavaScript's. And, as with the OO example above, if you really want to do functional-style programming, you might be better off using a language designed with that in mind, for example with default currying and pattern-matching built in.
But I don't think OP cares about any of that. I think OP just wants to whip some scripts together fast. JavaScript was designed with a browser in mind. It was not architechted with single standalone scripts in mind, and it continues to be a poor tool for that purpose.
Re:Python (Score:5, Insightful)
The guy says:
I'm not looking to start a new career as a programmer—I already have a career
So forget a strategic language to base a career on, he just wants to get stuff done
Re: (Score:3, Insightful)
Learn one and use it. It doesn't have to be 'new' and 'sexy' and, and, and...just use what works for you. For me it's perl.
I write perl code for CGI that also incorporates javascript, css and even PHP. JQueryUI has a hella pile of UI goodies that scale across mobile and desktop devices and perl has a deep, DEEP bench of available modules.
Undoubtedly you can do the same in python or ruby; but I have a perlhammer, so every problem is perlnail.:-/
Re: (Score:3)
As others have pointed out, what the OP is asking for is, basically, a language that does it all across many platforms, a tool that does all jobs, and I'm afraid that doesn't exist. The closest thing, IMHO, would be the oh-so-obvious answer "Java", except it's not interpreted.
Anyway, a question to those who are answering Python and Javascript: since the OP is asking for something that has, among other things, "mobile relevance, GUI desktop applications relevance", are there any decent IDEs/APIs/whatever t
Re: Python (Score:5, Interesting)
python has threads; no one cares about your definition of "correct print statement" since it always could print; Python has libraries for specific data processing that needs to be done very quickly, but the truth is 90% of a program won't be dedicated to that
What Python does have that makes it good candidate are mature libraries for all the use cases mentioned (web, server scripting, client gui, etc.) So does Perl 5, and to lesser extent Ruby has good libraries though not nearly as encompassing as either Perl 5 or Python
Global Interpreter Lock (Score:4, Informative)
Re: (Score:2)
you can use alternative (and faster) threading systems with python too, but have to custom compile the interpreter to disable some of Pythons mechanisms that won't be needed. Still, for some hypothetical high performance multi-threaded application that shouldn't be out of the question. No need to pickle objects for IPC if you are forking, pass simple strings of JSON or whatever.
Converting to "simple strings" itself takes time (Score:2)
there are limits as to what kinds of objects can be pickled into a message, and you have to mind the overhead of pickling and unpickling.
No need to pickle objects for IPC if you are forking, pass simple strings of JSON or whatever.
I was using pickling in a general sense of any serialization. (Different languages have different preferred names for this concept: Python has pickle, Java has serialize, etc.) So let me rephrase: There are limits as to what kinds of objects can be turned into "simple strings of JSON or whatever", and you have to mind the overhead of turning the object into a string and back into an object.
Perhaps my point is that it's still purpose-defeating if the CPU-intensive thing is parsing a multi-megabyte XML or
Re: (Score:2)
in those extreme cases ofttimes the objects (or data structures) and messages are handled in libraries called by python (e.g. the popular science and engineering analysis packages)
Re: (Score:3)
If you have a CPU-intensive thing, you can use shared memory and binary structs to share it, no need to turn everything into a string.
Re: (Score:3)
It's a fine language. The two biggest problems, which have caused most of the confusion, can easily be ignored: new and constructor functions. (They're why every half-wit on Slashdot thinks that 'this' is 'broken' or 'confusing'.) Avoid those while you're learning and you'll find a surprisingly sophisticated language. You'll wonder how you ever put up with Java and C#.
You'll want to learn them later, of course. But only because you'll see them inexplicably used in other people's code.
Re: (Score:2)
JavaScript is a lot of things, but fast prototyping language it ain't. You spend as much time peering through references as you do coding.
Re: (Score:2)
Some tidbits:
Re:Seriously? (Score:5, Insightful)
Maybe you should leave the coding to people who actually know what they're doing? If you're just a 'dabbler' then your code will always suck in every language and 'real' coders will smell it a mile away. Looking for the latest, greatest, buzzword to add to your resume will not improve your skills.
I really disagree with this. I think everybody who touches computers and data for a living (and who doesn't, nowadays?) should know some essential programming. They might never use it, but they'll understand so much more on what is going on.
I am very far from a car geek, but I can point to the basic components of my car and has some clue about what they do; same for small jobs around the house, basic management skills, etc etc.
Re: (Score:2)
Re:Seriously? (Score:4, Informative)
It takes special skills to program? Maybe if you are doing some rather complex operations, but in the same regard I wouldn't want to re-gear the transmission or rebuild the engine of a car while I'm perfectly capable of customizing other aspects of a vehicle. Programming is the same way, someone can be capable of doing something they want to do (run a website and manage the database; or script their everyday crap into a few lines of code) without being 'an uber hax0r' who understands OS theory at the assembly level and capable of dealing with the full range of network security threats.
Mythologizing programming is what leads to the nephew who knows a little html being assigned as the head of IT; after all that little html takes all that programming knowledge!
And since your opinion of other programmers is so low:
might I suggest that the D-K effect is in full show and, on behalf of all coders, hackers, code monkeys, keyboard jockies, and everyone who's ever touched a computer, may I ask, beg, and plead, that you to please never write another line of code again.
Seriously? (Yes, seriously.) (Score:5, Insightful)
I do this all the time in my line of work. Someone hands us a data dump of 2 million lines in a messy CSV file with dozens of columns that's old collected data. We benefit if we can make use of it--but we have to clean it up first.
It's a one-time job--script something up to process the data into cleaner data and format it as we need it to make use of it ourselves. Then, toss the script away.
There's a big difference between "software engineering" and "coding." Coding skill is useful in all kinds of edge cases that mainstream applications don't handle, and when you're just looking to finish an edge-case task, you don't need to think about correctness or maintainability. You certainly don't want to pay a contractor $$$ to cook something up if it's only three dozen lines and will only be used for two weeks. For those casesÃ"the "who cares if it works six months from now, we just need it to do something specific for us this afternoon" caseÃ"you just need it to work once or twice, during the current project, as a part of the *process* of getting it done, not as an *asset* to monetize over time.
I totally get where he/she is coming from.
Re: (Score:3)
Don't you need to keep the original file and the code you used to transform it, so that you have an audit trail which shows how you got the current data?
Re: (Score:3)
Don't you need to keep the original file and the code you used to transform it, so that you have an audit trail which shows how you got the current data?
Only if it gets down to covering your ass and then you're fucked anyway. Nobody gives a shit how you contributed to a success.
Re:I'd like to give swift a try (Score:5, Insightful)
Never waste your time on a language with only one deployment target platform if you can help it.
Re:I'd like to give swift a try (Score:4, Interesting)
There's been more money to be made with Objective-C than most other languages these last few years. Possibly than any other language. And that has only one serious target. Well two if you count iOS and OSX separately.
That should make Swift a very good bet. However, it's early days yet - the language is certainly not finalised even for a 1.0 release, and the documentation is skimpy. Most people would probably be best to wait a year.
Re:I'd like to give swift a try (Score:4, Insightful)
> There's been more money to be made with Objective-C
Only for the mediocre. For skilled persons, most of the money has been in matlab.
Avoid taking it in the backdoor (Score:2, Insightful)
[Apple Swift] is not a good choice until it is available as free software.
Let me elaborate on why this is true: Unless a compiler is available in source code form, you don't know whether it has a backdoor. And unless a language has multiple independent compilers, you can't use David A. Wheeler's diverse double-compiling construction to rule out self-propagating backdoors.
Re: (Score:3)
It's in beta. It's likely to be open sourced once it's ready. Apple have far more to gain than to lose by doing so, and in such circumstances Apple does release source. Expect to find it here:
http://opensource.apple.com/ [apple.com]
Of course it won't be GPL though. It'll be one of the truly free licenses, such as BSD.
Re: (Score:2)
JavaScript is good if you want portable web browser stuff, but otherwise it's not type safe and therefore tricky to debug.
Re: (Score:2)
I keep hearing this, but it doesn't actually seem to be a problem in the real world -- either with javascript or any other language with dynamic typing.
Re: (Score:2)
Agreed. There are a few paradigms that you really need to get your head around before you can use some languages (OO and threading, for example) but new languages tend to be mostly just learning how they do the same old thing.
Python Perl (Score:2)
Title was: Python .gt. Perl (Score:2)