Animal Behavior Society 2020 virtual meeting

The Animal Behavior Society conference was this week, and we were thrilled to take part in this virtual meeting with talks by Ilias, Erin, Paisley, Roz and Sam!

Here’s Ilias on the question of what makes a hummingbird unpredictable:

Erin presented her research on bird collisions and why some bird species are especially prone to mortality:

Paisley and I talked about recent work on social networks in wire-tailed manakins with coauthor Brandt Ryder:

Thanks to the organizers who put together an online meeting on short notice. We really enjoyed it and I think the quality of the talks was better than any meeting I’ve been to before. We missed the real socializing but found the virtual format to even the playing field in some ways with more opportunity for questions & discussion.

What to Read for new graduate students

Ilias and I have been talking about papers each week. Most recently, we read Platt’s Strong Inference paper about the scientific method and Doug Fudge’s engaging 50-year anniversary essay about it.

What are some articles that are great for new graduate students should read? This is a rough list-in-progress…

Stephen C. Stearns “Designs for Learning” (and “Some Modest Advice for Graduate Students”)

Platt (1964) “Strong Inference” (and Fudge’s 2014 essay “50 Years of JR Platt’s Strong Inference”)

Tinbergen (1963) “On Aims and Methods in Ethology”

Srinivasan et al. (1996) “Honeybee Navigation en route to the Goal: Visual Flight Control and Odometry”

Esch et al. (2001) “Honeybee Dances Communicate Distances Measured by Optic Flow”

Gould and Lewontin (1979) “The Spandrels of San Marco and the Panglossian paradigm…”

Ducrest et al. (2008) “Pleiotropy in the melanocortin system, coloration and behavioural syndromes”

Ioannidis (2005) “Why Most Published Research Findings are False”

Burnham and Anderson “Model Selection and Multimodel Inference”

Gelman and Stern “The Difference Between ‘Significant’ and ‘Not Significant’ is Not Itself Statistically Significant”

Gelman “The Problems with P-values are not just with P-values”

Gelman and Loken “The Garden of Forking Paths…”

Loken and Gelman (2017) “Measurement Error and the Replication Crisis”

Gopen and Swan (1990) “The Science of Scientific Writing”

National Learn to Code Day

On Saturday, I took part as a mentor in National Learn to Code Day with Ladies Learning Code. There were about 50 learners of all ages. The topic was “Using Data to Solve Problems: An Introduction to Artificial Intelligence and Machine Learning for Beginners”, led by Solmaz Shahalizadeh, the data team directory at Shopify in Ottawa.

The topic seemed like an oxymoron at first – how can beginners possibly cover in one day what could easily span multiple graduate courses? But actually, it worked great, and I think everyone learned a lot.

Continue reading →

How to learn to code

I just read a great post by Jessica Duarte on teaching beginners to code. It is all so true. Especially #5, making mistakes:

You [the instructor] have to ride out the mistakes. Make them often. Let the class fix them.

It’s essential for students to see and experience the process of working through mistakes. Right now, I am starting to use git and Github for our manakin research at the Smithsonian. A major benefit is that it allows us to make mistakes safely.

Duarte is organizing the 2017 National Learn to Code Day on Intro to Machine Learning and Artificial Intelligence. I look forward to helping out with the Ottawa chapter in on September 23!

Does biology explain the sex ratio in tech?

Here’s what bugs me about James Damore’s recent anti-Google screed: it’s a terrible misuse of biology.

The question he addresses is: Why are there so few women in tech and tech leadership? In his memo to Google, Damore offered an explanation (note: I added the numbers):

On average, men and women biologically differ in many ways. These differences aren’t just socially constructed because:

(1) They’re universal across human cultures

(2) They often have clear biological causes and links to prenatal testosterone

(3) Biological males that were castrated at birth and raised as females often still identify and act like males

(4) The underlying traits are highly heritable

(5) They’re exactly what we would predict from an evolutionary psychology perspective

I’ll assume, for the sake of argument, that points (1)-(4) are more or less true.

Continue reading →

Data sharing, reproducibility and peer review

I just reviewed my first manuscript where the authors provided a reproducible analysis (i.e., they shared their data and analysis script with the reviewers). This is something my coauthors and I have tried to provide with our recent studies, but it was my first time experiencing it as a referee.

I think it really helped, but it also raised new questions about traditional peer review.

Continue reading →

The Hummingbird Festival in Sedona

I just got back from the Hummingbird Festival in Sedona, Arizona. It was an honour to be invited there to present our work on flight.

Sedona Hummingbird Festival, 2017.

Photo by Maria Mahar at www.hummingbirdpictures.net

