Join AllAdvantage.com

Learning to Program in C


Background

I have owned a computer since I was ten, a Commodore VIC20. I didn't have a cassette player for this, so had to write down (by hand, no printer either) all my programs, so I could re-enter them every time I wanted to use them. As a methodology for learning programming, this repetitive re-entry hammered Commodore basic into my skull better than a jackhammer.

From there I moved to the Commodore 64, which some younger readers might find difficult to believe, meant that it had 64K (yes K,) of memory, not a 64 bit processor. I had the luxury of a tape, and then a disk drive (which was nearly 1.5 times as fast!)

Once I started work, I got into consoles, rather than computers, and we went through a fair few of the consoles which are now so cool and retro, like the NES (not Super), otherwise known as the Famicom. We also had an Atari 2600, another 16 bit Atari console which I can't remember what it was called (was it the Atari XL - write to me if you know). The Sega Master System and Mega Drive bring back memories, although we may well have lent these off other children.

Having worked my way up to the Super NES I then got a Sony Playstation, and now have my PC.

I figured that it was time to go back to my computer roots and learn to program again. I decided on C/C++ and HTML (as you tell the HTML works - but I wouldn't call myself anything but a hobbyist).

I decided to put this page together for myself (learning HTML remember), and also as a resource for myself and other learners.

On this page I shall put all the links to compilers, tutorials, web sites, and news groups that I find, along with what I use them for, and how useful I find them.

If anyone wants to share in this, let me know. I will be glad to add other peoples links, or to include their comments in the reviews of any sources.

You can either e-mail me or contact me on ICQ (my UIN is 5493207)

Resources

Enough waffle Matt - get to the good stuff you cry. OK then, detailed below are the resources I've found in the last month or so that I've been learning.

Compilers

The first thing anybody needs to learn to program is a compiler (I know most flavours of ~Unix have an in-built compiler - so don't shout I'm presuming that your using a PC)

If you are like me, and starting from scratch, then want you want is a FREE compiler to learn with. We don't want to spend a lot of money to find out that we don't have the aptitude or patience to learn, thereby wasting the money spent on a compiler.

I have used three free compilers, and this has now been narrowed down to one. These three compilers are;

DJGPP

This free compiler is the best that I have found, and the only one I use now. It follows all the conventions in the tutorial I use, and has its own IDE (Integrated Development Environment)Rhide

I know that this is a shallow reason for favouring the software, but having used other compilers, where it is necessary to jump in and out of a text editor, to enter arcane compiling commands, Rhide's simple drop down menus and options are bliss

DJGPP will run under Windows95 and 3.1, and the relevant versions of DOS (I use DOS 6.22 with Win 3.1).

The djgpp site has tons of software and options in it, and has a highly useful page called the 'Zip Picker'. This page basically asks you what you a bunch of questions, and uses your answers to determine exactly which zip files you need to download.

Homepage - djgpp (www.delorie.com/djgpp/)
Newsgroup - comp.os.msdos.djgpp

Miracle C

This is the second best compiler I've used.

Whilst it did not conform exactly to the tutorial I was using, it was well documented, so it was relatively easy for me determine how to change the tutorial code so that it ran under Miracle C.

While it does not have an IDE, so you need to use an editor, the compiling options are quite simplistic, and easy for a beginner.

I used Miracle C for a while, just running it in a DOS window and using the standard editor (EDIT). Then I discovered the Programmers File Editor, an excellent text editor which will run the compile commands of you compiler. This is not as good (IMHO) as using the a IDE like Rhide, it is still a damn sight better than using EDIT.

If you are going to use Miracle C, I would strongly recommend the use of the Programmer File Editor with it. Not only do they work well together, but they are both obtainable from the same source, CNET's DOWNLOAD.COM

Miracle C will only run under Windows 95 (and I presume NT). Attempting to run it under DOS6.2 gives an error message of "CANNOT FIND DOSXNT.EXE IN PATH" (or something along those lines)

lcc-win32

This is a free 32 bit compiler, which is free to download from the homepage shown at the foot of this review.

I must confess that I could not get the 'knack' of using this. I tried a few times, but the penny just would not drop on how to use it. I do not want to knock this compiler, as I have not been able to use it, but that is my fault. I can only say download it (it's free) and see what you think (I'd love to hear your opinions).

Lcc runs only under Windows 95/NT and comes with an IDE / text editor called WEDIT.

It is quite well documented, merging technical information on the compiler, with some autobiographical content on the history of the product, and how the author wrote it.

It can be downloaded at LCC-Win32 Unofficial Home Page

Newsgroups

One of the most useful features of the Internet are the news groups (also known as USENET).

For those of you who don't know, newsgroups are live world wide posting boards. Each newsgroup has a subject, and anyone who has access to the newsgroup can post a question, or some information to them. All the other subscribers to that newsgroup read those messages, and can follow up these postings with their own.

The result of this is similar to a public e-mail conversation, where everyone can read the e-mail, not just the people in the recipient list.

C has a few useful newsgroups, and I have included links to them below. You should note that they link to a news server read.news.globalnet.co.uk. If you don't want to use this server, then look for the groups under your own news

 

Netiquette

Like anything, newsgroup usage is subject to netiquette.

Most groups have a FAQ (frequently asked questions). This is usually published weekly. Regular subscribers to news groups get a bit pissed off at people who jump into a newsgroup, and ask an obvious question that is answered in their FAQ, or can be easily looked up by a basic WWW search.

The general netiquette rules for newsgroups are;

1. - lurk (read without posting) in a group for a while, to get a feel for what type of postings are made;

2. - read the groups FAQ

3. - read the contents of news.announce.newusers for a definitive guide to newsgroups netiquette.

Some useful newsgroups are (if you came from a newsgroup that is not reviewed below - tell me and review it yourself);

alt.lang.learnc-c++
This is a good resource set up specifically for new learners. However, do not think that only the most simple of questions are answered in this newsgroup. There is also a fair bit of discussion over advanced C/C++ topics.

comp.lang.c
This is a member of the comp. hierarchy of news groups, and is not really for the learner. However, they will not always bite your head off if you ask nicely, and as long as your question is not one that can be easily answered by reading their FAQ comp.lang.c Frequently Asked Questions

This FAQ is also a superb resource for general C information. As well as being netiquette, looking your question up in this FAQ will probably give the learner the answer to most of their questions. It will also be a lot faster, and a lot less likely to cause some one to flame your question from great height.

comp.os.msdos.djgpp A newsgroup dedicated to djgpp. As my compiler of choice, this is a newsgroup I read a lot (but very rarely post to).

Links

The World Wide Web is an excellent resource for almost anything, and learning C is no exception.

Some excellent C links I have found during the period I have been trying to learn are shown below. Please report any dead links to me by e-mail

Introduction to C Programming
C/C++ Links Page
C Programming
Learn C/C++ Today
Steve Summitt's Home Page
The Unofficial C for Dummies Web Page

Home | Read my CV | Search the WWW | Pictures
User Acceptance Testing | Learning to Program in C
ICQ Page (including Software Testers ICQ Group