The first time I wrote code to predict some things and then worked with good people to test them.
My second first-author paper arose when Blair Leavitt asked “could you find all the genes in the human genome that have CAG repeats that encode polyglutamine tracts?” The idea was to identify candidate genes, that are like the huntingtin gene whose CAG-tract expansion causes Huntington disease. Soon after that, the approach revealed itself to me in Lincoln Stein's Cold Spring Harbor Laboratory course, Bioinformatics: Writing Software for Genome Research. Ewan Birney taught us about the Ensembl Perl API to access sequences and annotations in a MySQL database. Mind. Blown. The initial coding for this took me about two weeks and the rest took four labs and several years. I learned a lot about project management on this one.