    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Editorial</title>
        <link>https://members.accu.org/index.php/articles/809</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Journal Editorial + CVu Journal Vol 17, #3 - Jun 2005</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c184/">Journal Columns</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c185/">Editorial</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c96/">173</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c185-96/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c185+96/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Editorial</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 09 June 2005 05:00:00 +01:00 or Thu, 09 June 2005 05:00:00 +01:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e20" id="d0e20"></a></h2>
</div>
<p>A great deal has happened since last I wrote an editorial. We've
had our annual conference (more of which later), I've finally had
my stomach operation, we have a new production editor, a new person
taking care of the Student Code Competition and lots of progress on
the ACCU website. Things really are moving along!</p>
<p>Other things haven't moved on very much. We've (in the UK) had
an election, litigation in the IBM/SCO, Novell/SCO and RedHat/SCO
case are going slightly faster than an asthmatic ant carrying some
heavy shopping up a hill and books with fundamental mistakes are
still being published despite such piffling little things like the
1998 C++ standard coming in.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e26" id="d0e26"></a>Coding Styles
in Books</h2>
</div>
<p>Something is eating at me and I'm pretty sure that it's nibbled
at you all at some point and that is the plague of fundamental
mistakes made in modern texts. I've been recently reading a 2004
book for Maths and Physics in Computer and Video Games programming.
Partly out of interest, but mostly as I teach it and despite the
book being very well presented and written, it is let down with the
likes of code like this:</p>
<pre class="programlisting">
/* purpose: to calculate the distance between two points
// input:  P1 - an array of two floats representing point 1
//         P2 - an array of two floats representing point 2
// output: the distance between the two points

float distance2D(float *P1, float *P2)
{
  // calculate the distance and return it
  return (float)sqrt(pow(P2[0] - P1[0]), 2) + 
pow(P2[1] - P1[1], 2);
}
</pre>
<p>Okay, there doesn't really seem to be too much wrong there - in
fact, there is nothing wrong with it. Not until you consider that
the language in use is C++, so the casting method for the float is
incorrect and I'm at a loss to see why float is being used over
double.</p>
<p>Am I being too fussy over the cast of float or the use of floats
over double? Well, no. Casting in C++ in very much different to C
and for a modern compiler, there is no benefit of using a float
over a double, infact, there are some very good arguments (albeit
old ones) for using a double in preference to float.</p>
<p>This continues throughout the book. Sure, it's not really a big
issue to those who know what they're talking about and do the
mental changes so they are reading what should have been written
rather than what has actually been written, but for the newbie,
this sort of information is setting them up for quite a fall later
on.</p>
<p>Slightly later on in the book, there is a small piece on
converting from degrees to radians. It's well explained then the
following is given to enable conversions:</p>
<pre class="programlisting">
#define RadToDeg 57.29577951f
#define DegToRad 0.017453293f
</pre>
<p>Had this been a C book, I'd have accepted it. However in C++
these should really be:</p>
<pre class="programlisting">
const double RadToDeg = 
    57.29577951;
const double DegToRad = 
    0.017453293;
</pre>
<p>These simple errors detract greatly from a very good book. Until
you hit the CD.</p>
<p>Why do companies insist on putting CDs in books which detract
from the book itself?</p>
<p>The worst example of this comes from a book I reviewed a while
back called &quot;Linux Games Programming&quot; where it contained (in the
words of the Hitch Hiker's Guide to the Galaxy) &quot;much that was
apocryphal if not wildly inaccurate&quot; - material which just wouldn't
compile, missing libraries from code examples and code which just
didn't belong on the disc!</p>
<p>For this particular book, I was encouraged to see multiple
references to OpenGL - which is great for everyone as it means all
of the examples can be compiled on a multitude of platforms and I
can then give live demonstrations. Um. No. It is OpenGL but the
code examples all have lots of Win32 bits surrounding the code and
if you have little or no experience of OpenGL (or Win32 code), the
examples are about as much use as a chocolate teapot. Do I spend
the time hacking things around to get the code to compile on any of
my Linux boxes or do I write fresh code to do the same as the
example code, become more proficient in OpenGL coding but at the
same waste time I don't really have in order to use the
demonstration code? Answers on a postcard.</p>
<p>I find it unsatisfactory (to say the least) that in 2005 we are
still being subjected to books with this type of mistake and
oversight in them. At least in the case of this particular book,
the publishers are more than happy to pass on comments to the
author for the next edition.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e57" id="d0e57"></a>Desert Island
Books</h2>
</div>
<p>It seems that competitions are all the thing at the moment. In
the last edition, we had the competition results in Francis'
Scribbles for the Desert Island books. It was quite interesting to
see what books people would have on their mythical desert
island.</p>
<p>I'd like to run 2 similar competitions (with a similar
prize).</p>
<p>The first would be simple. Any 5 books which you would send your
teenager off to university with (they can be studying any
programming course and is not restricted to conventional &quot;computer
studies&quot; courses). They are supplied with a Mini Mac, flat screen
monitor (solar powered) with gcc 4. That should make it far more
interesting!</p>
<p>The second would be more interesting. Any 5 books which should
be buried in quicklime.</p>
<p>Why would the second one be more interesting than the first?
Interesting question.</p>
<p>We all know the good books (typically the ones our reviewers
give Highly Recommended ratings to!) and would be happy to be seen
with them. However, as we amass books, it is inevitable that we
pick up a real turkey with more howlers than you'd find in a pack
of wolves. These are the books that if you were not so embarrassed
to have to admit to buying in the first place, you'd have taken it
back and demanded not only a refund, but probably a couple of books
to make up for the mental stress and anguish it placed you under.
Everyone has them.</p>
<p>What was your crime for this to befall you? What was so awful
that you are condemmed to this? I don't know. It must have been
something terrible. To make it worse, you've been supplied with a
ZX Spectrum using HiSoft &quot;C&quot; and a crummy black and white TV (only
usable on UHF 36) and a tape recorded with 1 C60 and which has to
be run off batteries.</p>
<p>Best entries will win a prize. Only genuine books though...</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e76" id="d0e76"></a>On With The
Show...</h2>
</div>
<p>That's enough of my ramblings. On with the show!</p>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