The audience at the festival had a ton of great questions and I learned a lot. For example, the Anna’s hummingbirds are a fairly recent arrival in Sedona, just as they are in Vancouver, because urbanization has also allowed the species to gradually expand its range east into the desert (as well as north). I wonder how that has affected the hummingbird community there? I also learned that it is pretty easy to set up an outdoor Drosophila colony as a protein source for breeding hummingbirds.

We saw the Grand Canyon and more bats, hummingbirds, and aura photographers than ever before in one place. Arizona has great insects, too. My favourite? The “pleasing fungus beetle” we spotted at Starbucks.

View from the south rim of the Grand Canyon

Photo by Charlie Croskery.

How do babies learn words?

My 10-month old daughter just proved that she understands some words. Now, when we tell her to “clap your hands”, or even just talk about clapping, we get a round of applause. Pretty cute! This wasn’t one of the things we were actively trying to teach her, like “daddy”, “mommy”, “dog”, or “milk” – I haven’t seen evidence that she knows those yet.

It just goes to show how learning works: motivation trumps deliberate efforts to teach. Clapping is just plain fun.

It’s spooky to think about what else she might come to understand without us knowing.

Flight school

Our research on hummingbird flight is featured in the July 2017 National Geographic!

The article is all about hummingbird science, and how new techniques are allowing us to see aspects of their behaviour that aren’t available to the unaided eye. You can read the print article here, see a beautiful video summary here, and another one here. Here’s one of an Anna’s hummingbird in a wind tunnel. He’s remarkably good at keeping his head steady as the wind ramps up:

The photographer, Anand Varma, took a great shot of my vision experiments at UBC that shows a bird perching in a strange, Tron-like environment of glowing green stripes:

Hummingbird in the virtual reality flight tunnel

Photography and video by Anand Varma in National Geographic.

Between getting the scene right, adjusting the lighting, and then waiting for the bird to act in just the right way, this one photograph took an entire week of work (hands on work that is, no photoshop!). Given all the other complex shorts in the article, it’s easy to see how the whole endeavour took a couple of years – much like a scientific study. Working with Anand that week, it was interesting to see how many other parallels there are between what he does and our research. A lot of trial and error, a lot of patience, and a lot of coping with the quirks and surprises of animal behaviour.

The article ends with a scene from the summer when the writer, Brendan Borrell, spent a couple of days with me in the lab. I have the honour of being described as emerging from the lab with a “sheen of sweat” on my forehead. It is embarrassing, but true! It was a hot day and we were working hard in that room.

There is also a nice editorial about the project here.

Peacock Day

Saturday, March 25 was Peacock Day at the Los Angeles Arboretum. I was looking forward to giving a talk at this event for months because it was a chance to return to my stomping grounds at the best time of year.

The event had guided peacock walks, peacock-themed art activities, sitar music, and an Indian food truck (because the species is originally from India). It was a hit – when I arrived in the afternoon there was a huge lineup at the park gates. Total attendance was over 4,400, the biggest day of the year for the Arboretum. There was even a bump in attendance the following day (2,800), because of people who missed the peacocks on Saturday.

My talk was in Ayres Hall (the same building we used to trap many of the females 7 years ago), with 170 people in the audience. I suggested that if we want to give credit where credit is due, we should really call it Peahen Day, because peahens are responsible for the evolution of the peacock’s amazing display.

I also talked about why I think the species does so well in California (and other places). I think it’s because peafowl are social (they stick together as an effective defense against most predators), because they are quick learners, and because the chicks spend a long period of time following mom – around 9 months, actually. That’s a long time for a bird! It provides many opportunities for mom to transmit skills that allow her offspring to handle new environments, like what to eat, how to hide, and even how to cross the road.

I think the main thing we’ve learned from our research on peafowl is the importance of dynamic signals during mate choice. i.e., it’s not just what a peacock has that makes him beautiful, but also how he uses it. A major theme in evolution research today is whether sexual selection speeds or hinders adaptation. Although we don’t yet know whether sexual selection has promoted adaptation in peafowl, we can say that they have spread around the world because of their sexually-selected traits. We brought peacocks to California, Hawaii, Florida, New Zealand, and many other places, because they are beautiful in our eyes as well as those of the peahen.

Troubleshooting and iteration in science

The scientific method is taught as far back as elementary school. But students almost never get to experience what I think is the best part: what you do when something goes wrong. That’s too bad because self-correction is a hallmark of science.

In ecology and evolution, most graduate students don’t get to experience iteration firsthand, because they are often collecting data right up until the end of their degree. I didn’t experience it until my postdoc, when we failed to repeat a previous experiment. It took several experiments and a lot of time  – two years! – to figure out why. In the end, it was one of the most rewarding things I’ve done.

