Go Down

Topic: suggestions for the Arduino style guide. (Read 497 times) previous topic - next topic


I liked what you all did in putting together a style guide and I think it will be very helpful for me as I try to put together my sketch code including the schematic - the pictorial - and perhaps even a flow diagram. I had a friend over the other day and he explained to me how software engineers use tabs to indent sections of code to make it more readable to other software engineers. I noticed that was done in some of the examples but it was not intuitive until explained. Perhaps this might be a good add to the existing style guide.  :-) 
Rick, Rickam1@Verizon.net


Ctrl+T will reformat the sketch with proper tabs, if you weren't aware of that. It's very useful, particularly for finding problems with mismatched braces and the like/.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy


Style is quite subjective, but I like your idea, and was toying with something similar in the recent past...

There are some 'standards' as you say, like indenting, but even then - more than one team plays by their own rules...!

caPitAlisation, under_scores, object-names and the use of global variables all have their own style followers.  Apart from readability, there are factors like memory use and performance that might affect choices in any single situation.
Ask the right question, which can be hard for beginners, but this doesn't mean that google is broken.
Experienced responders have a nose for laziness, (they were beginners once)... expecting the poster to contribute to the learning experience.

Go Up