Coh3n
2011-01-16 19:21:40
Hey! :)
I'm sure no one here will disagree with me on this. I've said this in about three posts today, but Camaro's TPA walking is the perfect example of something simple, working much, much better than anything complicated. There are countless times throughout the include that functions are way to complicated for anyone to understand and follow.
Yes, sometimes it's necessary as we deal with a lot of multi-dimensional arrays, but still things can be improved. Just a few things I thought of.
Over time, I'm hoping that the include will expand into more, much smaller functions. Yeah, it'll take a while, but better late then never!
:)
I'm sure no one here will disagree with me on this. I've said this in about three posts today, but Camaro's TPA walking is the perfect example of something simple, working much, much better than anything complicated. There are countless times throughout the include that functions are way to complicated for anyone to understand and follow.
Yes, sometimes it's necessary as we deal with a lot of multi-dimensional arrays, but still things can be improved. Just a few things I thought of.
- This will come in over time, but when writing new features, separate it into several functions if necessary. I remember Nava telling me a long time ago that procedures and functions shouldn't be more than 20ish lines. I never really thought about it, but separating things really makes it easier to understand!
- Sometimes the hardest things to accomplish can be done in the simplest ways. So when planning something out, start simple and little by little. Don't think ahead to the end result, think about it one step at a time.
From: Nava2
Plus by using more functions, it becomes self documenting.. plus forces you to put more documentation into the function headers. :stirthepot:From: NCDS
And reduces the need to repeat code ftw!
Over time, I'm hoping that the include will expand into more, much smaller functions. Yeah, it'll take a while, but better late then never!
:)