log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Git client updated to 0.07 (News:1)
- Archive Edition 27:1 reviewed (News:)
- Rougol April 2024 meeting on monday is Anniversary time (News:1)
- WROCC April 2024 meeting o...changes to our phone lines (News:1)
- April developer 'fireside' chat is on saturday night (News:)
- March 2024 News Summary (News:4)
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: Tutorials
 
  Tutorials
  (12:14 22/8/2001)
  monkeyson (12:22 22/8/2001)
    johnstlr (14:58 15/6/2002)
      Gulli (01:27 23/8/2001)
        johnstlr (09:36 23/8/2001)
          Phlamethrower (14:58 15/6/2002)
            johnstlr (14:58 15/6/2002)
              Gulli (16:21 24/8/2001)
                AndrewEllis (18:20 24/8/2001)
                  johnstlr (09:47 25/8/2001)
                johnstlr (09:45 25/8/2001)
                  Phlamethrower (12:12 29/8/2001)
                    Gulli (22:24 29/8/2001)
                      johnstlr (09:47 30/8/2001)
                        Gulli (14:58 15/6/2002)
                          Phlamethrower (17:50 4/9/2001)
                            johnstlr (09:31 5/9/2001)
                              Phlamethrower (17:39 5/9/2001)
                            ToiletDuck (14:58 15/6/2002)
      Phlamethrower (14:58 15/6/2002)
        rich (18:22 22/8/2001)
        monkeyson (14:58 15/6/2002)
      Matthew (14:58 15/6/2002)
 
Phlamethrower Message #4813, posted at 12:14, 22/8/2001
Unregistered user (Continuing from this news thread)

OK, so if I were to do some programming tutorials, what would they be about?

I'd think of writing them about BASIC, ARM code and C/C++:

* BASIC is a valuable tool to be able to use, from doing quick calculations/tests to writing ARM code where a better compiler isn't available. It is also a good introduction to programming for the newbies out there. A new tutorial isn't necessarily needed, but if an old tutorial is to be used then it must obviously be for BBC BASIC V and above - no PC tutorials!
* ARM code gives a greater insight into the workings of the computer, and is a must for quite a few programming tasks. AFAIK there is no tutorial which covers all the current instructions or the 26/32bit compatability issues.
* C/C++ is the 'way forward' according to quite a few, and provides compatability with other systems. A general purpose tutorial could easily be used instead of a new one (especially since I don't know everything about C/C++ myself), but amendments would have to be made to bring in RISC OS compatability - e.g. compilers/libraries available and how to get them to work.

The way I see it, most people start off programming in BASIC, so any BASIC tutorials must be for complete beginners. ARM and C/C++ ones can be for people who are quite used to programming, and where relevant know BASIC. This way any programming newbies can read the BASIC tutorial(s) first, before progressing onto ARM and C/C++.

If you know of any tutorials which will fill the above criteria, then let me know - I'd much rather collect a load of links to suitable tutorials than write them all myself.

  ^[ Log in to reply ]
 
monkeyson Message #4814, posted at 12:22, 22/8/2001, in reply to message #4813
Unregistered user A guide to using the GNU C++ compiler would be good - starting off with getting it and installing it, along with useful RISC OS libraries. I don't think a tutorial on C++ itself would be so necessary, but one explaining how to write RISC OS applications would be very welcome.

How about topics such as using printer drivers, fonts, claiming memory, the nested window manager? Could these be more generic, rather than focussing on a specific language?

  ^[ Log in to reply ]
 
rich Message #4818, posted at 18:22, 22/8/2001, in reply to message #4816
Unregistered user I think WIMP programming is especially useful - most people can hack something together for their own use (single tasking, hard-coded filenames etc.), but getting it into a form other people might like to use is another matter.
  ^[ Log in to reply ]
 
Gulli Message #4820, posted at 01:27, 23/8/2001, in reply to message #4815
Unregistered user
Jeff said:


C/C++ is the 'way forward' according to quite a few, and provides compatability with other systems. A general purpose tutorial could easily be used instead of a new one (especially since I don't know everything about C/C++ myself), but amendments would have to be made to bring in RISC OS compatability - e.g. compilers/libraries available and how to get them to work.

Actually the Acorn C compiler is one of the most ANSI compliant compilers I've ever used. The problem, as you point out, is that the standard set of libraries is relatively small - this doesn't stop C tutorials being of use. However it is tricky to find pure ANSI C tutorials. Try

http://www.acornusers.org/education/C.html

This still leaves C++ which is what should in my opinion be the main focus of such a tutorial series. That's what has been totally overlooked on RISC OS, probably due to lack of class libraries, but so much is being written in C++ today on other platforms and what programming student doesn't learn object oriented programming today?
I think a complete C++ tutorial from scratch to a fully working WIMP application is what is most needed. Quite a feat I admit but that way new programmers can get into what the world is using directly on RISC OS and don't have to start by learning BASIC if they don't want to. Competent BASIC programmers will always have to learn object oriented programming in order to get to grips with C++ so I think there would be much use for this tutorial.


A guide to using the GNU C++ compiler would be good - starting off with getting it and installing it, along with useful RISC OS libraries. I don't think a tutorial on C++ itself would be so necessary, but one explaining how to write RISC OS applications would be very welcome.

I think setting up GCC, while important, should perhaps be shifted in favour of getting people to use

http://www.davea.web.btinternet.co.uk/gccide/

I've only had a quick look and I haven't got it working completely yet but it looks very impressive - Dave Appleby could be filling one hell of a gap with this.

I second that, too much fiddling with low level compiler specific stuff can be quite a turn off for a bidding programmer.

  ^[ Log in to reply ]
 
johnstlr Message #4821, posted at 09:36, 23/8/2001, in reply to message #4820
Unregistered user Hmm lots of stuff to reply to

Jeff said:
Get the Ovation Pro demo

Ta - didn't know about that.


* Perhaps writing * commands and SWIs

To do this you need "how to write modules" which may or may not be a problem. Personally I think the easiest way to do this is in C - but it relies on the reader having the Acorn compiler.

Between the list you and Jake have cobbled together there's quite a large selection to work on.

Rich - WIMP programming is useful but it relies soooo much on the environment chosen. www.riscos.org are currently running a DR Wimp tutorial for BASIC programmers.

What language would you like to see this done in?

Matt said


There's also Chris Williams' EasyGCC (which I think even downloads it all for you!). See http://www.melotech.co.uk/downloads/

Thanks - again I didn't know about that - I'll take a look.

Gunnlaugur said


This still leaves C++ which is what should in my opinion be the main focus of such a tutorial series. That's what has been totally overlooked on RISC OS, probably due to lack of class libraries, but so much is being written in C++ today on other platforms and what programming student doesn't learn object oriented programming today?

I agree with your sentiments - it does require GCC though as the Acorn compiler isn't up to it.


I think a complete C++ tutorial from scratch to a fully working WIMP application is what is most needed. Quite a feat I admit but that way new programmers can get into what the world is using directly on RISC OS and don't have to start by learning BASIC if they don't want to. Competent BASIC programmers will always have to learn object oriented programming in order to get to grips with C++ so I think there would be much use for this tutorial.

I also think it's unrealistic. C++ is not a simple language - indeed I have several books on the subject (not to mention Design Patterns), and still don't have references for the STL and I'd like to get copies of Effective C++ and More Effective C++ as well. Even after all this I wouldn't class myself as a very good C++ programmer.

C++ at a basic level is relatively simple but it can get complicated very quickly - this is why I linked to Thinking in C++. I have a high regard for Bruce Eckels work - especially Thinking in Java.

Without a standard class library the tutorial would also have to cover the design and implementation of one - the guys on the RiscGuiLib list spent a long time discussing the design and I doubt any single person is qualified to make the "exact right" decision. Although perhaps any tutorial could use this library - it'd provide encouragement for the developers and also provide them with much needed documentation. The problem here is that the ResEd tools are not generally available.


I second that, too much fiddling with low level compiler specific stuff can be quite a turn off for a bidding programmer.

Well it would seem that we now have two options.

  ^[ Log in to reply ]
 
Gulli Message #4824, posted at 16:21, 24/8/2001, in reply to message #4823
Unregistered user

I appreciate that building a class library from scratch would aid a greater understanding of the WIMP - I'm just not convinced it's necessary, or beneficial to go head to head with something like RiscGuiLib. More important is a higher-level understanding of how windowing systems work in general - I apply what I've learnt on Windows and in Java to RISC OS, not the other way around.

I think I'd better explain myself a little - I certainly didn't mean that the tutorial should include writing a complete WIMP class library. Although I'd appreciate it I think that would be far too much for a language tutorial. The high level understanding is what I meant, using libraries that already exist - even though they may or may not be great.
An introduction to writing a library would be a great part of the tutorial though.

The reason why I'd like to see a complete from the scratch tutorial is so that there would be one whole tutorial (in parts of course) avialable from one place that builds on previous lessons and can in some parts prepare for later lessons. Allowing for a more complete and step by step path to writing RISC OS applications. The tutorial could also point out various differences in compilers for RISC OS so people would know first hand, not have to go out and find out the hard way why this doesn't work on Acorn C/C++ when the tutorial says it should work on all C++ compilers.

After all, we are thinking of a programming for RISC OS tutorial - aren't we?

  ^[ Log in to reply ]
 
AndrewEllis Message #4825, posted at 18:20, 24/8/2001, in reply to message #4824
Unregistered user There used to be an organistaion called the Association of C/C++ users (ACCU), with a special interest group called C acorn users group (CAUG). I don't know if they still exist, but CAUG was very good - I used to be a memeber, but when I started university I didn't have the time or money to support it. Student life 'ey!

I would certainly like to see tutorials on dealing with drawfiles with C/C++ including:

which data structures do you need
how do you add objects
how do you search for objects to alter them or remove them
rubber banding lines

Also how to create a grid and align objects with it.

  ^[ Log in to reply ]
 
johnstlr Message #4826, posted at 09:45, 25/8/2001, in reply to message #4824
Unregistered user

I think I'd better explain myself a little - I certainly didn't mean that the tutorial should include writing a complete WIMP class library. Although I'd appreciate it I think that would be far too much for a language tutorial. The high level understanding is what I meant, using libraries that already exist - even though they may or may not be great.

Well C++ libraries aren't too hot, or aren't being developed anymore. Apparently DeskLib is very good for C though.


An introduction to writing a library would be a great part of the tutorial though.

heh, yeah sometimes I forget that how you create a library isn't immediately obvious when you first start out.


The reason why I'd like to see a complete from the scratch tutorial is so that there would be one whole tutorial (in parts of course) avialable from one place that builds on previous lessons and can in some parts prepare for later lessons. Allowing for a more complete and step by step path to writing RISC OS applications. The tutorial could also point out various differences in compilers for RISC OS so people would know first hand, not have to go out and find out the hard way why this doesn't work on Acorn C/C++ when the tutorial says it should work on all C++ compilers.

I think any tutorial would probably have to be based around GCC anyway simply because not everyone has access to (or is willing to pay for) the Acorn compiler - not that I'd recommend buying for CFront.


After all, we are thinking of a programming for RISC OS tutorial - aren't we?

Well yeah, and we can start much further along if we assume the person reading it can program. As I say, the first steps to coding has already been done by loads of people.

  ^[ Log in to reply ]
 
johnstlr Message #4827, posted at 09:47, 25/8/2001, in reply to message #4825
Unregistered user
There used to be an organistaion called the Association of C/C++ users (ACCU), with a special interest group called C acorn users group (CAUG). I don't know if they still exist, but CAUG was very good - I used to be a memeber, but when I started university I didn't have the time or money to support it. Student life 'ey!

I believe they still exist although the web site hasn't been updated in ages

http://www.accu.org/acornsig/public/


I would certainly like to see tutorials on dealing with drawfiles with C/C++ including:

which data structures do you need
how do you add objects
how do you search for objects to alter them or remove them
rubber banding lines

Also how to create a grid and align objects with it.

Add drawfiles to the list somebody.

  ^[ Log in to reply ]
 
Phlamethrower Message #4828, posted at 12:12, 29/8/2001, in reply to message #4826
Unregistered user So it'll be a WIMP tutorial for GCC (assuming knowledge of C/C++), and using some existing WIMP library?
  ^[ Log in to reply ]
 
Gulli Message #4829, posted at 22:24, 29/8/2001, in reply to message #4828
Unregistered user
So it'll be a WIMP tutorial for GCC (assuming knowledge of C/C++), and using some existing WIMP library?

That's a start - basically anything C++ right now would be a step forward. Installing GCC and setting it up with libraries would be good too.

  ^[ Log in to reply ]
 
johnstlr Message #4830, posted at 09:47, 30/8/2001, in reply to message #4829
Unregistered user I've just setup EasyGCC. It took less than five minutes. Setting it up now quite literally consists of using it to automatically download GCC (if you have a net connection) or, like me, simply copying GCC out of the distribution archives, double clicking it to boot and then running EasyGCC which will automatically detect it. It really isn't difficult anymore.

Currently EasyGCC is limited to C code. However it is only a beta and Chris is willing to listen to ideas / offers of help.

  ^[ Log in to reply ]
 
Phlamethrower Message #4832, posted at 17:50, 4/9/2001, in reply to message #4831
Unregistered user I've attempted to write my first proper WIMP app in C++ to find out how hard it is, and....

Gah!

Who would have thought loading template files and things could be so tricky? Of course it could be because the PRMs don't seem to explain it very well...

So anyway, I'm now all for teaching people how to use a WIMP library.

As for the other tutorials we've listed, is there anyone with the know-how & time to write some of them? The ones I might be able to do are:

* Writing your own sound player
* Modules
* Perhaps one on ZIP files, if I ever get round to trying to compile utility library I found (Could have been on the PKware website...)
* Low level screen access

Which isn't really that much. Once I get into the WIMP a bit more I might be able to do Interactive Help, and a StrongHelp tutorial shouldn't be that hard (but there are StrongHelp manuals about StrongHelp so a tutorial might not be needed).

The other ones I have little or no knowledge about so it's probably easier if someone else does them:

* Printing
* Fonts
* Memory management
* Using networks
* Writing filing systems
* Reading industry standard file types
* Drawfiles - using them, creating them
* Handling URLs
* Global clipboard

  ^[ Log in to reply ]
 
johnstlr Message #4834, posted at 09:31, 5/9/2001, in reply to message #4832
Unregistered user
I've attempted to write my first proper WIMP app in C++ to find out how hard it is, and....

Gah!

Who would have thought loading template files and things could be so tricky? Of course it could be because the PRMs don't seem to explain it very well...

It's not difficult - just incredibly tedious because it takes a lot of code to do even simple things.


* Using networks

PRM Vol 5 has an excellent introduction on this. You do need to be able to read C code though. Then again you'll need to be able to read C if you want to examine 95% of the example code out there as well.


* Reading industry standard file types

Surely this is just a case of knowing how to manipulate files and then finding the format of the file you want to load?

http://fileformat.virtualave.net/

  ^[ Log in to reply ]
 
Phlamethrower Message #4835, posted at 17:39, 5/9/2001, in reply to message #4834
Unregistered user
PRM Vol 5 has an excellent introduction on this. You do need to be able to read C code though. Then again you'll need to be able to read C if you want to examine 95% of the example code out there as well.

Hmmm... must buy that manuals CD some time...

Surely this is just a case of knowing how to manipulate files and then finding the format of the file you want to load?

http://fileformat.virtualave.net/

Yes, I suppose that would do.

  ^[ Log in to reply ]
 
johnstlr Message #4815, posted at 14:58, 15/6/2002, in reply to message #4814
Unregistered user Jeff said:


* BASIC is a valuable tool to be able to use, from doing quick calculations/tests to writing ARM code where a better compiler isn't available. It is also a good introduction to programming for the newbies out there. A new tutorial isn't necessarily needed, but if an old tutorial is to be used then it must obviously be for BBC BASIC V and above - no PC tutorials!

Martin Fox recently released his book "First Steps in Programming RISC OS computers" - you can get it from here

http://www.argonet.co.uk/users/mfox/books/

I've not read it but I remember it receving very good reviews when it first appeared. Therefore I'd wipe off the need for a BASIC tutorial (although typically it's in Impression and Ovation Pro formats and I can view neither - bah).


ARM code gives a greater insight into the workings of the computer, and is a must for quite a few programming tasks. AFAIK there is no tutorial which covers all the current instructions or the 26/32bit compatability issues.

http://www.heyrick.co.uk/assembler/

wink


C/C++ is the 'way forward' according to quite a few, and provides compatability with other systems. A general purpose tutorial could easily be used instead of a new one (especially since I don't know everything about C/C++ myself), but amendments would have to be made to bring in RISC OS compatability - e.g. compilers/libraries available and how to get them to work.

Actually the Acorn C compiler is one of the most ANSI compliant compilers I've ever used. The problem, as you point out, is that the standard set of libraries is relatively small - this doesn't stop C tutorials being of use. However it is tricky to find pure ANSI C tutorials. Try

http://www.acornusers.org/education/C.html

Once you get past this you're into RISC OS specific tutorials anyway.

Jake said

A guide to using the GNU C++ compiler would be good - starting off with getting it and installing it, along with useful RISC OS libraries. I don't think a tutorial on C++ itself would be so necessary, but one explaining how to write RISC OS applications would be very welcome.

I think setting up GCC, while important, should perhaps be shifted in favour of getting people to use

http://www.davea.web.btinternet.co.uk/gccide/

I've only had a quick look and I haven't got it working completely yet but it looks very impressive - Dave Appleby could be filling one hell of a gap with this.


How about topics such as using printer drivers, fonts, claiming memory, the nested window manager? Could these be more generic, rather than focussing on a specific language?

I remember Acorn Computing running some good articles on the printer manager, fonts and stuff aagges ago - (I've probably still got them kicking around).

The problem with making them generic is that as some point you have to get down to a SWI call. Invariably this means showing the code as a SYS call and writing it in BASIC as I usually find BASIC programmers don't understand the method used to call SWIs in C. From my point of view it has been so long since I coded in BASIC I can't remember how to do it - Andrew Weston usually corrects my code wink On the other hand some of the ideas you suggest could be done in relatively small articles.

Last thing - OI TIB guys, how about adding the links I've put in this message to the programming section? smile

  ^[ Log in to reply ]
 
johnstlr Message #4823, posted at 14:58, 15/6/2002, in reply to message #4822
Unregistered user

Well if riscos.org are doing it in BASIC, then presumably we'd be doing it in C++; there's probably 101 uses for classes in WIMP programming. We could either use an existing WIMP library, or let the user build their own one from scratch, giving them a greater understanding of the WIMP, as well as fitting in with Gunnlaugur's idea of learning C++ & the WIMP from scratch

As I've already pointed out, this isn't an easy task by a long way. C++ in itself is a complex language and why duplicate the effort already made (and freely available) by authors such as Bruce Eckels?

I appreciate that building a class library from scratch would aid a greater understanding of the WIMP - I'm just not convinced it's necessary, or beneficial to go head to head with something like RiscGuiLib. More important is a higher-level understanding of how windowing systems work in general - I apply what I've learnt on Windows and in Java to RISC OS, not the other way around.


Erm, what options? I seem to have become lost in all the posts unhappy

Go back and read them then wink

  ^[ Log in to reply ]
 
Phlamethrower Message #4822, posted at 14:58, 15/6/2002, in reply to message #4821
Unregistered user
Rich - WIMP programming is useful but it relies soooo much on the environment chosen. www.riscos.org are currently running a DR Wimp tutorial for BASIC programmers.

What language would you like to see this done in?

Well if riscos.org are doing it in BASIC, then presumably we'd be doing it in C++; there's probably 101 uses for classes in WIMP programming. We could either use an existing WIMP library, or let the user build their own one from scratch, giving them a greater understanding of the WIMP, as well as fitting in with Gunnlaugur's idea of learning C++ & the WIMP from scratch

I second that, too much fiddling with low level compiler specific stuff can be quite a turn off for a bidding programmer.

Well it would seem that we now have two options.

Erm, what options? I seem to have become lost in all the posts unhappy

[Edited by Phlamethrower at 14:14, 24/8/2001]

  ^[ Log in to reply ]
 
Gulli Message #4831, posted at 14:58, 15/6/2002, in reply to message #4830
Unregistered user

Currently EasyGCC is limited to C code. However it is only a beta and Chris is willing to listen to ideas / offers of help.

So currently of not much use to me unhappy. Here's an idea Chris: C++ pleeeaaasssse smile

  ^[ Log in to reply ]
 
Phlamethrower Message #4816, posted at 14:58, 15/6/2002, in reply to message #4815
Unregistered user
I've not read it but I remember it receving very good reviews when it first appeared. Therefore I'd wipe off the need for a BASIC tutorial (although typically it's in Impression and Ovation Pro formats and I can view neither - bah).

Get the Ovation Pro demo:

http://www.pilling.demon.co.uk/ovationpro/index.html

The problem with making them generic is that as some point you have to get down to a SWI call. Invariably this means showing the code as a SYS call and writing it in BASIC as I usually find BASIC programmers don't understand the method used to call SWIs in C. From my point of view it has been so long since I coded in BASIC I can't remember how to do it - Andrew Weston usually corrects my code wink On the other hand some of the ideas you suggest could be done in relatively small articles.

OK, so we need small articles rather than big tutorials. Topics which I think might be important are:

* Printing
* Fonts
* WIMP (Perhaps more of an overview & some links to some utils/manuals)
* Writing your own sound player
* Memory management
* Perhaps writing * commands and SWIs (e.g. what all the different options do)
* Using networks
* Writing filing systems
* Reading 'industry standard' file types (e.g. BMPs, GIFs, ZIPs)
* Perhaps low level screen access (e.g. drawing sprites quickly)

Any others that I've missed?

  ^[ Log in to reply ]
 
Mark Quint Message #4833, posted by ToiletDuck at 14:58, 15/6/2002, in reply to message #4832
Ooh ducky!Quack Quack
Posts: 1016
just thought of another thing u could add -
writing a 3D API/Engine for RiscOS featuring
Multitasking

8/16/24bpp colour depths

Output to a 'buffer', such as a sprite, the screen. etc.

OpenGL interface (Although not all features are likely to be supported)

API accessible from C++, ARM code, and BASIC (via SWI's/jump tables)

Should have support for perspective correct texture mapping, transparencies, light maps, shaded polygons, particles, volumetric objects

FP hardware support

Hopefully 3D Card support

grin

  ^[ Log in to reply ]
 
monkeyson Message #4817, posted at 14:58, 15/6/2002, in reply to message #4816
Unregistered user
Any others that I've missed?

*Drawfiles - using them, creating them
*Handling URLs
*Global clipboard
*Interactive help
*Writing StrongHelp manuals

And, exceedingly less likely:
*PCI and USB drivers smile

  ^[ Log in to reply ]
 
Matthew Message #4819, posted at 14:58, 15/6/2002, in reply to message #4815
Unregistered user
I think setting up GCC, while important, should perhaps be shifted in favour of getting people to use

http://www.davea.web.btinternet.co.uk/gccide/

I've only had a quick look and I haven't got it working completely yet but it looks very impressive - Dave Appleby could be filling one hell of a gap with this.

There's also Chris Williams' EasyGCC (which I think even downloads it all for you!). See http://www.melotech.co.uk/downloads/

Last thing - OI TIB guys, how about adding the links I've put in this message to the programming section? smile

Have done - I had some of them already! smile

ATB,
Matthew

  ^[ Log in to reply ]
 

The Icon Bar: Programming: Tutorials