Re: [PIC] Learning C
Justin Richards <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.pic |
|---|---|
| Message-ID | <CAKMvr87mm=99CRyB-m_Ekj-8MGBuAWM5Yp=1dcA1=RBFaLrBGw@mail.gmail.com> |
I stressed liberal use of comments, and using > variable and function names that make sense. > warning. Rambling ahead I seem to spend lots of time dreaming up variable and function names that are concise. Others seem to do it with ease. For example I am regular dealing with temperature. Temp is terrible, temperature is too verbose and after many iterations I have currently settled on degC as a variable name. I consider I will never be an Ok C programmer until I master this seemingly trivial activity. I also labour over making code easier to read or easier to maintain. Which sounds like a contradiction. An example is the choice of an esp8266 dynamically or statically generating table elements of a web page. Statically means I have to update two or more sections of code to make changes, where as dynamically requires making changing to only one section. The static option is more obvious and readable when later revisited but onerous to make changes where the dynamic code is quicker, less error prone but more obfuscated. Paralysed by indecision. >