Lessons from talking to teenagers

My new anatomically correct friend

I've had the opportunity twice recently to talk about my research to a group of 14-17 year old secondary school students as part of the Women in Computer Science schools outreach programme in my department. This has been strange and interesting. The last time I had to address such a group, I was the same age as them, and they were people I had known for years. The dynamic feels very different from the other side.

I felt like my first talk was more successful than my second. The first time I made a point of talking about the different types of computational modelling that went on in the department - aided, beautifully, by the lovely detachably-organned anatomical model pictured above. I took out her organs and passed them around the class, explaining that yes, people did model all of these things. Yes, even the naughty bits (seriously, I have a friend whose PhD project is modelling the C. elegans gonad). I think I planned this talk better and aimed it more clearly at a young audience, and I managed make the experience quite interactive with questions and answers.

They were a small group, and there was one student who was clearly more engaged and interested than the rest. He answered my every question eagerly and accurately. I hadn't realised before just how much of an impediment this can be if you're trying to talk to a group! I was always that kid at school, and it drove me crazy that the teacher would wait for someone else to respond when I knew the answer and I wanted to get to the next part of the lesson already.

The second time I gave a talk to school children (today!), there were about a hundred of 'em and I was concentrating more on describing my own research, because they'd heard all about computational medicine that morning. There were fewer jokes and I spent more time trying to get them to understand the material. I think I made it a bit too dry and technical, when it needed to be more of a fun overview of the subject. However, they totally laughed at all two of my jokes. I now understand how my dad managed to maintain his stock of terrible jokes over the course of his teaching career.

I was following a brilliantly charismatic speaker (this guy!) who really managed to get the kids' attention and keep them engaged. He really made sure to keep the content appropriate for the audience (social networking and selfies came up a lot!) and gave out practically every piece of information in the form of a question and answer, forcing everyone to stay alert. He made jokes all the way through and kept them laughing and happy. I'm more used to a straight lecture-and-questions format from years of university education, and I'd almost forgotten the give and take that happens with school classes.

I really enjoy talking to young people and I hope to do lots more schools outreach in the future. The next time I give a talk I'm going to make it a lot more fun and a lot more interactive!

...

List to images

I've put together something I've been meaning to make for a while: a little program that takes a folder of images (.eps and .png files, specifically) and turns them into a webpage and a LaTeX document. My MATLAB code spits out images, and it's always a faff to put them together into something coherent and useful.

This is implemented in C++ and bash, and requires some kind of linux with pdflatex installed.

Click here to download the zipped up code, or use wget:
wget http://bethmcmillan.com/geek/ListToImages.tar.gz

Then, to unpack the file, use:
tar -xvf ./ListToImages.tar.gz

Then use listtoimages.sh followed by the path to the folder of images to make the pages. For example, I used:

./listtoimages.sh /users/bethmc/Pictures/

This gave me several files called "output" inside the Pictures directory, including a html file that contained all of the png images, and a PDF containing all of the eps images (the tex file is also supplied).

Anyway. Back to work, all of you!

Edit: my "Pictures" folder is mostly full of photographs of potoos. THEY ARE HILARIOUS.

...

jQuery is actually fairly amazing

HTML display prototyper
After a very brief time reading the excellent jQuery tutorial on w3schools this afternoon. I've made a useful little prototyping page, which allows you to enter HTML in the text box and see it displayed below. It takes a staggeringly few lines of code.

First, the usual top-of-file business:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>Try HTML</title>

Then, we load in jQuery from Google.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>

Now, the javascript. First, we check that the webpage has loaded:
<script>
$(document).ready(function(){

Then, we wait for someone to click on the button with the ID "show":
  $("#show").click(function(){

Now we take the value from the textarea with the ID "textin" and use it to set the HTML inside the element with the ID "results".
    $("#results").html($("#textin").val());
  });
});
</script>
</head>

<body>

Then, in the HTML, we have the area for the user to enter text:
<p><textarea id="textin" rows="4" cols="50"></textarea>

The button to press:
</p><button id="show">Show Results</button>

And the area to show the results:
<p id="results"> </p>
</body>
</html>

It has taken me significantly longer to write this blog post than it did to make that webpage. Hurrah for jQuery!

...