Go Down

Topic: suggestions for the Arduino style guide. (Read 1 time) 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/.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
ATtiny breakouts, mosfets, 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.
Experienced responders have a nose for laziness, (they were beginners once)... Sure, there are trolls, chest-beaters, and pretenders - but the help you'll get here is about as good as it gets - if you try to help youself!.

Go Up