tags:

views:

1057

answers:

30

Okay, so I read the k&r and C in 21 days (never quite finished the k&r) I never really liked looking through books, reading line after line to learn what n++ does.

I want to write some nice interesting stuff, and I don't want to have to spend hours on end reading books that talk about basic programming functions. Even though I never did anything real advanced, or even finished the k&r. I did finish the 21 day book, after a few months, but I just want to dive into it.

How best to do this?

+4  A: 

Google is your friend. Research tutorials, tips, patterns, and best practices. Also, joining an online community in your language or field of choice is a good way to learn. Once you have the basics, read other people's code.

VirtuosiMedia
+42  A: 

If you expect to magically learn how to program without putting effort into it - you may want to find a different hobby.

Most of us on here have spent years learning how to program, and yes, you do need to learn basic programming concepts before you can write "some nice interesting stuff".

unforgiven3
+2  A: 

Personally I think books are about the best way to get started if you're new to programming. There are some basic concepts that you'll miss (but need) if you just jump right in.

That being said, the most important thing to do is practice. And the best way to do that is pick something you're interested in and code it.

After that, the internet is your friend. If you ever want an intro just google "django tutorial" (or whatever) and you'll get a wealth of links back.

cletus
+3  A: 

Start writing code.

Do something you are interested in or try some of the exercises from K&R.

Jon Ericson
+19  A: 

How best to do this?

In my experience, you don't. From what you write it appears that you simply had the wrong books. The “learning … in 21 days” and “… for dummies” are the classical examples of bad educational books. As a good, polar opposite example, take a look at the “Head first” series of books, which is truly excellent.

Konrad Rudolph
+1 Vote on "Head First"
MarlonRibunal
My first book was an "...in easy steps." It was very simple, but it was my first book. I'm very thankful for these simple publications that cover what n++; does. Because that's where learning *starts*.+1 Vote
Jonathan Sampson
+12  A: 

The best way to learn to program (with or without the availability of books) is to write software. Find a task your computer can do and write a program to do it. Amaze your friends with the nifty little program you built.

One of my first programs was for an electronics store in Spokane, Washington (USA) that had a circle with a wedge that rotated and changed colors and displayed their daily specials. The Borland graphics library made the graphics stuff pretty easy, but I learned a lot on that little project.

To be a programmer, program.

Jim Blizard
+2  A: 

You're right, I really hate having to put effort into something. Why wasn't I born with all of the computer science knowledge known to man already embedded in my brain?

Books themselves aren't always necessary, start writing code and search for help online when you get stuck.

Ed Swangren
+9  A: 

Programming is not quite just writing code.

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. (Fowler)

And for this, in my opinion, there is no way to avoid good reading. Even thought pratical knowledge can help, only reading can give you the concepts to avoid pitfalls.

Give it a try, have patience. It does worth it.

José Leal
+1 for the Quote. Loved it.
Jonathan Sampson
+1  A: 

Looking at other code is probably the best way to learn - find an open-source application or code samples for a product you're familiar with, and go through to see how it does the things you do. I got my start modifying a CircleMUD codebase (http://www.circlemud.org) and finding out where things were stored and which functions did what.

Books are helpful, but if you want to get your hands dirty right away, start with something that you're familiar with on another level, and go from there.

Andy Mikula
I don't really agree that reading other people's code is a good way to learn. It can be, but if you don't understand their reasoning or the concepts behind what they are doing it is no help at all.
Ed Swangren
It might be better than reading a dry reference book, which the OP isn't too keen on doing.
Calyth
And universe forbid that he reads a bad programmer's code...
Jason Punyon
I personally learned a lot more from reading code than reading books, so I think this is a good approach. Not for everyone though.
Jason Baker
+3  A: 

I would say "try different books."

