## Thursday, 5 May 2016

### What is the molarity of water?

An interesting little question and a fun bit of maths...

The molecular weight of water is: 18.02 g/mol

The density of water is 1 g/ml

Therefore 1 litre of water (1000 ml) would weigh 1000 g

The molarity of something is the number of moles of that thing per 1000 ml volume.

So we have 1000 g of water in 1 litre and the molecular weight is 18.02 g/mol

Hence mass divided by molecular weight gives us the number of moles, so 1000 / 18.02 = 55.49 moles.

The 1000 g of water is in 1000 ml (1 litre) so the molarity of water is 55.49 M

If you are struggling with moles and molarity then you might find this blog post useful: Why is memorising the molarity formula a bad idea?

You can also test your understanding of the above calculations at: Maths4Biosciences.com

## Tuesday, 22 December 2015

### How to make an email Christmas card?

In a moment of madness, I decided to make an email Christmas card...  Sounded like an easy task, but wasn't.

First thing I need to do was come up with a design and I decided to go for a simple image and message, but then there was the question of the image...  Ideally, I wanted something unique (hence all the stock images of dancing Christmas trees were out), and something that looked modern and worked on desktop, tablets and smartphones. What I needed was a homemade animated gif that was in a reactive design ('reactive design' means that the design adapts to the screen size.  Easy huh? Well, no...

Basically, there were X parts to the problem:
1. Getting the moving image
2. Editing the movie
3. Converting to an animated gif
4. Constructing the 'card'
5. Sending the emails

### 1. Getting the image

Getting the image was relatively easy.  I just shot a video of part of the family Christmas tree... Easy...

For this, I just use a camera mounted on a tripod.  The tripod was needed as the final moving image was going to be a looping animated gif so the image frame needed to be steady.

I decided to record a 10-second clip of the flashing lights so as to at least catch one complete cycle.

(Originally I was going to use the live photo option in the iPhone and convert that to an animated gif (which is relatively easy to do), but I discovered that without a tripod the frame sides moved too much and so produced a very shaky final movie.).

### 2. Editing the movie

This was another relatively easy thing to do as I am very familiar with Camtasia 2, which I think is a great movie editing program.

Using the program I was able to trim the original 10 seconds down to a 1-second cycle of the flashing lights.

### 3. Converting to an animated gif

Conversion of the movie to a looping animated gif (I needed it looping so the lights were continuously flashing) was, like editing the movie, very straight forward as used GIFBrewer, which allowed further editing of the image, and the addition of text.

Once I had the gif corrected, and had adjusted the size, I then exported the animated gif.

### 4. Constructing the 'card'

The challenge here was to make it 'reactive'.

I knew that to make the card I would have to write it in HTML (which I know), but I had to make the email 'reactive' so that it was readable on desktops, tablets and smartphones.

Reactive design is not new, and it is something I have done in the past, but it can be tricky, especially when dealing with email, as opposed to browser, clients. Basically, the way a reactive design works is that the layout and sizes of elements on the page are adjusted for the best look on the available screen space. That is, the design 'reacts' to fit the device.

When producing a reactive design there are two approaches that you can take. You can either hand-code the design, which can be hard work and very difficult, or you can use a program. For the card, I opted for Responsive Email Designer, which whilst it did the job did have a rather steep learning curve. (I also looked at Mail Designer Pro 2, which was easier to use but lacked in fine control, that is, you couldn't directly tweak the underlying CSS.)

From Responsive Email Designer it was possible to set up the various breakpoint in the design for different screen sizes and to produce the email that I wanted. However, there was a problem... Responsive Email Designer does not support the bulk sending of emails.

Of the two programs I looked at Mail Designer Pro 2 was the easiest to use (most Mac-like), and was particularly good for entering the text, but weak on layout control, whereas Responsive Email Designer was excellent for layout, but truly terrible for entering text, and had some really annoying interface quirks.

### 5. Sending the emails

The final stage of the process I thought was going to be the easiest... How wrong I was!

From the Responsive Email Designer program I had the final card. I had the HTML code and all the CSS, but I couldn't send the card to my lists.  I could send it to myself, but when I tried to forward the card to my lists the responsive design broke.

I tried viewing the card as a webpage and then using the built-in feature on the Mac to email a webpage, but that also broke the responsive design.

There is no way to add HTML code to a message in Apple Mail (there might be a way in which this can be done using the signatures but that looked like a really tedious hack that I didn't want to attempt).

Microsoft Outlook used to have an 'Insert HTML' feature, but it has either been removed, or is now so well hidden I can't find it. And I also couldn't find a way to do it using the web interface.

In the end I went for MailChimp, which is a tool I have used before, but was one I was hoping to avoid using just to send out some quick and simple Christmas email messages....

## Monday, 25 May 2015

### Four really useful exam tips

Recently I asked some colleagues for some revision and exam tips and this is what we came up with:

1. Do you know where and when the exam is being held?
Sounds obvious but it is worth checking you know where and when your exam will be held. Nothing worse than spending weeks (hopefully) revising and then turning up at the wrong time and wrong venue and missing the exam. Also, make sure you set more than one alarm clock if your exam is first thing in the morning, or get a friend or parent to phone you up to make sure you are out of bed and heading to the exam hall.

2. Try to get plenty of sleep before your exam
Try to get plenty of sleep the night before the exam. Being sleepy during an exam is not good.  Don’t try to boost your alertness with caffeine etc., and do not pull an ‘all-nighter’ revising the night before the exam. That last-minute ‘cram’ very rarely works.

3. Think Positive
In an exam don’t panic, and think positive. If you encounter a question you don’t understand move on. Don’t sit there dwelling on it, leave it and come back to it later. Be positive. Don’t panic.

4. Don't Dissect!
Do not post-mortem your exam as that will only cause anxiety and distress. Resist the urge to talk to friends about the exam. As soon as the exam has finished go off for a walk, or a treat, and don’t hang around with your classmates that think either they did brilliantly (“that was so easy!”) or who think they have failed (“that paper was impossible”). Resist the urge.

### 17 Revision Tips....

Recently I asked some colleagues for some revision tips and this is what we came up with:

1.  Try answering questions from past papers
Have a look at past papers and try some of the questions. However, don’t fall into the trap of thinking that just because a similar question has come up in recent years it will be on the next paper, or thinking that as a particular question hasn’t been seen for a number of years it must be due to make a return. Lecturers are sneaky…..

2.  Don’t become a revision Zombie
Revising for an exam is hard work, but if you work smart, and you start your preparation early you will reduce the risk of becoming a Zombie. Try to take breaks, do some exercise that clears the mind and gets the blood pumping to the brain. If you do become a revision Zombie please resist the urge to attack your classmates and eat their brains. If you see a Revision Zombie RUN!

3.  Your brain is not a sponge - be an active learner
Your brain is not a sponge, it needs to be exercised. If you went to the gym to get some exercise just standing there looking at the weights or the running machine is not going to do it. You need to be active, you need to be involved. The same is true of your brain. Just reading your lecture notes won’t do it. You need to be ‘active’. Read the notes, put them down (so you can’t see them), recall the material (re-write or redraw it), and then check it against your original notes. Doing this will strengthen the memory of the material.

Your brain needs food, your brain needs oxygen. If you just sit there revising for hours and hours you are going to get slow, tired and sluggish, and your brain is not going to get the food and oxygen it needs to help you revise. Take a break, get up from the desk and go for a walk. Clear your brain and then come back and start revising again. You will be more productive and get more done.

5.  Don't waste time
Don’t waste time making your revision notes look pretty.  No one else is going to see them. Your notes should be functional and clear. They should be concise. They don’t have to be pretty and all coloured in with tons of sticky notes on the margin. Use the time you have to revise smartly. Revision is about revisiting material, you have hopefully already learnt, so as to refresh your memory. It is not about colouring in!

6.  Find your best place to work
Find the best possible place you can for your revision. Ideally, it should be somewhere comfortable (but not so comfortable that you fall asleep), somewhere that is quiet or noisy (depending on your taste) and where you have control over noise levels, and it should be somewhere free from distractions (smartphones, Twitter, Facebook, TV etc.). Once you have found your ideal place, use it!

7.  The Revision Timetable
Make a revision timetable and try to stick to it. Work out how long you have to the exams and how long you have to revise each topic. Don’t fall into two of the classic revision timetable traps: 1. You spend so much time making your revision timetable that there is no time left to revise (see Rimmer in Red Dwarf for an example of that); 2. You spend all your time revising for the first exam and forget that there are two other exams a week later.

8.  Don't just sit there - get some exercise
Studies have shown that going to the gym after a period of study can help with the recall of the material. Don’t spend all your time revising, get some exercise and get your blood flowing around your body.

10.  Mix it up a bit...
Just sitting there reading the same thing over and over, or ploughing through your notes class after class is not learning, you need to alternate your activities to keep your mind fresh and to keep learning. Try breaking your study up into small chunks of learning followed by a small test to see if you have learnt and understand the material. Doing this will keep you fresh and alert, and speed up the learning process. You never know, it may even make it fun!

11.  Test yourself
When you are revising just reading the material is not going to make it stick in your brain so that you can magically recall it during the exam. You need to understand the material and make connections. You need to summarise and process the material. Reading is passive, learning is active. Try reading the material and then after a shorty break try recalling the material, and checking your recall against your original notes. Doing this will test you so you will know how much you really understand, and it will help you strengthen the memory of that material.

12.  Don't Panic!
During the run-up to an exam, it is very easy to dwell on little things that would normally be insignificant in your daily life and to start panicking. Don’t!  Don’t listen to rumours, don’t dwell on the trivial, and if there is a problem speak to someone, a classmate, a teacher, a lecturer, or a parent. The key thing is not to panic, and to keep hitting the revision.

13.  Tick! Done!
Hopefully, you have prepared a revision timetable and you are following it. If you are then one handy tip is to mark off your revision as you do it as this will give you a sense of achievement and progress. It is always nice to tick something off on a todo list.

14.  Treat yourself...
Constantly revising is not going to work. You will get tired and inefficient. You need to break it up. The easiest way to do this is by giving yourself planned treats. For each revised lecture or class you could give yourself some time on Twitter or Facebook, or watch some TV. May be chocolate is your thing? If so, then for each 30 minute period of study you get two squares of chocolate or a biscuit (be careful though as this revision technique can lead to obesity). A slightly healthier option may be for every 30 minutes of revision you go for a short walk. The choice is yours - treat yourself for all your hard work!

16.  Keep your brain active... Mix it up
Try to keep your brain active by varying the material you revise. Try something really tough, and then switch to something easy. Mixing it up can help you retain information and improve your understanding.

17. Stop looking at social media!
Avoid temptation. Try to get quality non-fragmented revision time. Stay off the social media. If you are a social media junky then use it as a treat to help you revise - for every 60 minutes of revision, you earn 5 minutes on Facebook or Twitter. Put the phone down, lock it in a drawer, and resist the urge.

## Monday, 13 April 2015

### Percentage Solution Calculations - an online course...?

I am always looking for new ways to deliver material online and recently I can across Fedora, which seems to offer an interesting solution, so I thought I would give it a try. You can see my efforts at with a Percentage Solution Calculations course I have produced.

What is interesting about Fedora is it follows a School | Course | Lecture model. So to me it feels familiar - that is, the structure is just like my day job!

When you register on Fedora you create a School - in my case I created the Maths4Biosciences School.

The School

Once you have a School you can create courses, and I created a Percentage Solutions course.

Welcome page to the Percentage Solutions course

And with your course in place you can then add the lectures.

The course welcome page also shows the curriculum...

Course Curriculum

Once you have enrolled you can start the course and it walks you through the lectures...

The course...

Each lecture can containing text, images, audio files, videos, quizzes, and discussions.
The weakest part of Fedora are the quizzes. To create a quiz you have to use an external site, and the structure of the quizzes is poor as it is limited to multiple choice (MCQ), and there is no way to provide the user any feedback on their answers. Interestingly the lack of feedback is something a number of online quiz systems fail to do... I may have to look in to that...

Anyway, I was very impressed with Fedora. The site was very user-friendly, and it was surprisingly easy to construct the lectures on the Percentage Solutions course.

I have also taken a number of courses on the site (they are there to help you get familiar with how Fedora works) so I have also experienced things from the students' perspective. I enjoyed the courses and found them useful, and as a student I found the site easy to use.

## Saturday, 4 October 2014

### Looking for an ELISA plate reader, and why you shouldn't get a HumaReader HS

Before I start this post I would just like to state that the views expressed below are my own and not that of my employer.

For the last 18 months I've been trying to buy an ELISA plate reader, with no success.

Admittedly enzyme-linked immunosorbent assays (ELISA) are not new and have in fact been around for at least 30 years (I first heard about them during my first degree, and they were viewed as a replacement for the radio-immuno assay (RIA)). So, on the one hand you could be argued that the technology is old and well-established, or that it's a technology that is had its day. Either way you would expect the market to be mature and able to provide suitable equipment.

When I started looking for an ELISA plate reader I was struck by how old all the machines appeared to be (in a number of cases designed in the 1990s, and a few machines in the early to mid-2000s), the poor design of their user interface and how difficult it seemed to be to get data in and out of the machine (one company offered me a machine with an attached dot-matrix printer - I had no idea such printers were still made, can you even get the paper). What was really surprisingly was how few of the machines could be networked, and how old the input/output ports were on the machines.

What I was looking for was a modern machine that could easily export results either directly to a server, or to a USB data stick. You wouldn't think it would be that difficult to find such a machine? How wrong I was....

After two rounds of procurement (nothing suitable in the first round, so I dropped my requirements) I finally settled on the HumaReader HS as it appeared to be the best of a bad bunch. The machine, from what I could see in the literature, did have a rather clunky user interface but, and this was in my opinion it's big selling point, it did have two USB ports, a LAN port, and an SD card reader. From what I could gather from various promotional leaflets and the user manual, the machine was able to export data and methods to the USB ports, and it could be connected to a computer for direct export to Excel (see below). To me this seemed to be a good match as it meant we could easily collect and export data from 25 to 30 ELISA plates in an undergraduate practical and then redistribute the data to the students for analysis.

The HumaReader HS ELISA plate reader - it can read plates, but you can't get the data out of it...

The machine was delivered to us after 8 to 10 weeks and installed. It was only at this point it became apparent that the export to the USB stick was in a proprietary format (Why didn't the engineers think to do a simple CSV export? I guess they were not very good engineers?) that could only be read by another HumaReader HS machine. I really cannot see a reason for wanting to do this? Maybe the methods when setting up a number of machines, but why the data?

Ports on the back of the HumaReader HS ELISA plate reader - there may be data ports, but don't make the mistake I did and actually think you can export data

So, strike one, no USB export. So to my fallback plane... Export to Excel.

Unfortunately the HumaReader HS doesn't even seem to be able to export to Excel. When I raised this with the company (both the local supplier and the actual maker of the machine) I didn't receive a satisfactory response. In fact today I received the email below:

"Good day to you.
After several attempts, we managed to sort the data to excel format by using a customized Microsoft word Macros’ script.
The process is involved few steps as following:
2) Open the data which in LIS format to notepad, copy and paste the data to Microsoft word.
3) Sort the data by using a customized macros’ script and the data will be saved in excel format.
4) Open the excel format data and sort the data accordingly.
In Upon the sorting, the data is as following and for detail please refer to attach file."

Is the company serious? It would appear they are! To have to do this for 25 to 30 plates in an undergraduate practical would be an absolute nightmare. What century are we living in?

How do other people cope? How do they get data out of the machine? Why would you design a machine from which you cannot export the data? Absolute madness.

Today I have told the company they can collect the HumaReader HS Reader from the lab, and refund the money.

So, I'm back in the market for an ELISA plate reader. As for the ELISA practical running in a few weeks? Guess I will have to be creative...

Declared conflict of interest: I am really interested and supportive of open data standards that allow the sharing of data between scientists and different labs. I heave worked on data standards in proteomics and was involved in establishing the 'Minimum information about a proteomics experiment (MIAPE) standard.

## Sunday, 10 August 2014

### Is your teaching website mobile friendly?

Here is an interesting question... Have you tested your teaching website on a smartphone? If not, try it... I'll wait.

A lot of websites were produced before smartphones were really around (~2007) and so they are not mobile-friendly. Your site may look great on a desktop machine...

But on a smartphone, which the majority of students now have, it may look awful.

It may look OK, but it is impossible to read, and almost impossible to use. In fact, the only way it can be used is by zooming in, which is fiddly and means that it is difficult to find your way around the site. Basically, students will get bored and not engage with the site, no matter how wonderful it is.

However, the site would look much better, and be more user-friendly, if is displayed correctly, and didn't require any zooming.

The solution to this problem is to rewrite the site so that it displays correctly (or is at least usable) on mobile and desktop devices, and this can be done using one of two methods:
1. Responsive web design (RWD)
2. Mobile redirect
Both these methods have their pros and cons, and I have used both approaches.

### 1. Responsive web design (RWD)

This, in my opinion, is the correct way to do things... However, there are some disadvantages to this approach.

A well-designed website should separate the content (the words and pictures) from the layout, and typically the layout of the page is controlled by 'code' in a file, that is separate from the content file, called a cascading style sheets (CSS) file, which is loaded by the 'content' page in the web browser. These CSS files control the way the page looks, that is, the size of the text, the fonts, the positioning of text and images etc., and they can control more that one page.

Designing a website that has content and layout style separated in this way means that if you suddenly decide that you want all your text displayed in white on a black background, instead of black on a white background, then if you have designed the site correctly you only have to change one file, the CSS file, and all pages on the site (and you may have one page, or you may have many 1000s) will display the text in that way. If a CSS wasn't used then changes would have to be made to each individual page, and for very large sites this could be a very time-consuming job.

This separation of content from layout means that if it is possible to determine the screen size of a device, i.e. it is a large desktop computer screen or a small handheld device, then different CSS files can be called so that the webpage is optimised for the device. And this is what happens, as the webpage loads the browser can run a test for device screen size and determines how to format the page.

The 'pro' of this approach is the content is displayed correctly for the device being used, and images and movies are shrunk to fit in the smaller screen. However, the 'con' is that even though the image or movie appear smaller their files are not reduced in size so pages may load slowly on mobile devices with low bandwidth.

I used this approach with my main website:

The browser detects the screen size and uses one CSS file for large (desktop and tablet) screens and a different CSS file for small screens.

### 2. Mobile redirect

With a mobile redirect, the browser still determines the screen size of a device, but in this case, if it detects a small screen it will redirect the page request to a webpage specifically written for mobile viewing.

The major disadvantage of this approach is that you have to maintain two sources of the information (text), that is, one source for the desktop, and one for the mobile. However, this problem can be resolved by holding the text in one file and loading this dynamically into the 'desktop' or 'mobile' webpages by using PHP or javascript. (As you can imagine this makes things even more complicated.) Another problem is the page may not be correctly crawled (indexed) by the search engines as they may not be directed to the mobile version of the material, and so no one may find it!

A significant advantage of this approach is that images and movies can be resized to better fit mobile devices and this means images and movies will be in smaller files, which will, therefore, load faster on mobile devices with low bandwidth. Again, this means that two versions of the image or movie file will have to be produced - one for the desktop, and one for the mobile.

## Which is best for me?

This is a tough question. Both approaches have their pros and cons. Personally, I prefer solution 1, Responsive web design (RWD), however, for sites rich in images and movies solution 2, Mobile redirect, maybe a far better solution as pages will load faster and students will get a better experience.