Pelles C forum

Pelles C => General discussions => Topic started by: shazam on August 07, 2012, 03:52:39 AM

Title: maybe I aint got the smarts
Post by: shazam on August 07, 2012, 03:52:39 AM
I feel like when reading my book I understand but I just blank out when sitting in fron of the IDE(compiler)
I know I am not the smartest person around and maybe learning C was just a dream
BUT how did you 'all learn???

self learner here and not going to school for computer science....just wanted to learn for myself
Title: Re: maybe I aint got the smarts
Post by: CommonTater on August 07, 2012, 04:53:41 AM
Don't just read the book... sit at the computer, take all the examples and exercises, type them up and play with them.  Change them, break them, fix them, learn what does and does not work... then turn the page.

Seriously... You're not reading a dime store novel.  This isn't something you can learn in casual study.  You really do need to make a very deliberate study of every little detail.... and programming is all about details.

I guess I'm one of the lucky ones for whom programming "just makes sense"... I did the deliberate study when I started Pascal, then again when I switched to C and I've just done it again for C++ (which I actually hate). 
 
I think a lot of it is learning to think in small steps and sequences of events.  There's no magic... it's not hard in the sense that only a genius can learn it... it's mostly a matter of applying yourself and doing the work.
 
 
 
Title: Re: maybe I aint got the smarts
Post by: Bitbeisser on August 07, 2012, 09:21:28 AM
I feel like when reading my book I understand but I just blank out when sitting in fron of the IDE(compiler)
I know I am not the smartest person around and maybe learning C was just a dream
BUT how did you 'all learn???

self learner here and not going to school for computer science....just wanted to learn for myself
I am "almost" a self-lerner myself.
Well, I started now 36 years ago with programming when a math/physics teacher in (high)school (Gymnasium in Germany) asked who would be interested in learning to program. We then started a voluntary after-hours class, twice a week, for about 8 weeks learning the basics of programming logic and the basics of Pascal.

All on paper! There were no (home) computers really available back then (1976).

Along the way since, I then learned assembler for various CPUs (MOS 6502, Zilog Z80, Motorola 6800/6809/68k as well as Intel 8080, then 8086 (x86)), about 30 dialects of BASIC, C, Fortran, Cobol, Forth, Java, C++ and probably two dozen more along the way that I never could "warm up to".

In some way, back then, it was a bit easier to get into this. Nowadays, people that want to learn to program face IMHO three problems/hurdles:

1) learning the basics of programming (data types, program flow and control structures, basic algorithms), which is/should be learned completely independent of any programming language
2) leaning the basics of a specific programming language, building on the knowledge gained in step 1
3) learning the specifics of a certain language implementation and the peculiarities of the operating system that is being used

The problem is that today, most people skip on step 1, lacking therefor the basics to move forward as well as trying to combine step 2 and 3. And on that note, learning to program in C on Windows is IMHO a bad combination. C has a lot of "quirks" which can easily frustrate newbies because of unexpected side effects and Windows is a fairly complex OS, where a lot has to be learned in it's inner workings when trying to cope with the UI (try printing in Windows and you will age by years with every day/week you are trying to understand it and get it to work). Back in the days of DOS, all those things were MUCH easier and IMHO, people should use this as their first environment to get their feet wet before jumping into the deep end...

Otherwise, as Tater stated, just reading a book isn't doing much good, you need to understand what and why you are doing things shown in those. And that is the hard part when you're missing out on my previously mentioned step 1 and you do not try to really understand how those examples work. Just typing them up (or loading from an accompanied media) doesn't do much good, try your own examples to understand how certain things work. And don't give up if things don't work right away, it is proven that you learn the most from your mistakes, you just have to be willing to accept them. And there is usually very little you can break, at least if you keep it simple to get a start.

As an old German proverb goes "Übung macht den Meister"...  ;)

