views:

678

answers:

15

This may seem a vague question but as a programmer who self-taught everything I know about programming (By reading books etc.) I always wonder is there any 'correct' way of self-teaching programming. Is reading books and various articles on a specific technology and then write programs from that is a good method? Some of my friends learn programming in University and College. By being self-taught make me a lesser programmer (at least in resume) in comparison to them? Is there any things I can do in order to become a good self-taught programmer?

+1  A: 

Just effort a new PHP book or the programming-code you like to use. Read it dayly, practice and read tutorials on the internet.

Try to understand the code and try to apply the learned code to a project you're making for yourself for example a website or a application.

Just practice!

Edit: Let people give you a task to complete, you'll learn much faster when you have to accomplish something for somebody else.

Jordy
+22  A: 

"Practice without theory is blind. Theory without practice is sterile." - Kant, amended by Marx

Books are a start, but it's really dry. Nothing has the educational value of actually getting involved and writing stuff, but doing that without an understanding of what your doing tends to lead to inbred code and anti-patterns.

The best environment to learn from in my experience (also self-taught, as are the majority of the good coders out there imho, because good coders don't start at uni) has been in an active and real project with others. Especially more experienced others. This is one of the areas uni courses tend to fail on because lecturers rarely get stuck in with the students.

annakata
Note to mention that many lecturers don't seem to have much real-world experience either (at least where i was...).
Georg Fritzsche
This ^^. You can learn good theory at university, but you have to practice it to become good. You can make programs work through practice, but you'll never know if they're really good if you don't have the theoretical background. You don't need university for the theory, but books can be hard going. Best is to find someone who has practical experience, and understands the theory from study, and work with them. Of course you could consider doing a part-time course and get qualified yourself? Hard work, but worth it, I think.
Ragster
practice > theory
Travis
@Travis - That's a pretty strong statement. My real world experience is that if you don't practice much you write over-indulgent code full of micro-optimisation and other architecture astronaut problems, whereas if you don't read around the theory you end up writing unmanageable godfiles, and end up with essentially a pile of procedural scripts.
annakata
Trying to fix bugs in an active open source project can be very educational.Make sure that you find an active commiter that would agree to be your mentor / code reviewer for the patch you will produce
Jerome WAGNER
Do you have statistics to that good coders don't start at university? My first thought is that Richard Stallman and Linux Torvalds obth started at University.
HandyGandy
Also, as you progress up in classes at top level schools you do find many lecturers who work in industry. Though they won't get their hands dirty with beginners courses. For students with 0 knowledge it's a good way of getting to the point of knowing enough stuff to actually do something.
HandyGandy
@HandyGandy - no statistics to back this up I'm afraid (though I'm sure it would be fascinating), just my personal experience. Stallman was programming at least in high school, and I'd be really shocked if Torvalds went onto his CS course without having coded before but who knows? Every high-end coder I know started when they were 14ish iirc.
annakata
@annakata - I'm really meaning that I find practice more important. You should always periodically reflect on your work and learn new theory as you go. Part of the practicing is noticing that the code you just wrote is an unmannagable pile of precedural scripts.
Travis
+2  A: 

I've learned everything with constant work trying to do something more complicated. Generally it's best when you have problem to solve and only need tools - you will easily learn anything that would help you achieve that.

Tomasz Kowalczyk
+1  A: 

You need to learn the fundamentals, which you might not come across if all you do is teach yourself programming languages and work on projects. Have a look at the books on this list, and especially Structure and Interpretation of Computer Programs.

Of course, it's also extremely important to work on real world projects with other programmers, as the others have said, but if you want to excel you'll need a solid theoretical background as well (IMHO).

Skilldrick
+1  A: 

Reading is of course very important. Read books/articles about programming languages, paradigms, algorithms, security, efficiency and anything else that interests you and is related to the topic. But reading will only get you that far. Without experience and interaction with others you will lack important traits such as working in teams for instance and learning by doing. I find I learn best if I make the mistakes personally, but recognising my mistake from something I've read speeds the process of learning and finding the right solution.

