I have been reading the Clean Code book I got today, and it is exactly what I was looking for! Keeping functions small, preferably do one thing only, have descriptive names, don’t pass too many variables to a function. These are just a few of the insights helping me clean up my code. It’s also a good point in development to do this I think, as there are a lot of areas I can improve, and what better way to learn then through lots of practice!
I took my one big Sensor Commands function and put it in it’s own .py file, then broke it up into many smaller functions. MUCH nicer, but still needs work. I’m pretty happy overall, since I do actually want to share my code and have it be useful to others. Being easy to read and follow seem like important steps in that direction.
Guess I’ll be spending lots of time working on the code, but making zero visual and functional changes ^_^ It actually sounds like it would be one of those really boring things, and I suppose it would be if that’s ALL I was doing. However, just like organizing your office to perfection, there’s a real satisfaction from cleaning up programing code… of course I wouldn’t go as far as to say “To Perfection”, since I’m still very much learning! But a desire to learn, and do better are very important steps on the path towards Perfection (Never obtained, always getting closer).
Recent Comments