Instructions:
Write a typed report entitled "A guide to programming for Biotechnologists" using the questions below. It is advisable to make it single-spaced 12 pt font with Times New Roman for text and Courier New for Perl/Unix code - because each character size in Courier New is the same size, it is easier to read. The goal of this report is not only for assessment but also should be compiled with a view to recording key concepts and ideas fundamental to programming that you might use in the future. As such, it may also be useful to include programming templates, tricks or tools that you might want to remember later. The assignment is worth 25% of your overall mark, and there are 25 questions (each worth 1 mark). Answers should be succint and although no scripts are required, some snippets of code are requested. Please include your student number at the top of the report, along with the year, your class code and course code.

A) Unix
1 - Why do we need to understand the Unix environment and how can we define this using our .bashrc or .cshrc file? Aside from aliases, what else can .bashrc/.cshrc files be used to do?
2 - Write a oneline Unix command that use grep and awk and sort and explain what it does.
3 - What do the commands "grep -v" and "uniq -d" do? Describe an example where they might be useful.
B) Perl loops
4 - What is a for loop and why is it useful?
5 - What is a while loop? Why is a while loop computationally faster than a for loop?
6 - Write clear Perl code that creates a 3 x 3 array. Use numbers as the array elements. The array elements are "anonymous" - what does this mean?
7 - If an array is empty, what length does it have? Why?
C) Perl regular expressions
8 - Write Perl code for three ways to identify empty strings with brief descriptions for each.
9 - Describe two functions for the transliterate command with code examples.
10 - Explain how to make a substitution command global.
11 - Provide an example of a Perl command that reads in a fasta file straight into an array split up by gene rather than by newlines - include a brief description.
D) Perl libraries and modules
12 - Strict and warnings are Perl libraries. What do they do?
13 - Find another Perl library: explain why it is useful and how you might use it.
14 - What is a module? How would you use one?
E) Perl subroutines
15 - What is a subroutine? Provide a simple code example of one.
16 - Write code that passes 3 scalar numbers to a subroutine "divider". Write code for the subroutine "multiplier" that returns the product of the three numbers. Explain what the code is doing.
17 - Can you call a subroutine from within a subroutine? Provide a code example of this.
F) BioPerl and object-oriented programming
18 - What is an object? What are they used for?
19 - What is BioPerl? Provide one written example of how you might use it.
G) General concepts
20 - Provide a code example of how to delete a hash element and explain what this does.
21 - The best programming only requires while loops, hashes, subroutines and modules. Discuss.
22 - How is a scalar different from an array?
23 - Name one tool you have used to determine the function of an unknown gene sequence?
24 - Are there any fundamental differences between programming, scripting and parsing?
25 - Programming is an essential tool for modern biologists. Discuss.