SRL Archive - MSI Developer's Panel

Keeping Everything SIMPLE!


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.
  1. 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!
  2. 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.
  3. From: Nava2
    Plus by using more functions, it becomes self documenting.. plus forces you to put more documentation into the function headers. :stirthepot:
  4. 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!

:)

Sir R. M8gic1an

2011-01-16 19:30:10

~RM

Nava2

2011-01-16 19:48:02

Plus by using more functions, it becomes self documenting.. plus forces you to put more documentation into the function headers. :stirthepot:

NCDS

2011-01-16 20:57:16

And reduces the need to repeat code ftw!

Coh3n

2011-01-16 21:01:08

Added both yours and Nava's points to the first post.

Gu3st...

2011-01-17 06:07:23

Yeah, totally :)

How come you can view this forum Nava2? SSRL+?

Nava2

2011-01-17 07:51:34

From: Zyt3x
Yeah, totally :)

How come you can view this forum Nava2? SSRL+?


You didn't notice I've been able to read it for everrrr? :P

Dev, fyi. :D

Gu3st...

2011-01-17 08:08:22

From: Nava2
You didn't notice I've been able to read it for everrrr? :P

Dev, fyi. :D
Ah, thanks :)