Learning to code

I know it does sound a bit sacrilegious not recommending K&R to learn to C, and the Great Council of Neckbeards may bring me up on charges of heresy for saying it.  But I still break out in a cold sweat every time I think about learning C my Freshman year.  Knowing only BASIC and some Pascal, I had to learn C to solve impossibly hard projects with just K&R, an unsympathetic professor, and a TA whose English proficiently matched my knowledge of C.

You are right, if you know Java or C# well and at least understand the concepts of memory management, you will probably have no trouble learning C using K&R.

java's a good language to start out with. for the first few projects, I suggest using like notepad++ and the command line, it gets you to pay attention to the little details of the syntax. after a bit, you can move to an IDE, like netbeans or eclipse. I personally use eclipse, mostly because that is what my school uses in the csci labs, and what instruction is based off, but we stated out using text editior and CMD (most of the class still do, i'm just ahead of the class).


I've been learning C++ on and off for a few months from some online tutorials, and it seems really clean to understand. I found an online compiler and I have used that for now. I want to finish learning it then move to Java, so I can focus on Android applications. Unfortunately I still have to concentrate on studies, too : )


So far my only project is a text based RPG. I'm finishing up the "groundwork", the classes and weapons. I'll probably use an array for the "map", with different values representing different terrain or to simply trigger events.

The code is in a Googledoc if you guys want to have a look at it:



This is my second project. The first was supposed to be an ROG with a randomly generated worlds and no story, but I paused that one to make this scripted one.

More attention will be devoted to it in the summer.

Before getting any further into the book, I stopped. I took a step back and realized that there are many bugs in the example code of the book.

In consequence, I have resorted to learning Python through LearnPythonTheHardWay.org, and after that I will move on to LearnCTheHardWay. I've found this tutorial a lot more beneficial. In fact, I skimmed through a bit of the C tutorial from this guy and he goes on to sort-of deconstruct the book by K&R. Overall, I think I will benefit more from this guy's stuff even if I have to go through Python first.

It's funny writing basic Python code after learning how to write basic C code.