You want to learn programming?
  • Yokemate of Keyboards
    Yokemate of Keyboards
    takemehomegrandma
    Posts: 2720 from 2003/2/24
    Are you dreaming of being creative, to do your own thing? Are you new to programming, but wants to learn? Have you programmed before in AMOS or Blitz Basic (and have been hoping in vain for that to emerge on MorphOS)? Do you want to learn the basics of C programming on Amiga together with others? Well, perhaps you can!

    There is this thread over at amiga.org: http://www.amiga.org/modules/newbb/viewtopic.php?topic_id=14951&forum=2&25

    There seems to be some interest in forming a "beginners group", that cooperates to overcome the challanges and to do joint projects in a "beginners level". This is my post in that thread:

    Quote:

    I am very interested in learning C programming (I have made some brief tries a couple of times, but stalled). I already know Basic!

    Your thought of forming a "beginners group" is a good idea! :-) Perhaps someone with experience could volunteer as a mentor for such a sorry bunch? ;-) That would be great!

    I agree with MagicSN that one should start in small scale, with the easy ways. The focus should (at least in the beginning) be on C programming techniques, compiler usage, and such, rather than advanced OS features and functions. Therefore, the "learning projects" should IMHO be quite simple, bare bone, nothing fancy, and in an "Open Amiga spirit". By that I mean a focus on the AmigaOS 3.1 API, which at least in theory should make it possible to use all 4 flavours of the platform (at least in theory); the Amiga, the A1/OS4, the Pegasos/MorphOS and AROS. Right?

    Anyone else interested in a C beginners group? Any volunteer mentors? :-)


    My main thought is that one of the bigger challanges for a complete beginner is to overcome the process of setting up an IDE (we in MorphOS might have some benefits here?) and overcome the basics of C programming together with others. "NG" OS specific things might come later, the most important thing is to get more people involved in the creative process, right? There already seems to be some interest among beginners in forming a "Class 1 of Amiga API programming", as well as some mentors.

    Are you interested to learn?

    Are you interested to be a mentor?

    Who knows what might come out of this thought, but it could be worth to check out?
    MorphOS is Amiga done right! :-)
    MorphOS NG will be AROS done right! :-)
  • »10.02.04 - 01:08
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    minator
    Posts: 365 from 2003/3/28
    C is a fairly hairy language to get into, it's sure not the best learning language and unless you really need high performance there are other languages which will be better, C makes you do a lot of work you simply don't need to do in other languages.

    If you want to learn "modern" OOP programming try Java, it's very powerful and does everything you'll need, it's also simpler than C. If you really want to learn C or C++, Java will provide a big head start.

    Python is another, it's a scripting language but is also OOP. Looks very easy to learn as far as I can see.
    I've never actually used it, I've done Perl (a lot harder to learn) but Python looks like Perl in English!
    It doen't need a compiler so is easier to get going.

    You could always try Python then move onto Java then C / C++, that'd probably be a good route.

    That said I don't know if Python works on MorphOS, and Java doesn't work. It may be easier starting on a PC or Mac as both languages will work on them.
  • »10.02.04 - 01:39
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    takemehomegrandma
    Posts: 2720 from 2003/2/24
    I know that C isn't usually the first choice for a beginner. I have been programming a lot in basic, pascal and other high level langauges myself, and I know that those require "less work to get things done". However, speaking about Java, that isn't exactly a widely spread flavour on any of the current "Amiga"-branches, right? Currently I feel that C is the only language where any real usable work is being done. Trust me, I know that C has a steep learning curve, and that's why the words "beginners group" sounds good to me, as well as the word "mentors"!
    :-)
    MorphOS is Amiga done right! :-)
    MorphOS NG will be AROS done right! :-)
  • »10.02.04 - 01:48
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1217 from 2003/6/17
    IMHO, I think C is a great language to start in... and yes creating a GUI in MOS is tough.. MUI is too tough to learn so I dont bother..just writing CLI apps and reading other code for now until a better GUI tool comes out.
  • »10.02.04 - 03:33
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Chain-Q
    Posts: 347 from 2003/10/12
    From: 1 AU, EU, DE/HU
    I disagree. I think MUI is one of the easiest to use, learn, and program GUI toolkit. Believe me, i've used a few of the widely used gadget kits, like GTK and QT, and others, and they are a nightmare compared to MUI. But if you need, there are even visual GUI builders available for MUI, but it's just so easy to build eyecandy GUI-s in MUI, you normally won't need such builders. And MUI is also Fast, with big F. Just compare the speed with eg. GTK2 on your Linux, and see. So I see no problems with MUI.

    About the languages to use... Well, there are a few easy to learn languages on Amiga, such as AmigaE, or more PowerD, which has PPC support as well, and they are just great for small and medium sized projects. But i think, more important to learn how a CPU and general stuff works. For eg. if you learn what is a pointer, and how is it works, it's nearly no matter what language are you using, since pointers are the same everywhere.

    Anyway, i generally like the idea about a beginner class, and mentors. :-) I got many requests also about new Pegasos owners for programming infos, howtos and such, so collecting these infos is a good idea.
    [.PegasosII/G4.:.Efika.:.Amiga2000/060.]
    [.Free Pascal Compiler MorphOS Port.]
    [.Hosting AmigaSpirit.hu.]
  • »10.02.04 - 05:50
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    MarK
    Posts: 641 from 2004/1/25
    From: Prague, The Cz...
    Hi!

    My opinion is similar, I has already wrote few lessons of programming in my native language, but what people mostly doesn't understand is dynamic memory allocation, structures and related stuff, like memory organization and pointers. People should understand the basic concept of the software before they start to programm.

    And ofcourse MUI is damn cool and everything is question of few lines also without a WYSIWYG GUI editor.

    Bye.
  • »10.02.04 - 06:21
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Jupp3
    Posts: 1193 from 2003/2/24
    From: Helsinki, Finland
    if you just want to see what can be done with MUI, you could just look at rxmui examples... Building even complex MUI guis with arexx isn't really that hard...
  • »10.02.04 - 08:15
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Tcheko
    Posts: 510 from 2003/2/25
    From: France
    Hello @All,

    I must agree that something must be done for beginners. I was used a long time ago to develop in 68k asm and it was easier because lot of example and books where available. It is no more the case.

    I am currently trying to come back to amiga (mos) programming and it is not easy. Too much thing have changed or documentation is too slim (no examples mainly).

    What about Morphos Rom Kernal Manual ? Even if API is compatible with 3.1, we DO need better documentation and sample code.

    I search the web last night and didn't found a good forum with wide knowledge base. Most of amiga dev forums are quite empty. I though about comp.sys.amiga.dev (if I remember well) but it makes a long time this newsgroup is dead.

    Some people try to do some good stuff : www.guru-meditation.net for example. Content is french unfortunatly. Not too much article either but a good start (Hi Iliak!).

    It would be definitively usefull to have a knowledge base about mos programming (by extend amiga programming) with examples and tutorials covering most important subjects :
    - How to setup devenv
    - How to compile (build makefile)
    - MUI (Zune)
    - Networking (Mos 1.5)
    - File I/O
    - Datatypes
    - Graphics
    - Handlers
    - Creating Devices
    - Creating Libraries
    - Installer scripts
    - ... TBC

    A good KB is www.w3schools.com, tutorials are not complex but gives you the kick to start with.

    I hope 'mentors' will agree and be motivated to build something to help the students...

    Regards,

    Tcheko.

    PS : If anyone know how to link SDL static lib... I take.
    Quelque soit le chemin que tu prendras dans la vie, sache que tu auras des ampoules aux pieds.
    -------
    I need to practice my Kung Fu.
  • »10.02.04 - 09:24
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 730 from 2003/2/24
    From: aGaS & CUAZ Al...
    I agree with TheMagicM... MUI is not as easy as Gadtools or other GUI toolkits...
    For example... if it was sooooOOooOoooo easy, all the unix ports would come with a GUI because coders who port it would find it soooOooo easy and soooo fast to add a GUI that they would add it.

    Amiga programming tools and IDEs aren't very good. The text editors are nice but that's all. We haven't integration between GUI builders and IDEs. And the IDEs are poor. The documentation doesn't give examples. Etc... Newbies expect something like Delphi/VisualC/VisualBasic/etc...

    I don't mean that it's a big task to start coding, but you really need WILL to start coding. You need to search examples on aminet, you need to reboot your machine from time to time when you trash the memory with your pointers, etc...

    About MUI being fast, I think that's OK on peggy but on real Amigas with 060s, PCI graphic cards etc it's not as fast as I would like. On the other hand compared to GTK or any non-amiga GUI toolkit it rocks and it's damn fast. Just look the GTK Windows ports. They suck, and the programs that use GTK on Windows simply SUCK. Just check Glade or xchat. They are sloooow and crash often. And yes, I'm using at work a 2.4Ghz PentiumIV with 512MB of RAM and WinXP. And it works without problems with other apps.

    I would choose C because you have the best support and tools for C. I wouldn't spend my time with AmigaE/PowerD. They are as easy as C and don't offer any advantage IMHO.
  • »10.02.04 - 11:01
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    MarK
    Posts: 641 from 2004/1/25
    From: Prague, The Cz...
    Hi all!

    Why do You think, MUI is more difficult than gadtools for programming?

    What if You would like to add a forgotten button? In MUI You just insert it, in gadtools You have to move all the others buttons to insert the new one. IMO very uncomfortable.

    BTW: What do You know about AmigaE/PowerD? These are true Amiga languages, with lots of advantages except the portability.

    Bye, MarK.
  • »10.02.04 - 12:13
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »10.02.04 - 12:23
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 159 from 2003/10/24
    From: Portland Orego...
    I would have to agree with needing something for the new comer into MOS/MUI. I have been banging my head starting out on the system and being new to C/C++. A good beginners start guide, api info, yada yada yada would help immensely.

    Just my 2 bits.
    --Mithalas
  • »10.02.04 - 16:55
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 730 from 2003/2/24
    From: aGaS & CUAZ Al...
    "Why do You think, MUI is more difficult than gadtools for programming?"

    a) Because I find easier to write gadtool interfaces with gadtoolbox than with muibuilder

    "What if You would like to add a forgotten button? In MUI You just insert it, in gadtools You have to move all the others buttons to insert the new one. IMO very uncomfortable."

    I use GadToolBox, which IMHO it's much easier than MUIBuilder or any other visual MUI GUI creation tool. So if I want to add a button I simple write a button as I would do with Visual Basic/JBuilder or any other modern Visual IDE.

    b) I find MUI harder than ANY other Amiga toolkit, for example I find Reaction to be much easier (I'm not saying that it's worse or better, just that I find it easier).

    c) Remember that "easy" or "difficult" is subjetive. For me MUI doesn't look easy

    "BTW: What do You know about AmigaE/PowerD? These are true Amiga languages, with lots of advantages except the portability."

    I know AmigaE because I used it before I learnt C. It doesn't offer me anything that I can't do in C. AmigaE is not easier than C. Well, It compiled quite fast that's one point, but I can't see any advantage. PowerD is more or less an updated version of AmigaE.

    If I use C I can compile native stuff for AmigaOS3.x/4.x/MorphOS and AROS... depending on the app my program may be adapted to other OSes.

    I don't give a #### about "true amigans", "true amiga languages", "true amiga hardware", "true amiga trademarks" etc...

    If these "true amiga languages" have lots of advantages over C write me a list.

    Other "true amiga languages" like AMOS suck too IMHO. AMOS is the less system-friendly language I've ever seen on Amiga. I guess that as it's a "true amiga language" I should fall in my knees and start to praise it, but sorry I prefer C or C++. Call me heretic if you want :P
  • »10.02.04 - 17:05
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 730 from 2003/2/24
    From: aGaS & CUAZ Al...
    @Zylesea:

    I undertand how you feel at 100%. When I started coding on Amiga I spent more time trying to make the f***ing compiler work and adapting damn includes than doing real coding.
  • »10.02.04 - 17:09
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    Quote:


    I use GadToolBox, which IMHO it's much easier than MUIBuilder or any other visual MUI GUI creation tool.



    Here, when I was using Amiga, I sent all gadtools programs automatically to .recycled and deleted them forever. Maybe I tried them once or twice before deletion. Nothing wrong if you prefer using GadTools but:

    - it must be font sensitive
    - it must have resizable GUI
    - it must be a commodity
    - it must support iconifying
    - it must support custom screens
    - it must go away autom
    - it must support keyboard shortcuts

    Only very few non-MUI applications survived my HD so far... MakeCD is only major non-MUI app here and it uses triton.library...
    1 + 1 = 3 with very large values of 1
  • »10.02.04 - 20:06
    Profile
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    More:

    Quote:


    I use GadToolBox, which IMHO it's much easier than MUIBuilder or any other visual MUI GUI creation tool.



    I don't think GadTools is any easier. In gadtools you must lock screen, obtain visualinfo and other crap you never should care about, and finally calculate gadget positions. Ok, GadToolsBox makes that lot easier but even listviews are relatively difficult to use. Implementing something simple like drag&drop is virtually impossible.

    I know MUI has its learning curve to get into it, but once you learn how MUI works you never look back.
    1 + 1 = 3 with very large values of 1
  • »10.02.04 - 20:16
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    TheMagicM
    Posts: 1217 from 2003/6/17
    Crumb, Zylesea I agree with you both. For now I'm sticking to CLI based coding in C. boring as hell, but dechiphering fscking MUI to incorporate it into my code is a task in itself.

    "Hey, look at the examples on aminet"...

    yea, great. Look at the code with no comments in it..where can you ask for help and expect to get a reply in less then a few days? Sorry, but I'm sure "veteran" programmers will get annoyed by helping answer silly questions..

    Dont get me started on the docs that come with MUI.
  • »11.02.04 - 04:50
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    MarK
    Posts: 641 from 2004/1/25
    From: Prague, The Cz...
    I really don't get Your point. I also used GadToolsBox for several projects, but later I needed more advantages, which gadtools simply can't offer, like nlisttree, popupmenus and so and so. gadtools is simply obsolete and it's not under a development anymore. And it's not font sensitive, imo the biggest MUI feature. gadtools simply can't compete with MUI. And for more, to design nice gui with MUI, You really don't need and gui builder.

    In gadtools' times I wouldn't say a word against, but now??? But sure it's a subjective ;-)

    And when talking about AmigaE or PowerD... Sure, AmigaE isn't under development anymore like gadtools, but PowerD (and please take my opinions subjective here, as I'm PowerD's author :-D ) has a support for PowerPC processors, I know You still can't write native MorphOS applications, but be sure, it's under development. When talking about advantages and disadvantages, just visit my homepage, You will find there many :-)

    But hey, this goes out of the subject, can anyone here write a tutorial to write, say a simple calculator with MUI?

    Bye, MarK.
  • »11.02.04 - 06:38
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 261 from 2003/3/13
    From: Rotterdam, the...
    POWERD RULEZ!!! :)
  • »11.02.04 - 08:30
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »11.02.04 - 10:00
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 730 from 2003/2/24
    From: aGaS & CUAZ Al...
    I no longer code for GadTools, GadToolBox was just an example of what I would like for a MUI Visual GUI creator...

    I currently use Reaction and it is enough for me.... and I find it easier than MUI. I have started to do a visual tool to create GUIs, but more in the style of VisualBasic etc where you define only what happens after a event... don't hold your breath, it's too basic at the moment to be distributable.

    MUI has a lot of config options but apart from the Font, backdrop of the window and screen I have never used the other options.

    The basic 3.9 Reaction classes at the moment suit my needs. For example the ListBrowser class is similar to others I've seen in MUI...

    "When talking about advantages and disadvantages, just visit my homepage, You will find there many"

    "-multiple return values (8 for m68k (integers and floats), about 25 for ppc integers and 32 for ppc floats) "
    I'm not sure about this... If I use pointers inthe arguments I don't need to return the result in variables... or If you are refering to argument passing in functions in C you can pass arguments directly in registers or as stack.

    "lists can be defined/used everywhere you like/need, not on the definition only "

    Well, I don't know what are you talking about here... you can reserve memory dinamically in C so I don't know what stops you from creating a list where you want.

    If you are refering to defining a new variable in the middle of the code, it makes the code less structured IMHO. Having all the variables defined in One point avoids the problem of wondering what type was a variable.

    "binary modules "
    I've got no idea about what it is... it's something like link libraries? or a plug-in system? both things can be done in C...

    "much faster "
    compiling or in execution?

    "requires less memory "
    that's very true, gcc/Storm eats lots of ram...

    about the syntax AmigaE I think that AmigaE is something between Pascal and C... so yeah, it's slightly easier.

    BTW Developing a new programming language is a big effort and please do not take my questions as attacks. Many people, specially newbies will find that AmigaE/PowerD is easier than C and will be able to create OS-friendly programs.

    The idea of a MUI tutorial is wellcome
  • »11.02.04 - 12:08
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    MarK
    Posts: 641 from 2004/1/25
    From: Prague, The Cz...
    Hmm, if You mean *really detailed*, then a description if simple source code of, say, 50 lines would rise to not less, than 100 kilos of text...

    I wrote such tutorials in my native language, and detailed description of pointers and related stuff only took over 20 kilos of text... Really hard work...

    Bye, MarK.
  • »11.02.04 - 12:10
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    MarK
    Posts: 641 from 2004/1/25
    From: Prague, The Cz...
    Well, You can do with C everything, You can do the same with PowerD, but in many cases it's far simplier, than in C. I'm not talking only about syntax. Here I just ask, why to make it in more difficult way, when You don't have to? :-)

    Be sure, that I know, how big nut to crack such a language is, I work on it over 5 years now... And be sure I didn't say a last word in 'development world' yet :-D Future is bright!
  • »11.02.04 - 13:27
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »11.02.04 - 13:54
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2053 from 2003/6/4
    addendum:

    What I think is most important to all ppl who like to contribute something like a tutorial:
    We (or at least I) do not need a tutorial about C/C++ in general but in utilizing the (M)OS-functions. To learn C/C++ in general (learn how to create a "hello world" or to use classes or the STL) there are lots of books. But none of them mentions MOS/AOS system functions (in fact I would really wonder if they did...).

    I can read in a book what a pointer is, but why I always use them with these structs when using system functions I never understood in detail :-(
    There are a lot of things I do not know, some maybe due to lack of intelligence but I guess most due to lack of information.
    --
    http://via.bckrs.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »11.02.04 - 14:24
    Profile Visit Website