    <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  :: I Wish Programming Was Easy Again</title>
        <link>https://members.accu.org/index.php/articles/798</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">Programming Topics + CVu Journal Vol 17, #2 - Apr 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/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c65/">Programming</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/c97/">172</a>
<br />

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

                    -                        <a href="https://members.accu.org/index.php/articles/c65+97/">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;I Wish Programming Was Easy Again</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 04 April 2005 13:16:11 +01:00 or Mon, 04 April 2005 13:16:11 +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>It takes my PC just over 90 seconds from power up to desktop.
It's nothing special, not really that high spec'd, okay, it has a
lot of memory on it, but lots of memory is nothing that peculiar
anymore.</p>
<p>Now, add onto that time loading kdevelop and we're up to the two
minute stage. Type some code, compile and test, say 5 minutes. The
code is linked to, say, OpenGL.</p>
<p>It's not an amazing amount of time, but say the code has a
problem. Is the problem in the code or the libraries it is linked
to? Check the code, hmm, nothing looks wrong there. Right, run the
debugger on the binary... ah, looks like I'm passing something
incorrectly to OpenGL. What is supposed to be passed in there?
Where is my book with the API in? Drat, it's out of date, but
looking at that I'm actually correct. Oh well, fire up the browser
and search the OpenGL documentation, ah, found the problem.</p>
<p>My code is fine, it's passing the correct information to OpenGL,
so what is the problem? I'd better check the physical information
being passed and that it is exitting the OpenGL function correctly.
It is. ARGH!!!!!!!</p>
<p>Does that sound familiar? It does from this end, and definitely
will when you think back to when you started to learn C++ (or C)
and tried to link it to an established library for the first couple
of times (or more - I still manage to mess up when using Qt).</p>
<p>Is there a reason for this or is programming just becoming to
darned complex these days for people to break into? And if it is
too complex, shouldn't we all be doing something about it?</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e34" id="d0e34"></a>Lots of
Questions...</h2>
</div>
<p>My original editorial in the last issue of C Vu sparked quite a
lot of conversation on the accu-general mailing list where it gave
those on there the chance to let off a bit of steam over the
issue.</p>
<p>However, as with most computer related topics, it is not as
simple as looking through rose-tinted glasses, a more pragmatic
approach is required. While I stick to every word I said in the
last editorial, you'll see that some things are made better by
being slightly more complex.</p>
<p>One of the main issues raised was how complex something as
simple as making the internal speaker play a scale had become. The
example cited was for the Dragon32 which just needed PLAY &quot;ABCDEFG&quot;
to be typed into the machine and a scale played. But was it really
as simple as that for everything?</p>
<p>You'll need to think back now. If I take 4 machines (BBC B,
Oric, Spectrum and Dragon) and compare how different something as
simple as playing a scale was, we can soon see that even then
something like sound wasn't that easy! I'll not consider the
Commodore range as I have no real experience of them.</p>
<pre class="literallayout">
<span class=
"bold"><b>BBC B</b></span>                          <span class=
"bold"><b>Oric 1</b></span>
FOR a%=89 TO 113 STEP 4        FOR a=1 TO 8
SOUND 1,-10,a%,100             MUSIC 1,3,a,10
NEXT                           NEXT

