DESI: Code Decoded | Prompt #8

One of the first big obstacles I encountered was learning the code itself. Back in May when I first began working the positioner test stand they had just freshly finished converting the code to Python so it could be used on both linux desktops and linux single board computers. We began testing the code and started to run into many problems. It became clear that this code was still in its infancy and so I needed to learn it so I could debug it and expand its features.

This was a daunting task. The code for running the positioners in the tests consists of 24 interconnected scripts with an additional 4 scripts on the single board computers.

At first I figured I would just jump into the code; try to read it and trace a path through it — surely it couldn’t be too hard? I was dead wrong. I spent days trying to do this and got nowhere. I swear the code was beginning to drive me mad. I imagine my roommates must have thought so when I came home at night mumbling about Python this and Python that and saying arcane names such as posmovemeasure and petalcomm all while looking a little dead inside.

So this was not going to work. I took a step back and tried a different approach. This time I tried to look at each file and write down roughly what each file does and which files primarily contained the math calculations. This work became my “Guide to Code (As of 5/12/16)” a dear part of my lab notebook that I often refer back to to help others understand the code. Now that I had a rough idea of what each file did it became easy to begin to grasp the syntax of the functions in the code and to trace paths in the code to pinpoint where problems occurred. Eventually I even mode my own files with equally arcane names like motormovemeasure and added my own features like camera corrections on “blind moves”.

Ultimately the big lesson to learn here is that effort is not a surefire solution to overcoming an obstacle; I poured my heart and soul into trying to figure out the code just with brute effort and got no results. Sometimes you need a little cleverness to properly guide your effort.


Note: If you are unsure of what I am doing or want to know more please take the time to read my first post where I cover this in great detail! Inside the DESI Project


Leave a Reply

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

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s