Wouldn’t it be great if undergraduate students actually got to do this as part of their lab courses (i.e., revise and repeat an experiment), rather than just writing about it?

One thing that can come close – teaching you how to revise and repeat when something doesn’t work – is learning to code.

How to mentor

Yesterday I was asked about how I mentor in research. This is an area where I still have a lot to learn, however, there are at least four things that I think are really important:

1. Confidence**.
Instilling confidence is probably the most important thing a mentor can do. Science is about unknowns and learning how to become an expert. And that requires confidence.

So how do you instill confidence?

2. Basic programming and learning how to “script”.
This was a real catalyst for me and a huge boost to my confidence. Once I had mastered some basic programming in R, it allowed me to start treating data like an experimental subject. Want to understand what happens when you ignore pseudoreplication in your data? What about how collinearity might influence the results of your analysis? It’s not too hard to write a simulation to figure that out. A lot of basic programming is troubleshooting, a useful and transferable skill. Acting like an experimenter also comes naturally – I see it all the time with my 4-month-old daughter!

Learning how to write scripts is also key to making your workflow efficient and reproducible. Filtering, tidying, and graphing your data is 90% of the work. Doing that through code is way more efficient and leaves a record of what you did, making it easier to correct errors later on. And if you can generate publication-quality graphs purely through code, it will save you a huge amount of time making tweaks. And believe me, you will need have to make a lot of tweaks. Finally, scripting means your work can be used by others (including, and perhaps especially, your future self).

3. Students are scientists, too.
There is nothing I’ve done that couldn’t be done by an undergraduate, if they had enough time. One of the best things grad school was our weekly seminar series. We’d have an MSc exit seminar one week followed by a distinguished visiting professor the next. As a student, your work is every bit as important.

4. Treating feedback as an opportunity.
I think it’s important to provide students with lots of constructive feedback – and also, to help them develop an ability to deal with it. In science (and in life), rejection happens. I got another huge boost when I stopped worrying about negative feedback and started looking at it as a problem-solving opportunity. This is a broadly transferable skill.

Taken together, the points above are pretty circular: it takes confidence to handle feedback, but also dealing with feedback forces you to gain confidence. So “fake it until you make it” really works. As a mentor, I think it’s important to treat students as fellow scientists, to provide them with lots of opportunities to act as peer reviewers and reviewees, and to model the process of using feedback to solve problems.

Update to #1 above, on confidence: I also try to emphasize that the value of science is based on the quality of the data collected and clear dissemination of the results – and not whether it supports a particular hypothesis, or has a p-value < 0.05. I think this is a major stumbling block for a lot of students. Your thesis does not hang on the results of one test! The cure to this kind of thinking includes a better understanding of what p-values really mean and the limitations of null hypothesis statistical testing (NHST), and a focus on reporting the data (including effect sizes, confidence intervals, and individual variation).

** Related: I think a lack of confidence is a major cause of the leaky pipeline for women in STEM (and perhaps other under-represented groups). Many women choose careers outside of science despite aptitude (see for example this 2009 study by Ceci et al.). There’s some very recent evidence that gender stereotypes about aptitude – which could shape children’s interests as well as their confidence – begin as early as 6 years old (see here).

A murder and a mutant

I woke up the other day to see this:

A little closer:

Those aren’t leaves covering the trees – they’re crows! There must have been a few thousand of them (the picture only shows part of the flock, which extended to cover several other trees and rooftops). This is the third time this winter that I’ve seen a mega-roost in downtown Ottawa. Each time it has been on days that are much colder than usual. By noon, the flock had dispersed.

We had more bird encounters in Quebec last week where we saw a partial albino black-capped chickadee:

Here’s a black-capped chickadee with regular plumage, for comparison:

In domestic birds, partial albino (pied) mutations are recessive and fairly rare. It took about 100 years of cockatiel breeding before the pied mutation was established in the US, in 1951. I can’t find published numbers for chickadees, but bird banders counting mourning doves have recorded only 1 partial albino among 10,749 individuals. So this was probably a pretty rare bird! And here’s Ada, no longer impressed by a regular old chickadee:

Learning to science

From Alison Gopnik’s The Gardener and the Carpenter:

Imagine if we taught baseball the way we teach science. Until they were twelve, children would read about baseball technique and history, and occasionally hear inspirational stories of the great baseball players. They would fill out quizzes about baseball rules. College undergraduates might be allowed, under strict supervision, to reproduce famous historic baseball plays. But only in the second or third year of graduate school, would they, at last, actually get to play a game.