Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 30, 2006, 10:49 PM   #1
atari1356
macrumors 68000
 
Join Date: Feb 2004
How to read a programming book?

The topic probably sounds silly, but this is something that I've seriously been thinking about today.

For most things, I learn best by doing... by trying things out and discovering how things work on my own. However, most things are much more simple than learning a complex programming language or some framework.

In the past, when I've picked up a programming book I've taken what I felt was the "learn by doing" approach and worked slowly through the book - typing in the examples as I went along, and doing the exercises at the end of each chapter (if there were any). Eventually though I'd get bored or start feeling overwhelmed (*cough* Cocoa/Objective C memory management ) - feeling like I'd not made much progress.

Sometimes I'd learn how to do something - but not really understand why it was done that way. It seems to me that to really comprehend a language you should know why things are done a certain way - but as a result, I'd start to get bogged down in the details.

So, now I'm thinking that what I really need to do to make progress is just READ THE BOOK. Skip typing all that code in because it's just slowing me down - and get through the book, even if I don't remember all of the details. I can always go back and read certain parts again to get the details.

I think it may be better to get a general overview of the language - then hopefully the details will fall into place and start to make more sense later on.

What do you think? When you're first learning a programming language do you read through the entire book quickly? or do you work through all of the examples/exercises? I'm interested in other people's thoughts on this...
atari1356 is offline   0 Reply With Quote
Old Aug 30, 2006, 11:43 PM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
From my experience, if I want to learn a new language, I think of a program I want to write, and then work my way through that. I'm learning Ruby (and Rails) at the moment and instead of doing little silly examples, I'm just going to dive into some web apps and start writing them. So I'd suggest you think of something simple and useful you'd like to write, and work on that, while at the same time reading your book and looking up stuff online.
kainjow is offline   0 Reply With Quote
Old Aug 31, 2006, 01:13 AM   #3
Soulstorm
macrumors 68000
 
Soulstorm's Avatar
 
Join Date: Feb 2005
Studying a programming book is just as if you are reading a mathematics book.

What you will or won't do with this book is up to you. First of all, read the theoretics part very well. That's 50% of the learning process. And try all examples! After that, if you feel that you have understood all the basics of this chapter, you may skip the exercises for this one. But if you feel that this chapter is very important to skip (for example, a chapter about OOP), do every exercises.

The way you will handle the exercises will also be judged by your understanding of the matter. You will start with the most difficult exercise of the chapter. If you can't solve it, try something easier. By going down in the exercise difficulty hierarchy, you are bound to see something that will suit you. Solve that. This will surely provide you with a way of thinking to do the next exercise. And you will continue on from there...

I am the "learning by doing type". I go through all examples, and sometimes I heavily modify them and make them do something else.

Ah, and these little details you mention... These are the most essential part of every programming language. If you miss a detail, you may never know it, and that missed part will surely come out later, giving you headaches, and stalling you from your work for many hours.
Soulstorm is offline   0 Reply With Quote
Old Aug 31, 2006, 01:24 AM   #4
FredClausen
macrumors regular
 
Join Date: Aug 2006
Location: KALM
Send a message via AIM to FredClausen Send a message via Skype™ to FredClausen
When I first got into programming I bought a book, went through every page by reading them, then doing the examples. I learned pretty good, and that created the foundation for my future programming "skills".

Now I learn a new language by first reading the reference documentation, maybe perusing a book, and then I flat just write a program in it. The syntax is so similar between languages that I mainly just look for the differences.
__________________
 Fred Clausen © 
 Macbook 1.83 White | Mac Mini 1.25 ghz 
FredClausen is offline   0 Reply With Quote
Old Aug 31, 2006, 05:30 AM   #5
Palad1
macrumors 6502a
 
Palad1's Avatar
 
Join Date: Feb 2004
Location: London, UK
I started programming using the Holy Bible.



I really like the way it's structured.

Each chapter introduces a new notion, is built around samples, and a bunch of exercises are given at the end of the chapter.

