Today, I spent a few hours hacking away at the problem of automatically transposing song sheets into other keys. I’m pretty sure software already exists that does this, but I wanted to do this as an academic exercise, to see if I could come up with a markup language specification, and write a parser for it. I ended up accomplishing both, but also finally figured out how to write non-ASCII characters to a file on disk. Here’s my description of the implementation, and a link to the code at the end.
On Monday, I found Finder crashing way too often for my own liking, and MS Office misbehaving with the Save dialog. Therefore, I made the leap and decided to reformat my MacBook Air. The clean slate gave me an opportunity to formally try out Continuum Analytics’ distribution of Python.
The biggest selling point of the Anaconda Python distribution is that environments are a first-class citizen. Back when I wrote my first blog post detailing why I didn’t want to use any distributions of Python, including Anaconda, environments were basically a non-issue for me. However, in the intervening months since then, I have realized that in academic research, specified programming environments are a cornerstone of code reproducibility. In a published paper, if I am able to specify the Python and package versions that I am using, I increase the likelihood that another research group can download my code and run it locally. Therefore, to gain this benefit for the sake of science, I decided to give Anaconda a second shot (my first try didn’t convince me… but also because I didn’t realize the importance of reproducible code at that time). Here’s a short write-up about my experience with the Anaconda distribution at this point, with a focus on why I’ve begun to find it really, really great.
As a graduate student, it sometimes seems immensely difficult to be able to find focus for our work. Facebook feeds, email pings, requests from colleagues… How, then, do we find focus from all of these?
I think that the solution isn’t only about specific techniques. It’s about the orientation of our minds. We have to move to the other side of the spectrum. I believe that the most important thing is to be driven by a mission and to have a vision that were developed over time – and then focus comes naturally with practice. Otherwise, it’s forced focus – which is unsustainable.
In terms of things that have worked for me, I have drawn inspiration from the 99u website for these ideas, which I have successfully implemented for myself.
Here they are:
1. Think win-win: Say yes to only the best things.
Assuming you know your priorities and have them straight, then there’s no point futzing around with things that are not of the highest value to yourself and the people around you.
Therefore, if my colleagues ask me for help, I agree only if I know I can deliver positive value to them and it delivers value to myself too or others around me. If it doesn’t fulfill this criteria, then I would elect not to do it.
For example, given that my line of work involves a heavy amount of coding, if I’m asked by my colleagues to write a script to help them with something, I only say yes if I know it will be something useful for the lab in general as well.
However, if I see an opportunity to do an analysis that helps me advance my career work while also delivering value to my colleague, then I will agree to do it. Things that advance my career work include:
- Establishing positive control data sets for some of my ideas for analysis methodologies.
- Giving me test cases for analysis methodology.
- Opportunities to test coding skills on an alternate problem.
If I say “no” to all the good things, and “yes” to only the best things, then I’m giving myself the mental space and time needed to deliver on my best work.
2. Block off large stretches of your calendar and seclude yourself during those high productivity stretches.
At the beginning of your week, allocate time for yourself before you allocate time to others. If you know your body rhythms, then even better! Allocate time for yourself to do your most important work at the times that you have the most amount of energy.
Based on aggregate data recorded by RescueTime, my peak productivity comes between 10 a.m. and 12 p.m., and from 3 p.m. to 6 p.m. Between lunch time and coffee time, I am actually better off doing low mental energy activities, such as dealing with unimportant emails.
During peak energy times, though, my time is best spent on important things – high-value strategic items that include coding, sketching research ideas, and writing papers. During those times, I will find a way to block off all other noise – which can include using headphones + music, or going to a secluded place like the library, or going to the nearest Starbucks, in order to focus.
3. Let unimportant activities slough off.
If you resist saying “yes” to unimportant things, over time, they will stop coming to you. In turn, that will free up your mental space for important activities.
I have been asked to do many things that aren’t aligned with my most important goals. Sometimes I ignore them, sometimes I forget about them, and sometimes I simply reject politely. Ultimately, the only things I ought to be dedicating my focus to are things that will fulfill my own personal mission while also delivering value to the people around me. Everything else is cruft.
4. Stop being on-call.
This idea is directly lifted, but I think it bears repeating. The moment I make myself “schedulable” but not on-call is the moment I gain back my ability to control how my time is spent.
If my time is spent at the beck-and-call of others, soon enough it becomes a convenient option for them to get me to do things. While in the short-term it makes me valuable to them, in the long-run it becomes an addiction for them that I get implicated in. That kind of situation is no longer win-win for everybody, it is win-lose.
Therefore, I consider it very important for us graduate students to protect our time. This means letting others know that our time works on a schedule, that our time has to be booked in advance, and that we are not available at others’ whims. It means being extremely disciplined in saying “not now, please schedule” when others’ requests begin to roll off their tongue the moment they ask for your attention.
It comes with responsibilities too, though. If I agree to meeting with somebody at some scheduled time, I do not make changes to that schedule if possible. I also do not commit to meetings that I cannot have 100% confidence in committing to (e.g. other moving parts in my life have not settled).
5. Measure progress by milestones, not by hours.
This idea is lifted indirectly. Graduate students should really not be focusing on deadlines. Graduate students really should be focusing on hitting progress milestones, rather than measuring progress by hours put in.
I have experienced this personally. If I am not delivering on my own progress milestones, then no matter how much I re-run old analyses or run old experiments, I am not inching closer towards my final thesis goals. If I am only measuring the hours I put in, then I can very easily find myself distracted by other things simply to fill the hours.
On the other hand, if I am hitting progress milestones, then regardless of how many (or few) hours I have put into the work, I have made measurable progress, which matters much more than the hours I’ve put in. (Sometimes the time required depends on the scope of progress, so it’s okay to take a longer time, as long as one is comfortable with it and one’s advisor is as well.)
For those of us who have tasted research as undergraduates once, most of the time we have been drafted on by other graduate students and post-docs to help them with repetitive work that needs to get done. However, that’s not the case in graduate school. In graduate school, our duty is to get creative work done, leveraging our advisors’ expertise and our lab’s research environment to accomplish that.
Over the past few months, I have found one consistent habit that helps me focus my work – the habit of writing down my top 3 goals.
Firstly, I have a top 3 goals list for the long-term. This is a yearly goal of sorts.
Secondly, I have a top 3 goals list for the medium-term. This is a monthly goal, in which the three goals I list for the month are goals that help me achieve at least one of the yearly goals.
Thirdly, I have a top 3 goals list for the short-term. This is my weekly goal, in which the three goals I list for the week are goals that help me achieve at least one of the monthly goals.
Finally, I have a top 3 goals list for the day. The three goals I list for the day are goals that help me achieve at least one of the weekly goals.
I learned this system from a book I read titled ‘Getting Results the Agile Way‘ by JD Meier, and I would highly recommend it to anybody in graduate school. Graduate school is a long journey. As a training time for future creative and intellectual work, it takes a long stretch of time and it takes discipline to complete the journey. Having a good system to help one focus that journey can not only yield much fruit in the short-term (results for publishing papers, that is), but also yield long-term sustainable habits for success.
When I first implemented the system in the summer after 2nd year, I initially found that it was hard to set goals at the right level. For the programmer who might read this, it’s like not knowing what the right level of abstraction is.
However, I soon found a second habit that helped me set goals at the right level, and more. That was the habit of reflection.
At the end of each day, I would invest about 10 minutes evaluating what went well for that day, what didn’t go so well, and what could be improved for the next day. This would help me set goals for the coming day. I would also take some time to make sure that the goals set for the next day were still aligned with the weekly goals, and that the weekly goals were still the most important goals for the week.
At the end of each week, I would look a bit farther, and make sure that the yearly goals were still the most important goals I wanted to achieve. (For me, “important” goals are valuable, challenging, and novel.) Only then, I would calibrate my monthly and weekly goals to make sure that they were aligned with the weekly goals.
In some ways, given the nature of my work (computation, analytics etc.), the “week” is a natural unit of time on which long-term goals and long-range progress can be evaluated. That is why my monthly and yearly goals are re-evaluated every week. For some of my colleagues who are bench scientists, the “month” is a more natural unit of time, given the time scales on which their experiments operate.
In summary, the two habits are:
- Writing down 3 goals for the day, week, month and year.
- Reflecting and re-calibrating my goals for the next day, week, month or year.
To make this happen, start by setting some goals. Don’t be afraid that the goals will change. Let your reflections dictate whether they will change. I hope for you as much productivity as I have gained!
Note: This is part 2, a continuation of my reflections on lessons learned in graduate school so far.
One of the lessons I have learned over the past three years of grad school is that a graduate student has to have some form of motivation that keeps us going. The moment we get disengaged with the work that we are putting our time and effort into is the moment that we begin the downward slide in our graduate career.
I believe that one of the things that keeps a student going is to have a vision for what the end result of their project might look like. In this blog post, I’m going to assume that we know why a vision is important. Therefore, I will instead answer how I think vision develops, and along the way, propose a gentler definition of what it means to have vision, especially for those who are starting out in graduate school.
I’m about to enter my 4th year at the MIT Biological Engineering department. Just in April, my thesis committee (Profs. Jon Runstadler (advisor), Mark Bathe (chair), and JP Onnela (member)) gave me a pass on my examination, and I’m very much thankful for that. Having passed that and having finished up 3rd year, I felt it to be about the right time to put some thoughts down on this journey so far.
My biggest take-homes so far have been a reflection on two questions:
- What’s challenging, novel, and valuable about my work?
- How does vision about one’s project develop during graduate school?
In this post, I will analyze the three core aspects of the first question. In a follow-up post, I will outline what I think has been happening in my graduate school career with respect to having a “vision” for a career.
I recently wrote some code that, in every iteration, demanded the creation of 6 figures, called from an imported class’ function. The basic logic went like this:
for i in xrange(2000): # do some logic create_figure(1) save_figure(1) create_figure(2) save_figure(2) ... create_figure(6) save_figure(6) # do some other logic
This turned out to be a huge time sink – by iteration 500, I was seeing my code run at 1 iterations per minute, as opposed to the 7-8 iterations per minute I was seeing early on.
What exactly was going on? As you might guess from the title, it was matplotlib at work.
This is probably not the most elegant or Pythonic way of figuring out the source of the issue, but it worked. I’d like to share it here so that others don’t suffer through the same.