[Swlug] commenting - do you do it?

Rhys Sage rhys_sage at yahoo.com
Sat Jul 9 21:07:59 UTC 2022


I'm looking (somewhat blankly) at some Python code. It's 3 piece of code designed to run the L76B GPS unit on the Pi Pico. As it is, it works. Delving into the three pieces of code there is no commenting at all. Bear in mind my knowledge of GPS is a bit sketchy anyway. Now I'm faced with code that has somewhat cryptic procedure names and "elif" statements that I'd never come across (though having discovered them they are really cool) as well as other oddities and I'll admit I'm mightily perplexed.

I will persevere though. I am currently trying to work out where in the code and how in the code they identify which of the GPS records they're using and to confound things further the inputs are from the American GPS, The Chinese Beidu and the Russian GLONASS. 

As written, the code gives coordinates and time. That's about it. My aim is to read speed and compass direction. Altitude too would be nice but isn't essential. 

If you write code, please remember the poor sod that actually has to maintain or work on it five of ten years down the line. That person is me right now and my grasp of Python is shaky but improving as I progress through my drone project.

Rhys Sage



More information about the Swlug mailing list