For the beginner, seeing a function call inside a parameter is harder to parse. I found when I broke the result out into a state variable, beginners found the code easier to understand.
Tom Igoe
--
sent on the go. please forgive any terseness or typos
--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.
I've always written my sample code for readability over efficiency. It's been my experience that it's helped a lot in the classroom, and when I've varied from it, it's tended to cause confusion among my students. No reason other than that, really.
I prefer to teach efficiency after I teach the basic concepts. People tend to respond better to learning one idea at a time.
T.
Tom Igoe
--
sent on the go. please forgive any terseness or typos
I think it's fine to do it the way you showed, as long as the person it's written for understands it. If you're teaching the efficiency lesson there, I'd suggest explaining it in comments, to be inclusive.
Personally, I tend to trip over my own experience. Every time I think I can explain a more complex example in an introductory class, I fail. Turns out it doesn't matter that I'm gaining experience when whole new group of beginners comes in, knowing exactly as little as the last year.
Tom Igoe
--
sent on the go. please forgive any terseness or typos
On Mar 26, 2016, at 11:20 PM, Michael Shiloh <m.sh...@arduino.cc> wrote:Not teaching efficiency. It's never been an issue in student projects. They will sometimes ask about this and I point out that readibility is more important, just like you say.
I find that if they are curious about something, they stay engaged if I can take the detour for a little while.I only explain complex issues if they ask, and then I like to get it right.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.
--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.
The generalization of \bug
and \todo
is \xrefitem
.
The solution I suggest is:
in Doxyfile:
ALIASES += "req=\xrefitem req \"Requirement\" \"Requirements\" "
in documented code:
/// \req #42 - The system shall work in any situation