Working with others will not only make you a better programmer by discussion and learning from their mistakes and having them point out your own, but it will also make you a more valuable asset to a team when you know how to work well with others. Now this might be slightly outside the scope of the question as you might work with others and still consider yourself "self taught", as you don't have an official degree.

If you're thinking about a career in programming you should get an official education.

Polymorphix
+7  A: 

Teach Yourself Programming in Ten Years

This is the best guide I've ever read. It was my way when I started self-learning.

P.S. Another thing that I can add: sometimes nobody knows the right way for you. It can happen you are ready to start from Knut, Straustrup and another classic works, but sometimes PHP for dummies could help better. It depends on your previous general background. For me, most of material is free in articles and blogs, not in books, - but SICP is mandatory. Don't neglect anything, don't limit yourself with anything until you'll have a self-confidence. You're more or less all alone, even if you work with a best team. Sometimes random learning of some absolute unnecessary things can give you a clue to a basic conception used everywhere. Sometimes things that nobody knows except this strange newbie give the newbie an advantage in the team.

rudnev
Nice link. +1 /stupidpadding
annakata
+1  A: 

Start coding

http://pine.fm/LearnToProgram/?Chapter=00

Jirapong
+3  A: 

If I was to learn to program all over again, this is what I would do:

  1. Pick a language based on a project you might be interested in. (although programming tools and concepts are often similar/same in different languages you'll be needing to start off in the context of one language) I really think you need practical experience before all the general books make much sense.

  2. Say you chose PHP, at this point you should look for a good site that has a full set of tutorials/classes starting from nothing and bringing you up to basic usage of the syntax.

  3. At this the best way to learn I believe is to jump into a simple task you want to accomplish with your programming language. Start with tic tac toe, printing to the terminal or whatever.

  4. When you get stuck come here to stackoverflow to ask questions, we'll be here to help.

  5. Iterate. Get the first easy project done, move on to something more challenging and keep moving on making cooler stuff and asking better questions each time.

  6. Periodically go back to your tutorial site or find a new better one to relearn the structure of the language as you improve in fluency.

You'll soon have far more practical experience in the language, general programming concepts, design patterns etc. than a student that paid thousands for a course at a university.

Travis
+1  A: 

Think of a project, something you want to code, and learn what you need to write it.

Repeat.

SpecialK
+1  A: 

Theory is important. In fact, i read somewhere just yesterday that " there is nothing so practical as good theory" . But its also important to put that theory into practice which == learning by doing. And i personally feel that there is no one-size-fits-all solution to this. Everyone can do it differently. Some learn it better from books while some never have patience to read books.

crazyaboutliv
+2  A: 

I'm currently working with some guys who are self-taught programmers.
I think Their biggest disadvantage (and hence my biggest advice to you) is their lack of using best practices, conventions, and methodologies.
Keep in mind that knowing well the compiler specs is basic. Learning the IDE you work with comes after, but learning things like OOP principles (encapsulation, polymorphism etc.) and best practices (Single Responsibility, Cohesion, Seperation of concerns etc.) is imperative to being a good programmer. You should add to that some subjects that one might think are not that important to programming like understanding and practicing data structures, algorithms and calculating complexities..
If you're learning all of those (hope I didn't scare you (-: ), you're on the right way.

Oren A
Having being pointed the right direction is always pleasant..not scary :)
Dananjaya
@Oren A: I went to one school for informatics and two universities for informatics (one professional and one scientific), but all the things you mention there (except methodologies) I had to learn for myself. That they don't know this has possibly more to do with their interest than with their lack of education.
Steven
@Steven: Really? A university not teaching basic OOP principles? That doesn't make sense...
Oren A
@Oren: Yes you are right, we did actually get this at the uni of professional education, but still it was quite basic. I learned a bit of OOP and a lot of methodologies :-)
Steven
+3  A: 

First you need to know what a good programmer is. I'd say a good programmer:

  1. Delivers code that does the required job
  2. Delivers it on time
  3. Delivers it free of bugs
  4. Writes code that is easily understood by others.
  5. Writes code that is designed well so that it can be easily maintained. Code that is easily maintained is componentized neatly so that changes can be localized to a small area. This means the maintainer only has to learn the relevant bits of the code base and won't be surprised by strange side-effects caused by edits they make.

