We're a little crazy, about science!

The new to-do list

It’s been busy! So busy I was trying to find time to write while working on the million other things I have going on. Since I have a moment, I thought now would be as good a time as any to go over the big list my main-PI gave me to do before next week. It’s a long, long, long list and as you may expect, he’s pretty far removed from the situation, so I don’t think he realizes how difficult it is to do what he’s asking, but we’re doing any anyway! Thankfully I’ve gotten pretty good at coding, the bad side is that it’s not my code I’m working with, so that’s the start of my struggles.

Do a PhD they said, it will open doors for you they said. Well as true as any of that is, it’s brutal. I’m told that the third year is probably the hardest and so far that’s turning out to be true. There’s a lot expected of me, no one teaches you anything at this level of education (paradoxically) and to make matters worse, I just had to go from mechanical engineering to neuroengineering. It’s been a journey for sure and one that I genuinely don’t think I would do again if I had the chance. Yet, the ship has sailed on that one a long time ago and I’m left with the consequences of dreaming big. I guess if it were easy everyone would do it… at least that’s what keeps me going, that and pure spite.

On to the to-do list. My main-PI wants me to reprocess ALL THE DATA!! Okay, okay, bit of an exaggeration, he wants me to reprocess some of the data this week, then the rest next week. Yep, all the data, just not in a week (thankfully). In our lab and in a lot of labs that use EEG, we use software called MATLAB to process everything. I love MATLAB, I have a good understanding of how the code works and how to write it, so it makes me happy. For the most part anyway…

The issue is that I’m also working with a plugin to the software (maybe more like a software package for MATLAB I guess) called EEGLAB. EEGLAB is free and does all the stuff I need to do, between that and software called fieldtrip (another MATLAB package) I can do anything and everything our lab does involving brain-machine interfaces. That would be great if my main-PI was okay with the way things looked. He suggested that some of the plots used in EEGLAB could go into my paper that I need to write. HOWEVER, he wants me to make changes to the plots add things, correct things, make it look nicer. just the usual things my main-PI wants.

That’s the issue I’m having. When I edit my code after a few weeks of not looking at it, it might as well have been written by someone else. Just the other day I opened some really short code I wrote that did some really impressive stuff that I had no idea how it worked, I must have had a stroke of genius when I wrote it, because once I figured it out I was surprised I thought of doing it that way. Basically the code took out all the chunks of data I was interested in, properly labeled them, and packaged it into a cell array (my preferred way to work with the data), all in under 100 lines of code and most of that code was comments. It was brilliant and I’m still not sure what was going on when I wrote it, but I wish I could tap into that on demand because I’m still impressed and I’m not even bragging because it really feels like someone else wrote it.

The code I’m supposed to edit now is far more complex and far more foreign to me. Unlike my other code that felt foreign, this one doesn’t have my style of writing code, it’s not in my hand so it’s hard to make sense of what it’s doing even though I have a good idea of what it’s doing (if that make sense). Everyone who writes code has a different style they like there code to be in. I prefer to spread out my code leaving spaces to make it easier to tell which parts rely on what. This code is condensed, uses single line if statements (which kill me inside), and references several other custom functions so I’m left with 20 windows open trying to figure out the main code.

It’s not that I can’t edit it, in fact I have and I’m almost done making the changes I needed to make. It’s just that it’s like reading another dialect of a language the words separately make sense, but together feels like a jumbled mess. That’s also not to say that the person who wrote the code wasn’t skilled, they were clearly very skilled and it’s impressive code for sure, it’s just not the way I would write it because I actually didn’t write this code.

Basically the update is that coding is hard, editing other people’s code is harder. Even then, I’ve spent all day yesterday and today doing it and I’ve solved it to the point that I’m happy with the outcome. The hard parts of the edits are over (I think anyway!) and now I can focus on getting the minor things done like make the font larger and clean things up a bit. Overall good news so far and with a little luck I can finish it and get to the looooong part, reprocessing all that damn data!!

Advertisement

But enough about us, what about you?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.