Beginner that needs advice...

Hello All!

As the title says… I’m new. VERY new to programming and relatively new to Mac’s as well. I run a small web design company part-time and I’m a full-time Firefighter.

I’ve dabbled a bit in the web development arena with php when a client needs a CMS. I usually go with Joomla! and modify as necessary with outside help. I’ve got all the tools for a great design, but I find myself outsourcing the development side. I would like to be a one stop shop, and I have some ideas for other development as well… more of an “application” than a website.

That said, I have two tasks I’m trying to accomplish in the near term. One, I want to learn a language that can be used on my new shiny macbook that I love. Two, a language that can be used or applied to web development that is not PHP.

I’m hesitant on tackling two languages at once because I’m simply not that smart and have too much going on. I say that because my research has basically lead me to three options. I might be a “have my cake, and eat it too” with my questions… so feel free to say so if you think I am.

  1. Learn AppleScript as a base to which expand while solving some workflow issues I have right now.

  2. Learn Python * with same goal as #1 with added benefit of web dev.

  3. Learn Ruby and use the Rails framework. * same as #2

I would really appreciate some honest feedback. I know this site is heavy AS, but I searched and it seems that the majority here are a fairly strait forward bunch… which is nice. Thanks a million!

AppleScript is poor for web development, and not a good first language if you intend to learn others as well. Python and Ruby are both decent languages, with excellent web app (Django, Turbogears, Rails, etc.), Cocoa (PyObjC, RubyCocoa) and application scripting (appscript, rb-appscript) support. Both provide plenty of library, documentation and community support as well. The only area where they fall slightly short of AppleScript is in their OSA component support (needed for attachability - Mail rules, folder actions, etc.), although there is an initial release of a Python component, PyOSA, on the appscript site that’s mostly usable with care.

HTH

Thank you for the reply…

So you do not believe that AppleScript is a good choice for a first language? OK… I’ll look into python or ruby unless you have a better suggestion. I’m open to learn any language that has the potential to help me down the line. I really appreciate the candor.

The trouble with AppleScript compared to other languages is that its syntax obfuscates its semantics. While it’s easier for a non-programmer to look at an existing script and get a general idea of what it does, it’s harder to understand how it actually does it: different words can mean the same things, the same words can mean different things, applications and scripting additions can add new words or change the meanings of existing ones at various times, etc. A command can use any one of several different syntaxes, depending on where they’re defined; a word (or words) that might represent a command in one part of a script could represent a variable, property, or object specifier in another; and so on. Other languages may not look as pretty, but their syntax, which is regular, well-defined and predictable, clearly describes the mechanics involved: a variable looks like a variable, a command looks like a command, etc.

You can learn to program in any language; it’s just that some (e.g. AppleScript) get in your way more than others. The advantages of Python and Ruby are that they’re interpreted (quicker turnaround between writing code and running it, which is good for learning and rapid development), fairly mainstream (plenty of literature and community support), and general-purpose with plenty of library support (you can use them for practical work as well as learning). And there are plenty of others offering their own sets of pros and cons - e.g. Java (big in commercial development, though compiled so you lose the immediate feedback), Smalltalk/Squeak (very elegant, though not so popular so less community and literature support), Logo (designed specifically for learners, though not intended for practical work so you’ll have to move to another language before doing any serious projects).

Anyway, remember is that a programming language is only a tool; i.e. a means to an end, not the end in itself. Once you’ve grasped the general theory and developed some decent design skills, which is what learning to program is really about, picking up new languages is relatively easy because a lot of that knowledge and experience is completely portable. For example, since learning object-oriented programming theory while working in Python, I can apply a lot of those skills in Ruby and ObjC as well because they all support similar object-oriented programming models. So as long as you start off with a reasonably decent language for learning on, you can always pick up other languages later on if you need to do work for which that first language isn’t best suited.

HTH

p.s. Once you’ve chosen a language to start learning on, in addition to picking up tutorial material for that particular language (see the language’s main website for links to tutorials and other resources), I’d also recommend getting yourself a high school computing textbook and reading through the relevant portions of that to get an idea of basic theory. After you’re underway and want to start developing some serious projects of your own, I’d recommend buying yourself a good book on practical programming techniques. Steve McConnell’s Code Complete would be my choice, as it’s easy to follow and allows you to dive in and just read individual chapters as you need them.