Ralf
Title: Re: maybe I aint got the smarts
Post by: czerny on August 07, 2012, 09:51:27 AM
I feel like when reading my book I understand but I just blank out when sitting in fron of the IDE(compiler)
I know I am not the smartest person around and maybe learning C was just a dream
BUT how did you 'all learn???

self learner here and not going to school for computer science....just wanted to learn for myself
Each time you have finished a chapter in your book you self can give you a small project as an exercise. Something you are interested in. Try to solve your project with the book as a reference.
Title: Re: maybe I aint got the smarts
Post by: CommonTater on August 07, 2012, 01:00:05 PM
And don't give up if things don't work right away, it is proven that you learn the most from your mistakes, you just have to be willing to accept them.

+1 for that!    (Hi Ralf :D )

A programmer can't have pride.  Nor can he have a temper. 
The stuff that stays with me is the stuff that I struggle to get working... 

For that matter, I don't think I've ever written a program of more than about 20 lines that has worked right the first time.

 
 


FWIW ... Thomas Edison, while working on the electic lightbulb was taken to task by his sponsors.  He answered: "No, I do not know how to make a lightbulb but I have discovered several dozen ways not to make one". 
 
The message is... don't give up.
Title: Re: maybe I aint got the smarts
Post by: Stefan Pendl on August 07, 2012, 02:40:11 PM
As an old German proverb goes "Übung macht den Meister"...  ;)

You can interpret this as Programming needs practice, patience and experience.

You won't get experience without practice, and you can't practice enough without being patient.

This is all like learning to run: first crawl, second walk, third run.
You can't start running without being able to walk.

Similar to Ralf, I have gone through many programming languages, but started out with BASIC on a Commodore 64.

If you are gifted with logical thinking, programming should be fairly easy ;)
Title: Re: maybe I aint got the smarts
Post by: CommonTater on August 07, 2012, 03:38:36 PM
It might also help to understand the process of developing software solutions....  First you need a problem to solve  ;)

When I get the bright idea to solve a problem in software (i.e. write a program of some kind) I usually break the task down into several steps... Where I think a lot of new programmers make their mistake is rushing into writing code.  Again, I will remind you that no programmer has ever written a solution to a problem they do not understand.  It's not like in the movies where Boy Genius drops his butt in a chair and starts rattling keys and doing amazing stuff.  Most of the time that's the very last step in the process.
 
As you are working with your examples and books, ask yourself: "How might I use this in a bigger project?"  Most of those exercises are actually small versions of stuff you will actually use later on... So now is a good time to begin thinking about how you might apply them in real world solution.
 
It might even help if you decide on a program you actually want to write... Lets say a game, for example, and start thinking about how the exercises in your books are getting you closer to that goal.  That boring old array might give you a way to store high scores. Linked lists, pain that they are, are very good for storing lists of players. The finicky disk IO stuff is how you store the game till next session... and so on. 
 
 
Title: Re: maybe I aint got the smarts
Post by: Stefan Pendl on August 07, 2012, 05:13:33 PM
From personal experience I can tell that programming is 90% research and only 10% writing and debugging code :P
Title: Re: maybe I aint got the smarts
Post by: CommonTater on August 08, 2012, 03:56:20 AM
From personal experience I can tell that programming is 90% research and only 10% writing and debugging code :P

ROFL ... also true of sex.

Title: Re: maybe I aint got the smarts
Post by: Bitbeisser on August 08, 2012, 06:47:23 AM
From personal experience I can tell that programming is 90% research and only 10% writing and debugging code :P

ROFL ... also true of sex.
You're still single? <BFEG>

Ralf  ;)
Title: Re: maybe I aint got the smarts
Post by: CommonTater on August 08, 2012, 03:59:51 PM
From personal experience I can tell that programming is 90% research and only 10% writing and debugging code :P
ROFL ... also true of sex.
You're still single? <BFEG>
Ralf  ;)
Touche!  :D

(FWIW ... married, 3 adopted kids (now adults) and a wife who's smart enough for both of us.)