I’m after a little bit of advice from any of you seasoned programmers out there. I’ve been Applescripting for a few years now, and mainly thanks to this wonderful site I think I’ve become pretty adept at it. Got my head around script objects and shell scripting etc. I’m just wondering where to go from here. I’ve done a bit of research and it seems that Perl and Python would be a good next step to take. I want to improve my all round programming abilities rather than concentrate on achieving a specific goal. Has anyone got any experience or advice on what language to learn next? Thanks in advance.
I started learning Perl last month after just knowing AS for 2 years. I found it to be very powerful. Also, it is easy to learn because a lot of the syntax is relatable to AS.
Perl’s the classic hacker language, great if you want to pound out lots of quick-n-dirty scripts but a huge sprawling chaotic monster of a language. If you’re looking to polish your programming skills, Python or Ruby are a better bet as they’re much more organised in design.
I’d recommend Python myself - took me about a week to get comfortable in coming from AppleScript. The language spec is showing some middle-age spread and its standard library is uneven in places, but not painfully so, and it’s powerful, robust and very well supported. It has great third party library support (including Mac-specific technologies like PyObjC and appscript), a large and enthusiastic developer community, and tons of tutorials and other resources both online and in dead-tree form.
I’d also recommend borrowing/buying a couple good general programming books: a high school-level CS textbook is helpful for brushing up your basic knowledge of programming, and a copy of Steve McConnell’s Code Complete is IMO a must-have if you’re serious about learning good programming practice (AppleScript tends to teach you a lot of bad habits that you probably want to get rid of).
HTH
Thanks very much to both of you for your advice. It’s much appreciated!
I decided to try my hand at Python in the end. Got a copy of Code Complete and Learning Python and have been amazed at how quickly I’ve made progress. Don’t get me wrong, I’m a complete Applescript fan and have done amazing things with it, but sometimes get frustrated working out just what sort of English-like syntax is expected. Python is so simple to express exactly what you want and the code is resultingly compact and readable. You can always call it from Applescript with a ‘do shell script’ which only makes my Applescripts more powerful. Very cool indeed!
You made the right choice. Perl is really a horrible language in many respects and Python has great support on OS X.
Nice to hear it’s working out for you. Incidentally, here’s another useful bookmark for you: PythonMac SIG mailing list for Mac-specific Python discussion and support. Well worth subscribing to.
As an application scripter, you might also like to know that a new appscript release is on its way (the source distribution is already available, though I’d recommend waiting for the 1.2 binary installer which should be announced shortly). This update includes significant improvements to the user documentation: a new introduction to application scripting principles and a quick tutorial to familiarise new users with the ‘appscript way’.
HTH
has
p.s. I’m also very keen to get feedback on appscript from regular AppleScripters (especially on the documentation, which still needs some work), so if you do take a look then please drop me a note sometime and let me know how you find it.