I am graduating high school a semester early and have 8 months before college. My career aspiration is to be a startup entrepreneur. I barely know any computer programming now and have tried to teach myself but have had trouble doing so. What do you think it the best environment and method to learn computer programming?
I would suggest python (www.python.org), though of course you will get many alternate suggestions. Python is easy to pick up and is great for entrepreneurs in the sense that it gives them a good understanding of the fundamentals of programming without requiring them to learn more complex languages.
Start with the basics. Ensure you understand general concepts well before progressing to the details of specific programming languages. Take a trip to your local bookstore and spend a couple hours reading the beginning of several books on programming. I recommend starting with Python because it will remain useful throughout your career while providing a shallow learning curve and stable library, but language choice matters less than the concepts.
I recommend staying away from Microsoft's .NET and other proprietary languages for now; focus instead on more open tools. You'll attain more versatile skills that way.
I agree with those who have advised you to just start programming. Pick something that seems interesting and write a program that does it.
I learned C by writing a (heads-up limit hold 'em) poker program. I didn't use any libraries other than <stdio> and <stdlib>, so I had to re-invent the wheel in some cases. It ended up being about 1000 lines (not counting comments and excessive whitespace used for clarity), and it was just a text-based interface that could keep track of the state of a poker hand, allow you to make decisions, have the computer player respond semi-randomly, and determine the winner.
I used the Deitel & Deitel textbook, but I didn't do any of the exercises or try to memorize anything. Memorization and exercises are overrated (unless you are going to be tested on the material). It's better to just read a chapter, come up with your own example that uses the concepts explained in the chapter, and refer to the book as necessary.
After I wrote the rudimentary poker program I wanted to make it smarter, so I wrote a tic-tac-toe program that used a recursive minimax algorithm to search the game tree. I ended up losing interest in the original poker program, but have since become a game programmer.
Don't become a "programmer": become a "web programmer", or a "game programmer", or a "compiler writer". Don't learn how to program just for the sake of knowing how to program--instead, learn how to write a specific type of program that you find interesting. You'll be more motivated and will achieve tangible results sooner.
For me, it was having something practical to accomplish (and better if it had a deadline attached). String processing (manipulating text) was, for me, a comfortable place to start. Python is a great first language to learn and will let you explore just about every nook and cranny of computer science you find interesting. Pick up a Python book, work through the first several chapters. Then come up with a simple problem you want to solve. If you enjoy solving problems, stick with it -- a programmer you may be!
I'd recommend getting started in the following order:
1) Familiarity with Unix & shell scripting
2) A scripting language (Python/Ruby/Perl)
3) C
If you have more time, learn C++/Java, and a functional language. From a motivation standpoint, it might be helpful to learn a language with a specific task/project in mind (ie, I want to learn Python to make a webapp that does XYZ).
Hm, I personally found shell scripting very frustrating.
Out of the 2), I'd pick Ruby. Feels the most newbie-friendly.
C? Hm, yes, maybe. But I doubt you can manage C in 8 months if you never coded before. And for a "startup engineer", it might not be that relevant anyway.
I don't understand the mystique surrounding C. If you forget about pointers and structs for a minute and keep everything to one .c file and one .h file, there's nothing that would keep a beginner from learning the rest. Even though you can do complicated things with it, it's not that complicated of a language. Once a beginner learns to deal with "array index out of bounds" etc. they'll have a much easier time writing well-formed code in the future. C's role as an ancestor of (almost) all modern languages means that once you're familiar with it, new languages will be easier to pick up. Plus, the language has a great book: I'd tell a beginner to pick up Kernighan and Ritchie and read that.
You can learn CS 101-type C pretty quickly by eliminating pointers/structs/etc., but you won't be able to read/alter any real-world open source C. If you learn Python or Ruby, for example, you can jump into github and see what people are doing right now.
If you're looking for an ancestor language, you'd be just as well off learning Smalltalk, which you can do real things with immediately (e.g. learn it in the browser with Seaside), and then apply those lessons to modern languages like Obj-C and Ruby.
That is a good recipe. Gee, wish I had that 10 years ago, ha!
I would suggest PHP for "scripting language" since syntax-wise it is similar to C, so if one is learning that, then PHP goes with it nicely. w3c.org has good tutorials on all kinds of web related stuff, HTML, XSL, etc., including a tutorial on PHP. Recommend K&R's "The C Programming Language". That is like my holy book of programming, or would be, were I religious, lol. Plenty of books on shell scripting at the local barnes and noble, but I would focus on general syntax, not specific operating systems, since those come and go.
It's dated, but it is still one of the best expositions that I, in my limited experience, have seen.
I'm not certain about it as an introductory text to someone entirely new to programming. But it concisely and deeply explains a "philosophy" that is essential to good UNIX work and, I think, to programming in general.
Be careful in your resource selection. There is so much out there. A small fraction of those resources are the real gems. They convey the heart of the matter, and often in fewer pages than other resources that "beat around the bushes", becoming muddled or focusing on detail more than concepts.
Accumulating knowledge through reading and study can provide some sense of the lay of the land. When you encounter a topic, you may recognize it as fitting in "roughly over there". But it is practical work that is really going to motivate and solidify your knowledge. Find some things that interest you, and dig in. Rather than costing you time, they will turn concepts into the experience that brings real comprehension.
Agreed! That's what I did, even though I started a little late:
After college in Colorado (love to ski) I worked for 5 years, then got an MBA from Georgetown and joined a pre-IPO venture finance startup specializing in media, communications, publishing, and technology. We IPOed in 2001, I left in 2003, and get into structured finance -- not the kind you read about in the papers these days, but the kind the invests directly in electrical generation and transmission cooperatives.
After a couple years of that I decided to make a huge change: Quit my job, move to Europe, travel, photo (http://sweden06.com), blog, and teach myself some web technologies.
Now, finally, after too much pre-research, I'm starting to tech myself programming (Ruby) so I can build (or at least demo) web apps (in Rails). I know it's a long road and I'm an older guy, but I also believe it's pretty much never too late for anybody, whether he or she is someone with one set of skills deciding to teach themselves another set of skills or even someone severely overweight deciding to take the first step on the long, not easy, path that leads to lower weight and improved health.
Of course, starting down these paths and staying on them and making material progress are two different things, the second part being the most important, IMHO. It’s like the difference between ideas and execution: We all have lots of “great” ideas, many of us the same ideas, it’s the execution that separates.
Ok, sorry this comment got so long, this thread and the communities comments just got me switched on. Cheers from Sweden, Chris
I think the best way, at least for me, is to work your way backwards. Come up with an idea, and then figure out how you can create it... Most people I know who created successful projects (millions, tens of millions of users, etc) did this. Google, IRC, etc are your friends, along with your local bookstore.
[Edit]
I also want to support cmos' point that you should try to see the world during this time - youth is far more valuable than money, and the friends you make when you are young are the ones you remember forever. Especially ones made on random travels in random cities/countries.
By working on something - think of something - anything, start building it.
Once you do that - find a better way to do everything you just did, it's called re factoring.
As other people have stated, don't be afraid to use Google, IRC or even forums.
Python seems to be the language of choice for learning and you can get started by using Google App Engine for free if you don't want to deal with Server Config (but please realize you can't dodge this forever).
If you go the rails route you can use Heroku, it's very good from my understanding. I've only used it briefly.
I'd say it's recommended that you learn how to install MySQL, PHP/Python/Rails on your server. That will give you a big heads up.
The bottom line is that you need to work on projects you care about. You need some motivation for what you are doing. Wanting to learn to program is not enough. For example, I have wanted to learn Haskell for a few months. Being a busy college student however means that it's difficult to find time for such an abstract goal. Tangable, realistic projects are the best route to go. I never fully learned or understood C until I was hacking around Linux in my operating systems class last semester. Pick a small project that you want to accomplish, ask for advice about which language would be best, and then have at it.
Seconding this. I was going to post that link if someone hadn't already.
You can make 8 months of dedicated learning and practice count for a heck of a lot if you're persistent and tenacious, especially early on. But if you get to college, find that you can already do everything they're teaching at the intro level (possible, depending on you), and get bored, it could impact your studies negatively in several ways.
Go for consistent growth and find things to work on that will hold your interest for long stretches of tme.
Normally I would recommend you hunker down and try to write a program, or join an open source project, but since you said that you've had trouble teaching yourself I recommend you look for an unpaid internship. Every few months we take a few interns from high schools and colleges and start them off on basic projects which eventually evolve into more complicated ones. This gives you concrete goals while you learn new and interesting things in order to complete those goals. Usually you'll also have the benefit of collaborating with other interns in addition to asking the more experienced coders for help if you've exhausted all other options. We've found that most of the interns improve significantly during this period, it might work for you too.
Nothing beats seeing what you do works. I'd choose Python (available on most platforms, easy to learn, very complete) and a good book. Also try to accomplish individual tasks: reading and writing from a file, downloading a web page, printing a document, executing another program, sending a email, parsing an XML file, creating a CGI applicatin, etc.
Fundamental programming skills are the same in any language may it be Ruby, PHP, or C, so if I were you I'd learn Ruby (or maybe Python; I prefer Ruby though) in those 8 months and then take a good programming class in collage to advance to Java/C. For a average startup a low level language such as Java or C will be pretty useless, you'll do 99% of things in something like Ruby, Python or even PHP.
(On the other hand, if people knew how hard it was to make a particular program before they started, we wouldn't have most of the software we have today.)
I only mention it because it's one of the apps I first wrote when learning.
You get to understand about UI, data structures etc etc
Even if you end up only implementing some pop down menus, it's still worth doing. By that time you may have decided to do something else anyway...
PyGame is a binding to SDL. "Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer."
May I suggest that going to the bare metal (yes, programming languages are a kind of framework, too) for implementing Tetris is a bit over the top?
I had a job working as a marketing director, but I got bored, so I quit my job. Then, I started working on www.trailbehind.com in April. Now, I have angel funding and know a lot of javascript, python, and CSS.
There's no book, or method, or realization that will make you a programmer. You just have to start programming something.
Once you have programmed a thousand line system that does something cool you are a programmer. At least that's what my buddy told me.
Finish this course and you'll have a better grounding than many of today's professional programmers, and will be able to teach yourself pretty much anything.
One of my friends is workingthrough SICP. (He left his job becauee he felt burnt out and wanted to do something different before he went back into a 9 to 5 job). He is posting the answers on his blog (http://lawfulsamurai.blogspot.com/search/label/SICP). This might be helpful to you
Hire a guru interested in teaching beginners and explain him your task. A teacher cannot read books and learn for you, but he could tell you what you are doing wrong when you're doing it.
For the love of god, please don't start out with How To Design Programs.
Learn Scheme and Java. Use SICP for scheme, that will make you think like a programmer. Then you can learn Java using HeadFirst Java.
That way you'll have a "normal" language that a lot of colleges will use, as well as scheme... which is incredibly powerful and functional. Some colleges do tend to use scheme as well.
The Design Template -> I don't have an issue with it per se, but it just frustrates me. If you've seen Donny Darko, the love/fear scene (http://www.youtube.com/watch?v=Q38N9QvsdzU) pretty much is how I feel about the design template.
SICP is what I started with for scheme, and what I took away from it was "there is power in wishful thinking." After having read/watched SICP, going into HtDP was more like "Use the design recipe and everything you make will be easy."
I find programming/computer science a little more romantic than that.
SICP is great for self-studying beginners if they have an IQ of 180. Otherwise they would probably be better off to start with HTDP, which is essentially SICP lite, and then move on to SICP.
I actually tried starting with SICP. I remember looking at the table of contents and wondering why they devoted the entire fifth chapter to cash registers.
No assistance. At around age 16. Started with a Commodore 64 around three years earlier. I did not do all the excercises in SICP, but the text was not too difficult to read and understand.
Give yourself a couple of small projects with a timeframe within 8 months (a game, software related to other hobbies, etc. ... something you can get passionate about). Split your time between learning the fundamentals and explicitly working on the project. It is my feeling that you will learn more if you are motivated to complete a project with explicit goals. Good luck. (btw, go with python)
Given that the question reads "how to learn computer programming in 8 months?", I'd say there is no definite carved out approach to get there. Individual mileage might vary. However, as most other people have already suggested, "quickly building something" (preferably something that you care about) and trying to improve upon it will make you a decent programmer. In the process of trying to improve upon it, you would have hopefully figured out what is wrong with the existing program, quickly learn from it and come up with a better evolved program/product.
Why must you learn in these 8 months? Yes I agree you should get a head start but you've got your college career to become good at it, meet smart people that will guide you and meet peers willing to help you learn.
I was very much in your shoes when I finished high school. AT the time I was much more involved in hardware/circuits and had only taken one java class. When I go to college, aside from my CS-based curriculum I tinkered with web development on the side and 4ish years later I'm working at my own startup doing ruby (and still learning). Best of luck!
If it's a web-based startup you want to do, then you should just decide on a language. Then, start cranking out prototypes of your first system.
Start with simpler languages, start with 3-page (i.e. demo1.html, demo2.html, demo3.html) prototypes.
Probably the best way to decide is to hit the bookstore. Get a list of potential languages, and check out the books available. The one that's the easiest to read & follow, use. Then maybe get another book or two on the same language, to help get past rough spots.
If you're into a framework (e.g. Rails), start with the language first. Do the framework second, unless there's a book that teaches you both.
Other people have most of the bases covered, but I don't think anybody's mentioned that you should learn to use a real text editor, like Emacs or vim. They have steep learning curves, but the time spent learning them pays itself off.
You're graduating a semester early - congrats! That is certainly some indication that you have the drive and motivation to reach your goals. As others here have said, the best way is to write programs. But you need to start somewhere and I would echo the suggestion of starting with python. I have heard Think Python is good and you can get it free here: http://www.greenteapress.com/thinkpython/thinkpython.html . You may feel you are parroting a lot at first without necessarily understanding what is going on, but gradually things will come into focus. When I first started, it was just by typing in programs in the BASIC language from the little tutorial manual that came with my computer. Each program would be followed by a little explanation of what each new line meant and after a while you start to be able to apply your knowledge to other things. Python is a "just right" language in that you can start simply but it has all the power you will probably need to get you as far as you want to go when you're ready. But if you find it's not working for you try something else. Some people pick up lisp right away - I still struggle with it (or at least people's explanations of it). Don't give up until you find something that works for you. I would also see what hacker groups are in your area or try and find some like-minded people to learn with - you may be able to find an intro course through a local college or community college if nothing else.