Beginner programming enthusiast, want to learn BASIC/write programs for RISC OS
Rick Murray (539) 13840 posts |
Indeed. It’s an utterly ridiculous notion, because the only thing knowing assembler will teach you is why it is usually more efficient to use a long (or int, for us) than a short (32 bit vs 16 bit, on a 32 bit processor). Much more useful than wasting your time trying to get to grips with assembler, is to instead learn how to solve problems. What if I give you two numbers that represent lengths (say, 10m X 5m), can you tell me the area? Okay, now how did you do that? Step by step. An interesting exercise is to go and make a cup of tea (go on, I’ll wait). But there’s a caveat. You need to think about it. Every single action. Putting water into the kettle. Retrieving a tea bag. Understanding when the water is ready. Hell, moving your body as necessary to put you where you need to be in order to perform the tasks. Think about all the steps necessary to make that cup of tea. And, then, congratulations. If there was a language called “Human”, you’d have created your first program. Programming isn’t some weird mystical art (that’s networking!). Programming is taking a problem, breaking it down into progressively smaller pieces, figuring out how to solve that little bit of the puzzle, and then translating that into a form that can be understood by a “compiler” (think of it like an autistic child that will obey your instructions in the most literal way possible and not attempt to extract any sort of meaning from those instructions) to be executed by a piece of silicon that is even worse than the compiler. If the container that holds the tea bags is empty, what happens? Does the entire world turn blue with the word STOP floating in the air? Do you put the container down, pick it up, and retry plucking out a tea bag….. forevermore? I bet in your tea making program you said something like “walk to counter and plug kettle in”. There is no walk. There is sensing touch and position of limbs and expanding or contracting muscles. But, be warned, if you manage to lift a leg, what’s to stop you simply keeling over? Problem solving is more complicated than it first seems. But by knowing what you start with, and what you want to end up with, you can come up with a sequence of steps to make that happen. |
Richard Walker (2090) 431 posts |
I also disagree with the ‘assembly language first’ idea. I have written nothing in assembly language. The first thing I developed and released for RISC OS was written in BASIC, but it was nothing, really. The second thing was USBJoystick, which is written in C. I wouldn’t consider writing anything in assembly language. It is like buying piglets when I want a ham sandwich. |
Andreas Skyman (8677) 170 posts |
Yes, that was clear. I just felt I should at my perspective on it as well.
No assembly. Before C, mostly BASIC (after C, mostly Python).
I honestly can’t remember. To be clear, I have no grief with assembler – it is a good thing to know a little assembler to understand what the computer does, and Risc systems are ideal good for this. That said, I feel Risc OS is also an excellent platform for learning C, because of how near to the OS you can get without a lot of fuss. Definitely better than Windows and Mac, and probably better (in some respects at least) than Linux as well. |
Kid Konami (8755) 5 posts |
Is BBC BASIC that runs on RISC OS compiled or interpreted? I am not a big fan of Python, but I use it since everything is making libraries for it. I would much prefer to use C64 Basic. Just now reading about BBC Basic, since it never made it to my part of the world. It appears to be still updated BBC Basic. |
Martin Avison (27) 1494 posts |
The BASIC that has always been included with RISC OS is interpreted … but it is a very fast interpreter. Some BASIC programs are compiled, using ABC which is a compiler that is part of the Desktop Developer Environment (DDE) available from ROOL. |
Kid Konami (8755) 5 posts |
@Martin Avison: |
Martin Avison (27) 1494 posts |
If you need to use a version of BBC Basic on Android, you should have a look at BBC BASIC for SDL2 It is similar to the RISC OS version – they both originate from the same place, but the SDL version has a number of enhancements. |
Chris Hall (132) 3554 posts |
Is BBC BASIC that runs on RISC OS compiled or interprete The interpreter is, of course, compiled. But it is a very fast interpreter. Programmes can be compiled with RiscBASIC or ABC but each has problems. BBC BASIC is also available for Windows and has many extensions such as an x86 assembler. |
Kid Konami (8755) 5 posts |
@DavidS |