One Each - Best Programming and Scripting Language

Discussion in 'Programming' started by lxskllr, Dec 16, 2012.

  1. irishScott

    irishScott Lifer

    Joined:
    Oct 10, 2006
    Messages:
    21,570
    Likes Received:
    1
    I'd go with Java. It's of intermediate difficulty, is directly applicable and useful to many areas, and will serve as a serious leg-up on essentially any language you decide to take on after it.

    Python for scripting. Hands down. Ridiculously simple syntax in most cases and very effective, also readily applicable to many careers.

    Personally I'm one of those weird people who prefers c/c++ due to the extreme level of control it provides, but then again my interests and likely career lie with low-level work on computer hardware of some variety. Even I'll admit that it's much easier to debug when you have an intermediate piece of software, written in c++, doing all of the real work for you. ;)

    Mastery of manual memory management will set you free. :D
     
  2. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,968
    Likes Received:
    636
    C++, it's not controlled by any corporation, is fairly universal, and is very powerful.

    For scripting, it's a tougher choice as they all have their uses. Php for web (but can be used at the command line too), perl is fairly well known and universal, and so is python. I think I'd probably go with Python.
     
  3. Pia

    Pia Golden Member

    Joined:
    Feb 28, 2008
    Messages:
    1,563
    Likes Received:
    0
    IMO, Python. You'll want Python for scripting anyway - why not use it for larger apps as well?
    If you run into a problem Python is bad at solving, that's the time to pick up something else in addition.

    Say you find you want to develop for Android - you might pick up Java. Or you get interested in computer graphics, you might go for C++. Or you want to do something with a cheap Linux system-on-a-chip, you might go for C. Or you find yourself dealing with scientist or analyst types at work who use Clojure or F# or some domain-specific thing, and have a good opportunity to learn whatever they are using.

    When you know Python well, if you have no real need for another language but just want to learn programming more deeply, I think I'd recommend diving into low level stuff and learning C. Then, maybe, jumping to the very high level and learning something like Haskell.
     
  4. irishScott

    irishScott Lifer

    Joined:
    Oct 10, 2006
    Messages:
    21,570
    Likes Received:
    1
    Just an amendment, if he's going to jump into the weird world of functional programming I'd reccomend Lisp as opposed to Haskell. If nothing else because it has a kick-ass book: http://www.amazon.com/Land-Lisp-Lear...&keywords=Lisp
     
  5. Staples

    Staples Diamond Member

    Joined:
    Oct 28, 2001
    Messages:
    4,443
    Likes Received:
    3
    Lots of recommendations for Python (and I agree with this recommendation) but something I never hear anything about is, Python 2.x or Python 3.x? Django and I am sure a lot of other frameworks are not yet compatible with Python 3 (which is amazing since it has been out for 2+ years).
     
  6. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    LISP and C are RMS's favorite languages. While I think C has obviously held up, and will likely never have a replacement for true low level work, I'm not sure I'd try some Lisp myself. Just from a pragmatic viewpoint.

    He says to anyone who wants to learn another programming language to definitely include Lisp on that list due partially to the read-eval-print loop.

    Of all the stuff out there other than Python and C, Golang is my 3rd interest. I'd have a tough time deciding between starting to learn more about C or Go, between the two. I'm not sure I'd use either very much. C would probably be the safer bet and the standard academic learning exercise about low level programming.

    I learned on Python 2.x, and use Python 3.x. Not sure it matters what you learn on.

    The 2.x vs 3.x issue is mainly for people who have built very large applications over many years with reliance on large external library dependencies that haven't been ported over. And it's not so much that porting it is difficult, it's also that they don't want to have to drop support for the 2.x world.
    You can write 2.x code that works on both interpreters but not everyone wants to go to that trouble with preexisting code either.
    I just write 3.x code and prefer to stay in the 3.x world. Since most of my work is trivial, it's the right move for everyone though if it's a possibility.

    There's enough to learn that I don't think it matters what version you learn on, and if you've never programmed at all and don't know what a function is, I'd argue it even matters less what language you 1st learn.

    That said, if one sees things as I do, Python is both the ideal learning language and the ideal general purpose language. There's no reason to not do some research and find the best-bet from the start. It will save you some time later on. Unless you view it as a strictly academic exercise, then start with C, then go to Python. I don't recommend that unless you're a masochist or trying to show off how dedicated you are.

    I view everything else besides Python as best tool for a niche, ie C# .Net for Windows. I wouldn't bother just to make a Windows application though eg. my Python GUI apps run well under Windows.

    Django has Python3 support now. It's labeled as experimental the last I checked but it's there.
     
    #56 Obsoleet, Jan 9, 2013
    Last edited: Jan 9, 2013
  7. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,689
    Likes Received:
    93
    Thanks for the discussion guys. I've been watching, but not participating as I didn't have anything intelligent to add. Seeing lisp mentioned caught my eye though. I mentioned programming calculators, and those happened to HPs, and I used a lisp variant. That was decades ago, but I imagine some of that would come back, and there would be some familiarity. How useful is lisp in modern computing?
     
  8. Ken g6

    Ken g6 Programming Moderator, Elite Member
    Moderator

    Joined:
    Dec 11, 1999
    Messages:
    11,912
    Likes Received:
    75
    From what I can tell, HP's "Reverse Polish Lisp" is a lot more like BASIC than like Lisp. It's not really a "functional" language.
     
  9. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,689
    Likes Received:
    93
    Gotcha. I had done a bit of playing with system RPL and assembler, but in the last case particularly, I didn't know what I was doing, and I was crashing my machine. That wasn't good at all since I needed it for work, so I was reluctant to really push things.
     
  10. Venix

    Venix Golden Member

    Joined:
    Aug 22, 2002
    Messages:
    1,082
    Likes Received:
    0
    It's actually very useful and relevant. Several posters have mentioned Clojure already--it's a Lisp dialect.

    Clojure was initially designed to target the Java Virtual Machine, but now it also supports the .NET Framework and JavaScript. It's a superb language, especially when compared to Java.

    Clojure, Scala, F# and similar are great because they join elegant and powerful languages with the extensive framework/library support that used to only exist for mainstream languages. No more forced choice between good language + crap libraries or lame language + good libraries.
     
  11. JavaMomma

    JavaMomma Senior member

    Joined:
    Oct 19, 2000
    Messages:
    701
    Likes Received:
    0
    My current go to languages:
    C#, Python

    I don't think one can ignore JavaScript though, it's a pretty ugly language, far from my favourite but a necessity for client side web programming. Node.js is also pretty cool. The popularity of the iPhone means Objective-C is also fairly popular, not a language I enjoy but it gets the job done just fine.
     
  12. Tequila

    Tequila Senior member

    Joined:
    Oct 24, 1999
    Messages:
    821
    Likes Received:
    0
    Mainly Java and Python.
    R for statistical analysis. Reading R in Action and playing with it in R studio has been some of the most enjoyable programming in a long time.

    My limited brain has no room for any other languages :)
     
  13. Fallen Kell

    Fallen Kell Diamond Member

    Joined:
    Oct 9, 1999
    Messages:
    4,919
    Likes Received:
    3
    Except it can't rewrite its own code on the fly, like LISP can... Not that I would ever tell anyone to ever learn LISP (unless they are dealing with AI).

    As for my choices:

    Scripting: Perl or Python (really can't go wrong with knowing either. Perl can be easier to pickup sometimes if you know another language already since just about every other language's syntax found its way into Perl. But it also means there are 1000 ways to do everything in Perl, so looking at someone else's Perl code can be like looking at an ancient cuneiform text from Sumeria).

    Real language: C or C++ (They are the backbone language of just about everything. Window kernel is C. Unix kernel is C. Linux kernel is C and being ported to C++ (may have already been completed). Mac OS kernel is C++. In other words, anything and everything important is done in C or C++.).
     
    #63 Fallen Kell, Jan 15, 2013
    Last edited: Jan 15, 2013
  14. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    Update from the OP?

    I think the answer is clear (being outright biased) that Python gives you a good tool for crossplatform GUI apps, webapps, scripting, whatever usecase you have. Add in it has access to the Java world with Jython and .Net world with IronPython.. and you have the best swiss army knife in existence.
    No brainer and one of the places to learn to code too.

    I'm personally not big on statically typed, compiled and the only one I'd learn out of the pure desire to learn would be C. C is simply not going away as quickly as the rest, the standard for embedded microcontrollers, standard for device drivers, OSs and used for many performance intensive local apps.

    C works in tandem with Python as well. I view everything other than Python/C as the 'best tool for a given job'. ObjC for Apple, Erlang for distributed systems, the Java and .Net world I'd target with Jython or IronPython.

    So what is it OP? Python and C? Something else?
     
  15. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,689
    Likes Received:
    93
    Python and Java. I'm getting a little old for something like C. This is just for my amusement, and for /possible/ use in a business setting, but at this point a career isn't likely.

    Python has wide use, and can be used for simple and complicated tasks. My Java desire is almost exclusively for Android use, but it's nice because it's cross platform. For Android specifically, I have source code I can look at, and I have a real use for it. I'd like to modify and extend existing programs for my own use. Also, there's a real lack of GPL apps in the market. If I somehow came up with something worth using by others, I'd like to release it under the GPL and fill out the market by a little bit.
     
  16. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    Cool, sounds like good choices. Python can do heavy lifting, it's a bonefide powerhouse language. If you just learned that, you're a 'real' programmer. It's not 2013's version of VB6, contrary to static typing elitists. Dynamic typing is the future, the stuff that truly 'needs' static typing is best met with C.
    My opinion of course, but kernels, drivers, large apps are all written in it. I'm with Linus Torvalds that you either want as low level as possible, with something manageable for large projects- or go straight to the top and gain all the niceties of the dynamically typed, garbage collected, interpreted languages.

    I write off most static typed languages besides C for that reason. We will need static typed languages for the foreseeable future. But I think as the world increasingly goes towards 99.9999 (six 9's, nine 9's, whatever) uptime for internet services and applications.. we'll see dynamically typed languages like Erlang become more important. Erlang was developed to meet a goal of 4 minutes downtime a year. You can't do that with much else. Not saying run out and learn it, just that stuff like that is what to keep an eye out for.
    That said, similar to IronPython and Jython- you can write C using Cython, so no real need to learn it for most of us.

    Java is one of the biggest boys on the block though, there's certainly reasons to jump into one of the big two (C# or Java) but Java is platform independent.
    You can't go wrong with time spent in either choice. You have two worthy endeavors charted out. Best of luck.
     
  17. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,968
    Likes Received:
    636
    I barely know python but I used it to do a serial read of an arduino device and it's MUCH easier to do that with python than say, C++. So it can definitely do a lot of cool stuff and it's easier.

    Another cool thing with python is that you can use it as a command line calculator. Just type "python" and then you can start typing equations. Code too of course, which is awesome if you want to experiment with code on the fly.
     
  18. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    Raspberry Pi is another big reason for Python. You can do anything with those. I think it supports more than just Python (C I think and some form of Basic), but Python is the standard language.
     
  19. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,968
    Likes Received:
    636
    I keep forgetting about Raspberry Pi. I need to see if I can buy these in Canada and start messing around.
     
  20. homercles337

    homercles337 Diamond Member

    Joined:
    Dec 29, 2004
    Messages:
    6,341
    Likes Received:
    1
    As a scientific programmer (and computational scientist), i have only ever needed/used matlab/C/C++/Python. I hate bash/awk/tcl and all those mess of scripting languages. That is my $0.02 if you wanted to go the science route.
     
  21. Cogman

    Cogman Lifer

    Joined:
    Sep 19, 2000
    Messages:
    10,086
    Likes Received:
    14
    Raspberry pi is an ARM architecture. Its default OS is debian (linux) based. Those two things mean that you can pretty much run any language you fancy with it, certainly every language mentioned in this thread.
     
  22. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    Well, not C# on .Net.
    But certainly, you can fire up Erlang or C# Mono on one. You can 'run' almost any platform/language you want on it.

    I don't have one, but I'm guessing the inner workings to the hardware are easily accessible via Python.
    Using anything else probably means diving into C and abstracting it out again yourself.. which is already done for you on RaspberryPi via Python.
     
  23. Cogman

    Cogman Lifer

    Joined:
    Sep 19, 2000
    Messages:
    10,086
    Likes Received:
    14
    One of the benefits of using linux is how easy it makes it to interact with the hardware. Hardware handles are simply files that you interact with. In other words, want to turn a light on? Simply write 1 to the "turn light on" file.

    Any language that supports FileIO is going to be able to play with the hardware pretty seamlessly.
     
  24. Obsoleet

    Obsoleet Platinum Member

    Joined:
    Oct 2, 2007
    Messages:
    2,184
    Likes Received:
    0
    I'll take your word for it. I don't have one, and not to extend a thread that has gone beyond its purpose, but was looking to pick one up to control a light, problem was finding a way to interface with the light to turn it on and off. It had no hardware interface and finding a power adapter that could be controlled was tough (for cheap).
     
  25. Crusty

    Crusty Lifer

    Joined:
    Sep 30, 2001
    Messages:
    12,688
    Likes Received:
    0
    That's because you're looking for the wrong thing. What you wanted was a solid state relay, which can be triggered from all sorts of low voltage ranges(USB, Serial port, GPIO pins, etc). You would then be able to do stuff like
    'echo 1 > /dev/light1' or 'echo 0 > /dev/light1' to turn lights on and off.
     
Loading...