Re: Re: how to write good code
| From: | Yeti | Date: | Mon, 01 Sep 2008 17:51:18 +0000 |
| Subject: | Re: Re: how to write good code | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279230@lists.php.net to get a copy of this message | ||
Ross McKay <rosko@zeta.org.au> wrote:
> Find out what "bad" is by reading this:
>
> http://thedailywtf.com/Series/CodeSOD.aspx
>
> Then, don't do it like that!
What I enjoyed most on that page was this comment:
> One day, after a code review by one of our 'senior' developers this little beauty
> showed up...
> #define NUMBER_OF_BITS_IN_BYTE 8
> The justification was... that the byte might change.... and no 'magic' numbers should
> appear in the code...