Archive | Site news

A new programming book for non-biologists

Since writing and publishing Python for Biologists I occasionally get email from folks who found the books useful, and want to pass them on to non-scientist friends. This is, of course, very gratifying to hear, but the problem is that the examples and exercises won’t make much sense to anyone without a biology background.

With this in mind, here’s my first programming book for non-scientists:

front

 

 

 

 

 

 

 

 

As the title suggests it’s suitable for anyone just getting started with programming, and assumes no background in biology or even science. The only thing it shares with Python for Biologists is some of the text and a friendly, approachable style. If you have friends outside biology who are interested in programming, please send them along!

 

0

New business cards!

I’ve been meaning for a while to get round to making some business cards to hand out to folks who ask me about learning to program. Normally I just tell people to google “python for biologists” and they’ll end up in the right place, but it would be nice to have a physical reminder to give out. At first I though about having some USB memory stick business cards made  – there are some really cool ones that are the shape of a normal business card but can fold in half to reveal a set of USB contacts. Unfortunately they’re way expensive, and the minimum order is far more than I need.

Next I thought about making a “cheat sheet” style business card – the type with contact information on the front and some useful quick-reference information (e.g. a list of regular expression characters) on the back. I guess the idea would be that the recipient is more likely to hang onto the card if it has useful information on it. But I couldn’t think of anything that would fit in well with my website – after all, the emphasis of pythonforbiologists is on learning to program, not simply the practice of programming itself.

Finally, I had an idea; I would put a tiny biology-themed programming exercise on the back of each of my business cards, along with a link to a web page giving the solution.

cards1

This would hopefully mean that when somebody gets hold of one of my cards they can see straight away what kind of material and training I provide, and can head over to the website for more information. I wrote five different nano-exercises on five different biological topics:

  • parsing FASTQ file format
  • counting the number of occurrences of short motifs in DNA sequences
  • calculating AT content using a sliding window
  • generating the reverse complement of a DNA sequence
  • calculating restriction fragment lengths

Fitting the sample code onto the business cards was quite difficult. I wanted to make sure that the code would be readable and not too hard to understand – I even found room for a few comments – but it also had to be very concise. I only had about ten lines to work with, so I had to use very short variable names.

cards2

You can see images of all the reverse sides at this link.

After I’d designed the code samples and exercises I wrote web pages for each of the solutions. I decided to put the exercise description and the link to the solution pages on the front of the card, as I’d used up all the room on the back with the code samples.

cards3

I tried to make each solution page interesting to read. As well as giving an answer to the exercise, I included extra material about useful bits of the Python language that some people don’t know about. For example, in the solution page to the FASTQ parser exercise I talked about generator functions, and in the sliding window exercise solution I talked about higher-order functions.

You can browse all of the exercises along with links to their solution pages here. Comments appreciated!

3

Powered by WordPress. Designed by Woo Themes