views:

871

answers:

15

I'm interested in programming, but it seems to me that I can't get into it. Every time I've tried to learn a language and stuff by looking through tutorials or books I'd never get past the part where I use the syntax to make something. And by interest, I mean that I read stack overflow a lot, coding horror, and stuff but the actual coding part is hard for me to get into. Did anybody start this way? How did you get past this block?

+1  A: 

As with any craft, it takes time to get used to. It maybe one day that everything just "click". Before that, everything may appear to be mysterious or hard to understand. Meanwhile, try doing some projects, like print out all numbers that are divisible by 3 from 1 to 1000. Or find all the prime numbers from 1 to 1000. Or draw dots so that they form a circle (you can use canvas tag on Firefox). Each simple thing can build up your confidence and your foundation for doing some more difficult next time.

動靜能量
+13  A: 

I'd recommend finding a simple, real problem that you have and solving it. For example, write a simple script to solve your Sudoku puzzle or send an email if the load on your system reaches a certain threshold. Start small and always iterate your work when you're learning (keep cleaning it up, adding things if necessary, etc.). Most of all, have fun :)

inkedmn
Yes, finding a real problem to solve is important, as it will keep you motivated. My first database application (to store information on tracks in a record library) taught me a great deal.
Jeremy McGee
There's nothing better than trying to solve a real problem to get into programming. I'll try to find something I want to solve when I learn a new language, too. This helps me alot.
Michael Barth
Pick a fairly simple problem though. Because if you go too deep too early, you will drowned. Start with a "hello world" (http://en.wikipedia.org/wiki/Hello_world_program), you'll be amazed at how good it feels just to get something up and running.Give Python a whirl http://docs.python.org/tutorial/
Greg B
+1  A: 

find yourself a task instead of trying to read the books... something that would keep you interested... say 1st aim would be a hello world program. 2nd could be writing it a 1000nd time... set yourself a dead line and then meet it.

also find your self an ultimate goal... mine was to design a chess engine that would eventually beat me... really helped me keep going :)

Best of luck

Umair Ahmed
Umair, Hows the chess AI going? Are you there yet? ;-) It's just that it's an interesting but difficult problem... "Nutty" would be the word I'd use... as in closely related to legumes, not white-coats.
corlettk
Well i stopped working on it when it started beating me! :P Indeed its a very interesting (and time consuming problem). But you can write a fairly good chess engine very quickly.. there are a lot of good articles around on chess programming. http://www.gamedev.net/reference/programming/features/chess1/http://www.frayn.net/beowulf/theory.htmlalso a good way to learn is look at other peoples code.Crafty (http://www.cis.uab.edu/hyatt/)toga (http://www.superchessengine.com/toga_ii.htm)
Umair Ahmed
+12  A: 

I don't think programming is something you can learn from books, at least not at the beginning - I learnt by doing.

Back in the days when floppy disks were 8", graphics were blocks on the screen, and BASIC was the only language available to me my school had a computer programming course, our head teacher taught it, but didn't really understand what he was teaching, and me, being a smart assed kid (who grew up into a smart assed adult), want to see what the 380Z could do. That caused my initial interest - but it wasn't until I wanted to write something for myself that I really started to learn. Myself and my best friend both had different computers, and we both wanted to prove we were better than the other, that was the driving force. So it was the desire to write something, anything, to prove we could that did it. We ended up writing text based adventure games, and I even got the listing printed in one of those "Type this in" magazines at the time.

My point is reading constrains you to theory, you learn by doing and by making mistakes and in fact reading too much may constrain you. For example reading about "advanced" topics such as IoC, unit testing and so on aren't really topics for beginners, and frankly aren't that necessary when you start out because you need to have coded stuff and made mistakes and wondered about your code quality to appreciate them.

So set yourself a little project. Catalogue your books, your CDs, your DVDs, or write a shopping list program, or a little game, something, anything that's useful to you. Make your mistakes, use reading to move you forward a little each time, until you have something that works, then start reading more to discover how you should do it "properly" as opposed to just making it work.

Worked for me anyway.

blowdart
+1: nicely written, pretty much describes how I got started as well (though I got started after I left school).
Fredrik Mörk
+1 on problem driven learning... Books are useful when you've got a problem you already (pretty much) understand and are looking for _solutions_ ... If you have no idea what the problem is yet then reading books which discuss solutions will only confuse you... you'll have a bow, a arrow, and no TARGET. Lookout foot!
corlettk
A: 

When you start programming, trying to take the first step of writing you own program can be difficult and overwhelming. The easier to start programming is to change existing code. Take example code of the tutorial and try to change it, maybe only one line, and see what happens. After you get more comfortable with changing the code, try to add something the program.