Hmm. Well, I think you can learn a heck of a lot from books, but to really know if you've written good code, you need feedback from other people who try to work with that code. All of the points written above are 'subjective'. It's easy to write code that does the required job if you yourself decided what that job should be, but if somebody else came up with the requirements, then being able to understand them is an important skill, and you won't know if you've got it or not until the person giving you the requirements agreed you wrote a suitable program.

I would say though that being self-taught initially is a really good way to go. I self-taught myself to program. I've learnt loads since working with other programmers, but I do think sometimes that I learnt a lot by being self-taught! Self-teaching makes you a very resourceful person, because you have to solve all the problems you encounter yourself, you can't just ask a 'teacher' to help you out. This means you learn to get to the bottom of any problem. When the going gets tough and you're breaking new ground, and there is no teacher that knows the solution, you'll have learnt the skills to solve the problem by your self.

I'd suggest that besides reading books, you try and find an open source project to contribute to where you can get some feedback.

I guess what you could do with is some kind of 'rate my code' website, where you could post some code and people could comment on it and the best comments could be voted up. Something a bit like stack-overflow, but I'm not sure stack-overflow itself is the correct place. Stack-overflow is a good place to ask short specific'ish questions, such as is this function any good. But, to truly determine if code is any good, big chunks of a program would need to be looked at.

Scott Langham
+1 hotornot for code :D
Matt Ellen
+1: i can easily classify myself on these steps.
Ankit Jain
+1  A: 

Download the materials under "Introduction to computing" at get a computer and a notebook (paper one), I don't think you need to get the exact books they refer to, unless you can't figure out that when they say read Chapter 15 it means Chapter 8 in your book.

http://see.stanford.edu/see/courses.aspx

Do not do the whole course in one week, pace yourself do all the work ( homework, quizes exams ).

Then go through http://www.cs.sunysb.edu/~skiena/373/.

After that take a month break, then go around looing at programming languages and decide what you want to be good at.

HandyGandy
+1  A: 

By being self-taught make me a lesser programmer (at least in resume) in comparison to them?

Ironically, I wrote a paper for the capstone class in my Computer Science major along these lines. Basically, the consensus seems to be that many software companies are willing substitute significant open-source software development experience for a formal degree (whole organizations have dedicated themselves to studying such phenomena). This is particularly important for upper echelon third-world countries, where access to computers is available but access to higher education is not. My suggestion if you are concerned about resume and would like to advance or get a job in the programming world would be to get involved in an open-source programming project. The learning curve for such projects can be very steep at times (especially when the code is in poor condition, as is often the case), but if you can overcome that, then you will learn a lot and improve your resume at the same time.

David Hollman
+1  A: 

Self-taught is good; we all must be self-taught to a degree, even those who come from structured environments like universities (more theoretical) or instructor-led, targeted coursework (like MCSE).

Your question implies several things. How do I learn? how do I apply what I know? how well do my skills compete (i.e. what does the marketplace value in which I'm competing?)

You can't learn everything (even though you may have an interest and may want to be a perpetual student), so you first have to decide on what to learn. At some point you want to make a living (by applying what you know for someone who values your skills enough to pay you).

The hands-down best way teach yourself, imo, is to replicate examples. For example, you may grab an interesting programming book (e.g. Head First C#), set yourself up with a computer and a suitable platform (e.g. c-sharp and msde), and keyboard each example as you move through the book. Expect to take some time. Be dedicated. You don't get something for nothing. Don't be a robot and replicate each example precisely, but modify each one a little so you can see and understand how the example really works. it may help to have a real-world situation in mind as you do this. Or, you may already be familiar with some other programming language and are interested in learning a new one. The question here may be a little different: "how can I do 'that' in 'this' new language?" This is a more syntax-oriented approach.

Anyway, the competition/comparison is (should be) about practical application. If you can talk (and demonstrate) intelligently about "why" you know what you know (not "what" you know - any talking head can do that), and how it can be applied, you're making headway.

btonissen