Careers: Interviews
Respected Linux Expert, Writer, Author
This week, Stephen
Ibaraki, I.S.P., has an exclusive interview with Ken Burtch.
Ken, well respected for
his Linux work, graduated with a Computer Science first class honors
degree from Brock University and did his Masters work at Queen's
University. He has been using Linux since version 0.97, at a time
before Linux was popular. He is the founder of PegaSoft Canada (http://www.pegasoft.ca),
an association that promotes
Linux advocacy, education and development in southern Ontario. He
has worked with a number of companies including Mackenzie Financial
Corporation, one of Canada's largest mutual fund companies. Ken is
an active member of the Writers' Circle of Durham Region and his
award-winning short story, "Distance,” was recently published in the
"Signatures" anthology (ISBN 0973210001).
Amongst his latest book
credits is “Linux Shell Scripting with Bash.”
Discussion:
Q: Ken, as a
well-respected Linux authority, we thank you for taking time out to
do this interview.
A: Thanks for inviting
me.
Q: What triggered your
interest in computers?
A: A TRS-80 Model I
computer was donated to my high school and placed in the school
library for everyone to use. I became fascinated with early games
like Paddle Pinball. I remember one occasion where the librarian
asked me why I couldn’t create something impressive on the computer,
like “Donkey Kong”. By the end of the afternoon he saw I had a stick
figure dropping letter “O” barrels a letter “P” that could jump the
barrels and make its way to the top of the screen.
Q: Can you share your
most valuable lessons from your Master’s work?
A: Professors and
universities often have their own agendas. Only you can teach
yourself and push yourself to find the heights that you can achieve.
One professor asked me if
I wanted to be in “academia” or “industry”. I have discovered that
they are more the same than different. Both are corrupted by money
and ambitions. Both have their jargon that does not mean anything.
Don’t sell yourself short and become “institutionalized” by these
ignoble institutions. Value yourself and your integrity.
Q: Ken, tell us more
about PegaSoft?
A: I started PegaSoft as
an Apple II shareware game company. “Quest for the Hoard” was an
early award-winning game with 14 track music and pioneering 3-D
stereo sound. We reformed at the beginning of the web era to make
the Niagara Falls region’s first full Internet email and news
provider. During this time my partners and I discovered Linux and we
switched our focus to a Linux support and advocacy group, sharing
ideas and promoting Linux projects in southern Ontario. PegaSoft has
been actively involved in Linux even before Linux entered the
limelight in 1999.
Q: What are your top five
tips for good Bash script design?
A: 1) Be organized
because you don’t know the life expectancy of your work.
2) Check for problems
before your script does its work.
3) Use source control to
manage changes.
4) Use proper quoting so
that your script will be adaptable to future problems.
5) Use Bash’s optional
error checking features whenever possible.
Q: Can you describe the
most important aspects of database scripting?
A: Database console
clients can be accessed like any other shell utility: for many basic
operations there is no need to go beyond shell scripting. Since the
column information is lost, it is up to the shell script to confirm
that the data received is what was asked for. In addition, the
database console clients have different conventions for their use,
including different ways of reporting errors. It is a good idea to
create a template script that can be cut-and-pasted into different
projects.
Q: What are the key
points with system administration and security?
A: Linux has many
features for secure scripting but scripts only do what you tell
them. If you don’t tell them to check for security loopholes and
honour security conventions, then they won’t be secure. For example,
when I worked for a mutual fund company, the consultants left all
their data files with wide-open access so that anyone on the
computer could view confidential information. In this case, it was
also a violation of a federal law that requires mutual fund
companies to restrict access to stock market data. No one would have
known about the issue except that a second party reviewed the
consultant’s work.
Q: Can you share the top
pitfalls when Web scripting?
A: A developer needs to
choose the right tool for a job. Shell scripts are ideal for small
web applications because of their flexibility. The downside is that
scripts have no native support for web development. To view form
variables, the developer has to design the new capability. For large
web projects, the developer should use a scripting tool with
stronger web support.
Q: What special secrets
can you provide on TCP/IP network programming?
A: Many programmers don’t
know that the Bash shell can open network connections. The latest
versions of Bash recognize protocol names so that the programmer
does not need to list TCP/IP port numbers. Essentially, the
programmer says, “Give me a Web connection” and the shell does all
the work.
Q: What five predictions
can you make about Linux?
A: Linux is at a critical
stage right now. With the release of the new 2.6 kernel, it is
poised to make major headway in the enterprise markets.
1) IDG predicts that
Linux desktops will surpass the number of Mac desktops this year.
2) Linux desktops should
reach a point of being as easy to use as Windows this year.
3) Linux will continue to
gain market share in the server market sector.
4) The Linux market will
continue to consolidate until there are two or three major vendors.
5) It will be a very good
year for companies like IBM that have embraced Linux technology.
Q: What predictions can
you make about Open Source?
A: Open source is not a
cure-all solution: it’s best suited to projects where the end-goals
are well understood. The open source communities are continuing to
rally around Linux in business and FreeBSD in universities where the
target is to create an operating system with the power of UNIX with
a friendly desktop environment like a Mac or PC. Although there has
been a number of exciting open source projects announced, the focus
this year will continue to be on the open source operating systems.
Q: What five tips can you
provide from your Linux book?
A: 1) Use “shopt –s –o
nounset” to catch spelling errors.
2) Use a DEBUG trap in
tracing mode to monitor a misbehaving program.
3) Associative arrays
(Perl-style hashes) can be simulated with Bash arrays.
4) For better
performance, don’t use find in a pipeline. Use the find switches
instead.
5) Use the dialog command
to make user-friendly scripts.
Q: Regarding your latest
book, what makes it different from the others?
A: I spent a lot of time
researching this project, trying to fill in what was missing in
other books on the market. First, some shell books only cover the
shell without referencing the underlying operating system. Since the
purpose of a shell is to run operating system commands, such books
contain little practical information. Second, the book is written by
a single author. There is a trend in the IT publishing industry to
get multiple authors to collaborate on a single book to get the book
published as quickly as possible. I would like to think that my book
is consistent and focused, solid material logically constructed with
little redundancy. Third, the book is designed with practical
examples, answers to common questions and has reference sections so
that it will serve as a useful addition to a professional
developer’s bookshelf. I hope that this book will be as useful to me
as to others that may purchase it.
Q: Can you detail your
current work and favorite projects?
A: I’m currently
developing an open source project called the “Business Shell”. This
shell is a unique scripting tool and provides an interactive command
prompt, a serious scripting language, and integrated database
support. Rather than using Perl for one project, PHP for a second,
Bash and Python for others, the Business Shell creates a
standardized environment for all these activities. The core
language, AdaScript, is based on an ISO standard and is compatible
with the Linux GCC compiler. The result is a database-enabled tool
that is part of an enterprise-wide, open source alternative to J2EE.
Q: Do you have any
humorous stories to share?
A: I always have humorous
stories. Back around 1996, PegaSoft co-founder Dan Braun received a
Perkin-Elmer minicomputer—about the size of a fridge and the power
of an Intel 386—and we installed it in my basement. We get a lot of
humidity in the summer, but so much heat was generated by the
minicomputer that my basement was completely dry all summer long.
However, my electric bill quadrupled so I couldn’t call it a
cost-effective solution.
Q: Tell us about your
short-story writing experiences.
A: I began writing poetry
in Grade 2 and won a local contest. I was encouraged to write in
elementary school by Mrs. Rutherford, who created a book of my
poetry illustrated by my classmates. When I transferred to Ridley
College, a private school, for Grade 8 and 9, I was fortunate enough
to study writing under Terrence Cronyn, the brother of actor Hume
Cronyn (the husband of Jessica Tandy).
During later high school
and university, I started—and left unfinished—two fantasy novels,
the longest one still sits on my bookshelf with the characters stuck
in the middle of a field in around chapter 13. I co-authored, with
Christian columnist Gord Harris, an unpublished book of
inspirational stories.
Last year, my short story
“Distance,” the tale of a man who had an argument with his wife, won
second price in a Toronto Sun newspaper contest and was published in
the “Signatures” anthology. I am looking forward to doing more
writing this year.
Q: What are your top
recommended resources?
A: The trouble with shell
scripting resources is that they are scattered in many places and
tend to focus on certain aspects of Bash. Even then, much of the
book is formed from trial-and-error research. My book attempts to
pool all this information in one place. So I can’t give a definitive
list of scripting resources to interested people—beyond the Bash
manual page, there aren’t any.
Q: What kind of computer
setup do you have?
A: I have a 486, Pentium
II and Pentium III and a DEC Alpha server. For research and type up
notes, I carry with me and 1980’s Tandy 102 (reputed to be the last
computer Bill Gates programmed). It is smaller than a laptop and has
a longer battery life. I live out in the country but I’m fortunate
enough to live in the one area in the county with DSL Internet.
Q: If you were doing this
interview, what two questions would you ask of someone in your
position and what would be your answers?
A: Q1) There are several
scripting languages available for Linux, such as Perl. Why is shell
scripting still an important part of Linux development?
A1) In computers, there
have always been a wide range of languages available, including
scripting languages. In the case of Bash, it is still the one tool
that every programmer uses on the job every day. It runs on a wide
variety of platforms, conforms to the POSIX standard, and contains
the features necessary to orchestrate workflow and report problems.
When it comes to these kinds of applications, Perl doesn’t offer any
significant advantages over Bash. In addition, Perl breaks with a
number of Linux industry standards, cannot (normally) be used at the
command line, and has many of the same weaknesses of Bash in terms
of scalability and debugging.
Q2) Why isn’t shell
scripting a part of the curriculum in many universities?
A2) When I was in
university, the emphasis on proper programming methodology meant
that the courses taught a high-level language (like Pascal, C or
Java) and left the students to pick up on the environment in which
the development takes place. These high-level languages don’t exist
in a vacuum and it’s not possible to do meaningful work without
introducing the tools with which to do that work. If universities
and colleges are there to help students train for work, then shell
scripting should be a significant part of any introductory Linux
course since the Linux shell will be an essential part of their
daily routine.
Q: Ken we appreciate the
time you spent in doing this interview—thank you!
A: Thank you for inviting
me to talk. |