<span class=
"bold"><b>Spectrum</b></span>                       <span class=
"bold"><b>Dragon</b></span>
FOR a=0 TO 11                  PLAY &quot;ABCDEFG&quot;
BEEP a, 5
NEXT a
</pre>
<p>These will all play a series of beeps which produce a scale
(some include the sharps, some don't). What it demonstrates that
from a programming perspective, if you learn from any of these
audio systems, you're going to have a problem going to a different
one.</p>
<p>Okay, sound is just one thing. A machine is nothing without
input/output and graphic handling. This is where things became
really different. While most had a <tt class="literal">PLOT</tt>
and <tt class="literal">DRAW</tt> method of putting lines on the
screen, the way they did it wasn't the same. The BBC B and Spectrum
were effectively the opposite of each other with the Oric just
being strange!</p>
<p>Line graphics are all well and good, but what about sprite
handling? None of the 8 bit machines really had any sprite handling
facilities, so unless you created a whole pile of user defined
graphics, you would need to fudge the screen so that it appeared
there was more graphics than there was or you had to generate the
graphics on the fly or you plain had (say) 16 points of rotation
and depended on a frame rate to fool the eye. (Later versions of
BBC BASIC (mainly for the RISC OS machines) had sprite handling
facilities, however, that would also mean I would need to consider
the ST and Amiga machines).</p>
<p>Compare this to literally a few lines to call the Allegro or SDL
libraries and you can see my point. Sure, there are problems
learning how to compile, waiting for the build and the such, but it
is (on the whole) much easier to learn.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e72" id="d0e72"></a>What's Your
Point?</h2>
</div>
<p>Simple, yes it was easier but the drawback was that moving from
one platform to another was a right royal pain in the backside!
Interoperability was not on the cards.</p>
<p>While things are more complex now (such as having to use
specialist bitmap software for sprites or sound software for
audio), the actual API is much simpler; you learn it once and
compile it quite a few times. Sprite, audio and (to some extent)
error handling is provided by the library.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e79" id="d0e79"></a>You What?</h2>
</div>
<p>Okay, at this point, you're starting to question the reason
behind the argument put forward in the last editorial as this
really does make me sound as if I've contradicted myself.</p>
<p>While the movement has been from a version of BASIC on all
machines, quite a number of machines do come with languages which
don't require compilation. Tcl is one such language. No compilation
is required and the results are instantaneous. It just isn't as
easy to learn as BASIC was or (in my opinion) as friendly to the
new user.</p>
<p>Copyright issues aside, there is no real reason why a version of
BBC BASIC for each platform isn't bundled (I know there is BBC
BASIC for Windows, a Linux BBC BASIC and a MacOSX version, all but
the Windows version being free). This would give the user an easy
to use language within (about) 2 minutes from firing up with the
advantage of seeing instant results.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e88" id="d0e88"></a>DHTML and
Javascript - The Way Forward?</h2>
</div>
<p>A point which was raised in discussion was the use of DHTML and
Javascript with a web browser for learning. I have a problem with
this, in fact, I have a few.</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>It requires a browser happy with both. Despite there being an
ECMA standard for JavaScript, not all browsers comply (quelle
surprise) with how the standard describes operations. Add this to
having to fudge for specific browsers, and you can't really have
anything which will work with certainty.</p>
</li>
<li>
<p>Some browsers don't do one or the other (or both). Opera (up to
version 7.5.2 for Linux) certainly doesn't like DHTML. Browsers
used for the visually impaired have problems with DHTML and dynamic
content generated in JavaScript.</p>
</li>
<li>
<p>While JavaScript is pretty close to an OO language, it is also
close to being a straight procedural language. As such, it really
doesn't help the newcomer as they're easily confused - are they or
are they not using an OO language?</p>
</li>
<li>
<p>DHTML doesn't have a standard. It makes any real certainty over
how a browser should react somewhat hit and miss.</p>
</li>
</ol>
</div>
<p>While everyone now using one of the main platforms<sup>[<a name=
"d0e108" href="#ftn.d0e108" id="d0e108">1</a>]</sup> has a browser,
someone learning on (say) Firefox will need to learn how to get
around DHTML problems for Opera and IE (with the same being
applicable in reverse). This is pretty much the same problem as
there was with the differing implementations of BASIC.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e112" id="d0e112"></a>What About
the Learner Though?</h2>
</div>
<p>We are all (presumably) professionals. We know how to build our
software, effectively debug, optimise the code we write and the
myriad of other aspects there are to writing software, but we must
remember that we all had to start somewhere.</p>
<p>While there is little doubt that the likes of Francis
Glassborow's book is a step in the right direction, it is,
unfortunately, not cross platform. I certainly would not buy a copy
as I very rarely touch a Windows machine (other than tech support
at work that is!); it would contain very little which would give an
instant result for either myself or my son.</p>
<p>Have we moved so far away from having a built in interpreter
with some form of common language behind it that to go back would
be almost unthinkable? I have to conclude, on current evidence,
that this is the case.</p>
<p>The learner no longer has the 3 seconds and into BASIC as we
used to have. The code, build, run, debug system looks here to stay
unless a common language is built in to each Linux distro, each
version of Windows and OSX. I can't see that happening, more's the
pity.</p>
<p>Sorry folks, looks like the fun days of the 8 bit machines have
gone and we're left with makefiles and debuggers.</p>
</div>
<div class="footnotes"><br>
<hr class="c2" width="100">
<div class="footnote">
<p><sup>[<a name="ftn.d0e108" href="#d0e108" id=
"ftn.d0e108">1</a>]</sup> These being Windows, Linux and MacOSX. I
am leaving other platforms (such as RISC OS) out for the purpose of
this article.</p>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
