Fog Creek Software
Discussion Board

Anyone learn to program how they tell others to?

The 'how Should a novice start learning C++' led me to this thought:

How many of you learnt to program the way you tell others to?

I learnt to program in the days of the microcomputer - first on the ZX81, later on the BBC and most productively on the Acorn Archimededs. I learnt in BASIC, and then assembler.

From that I learnt C++ from a pocket reference book on a train back from Sheffield. In effect, I learnt it as a bunch of neat tricks - you should see some of the drivel I came up with.

I do not recommend this method of learning of C++...

So, who out there learnt the way they recommend or, do you, like me just give others advice based on what you think would probably work?

Mr Jack
Tuesday, March 16, 2004

Well I would certainly recommend learning the way I did. I got "C for Dummies" by Dan Gookin.

It assumes that the reader has absolutely zero knowledge of programming, which is where I was when I started.

C is great for beginners because it doesn't lull you into a false sense of security, and you have to face up to pointers.

I know some people are offended by this book, but each to their own. If you have any prior background in computing, math, or technical antics it's not the right book for you, but for an overawed newbie, it's perfect. It got me where I am today.

As long as I don't look too closely at where I am today...

Fernanda Stickpot
Tuesday, March 16, 2004

I wonder if the "for Dummies" line of books was "for Beginners" (or something less insulting), and everything else about the books was the same, would it have sold as well?  Maybe better?

Tuesday, March 16, 2004

I learned first in GWBASIC/QBASIC doing quickie neat things.  I even set up a boot menu when our DOS menu program broke, so my mother could still get into WordStar without asking for help.  (6th grade)

I bought a book "Teach Yourself ... C" and got about halfway through.  I didn't have a C compiler of any sort at the time. (7th grade)

I bought the Power C compiler set (you probably shouldn't ask), read the book (halfway?) and never really got into coding anything.

I took the AP computer science class and learned Pascal.  In this class I learned more than enough to whiz me through the first two introductory CS classes in college, and beyond.  We wrote one program pretty much every week in the AP class.  This is where I learned more than probably any time before or after.  (senior, high school)

No one asks me what to learn in programming.  Everyone who wants to learn doesn't bother asking me--they just start.  Of course, I'm talking about the teenagers+ age bracket, so I'm not claiming that your six year old will just 'figure out how to learn programming by themself.'

Tuesday, March 16, 2004

I dunno. For one thing, even "for Beginners" would offend a certain type of person that detests the idea that, when you're learning something, you don't know it already.

I think the "for Dummies" phrasing appeals to the flip side of this - many many people go through life believing themselves to be, not simply *ignorant* of a subject, but actually *impaired* in it, partly because they have been shamed in the past when they didn't know something they had never been taught, or never been taught properly.

So a book whose title implies "despite the fact that you're a bit dim and can't learn as well as those people over there who are laughing at you, this book breaks the concept down into teeny bite-size chunks and feeds it to you in such a way that even you, poor bonehead, cannot help but learn *something*" is going to appeal to the latter demographic and engender rage in the former.

Fernanda Stickpot
Tuesday, March 16, 2004

I have to second the recommendation for "C for Dummies". I learned programming with BASIC, and had a reasonable amount of experience with that. But I found the transition from an interpreted environment to using a set of tools (a general-purpose text editor, the compiler and the linker) to be quite unfathomable -- I couldn't even get through the compile/link stage (well, I was a teenager, I'm not losing any sleep over that now...). I very reluctantly bought the "C for Dummies" book, and within a few minutes I was writing C quite happily. In fact, I loved the book -- I found it an amusing page-turner (I think only Code Complete can compete with it in terms of readability, at least for tech books).

But, to answer the original question: I learned a few things the right way the first time around, but not all. When I learned BASIC, the line-numbered approach was on its way out and subroutines and labels were reasonably common, so I didn't learn to write spaghetti code, and this stood me in good stead when I learned C and assembler. When I first learned C++, it was seen as a version of C with some syntactic sugar and functions that belonged to structures (which were called classes for some reason :-). It was some time before I learned the basics of OO design and how C++ could express those designs.

C Rose
Tuesday, March 16, 2004

I read a lot of teach yourself and for dummies books, in addition to not-for-dummies books. C for Dummies was one of the first of that series and I think it is a great book. The "for dummies" was not meant literally. The idea is that you don't have to be an uppity academic to be smart enough to figure out computers. You do have to be smart though, or at least extremely patient.
Buying a for-dummies book, and especially reading it on a train, means you are more committed to learning than to impressing others with your brilliance.
Other for-dummies books, not by the original author, were not nearly as good, certainly not as hilarious.

The Real PC
Tuesday, March 16, 2004

First of all, the cards have 80 columns and although you can have as many as 6 characters to define a variable it saves a great deal of keypunch time if you name all your vars with just one or two characters. Next, remember there are only 4k words available in timesharing fortran, so count your array sizes carefully and if you are going to run over, there's a trick called subprogram overlaying...

Tuesday, March 16, 2004

>> First of all, the cards have 80 columns and although you can have as many as 6 characters to define a variable it saves a great deal of keypunch time if you name all your vars with just one or two <<

Bad move, this is just going to start a series of "in my day" comments, of which this is the first:

In high school in grade 8, we used 40-column BASIC cards, filled them out with pencil (which was a good way to see how Hollerith code worked).  We had a card reader, a modem (probaby 300baud) with an accoustic coupler, and a TI thermal printer terminal.  The mainframe behind all this was an HP minicomputer, I assume a 3000.
Then later we moved on to a PET and later a couple of Apple ][s.  So I never tell anyone to learn this way.

A keypunch was a step up...

Tuesday, March 16, 2004

On a tangent to all of this, did you know that the actual guy who inspired the character, Mark "Rat" Ratner, from the film "Fast Times at Ridgemont High" was the same guy who started the "___ for Dummies" book series.

Ratzo Rizzo
Tuesday, March 16, 2004

Do not forget the importance of column 6.

Simon Lucy
Tuesday, March 16, 2004

I taugh myself C without books. I just started with a codebase and when I wanted to do something, I looked for how it had been done elsewhere, and looked it up if I got stuck.

I doubt you can do that if C is your first language though!

Sum Dum Gai
Wednesday, March 17, 2004

People knock them, but the 'For dummies", "In 21 days", "in a weekend", "in 24 hours" books are a great way to get into any subject.

The better ones  (Hungry Minds), will teach you just enough to begin learning, and to know what you need/want to learn. They kinda help bridge Meno's Pardox

'How will you inquire into something, Socrates, when you don't at all know what it is? Which of the things that you don't know will you suppose it is, when you are inquiring into it? And even if you find it, how will you know that it is the thing you did not know?"
-- Plato

Wednesday, March 17, 2004

I taught myself programming in a ZX Spectrum (Basic and little asm).

Then came glorious Clipper 5, and C. Shortly after, I got my contact with C++.

However, it was only after going through "C++ Primer" and "Thinking in C++" that I got some solid knowledge. I've even managed to make sense of some (but not all) items on "Effective C++" and "More Effective C++".

Paulo Caetano
Wednesday, March 17, 2004

In my day, sonny, we had to mail our punch cards to the computer in the next county. they mailed back a printout with the errors.

You really learned what desk checking was about.

Thursday, March 18, 2004

*  Recent Topics

*  Fog Creek Home