Announcement

Collapse

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Decided to start learnig C

    I've played around with BASIC since about 1979 but never really got super deep into it. A few years ago, I bought a book about assembly, but couldn't stay awake reading it. So, late in September, I started looking for Online Courses for programming. I stumbled accross "C Programming with Linux" from Dartmouth College. I'm now three courses into a seven course program and learning a LOT! Has anyone here checked this out or completed all seven courses? I'd love to hear feedback and suggestions as to were to go after completion. C++? Python? Java? Other C courses?

    If you click the picture, you'll see my progress so far.

    Capture.jpg

    #2
    Good luck and have fun with learning C! I have started several times but I am so used to Pascal that every time there is a need for programming something, I have to fall back to Pascal again because I'm not familiar enough with C.
    But there is also a bit of annoyance: Borland C is not GCC C is not Microsoft C etc. etc. Broland Pascal is Free Pascal and that is good enough for me.
    With kind regards / met vriendelijke groet, Ruud Baltissen

    www.baltissen.org

    Comment


      #3
      Hi, ibmapc. I'm glad you are learning (and I wish enjoying) learning C. As Ruud said, GCC has many differences with Borland or Microsoft C for DOS, although the basics are the same because Borland C is ANSI compliant (although old standard), but it has many incompatible extensions aimed for DOS programming.

      So where to go next depends on your programming target: if you wish to do DOS applications, the basics will be the same you learnt for Linux (file handilng, text printing, logical operations, types, structures and such are part of the ANSI standard since decades ago) but you would need to learn some DOS specific functions, some of them slightly different depending on the compiler you choose, such as Microsoft, Turbo/Borland or Open Wattcom.

      So if you want to expand your C knowledge applying it to DOS programming (if that appeals to you), I would read something as Herbert Schidt books on Turbo C, for example. Also must be there some tutorials over the Internet but I can't tell as I don't know them.

      If, on the other side, you want to learn to program modern 32/64 bit console or Windows applications, or even web applications, with a language very close to C/C++, but easier to implement and code than Visual C++ on this platform, I would suggest learning C# with the help of the .Net Framework.

      Of course Python, Java and Pascal are excellent too but I'm not as familiarized on them as I'm on C, that's the reason I did not talk about them before.

      Comment


        #4
        I learned C, am still learning C, using texts like C How to Program. I want to say there are better ones. But I've read 2 different editions over the years. It's just the one I stuck with.

        There doesn't seem to be many if any good texts on advanced C topics. One I also like is an O'Reilly book, with a sea horse on the cover IIRC, 'Algorithms in C' or something like that. Actually deals with issues like encrypting data and such.

        Online courses can be good I suppose. But you need to work that knowledge. Otherwise you'll just forget a lot of it. Trust me.

        Another book I used to have was Crafting C Tools for the IBM PC. Not sure if that was ansi based, M$ based, or wot. That's the world we live in. You have to be able to use more then one variant.

        A knowledge of C is not optional and the knowing will serve you well. It's the basis for so many other languages besides - Java, Javascript, PHP, etc. C++ of course. You don't have to limit yourself to C. But as I've already said it's really a foundational skill in computer science.

        Comment


          #5
          K&R C is the original document from which most of the old guys became acquainted with the language. I've linked to a somewhat later online edition that might serve better to get your feet wet; for differences from the first edition, see Appendix C at the end.

          In many respects, it's quite different from C99 and light years away from C++. Like all computer languages, it seems, it was a very simple language; but it's grown like Topsy in the intervening years. Consider original 1954 FORTRAN and compare it with, say, F90. C is much like that, particularly when considered in the light of C++.

          I don't know if any of the old Usenet C forum content presided over by Ritchie is still around, but I found it to be interesting reading back in the day.
          Last edited by Chuck(G); November 7, 2020, 09:03 AM.
          Reach me: vcfblackhole _at_ protonmail dot com.

          Comment


            #6
            Originally posted by ibmapc View Post
            I've played around with BASIC since about 1979 but never really got super deep into it. A few years ago, I bought a book about assembly, but couldn't stay awake reading it. So, late in September, I started looking for Online Courses for programming. I stumbled accross "C Programming with Linux" from Dartmouth College. I'm now three courses into a seven course program and learning a LOT! Has anyone here checked this out or completed all seven courses? I'd love to hear feedback and suggestions as to were to go after completion. C++? Python? Java? Other C courses?

            If you click the picture, you'll see my progress so far.

            [ATTACH=CONFIG]64547[/ATTACH]
            Last year I bought a C++ book from Amazon and it came from Walmart. It was supposed to have the CD/DVD with it but I never received it. Still going round and round with Amazon and I don't think I'm going to win.
            Surely not everyone was Kung-Fu fighting

            Comment


              #7
              On what machine are you targeting your programs for?
              If it's for an early vintage computer, then stay with C. However, early K&R compilers didn't have very good debuggers. You really need a good debugger to find and correct errors in your source code. Otherwise you're level of frustration will be high.
              I would recommend C++. K&R C had problems with pointers and other areas that were addressed in C++.

              There are several free C++ compilers that run on modern machines. Couple that with the enormous tutorials on YouTube, your experience will be more rewarding. and less frustrating.

              For older P.C. compatables, Turbo C++ works fine. Not as many YouTube tutorials though.

              As far as Assembly language goes. Heathkit made the ET3400 and ET1000 computers that had self teaching courses. Assembly will give you knowledge on what happens at the "primitive" level of programming. Great for interfacing with circuitry.
              IT is very tedious to learn. Just keep in mind if you want to learn interfacing with hardware, assembly language is the way to go.

              Comment


                #8
                Originally posted by ibmapc View Post
                I'd love to hear feedback and suggestions as to were to go after completion. C++? Python? Java? Other C courses?
                Learn some data structures, for sure. Linked lists, trees, maps. Those will take you far, in any language. With C you'll know them at a primitive level.

                You should go write a bunch of C programs next, that's what you should do.

                I can't speak to the classes, but you can't learn C, or any language really, in 7 classes.

                You need to apply the language to things that interest you and get things done, and it's best done without a safety net.

                You need to go and write a bunch of stuff that maybe in the end you're not happy with so that you can improve later. It software, you can change it.

                Simply, it takes practice, a lot of practice, to learn these environments and be productive with them.

                I also suggest to anyone learning a language, that while learning, you type in all of your code. Don't cut and paste it from the web, type it in. If practical, don't download it from the web, but type it in. Your brain processes it much differently character by character than just drag and dropping large blocks of code that you know nothing about.

                Typing it in lets you asses what you're typing. Determine "Oh I see what they're doing here" vs "WTH is going on here?". You also have a better chance when you're in some section of "I don't know" to have it make sense later when the rest of the code is in place. When the "Aha" hits.

                There is a LOT of code in the world and on the internet, but there's still a lot of room to find your own voice, write your own code, make your own mistakes, and fix them. There's a bunch of alternatives out there, don't chase them. Best to work with C and find its warts and problems and such as they apply to you before you go run out trying to find solutions because of what someone else says.

                I'm of the opinion that an expert in anything is not someone who knows something, it's someone who knows how to fix something. There's a zillion books on how to tile your bathroom, and almost none of them really help you when your floor isn't level, the wall is out of plumb, or something doesn't set right. To fix things, you have to break things, and to break things, you need to make things. So, go make some stuff, break it, fix it, and make it again.

                It's always good to learn other languages, but it's better to be fluent in one before venturing out. Only then will you be able to better appreciate the new language, and, perhaps, the old one as well.

                Comment


                  #9
                  I use C for any project where I really need performance (except on 8-bit machines where I just write it in assembly), or on systems where I can't count on any runtime being there other than the standard C library, which is everywhere.

                  But its string handling sucks, so I tend to use Perl for everything else (except on 8-bit machines where BASIC suffices).
                  I use my C128 because I am an ornery, stubborn, retro grouch. -- Bob Masse
                  Various projects and oddities: http://oldvcr.blogspot.com/
                  Machine room: http://www.floodgap.com/etc/machines.html

                  Comment


                    #10
                    Originally posted by Chuckster_in_Jax View Post
                    On what machine are you targeting your programs for?
                    If it's for an early vintage computer, then stay with C. However, early K&R compilers didn't have very good debuggers. You really need a good debugger to find and correct errors in your source code. Otherwise you're level of frustration will be high.
                    I would recommend C++. K&R C had problems with pointers and other areas that were addressed in C++.

                    There are several free C++ compilers that run on modern machines. Couple that with the enormous tutorials on YouTube, your experience will be more rewarding. and less frustrating.

                    For older P.C. compatables, Turbo C++ works fine. Not as many YouTube tutorials though.

                    As far as Assembly language goes. Heathkit made the ET3400 and ET1000 computers that had self teaching courses. Assembly will give you knowledge on what happens at the "primitive" level of programming. Great for interfacing with circuitry.
                    IT is very tedious to learn. Just keep in mind if you want to learn interfacing with hardware, assembly language is the way to go.
                    For me proly something that runs at least XP? Never gave it much thought. I'm fair with BASIC/Visual BASIC but haven't used those in a while. The last time I did anything productive was before I retired back in '07. I wrote and compiled a program that would figure dB losses and gains with various tower based fixed positioned RF transceivers/duplexers with respect to antenna type, radiation pattern, elevation, and local area topography.
                    Surely not everyone was Kung-Fu fighting

                    Comment


                      #11
                      Originally posted by whartung View Post
                      You should go write a bunch of C programs next, that's what you should do.

                      I can't speak to the classes, but you can't learn C, or any language really, in 7 classes.

                      You need to apply the language to things that interest you and get things done, and it's best done without a safety net.

                      You need to go and write a bunch of stuff that maybe in the end you're not happy with so that you can improve later. It software, you can change it.

                      Simply, it takes practice, a lot of practice, to learn these environments and be productive with them.
                      This, exactly. A good quick-overview tutorial is great for getting you started, but the best thing you can do once you have the basics down is start applying them to a practical problem. Nothing builds experience like actually doing something for real.

                      Specifically, I'd say look for something you can accomplish fairly simply (i.e. some basic command-line utility you can do with just stdio functionality) that aligns with interests you already have and understand well. In my case, I once wrote a de-duplicator for DX7 patch libraries, because that was something I needed anyway, and all the documentation on the formats was easily obtained. Taught me a bunch about designing and coding a C program.

                      (Really need to give it a rewrite, actually...)
                      Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
                      Synthesizers: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, E-mu Proteus/2, Moog Satellite, Oberheim SEM
                      "'Legacy code' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup

                      Comment


                        #12
                        If you're programming medium-to-high end microcontrollers, C is pretty much a given, as development suites and sample code are universally written in it. Low-end MCUs are generally best done in assembly, as speed and memory are minimal and you may be counting cycles for timing. I'm aware of Python being used with some MCUs, but that seems to be a fringe movement. Truth be told, I'd almost prefer Ada--but that hasn't caught on in MCU work and probably never will.
                        Reach me: vcfblackhole _at_ protonmail dot com.

                        Comment


                          #13
                          Back in the day ADA was the thing at the Pentagon. Might be still around in some areas.
                          Surely not everyone was Kung-Fu fighting

                          Comment


                            #14
                            Originally posted by commodorejohn View Post
                            This, exactly. A good quick-overview tutorial is great for getting you started, but the best thing you can do once you have the basics down is start applying them to a practical problem. Nothing builds experience like actually doing something for real.

                            Specifically, I'd say look for something you can accomplish fairly simply (i.e. some basic command-line utility you can do with just stdio functionality) that aligns with interests you already have and understand well. In my case, I once wrote a de-duplicator for DX7 patch libraries, because that was something I needed anyway, and all the documentation on the formats was easily obtained. Taught me a bunch about designing and coding a C program.

                            (Really need to give it a rewrite, actually...)
                            Finding something interesting to write is the key to it all. What you want is to build kitchen cabinets, not find a use for the table saw. The languages are just tools, the craft is in applying them, knowing that most any tool will work.

                            Back in the day, it was games. I was always writing games. Really bad, half finished games. As with most things of this nature, I wrote the game until I solved the most interesting problems, and then moved on to something else.

                            I'll never forget trying to write a Space Invaders game on the TRS-80. And a problem I had was how to determine which alien got hit. The aliens were made up of the coarse pixel graphics of the TRS-80. But the solution I came up with was I put a unique character in the middle of each alien. When the missile hit, I "looked around" for that character, and used that as an index to tell me what alien I hit. As you can imagine, each alien looked odd and bad on the screen. There are all sorts of better ways to do this, but none had occurred to me at the time. Much of this stuff just happens "in the moment", and you work it, and move on. It's a BAD solution, but away I went with it. And it's instructive.

                            So, the take away? Write bad software. Write lots of bad software, so you can become like Edison: "‘Results! Why, man, I have gotten a lot of results! I know several thousand things that won’t work."

                            Write to the problem, solve the problem, move on to the next problem. If you have to return to code that no longer solves the problem, change it. It's software, it's not cast in stone. Outside of deleting production data from a database with no backup, or having a robot arm spin around and hit you in the head, 99.99999% of the time, you can't hurt anything. Try to stay away from code that drives radioactive sources in your first few programs.

                            What makes things so much more difficult today, however, the internet is gorged with distractions. Because the internet is the Home Depot Tool Wall of options to get things done, where the focus and discussion is on the tools, not the problem at hand.

                            You will be able to do whatever you want in C. Treat it as your hammer for the next 6-12 months of doing real work, then come back and with eyes open as to what you might want in another language. All of that hard fought experience will carry forward.

                            And, especially today, write everything yourself and avoid libraries if possible. Write your own data structures. Sort your own data. Read and write your own files. Copy and adapt algorithms, for sure, don't reinvent Quicksort, but write the code for your data, for your application.

                            Comment


                              #15
                              Just a thought, if you learn Forth you can use on new computers as well as the 8bits, there are variations of it though.
                              Generic and Amstrad CPC based Programs written in Turbo Pascal 3

                              Comment

                              Working...
                              X