Dani van der Meer
A: 

As others have said, you want to start simple and work your way up. In that regard, I reccommend Lua. It has simple and easy to understand syntax, is quite flexible and fast, and has tons of libraries for everything from web development to game development! google "lua" or go to LuaForge.

RCIX
+1  A: 
  1. It will really help you if you understand the RAM model - basically, that's how computers work.
  2. You should try to imagine the steps of an algorithm. Build a mental view of the process that you try to describe with your program.
  3. Read this essay for fun and for some insights :)
Nick D
I just read through "that essay"... It's really very, very good. Someone should inform the non-programming population, especially the part about "Don't even talk to me I'm CODING!" ;-)
corlettk
Yes it's a very good essay, as are most of Paul Graham's essays :)
Nick D
+1  A: 

When you learn a language, try to learn it by using it while learning. For example, you can begin with a simple `Hello world!' program. Your first working program will make you happy. Keeping to the spirit, learn a bit more of the language (again, do-while-you-learn). Try to code simple programs such as generating even/odd numbers, prime numbers, sorting numbers, factorials, et cetera. Once you are comfortable with them, you may try to implement something that will be useful to you.

Alan Haggai Alavi
+5  A: 

If you're really new to this gig then I suggest you try Alice, and/or Greenfoot... They both enable you to "see results quickly"... whilste sneakilly and indelibly burning the fundamental concepts of ALL computer programming (assignment, sequence, selection, and iteration) into your thick scone... as well as some core OO concepts which will serve you well for the rest of your career.

And most of all Have Fun! ... Find a problem which interests you, and is (you guess) within your capabilities (Hint: a YouTube knock-off might be a little over-optimisitic) and continue exploring it.

Just for instance:

  • Write me a program which calculates all the prime numbers between one and 1000.
  • Now translate it into another language... from C# to Java...
  • Now let me enter the maximum value (upto 2,147,483,647)
    • Too slow? What can you do to improve the speed?
  • Now give that a GUI interface.
  • Now give it a web interface.
  • Now make it generate a JPEG, displaying the spread of primes... yes there is pattern there.

If you do something everyday that delights, engages. and challenges you then you'll likely live a fulfilling life ;-)

Cheers. Keith.

corlettk
A: 

I am also an unexperienced beginner, i think you should first try to solve funny problems, to build your knowledge, and then go on advanced problems. Go for it!

Magnetic_dud
A: 

In my opinion start with something very simple.
I suggest HTML.
It's not even a programming language but a markup language.
After that javascript is a pretty simple language to start with.
Use Google. Google is your friend.
I used Google :)

the_drow
+1  A: 

Hi man,

There is nothing call as impossible under the sun.

Never feel that you cannot do... it's only practice, patience , hard working and never give up motto that counts at the end. Every one falls for the first time.

Any person who are there in the StackOverflow or any author's book which you are reading didn't not attain the fame in just one day. Every body worked hard in sometime of their life, given the proper time for their growth, learned from others and kept on practising, so they are here.

I have often heard many peoples says like "Java is easy or dot net is easy or C/C++ is tough". Tell me if any logical problem is given to you say to find the factorial of number and if you choose any language of your choice, will you not be able to get the correct output?

So what I suggest is that, don't go behind learning more and more languages. Pick up any one of your choice,but focus more on your logic.Start from the beginning; from the very first chapter. Solve the problems. Start with basic and then go to solve for tougher. Try with varieties.

This is the only thing that will be with you forever irrespective of whether the language is booming in the market or is a moribund one.

Remember "Even Rome was not built in a day". Practice and practice until you succeed.

Best of luck. (:

priyanka.sarkar
A: 

I started here two years ago i was in high school then :) really good content it will help you get started

Yassir
A: 

Do you enjoy solving a problem - if you do then you will enough programming - do you spent hours trying to solve a certain problem - do you want to find a quicker solution to a problem - yes then your enjoy programming. The part where you look at a blank screen and can't write a program is tow fold firstly you can't actually know a programming lang like c,c++, or C# or Java without writing programs and secondly you need to think about what your trying to do before you start typing. Open google and see how other people have solved a problem understand and adpat their code and over time you will start to invent new idea. You need to code EVERYDAY so programming is in your blood and then you take a break. It not easy it hard work and the fun soon wears off when your doing it for a living.

But when you write decent code there's nothing better - that feeling of winning over coming the problem - but the more you learn the more there is to learn - learn something new eveyday and your keep learning - don't think you know it all after A FEW YEARS. It's never ending learning to program and so once you accept that your be a better programmer

apeman