You are not logged in.

#26 2011-10-30 04:34:58

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: Learning C question

jasonwryan wrote:

What about this one, or this one, or even this one?

This comes up from time to time; there is no real need to sticky it smile

Right, exactly: it keeps coming up. If anything, the plethora of threads more adds weight to the argument that this needs stickying. Probably, the OP would not have created the current thread if those other threads had already been stickied?

jasonwryan wrote:

Good idea: but it sounds more like something for the wiki

If it should go in the wiki, then how about a sticky pointing at the wiki: "Novice and advanced programming tips: we get this all the time. First have a look here <url provided etc> before posting new questions."

Offline

#27 2011-11-10 18:42:13

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Learning C question

If you are a complete beginner, I would recommend the following... IMHO Malan is a great lecturer:
www.cs50.tv

Or you can just pick up K&R

Last edited by ugkbunb (2011-11-10 18:43:01)

Offline

#28 2011-11-14 16:27:20

N30N
Member
Registered: 2007-04-08
Posts: 273

Re: Learning C question

jasonwryan wrote:

Good idea: but it sounds more like something for the wiki

And so it begins: Learning resources.

Offline

#30 2011-11-14 20:08:23

rowdog
Member
From: East Texas
Registered: 2009-08-19
Posts: 118

Re: Learning C question

Higher Order Perl is good and free.
http://hop.perl.plover.com/

Offline

#31 2011-11-15 16:24:07

rickeyski
Member
Registered: 2011-01-27
Posts: 25

Re: Learning C question

There is also learn c the hard way now as well

http://c.learncodethehardway.org/book/

Offline

#32 2011-11-17 04:21:21

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Learning C question

Ooo, Its nice to see someone was kind enough to start it up. Thanks to whoever did it and I look forward to people sharing some good stuff.

Offline

#33 2011-11-21 19:26:53

pling
Member
Registered: 2011-11-21
Posts: 20

Re: Learning C question

Learning C by writing a windows manager is not a good idea. C is much more difficult than Python or C# and considerably less productive. You need smaller problems to work on - ones that are reasonably easy to test and reason about, especially in regards to memory management via pointer, which is the key thing you have to learn. And these problems should all be console based to make testing reasonably easy; testing GUI apps that have been written with manual memory management is an art in itself and you usually won't know when you're messing up.

Offline

#34 2011-11-23 00:00:01

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Learning C question

Do you already have a basic understanding of (numerical) algorithms and data structures, and are simply needing to better understand the C language? You mentioned having experience with "high-level" languages at work? What kind of programming do you currently do? What languages do you currently know?

Also, what kind of problems are you wanting to solve? Is developing a (new) window manager representative of your domain of interest, or just something that you thought would be a good place to start? What are your long term objectives (ideally)?

Knowing the answers to these questions may help others to more effectively taylor their responses.

I agree with Pling that starting out with a window manager is rough. The best heuristic for learning something new is to start with something incredibly simple and incrementally add complexity as your knowledge and skills develop.

Last edited by bsilbaugh (2011-11-23 00:18:52)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#35 2011-11-23 20:23:29

pling
Member
Registered: 2011-11-21
Posts: 20

Re: Learning C question

brandon88tube wrote:

I understand arrays, loops and the other basic things like if statements because of my other programming knowledge, but what tends to get me is the whole pointer thing and memory management. I don't understand the point of using a pointer over a normal variable. I might already be using them at work, but unknowingly so, as I make variables that sort of reference something else.

The point of a pointer, as opposed to a reference, is that you can move it. If ptrA points to arrayFloat[0] then ptrA++ (i.e. ptrA + 1) will point to arrayFloat[1]. So you can loop through an array by advancing a pointer - this why C strings are zero terminated, so that you can detect the end of 'em easily. So a string copy would just be while(*a++ = *b++).

This is moveability is, of course, one of the reasons why pointers are dangerous.

Offline

Board footer

Powered by FluxBB