Forum Rules and Etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.

Rule 1: Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.

Rule 2: Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.

Rule 3: Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.

Rule 4: "PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.

Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Rule 5: Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.

Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.

New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.

Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

Decided to start learnig C

  • Filter
  • Time
  • Show
Clear All
new posts

    Although I also consider myself a beginner (I'm a musician by profession), I will add my own thoughts.

    I think an important reason for choosing one programming language or another is the preferred (or desired) programming paradigm. And that obviously translates into the way you think. (Or vice versa: The way you can think results in your choice of programming language.)
    For me, OOP is a more natural way of thinking about problems.
    On the one hand, it is very abstract, because it allows you not to think too much about hardware. On the other hand, it is very specific, because it allows you to model a problem using objects. Which, of course, is not always needed. Anyway, I have a choice.

    The second thing. It is much easier for me to find a hole in the roof in the cpp code than in c, because I know who is responsible for what and where to look for it.

    Although OOP can be approximated in c, imho c ++ in that case is the better choice.

    And a little bit of the exotic at the end. In the early 1980s, 8-bit computers began to appear in communist Poland - mainly in some schools. Few could afford a home computer.
    In those days, the computer press in Poland (but also my math teacher) promoted LOGO as a much better language than BASIC, as it taught "good habits" and avoiding the "spaghetti code".

    Before my parents bought me my dream Atari 800xl, I was going to a friend who had zx spectrum. To this day, I remember the thrill when the turtle drew what I had imagined on the zx spectrum screen!


      It's a good point about thinking.

      Back in the late 1960's, a fellow was offering seminars in what, IIRC, he called the "Pride Method". The basic idea was simple--before a line of code was scribbled on a coding pad, one defined precisely what the output and input of a program would be. That included page layouts and input formats. Then a list of steps, including all data structures that would be needed to get from the input to the output, along with a list of possible "gotchas" and what would be done with them. The guy's whole point was that if you were thorough enough in the specification, the code pretty much wrote itself.

      It's still good practice. As in so many fields, music included, discipline is the key.

      C++ is a lousy fit for low-level hardware applications, such as device drivers. It's a great fit for user applications, if not a bit verbose. Template writing is an art all within itself. I don't find a well-written C program to be any more difficult to understand than a well-written C++ program.

      I don't use a chisel to drive screws, nor a screwdriver to shape wood. Every language has its uses. I'd no sooner write a simulation in C than I would write a device driver in SIMSCRIPT.
      Reach me: vcfblackhole _at_ protonmail dot com.


        I agree with what Chuck is saying about C vs. C++.

        One thing I will say about C is that, like assembly, there are no training wheels. This isn't a critique of the language at all, but rather a warning: It is easy to hang yourself quickly in C/C++. This is something to think about when learning it - go slow - step the code - watch what it does. Get past all those bugs however in its performance can be stellar.


          Originally posted by Chuck(G) View Post
          Not at all--"playing around" with is not exactly real programming. You can write a "hello world" program in dozens of langauges; e.g.,

          'Hello World!'

          Runs in APL just fine, but doesn't even begin to scratch the surface of the language.

          It's "playing around".
          Well then, I guess I'm still "just playin' around". This is a hobby for me. If I wanted to make a career of it, I should have started A LONG TIME AGO! These days, I spend my free time doing what I enjoy and trying to stretch my abilities, mentally and physically. So, Yes, this is supposed to be fun AND difficult. But not so difficult that I start yelling at the wife about it!



            How about Pascal as the first language to learn!!!!!

            Back in my school days, they used to tell us that Pascal was
            the best "structured" language to learn about programming...



              Originally posted by ibmapc View Post
              Well then, I guess I'm still "just playin' around". This is a hobby for me. If I wanted to make a career of it, I should have started A LONG TIME AGO! These days, I spend my free time doing what I enjoy and trying to stretch my abilities, mentally and physically. So, Yes, this is supposed to be fun AND difficult. But not so difficult that I start yelling at the wife about it!

              Which is really why you ought to try Processing. It's the closest modern equivalent I could find to the old Turbo Pascal or BASIC platforms. Java is used extensively in high schools and universities for teaching CS and is close enough to C syntax as to not be disconcerting if you are already somewhat familiar with that. Kind of the modern replacement for Pascal. One might say that Python is the modern equivalent of BASIC (using some creative license here). Having both available under Processing provides some flexibility in language choice. Many examples are provided as both Java and Python versions.

              In Processing, the code isn't called an application, it's called a sketch - a quick, lightweight program to carry out a task, usually graphically oriented because that is the most interactive and rewarding for beginning (and seasoned) programmers. Much of the boilerplate code is hidden away which often presents a barrier to entry by convoluting the process of just getting something running. The large collection of example code can be used as a basis for your own, or just modify the examples. Lots of online videos and documentation at your fingertips.

              A nice sandbox to play in.


                Originally posted by ziloo View Post
                How about Pascal as the first language to learn!!!!!

                Back in my school days, they used to tell us that Pascal was
                the best "structured" language to learn about programming...

                Back when Pascal was making waves and "structured programming" was the latest buzzword, I did some research and explained what it was all about to a co-worker. His response? "You mean what good programmers have been doing since there have been computers?". Yeah, pretty much. One could, I suppose make the point that Algol-60 was the first structured higher-level language--and nearly nobody uses Algol today. I think Pascal's (and Modula-2's) day in the sun has come and gone.
                Reach me: vcfblackhole _at_ protonmail dot com.


                  Depending on what the ultimate goal is here and if you're already familiar with "a language" (BASIC is good enough) another decent sandbox for playing with C might be to buy one of those Arduino starter kits that comes with a protoboard and a bunch of LEDs/sensors/whatever and learn via exposure to the Arduino IDE. (The language for which is C. The Arduino library includes a number of primitives that make it not quite a *standard* C environment in terms of input/output, etc, but all the normal data and control structures are there.) There's a huge library of exercises and reference sketches out there to work with and if you blow up anything you can get a box of three knockoff Arduino Nanos for about $15 from Amazon and not shed a tear. The AVR hardware is a very minimal (but fast) 8-bit CPU so it does make you think about things like choosing the optimal data types (bytes verses integers, etc), and it's even pretty easy to program in assembly, so if the goal is to figure out how to get closer to the hardware you could do worse.

                  (I'm mostly a Python programmer in "real life", but I was able to pick up enough about the AVR's assembly language to do real work with it in a couple afternoons, and the Arduino IDE makes it not particularly difficult to embed short assembly routines directly into a C program.)

                  Obviously this probably isn't the way to go if you want to learn C for "systems programming"; there's not really an "OS" involved here.
                  My Retro-computing YouTube Channel (updates... eventually?): Paleozoic PCs Also: Blogspot


                    Amazing response to the OPS's thread from the professionals and hobbyist alike. What I think he wants is some general tips and encouragement on where to start. Instead he's been getting a steady flow of what others deem necessary and important and a load of guidance concerning prerequisites. I think he knows that he probably won't be making the mortgage payments (if any) from the C++ adventure, but like a lot of us, just wants to know something about it. Speaking for myself, I've got the software now and I have a book. My plan is simple or maybe not; I'm going to attempt to take a simple BASIC game and port it to C. I'll play with it and if it's like my last endeavor with Linux, I may lose interest fast.
                    Surely not everyone was Kung-Fu fighting


                      Originally posted by Agent Orange View Post
                      Amazing response to the OPS's thread from the professionals and hobbyist alike. What I think he wants is some general tips and encouragement on where to start. Instead he's been getting a steady flow of what others deem necessary and important and a load of guidance concerning prerequisites.
                      I should be very clear. I've already made several posts on this thread. But I should make it unequivocal.

                      Simply the OP should do whatever he wants, but he should stick with C. If you start chasing languages without doing anything, you'll never stop, and, in the end, won't get anything much done either.

                      C is fine. Work with it, get your things done, put some time in to it to learn the things you love and hate about it.

                      In college, they (at least used to) have these "computer languages" class. Basically it was a quick introduction to a lot of languages within one course, vs a dedicated course on Pascal or FORTRAN.

                      And while the languages course gave some exposure, it really wasn't enough. It was enough to give a little taste, but that taste tended to be bitter because the languages were different enough that all the student would do is stumble through them just to get the projects done.

                      Many, many people learned to hate Lisp in these courses. I can see someone spending 2 weeks with Python and grousing about the semantic whitespace, and other warts on the language rather than its benefits.

                      Which is why I feel that if someone wants to learn to program, they simply need to pick a language, ANY language (any real language, vs the novelty languages, and I honestly don't recommend assembly, but...), dive in head first, and stick with it. Because so much of programming and computer science has nothing to do with the language.

                      So, in this case, the choice has been made: C. Run with it, have fun with it, do some projects, get some work done, get some successes out of it.

                      Later, that experience can be used to make an encounter with another language that much more rich. "Oh, C does that, C doesn't do that, why would I want to do that? This is better, this is worse."

                      If I were doing C on a legacy PC, I'd pick a 386, and I'd pick Turbo C for the IDE, and the SMALL memory model, and do all I can with that (which is a lot, skies the limit). The small memory model gives you 64K of code and 64K of data, without having to worry about segments and NEAR and FAR pointers and all of that. Tiny model shares the code and data, but doesn't offer much of a difference in the actual coding experience, so may as well get the extra memory space for free. Plus all of the code written for the SMALL model will pretty much "just work" if you compile it under Linux (which doesn't have to worry about the early PC memory models). Why muddle your head with details like the memory model when you're just trying to get a linked list to work.

                      You can do that with the other memory models, it just changes the default pointer style, but, again, why worry and obsess over those details at the juncture.

                      The debugging experience on the 386 is just that much better to be worth while if you're not going to be pedantic on processor, and Turbo C is a wonderful IDE.


                        I guess it depends on who you are with Languages, I had my time with C in Class and apart from the Lecturer, I had problems with Coding problems in written sentenses and I think I would still have those problems.
                        If a problem arrised in BASIC or there was a certain problem with someones code in BASIC, I'd have a higher chance of solving it particularly if it had a mathemathical problem to it, because I could simply type the formula and get an answer and if it was what I was looking for then great, otherwise I'd eventually work it out. Not all BASIC stuff, though breaking it down into a more structured look has work for me particularly when dealing in Short BASIC stuff with Long Lines. I have Pascal to thank for that.

                        On a modern system, Python seems to be the language which offers that area to type in a forumula and return a result though, I'm not sure if I've seen C with that kind of offering. Though I've seen people learn C and not know anything else, so maybe by the time I came along and knew BASIC, Pascal, Delphi, some Logo & Z80 Assembly I needed to commit to C and forget everything else.
                        Generic and Amstrad CPC based Programs written in Turbo Pascal 3


                          I picked up the later (next) edition of a C text I consumed long ago. It was cheap, and brought back memories. I haven't completed it, moved on to other projects, but plan to pick it up pretty soon. I have this behemoth Northstar server box that's been sitting here for too long. The Dimension. I think I would get a kick out of porting Minix to it. Therefore I'll need to brush up thoroughly on whatever knowledge I had (had and forgotten a lot of). I tend to do things the hard way. I could probably muddle through the source code, which I don't even need to do really. But when it stops chokes on something I'm going to need to understand why. The D* isn't a PC compatible, although it hosts plug in PC motherboard cards. It's uP is an 80186. When I got it it was somewhat banged up. The hard drive bracket suggests the h/d itself took a very sever beating. I haven't the guts to just plug it in and see what happens. I'm not hopeful. And I don't want anything to catch on fire. My Tandy 4000 did recently. A capacitor exploded, part of it flew across the room, and the remaining stump kept burning until I blew it out. And it wasn't even my birthday.


                            Generally the consensus is (or was, possibly not in this thread though) that it's best to learn a language like C without having to deal with the mechanics of an IDE (Integrated Development Environment). IOW write your program in a text editor, issues simple command line instruction, w/switches or parameters possibly, which will result in the creation of an object file (assuming no errors). Which would then require linking, another simple command. All of this can be automated with batch files. When writing assembler programs years ago, I wrote the batch file so the newest iteration of my program would overwrite the earlier version, working mu way through the error correction process.


                              Have you tried any of the free courses available from Stanford, Harvard or Coursera? They aren't particularly effective for learning practical programmin skills, but they do give you a good primer on the main languages and they're quite a bit more entertaining that a textbook. The computer science primer course from Harvard gives a good intro to C I believe. Those courses tend to give you access to good learning resources, which is their real value for people with basic programming skills.


                                I think you heard everything needed to know from the "Higher Powers" ......(not me!).
                                You can write a nice code and get some output and show us on this thread....