[Courses] C Programming For Absolute Beginners, Lesson 5A: All About Functions, Part 2

Akkana Peck akkana at shallowsky.com
Wed Apr 4 02:40:17 UTC 2012


Jacinta Richardson writes:
> To the less expert, I want to butt in here and make a point.  While
> Howard is essentially correct, this is not a matter you need to
> think about.  Not now, and probably not for a long time.

100% agreement.

>   1. The first rule of Optimization Club is, you do not Optimize.
>   2. The second rule of Optimization Club is, you do not Optimize without
>      measuring.
>   3. If your code doesn't do what you want it to do, you have no business
>      optimizing it.
>   4. If your app is running faster than the underlying transport protocol, the
>      optimization is over.
>   5. One factor at a time.
>   6. Testing will go on as long as it has to.
>   7. If this is your first night at Optimization Club, you have to write a test
>      case.

Love it! And this all applies no matter what language you're using.
We talk about it more in the C world, but if you find yourself
writing Python or Perl or Ruby and wanting to optimize something
before you even have the code working ... think of Optimization Club.

Note: this doesn't mean you should write obviously huge
bloated inefficient code, either. It just means write simple,
straightforward code at first, and leave the tricky hard-to-read
optimizations for after you get things working and measured.

	...Akkana


More information about the Courses mailing list