What is the best way to learn Python, Ruby and other scripting languages?
More than a few readers posed that question in response to a recent column I wrote about how scripting skills are no longer optional for software test pros. Others were kind enough to answer the questions, offering their fellow testers suggestions for learning Python or other scripting languages that work well for them. To round out the advice, I reached out to Lisa Crispin and Matthew Heusser--two SearchSoftwareQuality.com experts--to see what they had to say about the best way to meet this challenge.
Tip #1: Attitude is everything
A key theme that emerged from the suggestions is that learning languages to write scripts for test automation is a do-it-yourself project. No matter where you work, it's unlikely the boss will make this happen for you. In other words, no one is going say: "Take this class. Do it on our time. The company will pay."
In the real world, software test pros need to take the initiative to learn on their own time, and often on their own dime, as well. (The options offered here are free or low cost.) Learning a scripting language is easier for software testers when they take on the challenge willingly, with the mindset they are investing in their own professional development. Enthusiasm helps, too. One reader who responded to my column on scripting languages took the initiative to learn Python. I loved his/her comment because it's a great example of the assuming the right attitude.
"I started taking online Python courses. I love it. Looking to increase my skills… using Python. Will try to incorporate Python skills at work. Will see where this leads. I do find Python exciting."
Tip # 2: Get this book
There's no shortage of books available to learn scripting languages like Ruby, but as many have noted, most aren't geared to software testers. Here's one that is, and the title says it all: Everyday Scripting with Ruby: For Teams, Testers and You, by Brian Marick.
Crispin recommended this book for learning Ruby, and Heusser gave it a nod as well. "It was a huge help to me when I wanted to get better with scripting. I worked through all the examples in the book and it gave me a lot of confidence," Crispin said.
Although she has a background in programming, she recommends Marick's book to those who don't. "For a newbie, working through a book like Brian's is a good way to go," she said.
Tip # 3: Learn Python and Ruby at Codecademy.com
Tip #4: Team up with a developer
"Try to choose a scripting language with which programmers on the team are familiar."
Lisa Crispin, Agile testing coach
I talked about learning the language your developers work with in a recent column on automated software testing, and Crispin suggested the same approach. "One tip I give testers is to try to choose a scripting language with which programmers on the team are familiar." She related the following story—with the caveat that she is not recommending today’s testers learn TCL.
"Back in the day, I worked at a company where the Web app was coded in TCL. I had heard that TCL was a good scripting language for automating tests, so I bought myself a book and taught myself enough to write test scripts. Whenever I had a problem, the programmers were happy to help me, because they were experts with TCL. If I'd used something different, they wouldn't have been any help."
Final words of wisdom come from another reader weighing in on the need to learn scripting languages: "Countless skills are self-taught. Change is a constant state." Well said.
Are you teaching yourself a scripting language? Let me know.
This was first published in November 2013