Sometimes you’re too close to the problem

I’ve had a breakthrough! I’ve been working for months on a problem and I probably could’ve come up with the solution sooner if I hadn’t been trying to force it. Maybe I’m weird, but I find the easiest way to come up with a solution to a problem is to just walk away from it. I don’t always do it, but I always end up regretting that I didn’t just step away from the thing long enough to get the full picture.
Originally I was going to call this post “they come to me in the shower,” but that felt a little suggestive. Ideas come from everywhere and inspiration can strike when we least expect it. I’ve had several instances where I was doing something completely unrelated when the perfect solution pops into my head for seemingly no reason at all. I’m sure my brain has it’s reasons, but I don’t think I’m alone in this. Since this happens so frequently I think I’ll share a past example of my biggest “eureka” moment and then we can talk about the latest one.
During my research as an undergrad and Masters student I was secretly waging a war. A war on pin joints. A pin joint is the most common type of joint we engineers use. There are so many examples of the humble pin joint that you’d be hard pressed to find something that moves not using a pin joint. From door hinges to robots, prosthetics, cars, everything uses the pin joint. We use it because it’s easy to manufacture and it works well, but it is certainly not the best solution.
Before I started my PhD my research was in biomimicry. Copying and augmenting the solutions that biology has provided us for problems, because almost all the problems we face are the same problems biology has found solutions for. Nature has had millions of years as a head start to find the best solution and while nature’s solutions aren’t always the best, they are oftentimes better than the stuff we can do. So I borrowed a lot from the human knee and designed a knee for prosthetics/robotics that was more efficient and more wear resistant than anything on the market. It’s been four years since I came up with the design and I haven’t found a lab who’s made something better.

The issue became finding a solution for the rest of the joints. I hate pin joints because they break easily. When they break it’s what we engineers call a catastrophic failure, meaning once it goes, there’s a good chance other things will break as well. Think of what it may look like if the hinge on your car door broke, the door itself would more than likely get damaged in the process. Pin joints are a horrible solution for robots (in my opinion) so my ultimate plan was to build a robot that didn’t rely on pin joints. That was easier said than done though, I had no idea how to solve the problem so I had to think… and think… and think.
Eventually I was helping a friend with a different project when the idea struck. I had spent a lot of time thinking about the stuff that holds us together. I just couldn’t come up with a good analog for that, nature uses strips of thick material to hold bones together, not the ideal solution for a robot. Eventually I found the solution hidden in the most common joint in the body, the synovial joint. It’s the way the body connects almost all of our joints together and the solution came to me because we were working to build a testbed for determining the material properties of some artificial muscles we had in the lab. Months of trying to find a solution to the problem and just like that, I had my readymade answer sitting in the palm of my hand.
After a few weeks I had the prototypes constructed, ran some tests, then I built a complete life-sized humanoid robot that was self balancing, could stand without support, and had no load bearing pin joints. Technically speaking the knee has pins, but those don’t carry the load, trust me I checked and that’s the secret of my knees longevity. I don’t know if I would’ve come up with the solution otherwise, I mean the answer was right in front of me the whole time, but I never put the pieces together. I’m not a smart man, but I would like to think others in my position would’ve missed it too.

Which brings me to today, or rather yesterday when I came up with the solution to my problem. Math is hard, programming math is sometimes even harder. I don’t know why, but I spent most of my education writing pretty looking formula out and trying to convert that to code is (for me anyway) an almost insurmountable task. I’ve literally had to write out on a piece of paper each of the equations or I’ll use Microsoft paint, which is my favorite place to draw out my ideas… poorly. Even then it takes time, effort, and I just hate doing it, but that’s my life now so I deal with it.
The problem is that my main-PI wants me to take the data that I finished collecting back in November(ish) and run a very complex type of analysis. That would be fine if I had used the premade software to do all the previous analyses that I had done, but as I mentioned I am not a smart man. I instead wrote tons of custom code to do all the things that I needed to get done because at the time it made more sense to do it that way. This meant that the software that would let me do the analysis my main-PI wanted wouldn’t work since none of the data was in the correct (outrageously complex and particular) format the software package wanted and I had to once again come up with my own solution.
I scoured the internet for an alternative. I had hoped that others had written code I could adapt to my needs, but I came up empty handed. So it was time to once again write my own. For the past few weeks I’ve been stuck on a single step, it’s THE step to convert my result to the thing my main-PI wants. It took me months of work to get to this point so I was eating, sleeping, and breathing trying to find the solution to this problem. As you may (or may not) be aware for the past few days last week I was incredibly busy with my Co-PI’s research (here and here). So I was forced to step away from the project and focus instead on the tasks we were trying to get done. It was an awesome set of experiments by the way, but four in one day, plus a lecture, then three the next day was a bit much!
The short version (since I tend to ramble) is while I was participating in an experiment (as in I was the subject being experimented on) the idea popped into my head as if by magic. The solution was simple, so simple I can’t believe it didn’t occur to me simple. I needed some values from a different function in a previous step (one I could run using my custom code), but I didn’t know it at the time. I guess my brain connected the dots as I sat there and I realized the step before the one I was stuck on had the answer I needed the whole time.
Yesterday I implemented my solution and got garbage results… yeah sometimes that happens. However, I was close I just didn’t know why I was getting the wrong answer so I dug into the code for the software package that would give me the answer I wanted (I used a lot of the debugging techniques I taught here FYI). Turns out I just needed to scale the output I got from the other function and that was the step I was missing. I went back, scaled my output then plugged it into the function that would give me the solution I was looking for. It was the solution I expected, but I had to verify it was the right solution.
Sure enough, the solution was correct! I was done. Okay not quite, I still need to make some fancy plots and what not, but that feels a lot more achievable now that I have the solution ready to go. Making pretty plots is something I’ve gotten quite good at doing. This will be something totally different and novel, but my main-PI will love it (I think anyway). It probably won’t be super straightforward, but it will be good if I can pull it off.
So that’s the story of how I was being experimented on and found the solution to my other problem. Maybe it was the electrical stimulation, or maybe it was just that I had time to sit and think while. I honestly don’t know. My hope is by writing this down, telling these stories, I will remember that if I’m stuck the best thing I can do is walk away.
Sometimes you’re too close to the problem to see the solution.
But enough about us, what about you?