As has been repeatedly pointed out here, you can't learn without reading something. If comprehensive "how to program" books aren't your style (and I wouldn't judge the genre by the "Learn Brain Surgery in 24 Hours" series,) try something with "Cookbook" in the title. Cookbooks, rather than taking a didactic approach, show lots of examples with minimal explanation. For a lot of languages, they'll give you the grasp you need.

Jekke
+1  A: 

You've said you don't want to "spend hours on end reading books that talk about basic programming functions" - so don't. That doesn't mean you shouldn't get books, just that you shouldn't get basic books. There are plenty of books out there which dive deeply into languages/platforms.

The K&R book describes everything in C, and "21 days" books aren't really meant to be advanced books, so it sounds like you've just picked the wrong books for what you want, really...

(Disclaimer: I'm biased as the author of a reasonably advanced C# book.)

Jon Skeet
so you reckon i should read apue or something similar instead?
Can't say I know that myself - but find something intermediate/advanced in the area you're interested in.
Jon Skeet
+3  A: 

Programming textbooks tend to be terrible at teaching programming from scratch, even if they're marketed that way. Once you've got a little hands-on experience, you'll have a much easier time understanding the lessons in the book.

It doesn't have to be a lot of experience -- just write (or copy) a basic 'Hello world!' program and then play with it, trying out some of the ideas you're interested in. Then go back and re-read the relevant sections in the book, and apply what you learn to your code.

Keep going back and forth until you're familiar with it. You'll find that you naturally start branching out into other sections as you become comfortable with what you've got and start experimenting again. Don't necessarily follow the order the book gives you, just investigate whatever looks interesting.

Whatsit
+1 because I learned more in 8 weeks on the job than reading 6 books (admittedly in 4 different languages)
dragonjujo
The best way for me to learn was to just do it. I had taken courses on C and C++, but learned more when teaching myself C# in a week and just coding at my last 2 jobs than I did in any course
phsr
+1  A: 

I think some of the comments/answers are not paying attention to the fact that maybe Gretchen is not the type of learner that learns from books.

Are you the first time programmer? or do you have other programming backgrounds?

A way to do this could be to find a basic, typical programming problem, and just start doing itin the language that you're trying to learn.

Problem is what is "interesting" to you, and how difficult is this "interesting" problem going to be for you. C is not a trivial langauge, and has tons and tons of pitfalls, which is generally documented pretty well in books and on various websites.

You'll probably need something lighter than K&R to start. K&R seems to be more of a reference and may not help your learning style.

Calyth
A: 

My first answer is, you've really got to change your attitude towards books.

My second is, if you really hate to read books, then read other people's code, lots of it, and refer to your book (K&R, not the 21 days one) when you have to grasp some new concepts. In one way or another (as guides or as references), books are essential to programmers.

And, all in all, to everyone else.

Federico Ramponi
+2  A: 

Whatever you do, don't read anything on this list and you'll be well on your way :)

Jason Punyon
A: 

As others have noted, reading is an important part of learning about Computer Science. With that said, I would argue that a more important avenue to learning about programming is to actually program (preferably with a mentor who can tell you when you're doing bad things). Practice makes perfect after all.

Jason Baker
A: 
  • Pick a platform/language to develop with. You won't understand the pros/cons of the various choices out there yet, so don't worry about it.
  • Find some online tutorials about your chosen language, play around with them.
  • Try to solve a real-world problem that you have using your selected language/platform. I find that a simple budgeting/ledger system usually gives me enough insight to get the ball rolling on a new language. You might try an address book or a simple game.
  • Whatever you do, don't be too ambitious. Start small, keep it simple.
  • After you've done enough piddling around to where you feel comfortable with a language, start looking into topics like code re-use and modularity. Any time you come across a programming term you don't know, do a quick Google and find a definition. Even if you don't understand it fully when you read it, in time it'll gel in your head.
  • Hang out with programmers. They all love to talk about the challenges they've faced and their approach to various problems. Your biggest challenge there will be getting us to shut up.
ajh1138
+1  A: 

I have not bought a programming book in 5 years. Here is what you do:

  1. Identify your development platform
  2. Acquire the tools that are necessary to develop on that platform (Pretty much all platforms have freely available tools - yes, even MS!)
  3. Go to google.com
  4. Search for "my development language/tool tutorial"

e.g. "C C++ eclipse programming tutorial"

  1. Repeat 3-4 slightly modifying your search until you find a decent article.
  2. Write a simple "Hello, World" type program
  3. Write a slightly more complex program
  4. Write a prototype of a program in an area that interests you (e.g. Photo organizer, a checkers sim, whetever).

Make frequent use of web searches when you are stuck. Below is my motto:

Rule #1: You are not the first person to have encountered a particular problem. So search the web for the answer (or post to StackOverflow when searches come up empty).
Rule #2: If you think you are the first person to have encountered a particular problem, see Rule #1.

mjmarsh
A: 

Get a copy of XNA from Microsoft (its a free down load) and then chceck out some of the video tutorials they and others offer. You could also try a night class at a local college. I will admit the quality depends on the instructor. If you can ask around about the professors.

Jim C
+1  A: 

If you want to develop something with value in C or another equivalent language, you can always watch video lectures.

If you want to program in something without a learning curve, please download Scratch or Alice.

mweiss
A: 

I learned programming without a computer - all I had is a Java 2 exam guide. The funny thing was - after I started coding, it was very easy and natural even though I haven't really done it before. But programming without books - well - it is possible. C'mon, if you feel comfortable reading off-screen, you can find a wealth of tutorials and guides on how to get started. By the way, that's how iPhone developers had to learn things before books on iPhone development started coming out. The same is with ASP.NET MVC - before there are books or documentation, you just make do with what you find online.

Dmitri Nesteruk
A: 

Well you found this site, so you are well on your way!

Seriously though, reading books is just one form of drawing on the experience of others in the development community. I doubt that the K&R book is the easiest book to read if you are just beginning to program. I can understand of the frustration about wanting to dive in, but suggesting that you will not need to draw on the experience of other, through reading or other forms, would be a mistake akin to redesigning the wheel.

(unfortunately as a developer community we often attempt to redesign the wheel which is both a good and bad thing)

Kevin
A: 

If you want to learn by example (ie, reading other people's code), there is a wealth of information on the 'Net, including on this site. If you have an interest in something, try to find one or more examples. Then try experimenting with changing the code. Make it do what you want.

Scott Hoffman
A: 

What you are trying to do, learn on your own, is hard but also can be very rewarding if you persevere. But there is so much information out there that it can be overwhelming to get yourself focused. Believe me I feel your pain because while I have been master command line script programming, I have had a hard time getting motivated to learn web-based and GUI programming.

Here is my plan for learning on your own:

  • motivation
  • choose a simple problem to solve that can bridge from your existing knowledge
  • development environment appropriate to the task
  • build new complexity in gradual layers

Repeat:

Start with motivation because you need to overcome an obvious block. And, to overcome the block with the least effort, we need to know what you are trying to learn so that we can choose the best language/environment to learn in.

For a bridge, what I mean is you already have knowledge that you can apply on paper. We want to take a simple existing problem and translate it into a program. You will learn a lot even from setting up a very basic program to do a simple task. It helps to start with a problem you are familiar with. I got the biggest jumpstart learning perl by taking one of my shell scripts and just translating it into perl. For you, your starting point is what you already know.

Now that you have motivation, and a simple problem to solve, you need to choose a language/environment appropriate to the task. If you just want a simple command line, you can use a basic scripting language like perl, python, or ruby. If you want a GUI, then you need to decide whether to go web-based or to setup a desktop application, because each has a very different environment. If you want to write networking, then you can use one of the scripting languages or C. You can also do any of this in java, but the environment setup may be daunting.

Then, after your first program is working, you can either extend it with new features, or choose an entirely new problem to solve that is slightly more complex then the first.

Until you are a master.

--

A: 

Find a master who teaches you.

Petteri Hietavirta
+1  A: 

Programming is never easy. It requires audacity and persistence. Books are very important part of the learning process. If you don't want to read books, chances are you are limiting your venues of learning. Great programming lessons are written in books.

I am still on the learning curve in programming like you are. I have been attending classes at colleges . I am attending User Group meetings. I am attending events such as the Southern California Code Camp (http://www.socalcodecamp.com)Although I'm tight when it comes to financial, I am seeing to it that I buy books to read if I have the spare money to buy.

I bought the Head First C#. Just last week I bought the C# Professional by Wrox. I already have the C# Cookbook. I actually started trying to learn programming through C++. It took me to the second class to realize that a low-level language such as C++ does not fit what I want.

Learning programming is never easy. For me I've been in the trial-and-error phase. But I would not give up. This is what I want in the long-term. I realize I could not do it by reading alone. A community college have just accepted my application. Once I can get my user account to their system working, I will enroll to the "Visual C#" class to bring my learning to the next level.

MarlonRibunal
+2  A: 

Find a mentor, write lots of code, read other peoples code.

But seriously.. get over the book thing!

Fortyrunner
A: 

Funny enough, now that I am coding .net for the last few years, I've found the best tutor to be intellisense! I will frequently peruse through the list of methods and attributes and really discovered quite a bit, more direct than reading through a book.

Mark Kadlec
A: 

You can't just read the books and think that you know stuff. You must practice those skills that are in the book.

Cumatru
A: 

The books are good to get started only, e.g. try out the Hello World examples and some other basic things. Do try them out and don't just read about them because experience is what matters.

But then go from there on your own: Think of how you could modify the examples you read about, or what other task you could solve with these or similar techniques. Be creative! Think of a program that would be cool and then skim the books or web sites to find out how to get there. Put it all together, get it to compile and run.

The point is you have to have your own goals and then use the books as references that can help you get there. Don't follow the books too much, just look things up as you need them in order to write your own programs.

Also, once you become more or less fluent in the language: Read other people's code! It actually helps a lot to improve your code. I discovered that myself pretty recently, and my code is getting way better since.

BTW, of course, this is not true just for learning a programming language. When you learn a natural language, e.g. Spanish, you would also never just read books about Spanish or books in Spanish language. What you do is you actually try to speak and write in that language. And often it's said you have to live in the respective country to really learn the language. I don't know what that would mean for C++ and Java. Maybe live inside your IDE? And, masters of any natural language, like Spanish, will think in that language, not just translate their original thoughts into it.