Some chapters refer to previous exercises and build on top of them, that's great because you really feel like someone is actually helping you along while you progress.

Last edited by Palad1; Aug 31, 2006 at 05:39 AM.
Palad1 is offline   0 Reply With Quote
Old Aug 31, 2006, 06:08 AM   #6
bousozoku
Moderator emeritus
 
Join Date: Jun 2002
Location: Gone but not forgotten.
I tend to use a couple of different books at the same time.

I find the O'Reilly Nutshell series of books to be great. They give a good description of specific functionality in a way that doesn't end up as a lecture.

I'll pick a small project and run through a book as a reference, skimming any code examples given. Once I've outlined my project in code, I code specific pieces and return to the code examples for verification.
bousozoku is offline   0 Reply With Quote
Old Aug 31, 2006, 09:30 PM   #7
somewhatstunned
macrumors member
 
Join Date: Aug 2006
In my experience of programming books, Fat is Bad! Sure it's ok as a first pass to introduce you to menus and such. but it's the dense, skinny books that give you the backstory that makes it all make sense.

I'm new to mac programming myself, but I've been programming for many years in Unix and Windows and Java and I am now looking for the dense, skinny book on OSX. A book with challenging exercises is very good.

What is that book? Anybody know?
somewhatstunned is offline   0 Reply With Quote
Old Sep 1, 2006, 08:08 AM   #8
atari1356
Thread Starter
macrumors 68000
 
Join Date: Feb 2004
Quote:
Originally Posted by kainjow
From my experience, if I want to learn a new language, I think of a program I want to write, and then work my way through that. I'm learning Ruby (and Rails) at the moment and instead of doing little silly examples, I'm just going to dive into some web apps and start writing them. So I'd suggest you think of something simple and useful you'd like to write, and work on that, while at the same time reading your book and looking up stuff online.
Ruby/Ruby on Rails is what I'm learning now as well... the web app I want to create will be quite large, but I'll figure out how to break it into smaller chunks to tackle as I'm learning.

I've decided to buy the Second Edition of Agile Web Development with Rails (currently in beta), since the first edition seems just a bit outdated with it's lack of migration info... and using migrations seems so much easier and better than the way it's done in the first edition.

With previous programming languages, I never really had anything in particular that I wanted to create... so lack of motivation was probably part of the problem. I think you're right about needing to find something simple and useful to work on as you're learning.
atari1356 is offline   0 Reply With Quote
Old Sep 2, 2006, 04:38 AM   #9
weg
macrumors 6502a
 
weg's Avatar
 
Join Date: Mar 2004
Location: nj
Quote:
Originally Posted by atari1356
So, now I'm thinking that what I really need to do to make progress is just READ THE BOOK.
How to read a programming book? Easy.. don't.
Start writing your own applications, probably using short tutorials on the web, and use books only as reference. If you want to learn coding, the only way to do that is hands on.
__________________
- weg
weg is offline   0 Reply With Quote
Old Sep 24, 2006, 06:23 PM   #10
Fairly
macrumors regular
 
Join Date: Sep 2006
Location: Cambridge UK
Quote:
Originally Posted by Palad1
Palad1 has the right idea. But don't just read the book - do it too.

Do all the exercises. Every last one.
Fairly is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Book Recommendation - iOS Programming VanMac iPhone/iPad Programming 1 Oct 8, 2013 10:01 PM
iPhoto database...programming to read it Omne666 Mac Programming 6 May 29, 2013 09:31 PM
Best book for iOS programming? MaxOrlcok iPhone/iPad Programming 12 Mar 22, 2013 10:54 AM
best book for iphone/ipad programming? hassoon iPhone/iPad Programming 3 Sep 6, 2012 04:02 PM
If I Wrote a Programming Book... ArtOfWarfare iPhone/iPad Programming 18 Jul 26, 2012 02:51 PM

Forum Jump

All times are GMT -5. The time now is 05:32 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps