Im wanting to learn a new type of scripting

the-keeperthe-keeper New Zealand
edited August 2010 in Science & Tech
Im wanting to learn a new type of scripting other than batch, so was wondering what would be an easy language to learn but not overly limmited, which is probably a dumb thing to say :sawed:. ive been sujested to learn a 'c' but i would like to know what each language that is sudjested to me is used for too =P

thanks guys :D

Comments

  • pragtasticpragtastic Alexandria, VA Icrontian
    edited August 2010
    Perl
    Python
    Ruby

    All 3 are useful from a command line and are also used to build modern web application in many cases (django/rails/etc). Python/Ruby also have Object Oriented capabilities (which is where these languages are more in depth than bash), and Perl will get OO in the newest release I believe.
  • pragtasticpragtastic Alexandria, VA Icrontian
    edited August 2010
    Also, the 'C' languages are not scripting languages since they need to be compiled.
  • MrTRiotMrTRiot Northern Ontario Icrontian
    edited August 2010
    I'd go with Python. A lot of things use Python, It's fairly common
  • ardichokeardichoke Icrontian
    edited August 2010
    Eh... from what I've been seeing Ruby is where a lot of the industry is going these days, more so than Perl or Python. Might be more useful job-wise to look into Ruby.
  • AnnesAnnes Tripped Up by Libidos and Hubris Alexandria, VA Icrontian
    edited August 2010
    Keeper,
    What are you ultimate goals? To just learn some cool new shit, or learn something that will further a career or career options? What sort of things do you want to build with this new language?
  • the-keeperthe-keeper New Zealand
    edited August 2010
    My ultimate goals are a bit of both really, i do want to head towards a career in computer programming/ scripting. i supose i want to learn stuff that will kinda lead me in the direction of and prepare me for more advanced stuff.

    Also which is easier, python or ruby?
    im not wanting to opt to the easy way out but i also dont wana throw myself in too deep.

    and finally where do i start with each type of scripting, and what kinda scripts should i try to create to get me on my way.
  • LincLinc Owner Detroit Icrontian
    edited August 2010
    pragtastic wrote:
    Perl
    Python
    Ruby
    Or the one that's nearly as popular as all 3 combined, PHP. :rolleyes:

    If you want to learn a language that's going to let you work with the maximum number of popular web apps (like Wordpress & vBulletin, which power this site) I'd go with PHP.

    Sites & software running on PHP: Facebook, Wikipedia, Digg, Joomla, WordPress, Drupal, and just about any popular forum software you can name. It's ubiquitous and making great strides with every release.
  • pragtasticpragtastic Alexandria, VA Icrontian
    edited August 2010
    The only reason I didn't think of PHP in my response above was because I was thinking of languages that you would commonly see used from both the command line and to build web apps. That being said, I think PHP is a fine choice since it has made great strides in recent times as Lincoln stated.

    Also, now that I think about it, what you're looking for keeper isn't confined to just scripting languages. What you should be looking for is a fundamental knowledge of programming concepts, which these days most any language will support. Therefore, the language you pick really doesn't matter, what matters is that you find some sort of online tutorial or book that can explain the concepts in an easy to understand way. For example, if you were to start with Ruby I would suggest this book.

    Once you have a solid grasp of the basic concepts of programming, that knowledge will translate to other languages without much trouble as it's mostly just learning new syntax.
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited August 2010
    I'd suggest python.
  • LincLinc Owner Detroit Icrontian
    edited August 2010
    pragtastic wrote:
    I was thinking of languages that you would commonly see used from both the command line and to build web apps.
    That's funny, because it was just Friday I was reading about using grep and cat with a PHP web interface. :p
  • ardichokeardichoke Icrontian
    edited August 2010
    Lincoln wrote:
    That's funny, because it was just Friday I was reading about using grep and cat with a PHP web interface. :p

    I think prag was talking the opposite of that... namely using a scripting language to simplify the day-to-day operations on the command line, instead of scripting a web interface to the command line :P
  • LincLinc Owner Detroit Icrontian
    edited August 2010
    You can run PHP via the shell as well; was just doing that at work last week too. The web interface just simplifies further.

    Aside on what we were doing: co-worker wrote a bash script to deploy a new dev subdomain and I challenged him to have it send the team a confirmation email too which I believe he accomplished by throwing a PHP script in the mix.
  • LincLinc Owner Detroit Icrontian
    edited August 2010
    the keeper, here are some things to consider:

    1. Look at who's hiring for what. For example, f you want to work for Google, better learn Python. If you want to work with Facebook, it's PHP.

    2. What language has the resources you need to learn it (books, tutorial sites, references, people you can ask questions to).

    3. What language can run in the server environment you want? PHP and Perl have had the edge historically, but Python and Ruby have made inroads here.

    4. What sort of programming do you want to do? If you're building custom websites, probably PHP. If you're managing a lot of internal systems, probably Perl. If you need to build web apps rapidly, probably Ruby on Rails. Each has its own strengths and weaknesses, so look at what you want to do.

    5. At some point, you'll be looking at frameworks. Which language has the frameworks that are going to let you work the way you want to? (e.g. Ruby has Rails, PHP has Cake & CodeIgniter). http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#PHP
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited August 2010
    Depending on your age and your current standing in school, it's a good idea just to pick a language and learn it. There will be obvious differences between the languages but once you learn the concepts and what makes each language unique (static vs dynamic typing, for example), you should be able to pick up a new language relatively easily.

    I'd just pick a high level language, learn it, and try to do things that interest you with it.
  • the-keeperthe-keeper New Zealand
    edited August 2010
    im currently 15 years of age and well now that i kinda think about it, if i was to be involved in the making of games it would be more for larger games like mmo's and stuff like that, so are these languages still suited to that type of programming?
    But really and truely my thoughts on what kind of programming i want to do are still very broad. i guess ill have a look at python, ruby and php and get back to u guys for further help.
  • ardichokeardichoke Icrontian
    edited August 2010
    Scripting languages have nothing to do with building games. Unless you're building web-based (in the browser) games. If you're looking go build games your best bet is to start learning C and C++ as those languages are generally the cornerstone of game development (at least AFAIK, it's been quite a while since I was interested in game development. One attempt to program a "simple" AI cured me of that).

    Now then, that all said, let me break down the common uses of scripting vs. programming as best I can.

    Scripting
    * Bash, PHP, Perl, Ruby, Python, etc.
    * Often used to build websites (as Lincoln mentioned)
    * Also often used to simplify tedious command line tasks
    * Scripts are usually shorter and more straightforward than full-fledged programs
    * Can be described as "programming within a program". That is, you write a script, but another program reads, interprets and executes that script at run-time. This is somewhat inefficient (though the power of modern computers makes this less of a drawback)

    Programming
    * Java, C/C++, D, etc.
    * Generally more complex than scripting
    * Most desktop applications (including games) are written in a programming language, not a scripting language, mostly for the sake of efficiency.
    * Programs are not interpreted. They are written and compiled directly into machine language (the exception to this rule being Java, which is still interpreted but must be compiled as well. That's a more complex case and far beyond my time to explain here).

    This is, of course, grossly oversimplified. The reason for this is mostly the fact that I don't have the time or desire to rehash a topic that has been extensively covered already. If you really want to get in depth on the difference between scripting and programming, just use the Google. It can guide you to far more detailed information than I can dredge out of my brain. Same goes for game programming, some Googling will yield you more results than we can give you.
  • PirateNinjaPirateNinja Icrontian
    edited August 2010
    This is kind of out there, but I think learning AutoIT or AutHotKey scripting is a lot of fun if you are just looking for a hobby. They are very simple scripts with easy syntax and they are a great way to learn the essentials of scripting. Both have nice central community support forums, and large libraries of code to include in your projects. They probably represent a nice stepping stone to Python.

    A second suggestion is to keep learning the English language. I'm no expert with English. I screw it up all the time. However, it would be healthy to get in the habit of simply trying to use proper grammar and spelling at all times.
This discussion has been closed.