|
I want to learn how to program. Where should I start?
Last post 03-08-2008 8:41 PM by Ice^^Heat. 35 replies.
-
03-02-2008 12:45 AM
|
|
-
MrKltpzyxm


- Joined on 03-01-2008
- Denial
- Posts 3
|
I want to learn how to program. Where should I start?
Programming interests me. The problem I have is that generally speaking I have not been a very motivated individual. This lack of motivation is not limited to learning how to program, but not learning how to program is one little regret that tends to pop up and gnaw at me quite frequently. I'm going to try to turn over a new leaf and become a motivated individual who will achieve my goals and I was wondering if anybody around these parts had some advice about where to start when it comes to programming.
Now I currently am feeling very motivated to do this, though I must admit that I am a bit discouraged by my past failures. I also tend to feel that I'm way behind the curve here. I'm 22 years old right now with what feels like no experience and I have the feeling that anybody wanting to be a (good) programmer usually starts in the womb. I basically hear of people that have been programming in assembly since the age of 10 and feel like I'll never catch up. I just realized that this is starting to sound like some sort of pitiful sob story. Though I've decided to leave all of the "pity me" crap in because this request is not only for advice but also for encouragement. I'm secretly hoping that somebody will say, "It's not too late to start, and if you want to do this then you should. (And here's how...)" (also, I suppose it's not much of a secret if I just put it there) There is a bit of emphasis here on teaching myself because the short
stint that I had in college resulted in me failing a lot of classes and
wasting a lot of my money. The major reason for my failures was a lack of motivation and outright laziness. As I said before, I am trying to get a fresh start, but I'm not so naive that I think I'll get it on my first try and just all of a sudden be this motivated person who's going to follow through. So I'd like to do as much of this learning on my own without spending a lot of money. (At least not the kind of money that tuition requires) Hopefully that way, if I fail the first time, I'll still have the resources at hand to pick it back up later. I do have a small amount of experience when it comes to programming. It is, however, a very small amount of experience.
In high school I would spend most of my math classes writing programs
on my TI-83+ calculator in its version of BASIC. (At least that seems
to be the closest think that I can compare it to) These weren't very
complicated programs, mostly dedicated to rolling dice or guessing a
number or watching some character bounce around the screen. Straight
out of high school I attended a community college where I took a few
programming classes. I've forgotten most of what I learned in those
classes but I think I could pick back up where I left off with a little
bit of refresher. The languages I studied were Java and C++. I also
have a very basic knowledge of HTML. It might be easier to just assume
that I have no experience programming at all because at this point
starting from scratch seems like it might be one of my best options. So, long story short: What/where is a good place to start if I want to teach myself how to be a good programmer?
"Sic gorgiamus allos subjectatos nunc." Not just pretty words. ...and Weena Mercator as the hopping woman.
|
|
-
-
zzo38


- Joined on 02-10-2008
- Posts 154
|
Re: I want to learn how to program. Where should I start?
It depends what program you want to write.
: IF COMPILE ?-GOTO COMPILE-HERE ; IMMEDIATE : THEN HERE SWAP ! ; IMMEDIATE : ELSE COMPILE GOTO COMPILE-HERE SWAP HERE SWAP ! ; IMMEDIATE
|
|
-
-
dhromed


- Joined on 04-13-2005
- Dutchland
- Posts 2,614
|
Re: I want to learn how to program. Where should I start?
It depends what program you want to write.
Good one. Meaningless examples teach you about syntax, but learning to program means to learn to program something. Thing is that as a novice you may not have a decent a idea of the things you want to make that fit your skill level. So at first it's going to be a lot of futzing about and getting basic errors you cant fix.
MrKltpzyxm:What/where is a good place to start if I want to teach myself how to be a good programmer?
Step 0 is to try and be any sort of programmer. The language with the lowest entry barrier and is actually useful would be Javascript. Hit up an empty HTML page template, pop a script tag in the body, and start typing. Use Firefox or Opera, because they have good error messages, as opposed to the crap messages IE gives you. Have a quick look at these (but don't rely on them for Good Javascript), and start reading this dude (my very first javascript came from him). And remember that's not all there is to it. A year from now you will still be a noob programmer, much like it is with any craft or skill. :)
— Flurp.
|
|
-
-
brazzy


- Joined on 08-08-2005
- Posts 552
|
Re: I want to learn how to program. Where should I start?
If you're worried about keeping up the motivation, you need a medium-term goal. Something that can be realistically achieved by a novice programmer in the language environment of choice with a reasonable effort and which would be useful or or satisfying enough to motivate you. You'll be fighting against your incomplete understanding of the programming language and environment a lot at first, which can be frustrating. Teaching languages and problems are designed to minimize this, but solving them is probably not enough of an achievement to keep you motivated.
|
|
-
-
mfah


- Joined on 12-01-2007
- Posts 112
|
Re: I want to learn how to program. Where should I start?
Programming itself is surprisingly easy. You just throw a few statements together and something happens. Good programming, on the other hand, is not so easy. There are plenty of pitfalls and bear traps that will catch you, no matter how careful you are.
The best advice I can personally offer is:
If you're starting out, avoid Object Oriented Programming.
There's a lot of wacko stuff that hurts the brains of even experienced people in OOP. You want to start small and simple. So pick a small and simple procedural language. You've already been burned by Java and C++, so go for something like classic C; it's a very compact language with little to distract you from just getting on with the job. If you can understand the for loop syntax, you've already mastered the most difficult part (aside from pointers - don't even think about touching pointers at this stage). Do a few simple console applications - avoid GUI work. Add and multiply some numbers, build from there. The best thing about this approach is that a lot of other languages share the C syntax, so it's good groundwork.
Accept that you're going to make mistakes.
It's a bit of a cliche that any non-trivial program contains bugs, but it's totally true. Once you graduate beyond "Hello World" you will make mistakes. Don't let them put you off, knuckle down, put the work into understanding why you made the mistake, understanding what you have to do to avoid it.
Don't overreach
You wouldn't expect to go straight from flying a kite to flying a Boeing 747, so don't expect to go straight from "Hello World" to - say - a Desktop Search app. You need to know what your limits are, and push them gently. Otherwise you might end up spending 9 years on something that doesn't even work.
Read the documentation
It's there to help you. Don't go into using any API or framework without the documentation to hand. Put the effort into understanding the examples. Read a lot of other people's code, see how they do things, understand what's happening.
Pick your second language carefully
You'll learn nothing if you only know languages that do the same thing in the same way but with different syntax. By the time you have a good enough grasp of your first language, you'll have hopefully seen and read enough to be able to make a decision on a second language that's sufficiently different enough to broaden your knowledge.
If all of this sounds like an unsexy tedious grind, that's because it is - you need to do the basic ground work before you even attempt anything fancy. It's like playing guitar, where you need to put in the effort of practising chords and scales (don't let punk rock fool you, those people were far more technically accomplished than legend would have it).
|
|
-
-
Spectre


- Joined on 05-09-2007
- Posts 455
|
Re: I want to learn how to program. Where should I start?
While you're learning how to program, don't forget to read this site to learn how not to program.
╩юфют√ь ёЄЁрэшЎрь яюЁр эр яхэёш■.
Visit #TDWTF @ SlashNET - the semi-official WTF IRC channel.
|
|
-
-
Salami


- Joined on 01-17-2007
- Posts 16
|
Re: I want to learn how to program. Where should I start?
Assuming you have the math and logic skills, the effort involved in learning programming is equivalent to learning a foreign language. You wouldn't expect to speak French next week except for a few phrases. After 6 months or a year, you have some basic competence. 2 or 3 years and you have some confidence. After 5 or 10 years you are an expert.
|
|
-
-
tster


- Joined on 04-11-2006
- Natick, MA
- Posts 1,292
|
Re: I want to learn how to program. Where should I start?
mfah:If you're starting out, avoid Object Oriented Programming.
There's a lot of wacko stuff that hurts the brains of even experienced people in OOP. You want to start small and simple. So pick a small and simple procedural language. You've already been burned by Java and C++, so go for something like classic C; it's a very compact language with little to distract you from just getting on with the job. If you can understand the for loop syntax, you've already mastered the most difficult part (aside from pointers - don't even think about touching pointers at this stage). uh..... no. C is not a simple language. I might suggest scheme to start with. It actually is a simple language, and far more powerful than C. I would also try and stick with strongly typed languages. This means avoid javascript, perl, ruby (although if you want to try one of these, try this one probably). also you should avoid learning VB like the plague. And for the love of god, use an IDE. I hate people hat suggest new programmers use textpad or something similar. Use an IDE, and use it consistently so that you learn how to use it. I might suggest Eclipse for all the static, OO languages (and C), Komodo for all the dynamic languages (Perl, Ruby, PHP (PS, never learn PHP either)). If you are going to start with Scheme, Dr. Scheme is the standard and is good.
The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting... see bio for the earth shattering ending.
|
|
-
-
brazzy


- Joined on 08-08-2005
- Posts 552
|
Re: I want to learn how to program. Where should I start?
tster:And for the love of god, use an IDE. I hate people hat suggest new programmers use textpad or something similar. Use an IDE, and use it consistently so that you learn how to use it.
And I hate people who suggest using an IDE to total beginners. An IDE can be very convenient and save you a lot of time, true. But if you never learn how to use a language "manually", you will be utterly and completely lost when there's a problem or challenge that the IDE's makers did not foresee. Or if they want to do something like automatize a complex build process (which can save you even more time than an IDE). A novice programmer most definitely should work with basic tools (editor and compiler/interpreter) for a time (a few days at least) until he understands how they work.
|
|
-
-
Spectre


- Joined on 05-09-2007
- Posts 455
|
Re: I want to learn how to program. Where should I start?
tster:also you should avoid learning VB like the plague.
tster:never learn PHP either
And I hate people who make such statements. It's not even funny anymore.
And C is simple, why not?
╩юфют√ь ёЄЁрэшЎрь яюЁр эр яхэёш■.
Visit #TDWTF @ SlashNET - the semi-official WTF IRC channel.
|
|
-
-
RayS


- Joined on 01-22-2005
- Posts 680
|
Re: I want to learn how to program. Where should I start?
There are people who started in assembly at 10? Drat, I'm a year behind! Anyway, if I were to be teaching someone, I'd start with a decent, popular OO language. Probably Java, C#, or VB.NET (to be honest, probably because they're what I use) and follow something like this general plan - Synax - get your basics right. No point going anywhere until you know your language's loop types, variable usage/types, etc. Use a language reference here.
- There are loads of mini-apps like calculators, Conway's game of life, etc. Apply what you learned in (1) to do some of these.
- Object, object, objects. From making the most of those giant frameworks you'll be working with tomaking your own, unless you're writing drivers and kernels in C/assembly this is the most important part of most of what you'll be doing in a decent-sized application in a high level language. Generally it underlines your architecture, defines code reuse, encapsulation, and turns a giant 10,000 procedural mess into (hopefully) a well structured maintainable thing of beauty.
- Go back to what you made in (2), laugh at it, post a few of the best bits here, and redo it properly with what you learnt in (2) in mind.
- Databases. Especially in business, most apps are just a way of handling data, be it in a text file or SQL server. Learn the basics of SQL, and how to use it from your language of choice.
- Pick something like a basic POS system for a shop. e.g. write a basic system to manage stock coming in and going out. Hey, you finally have something useful!
- Redesign the app from (6) to be multi-user, based on a client/server design. This will introduce you to the joys of networking, and concurrency issues inherent in any multi-user system.
As in some of the above posts, some will tell you to use an IDE, others will tell you to use just a text editor and compiler. I'm in the "IDE" camp, especially when it comes to somebody with self-confessed motivation issues. Nothing's more likely to turn you off than 6 hours tracking down a stupid typo or finding the correct way to call a function, when a decent IDE will point out the obvious to you and get you going again.
EULA: By reading this post and associated disclaimer, you are consenting to agree with the opinions disclosed within. If you disagree with this license agreement, you may not return it for a refund.
|
|
-
-
Nether


- Joined on 06-02-2007
- Posts 63
|
Re: I want to learn how to program. Where should I start?
I would NOT worry about being behind the curve. The most important attribute of a career programmer is their ability and eagerness to learn new things at any time and employ their new skills. I'll post my email to a pre-college student who asked me the same question:
1) How should I start programming? If you're eager to dive in before you actually start programming classes, I'd recommend the following things: a) Install linux. If you don't have multiple machines or you don't want to overwrite your Windows install, you can set it up to dual-boot, giving you a choice on boot of which OS to load. Linux has a number of line-oriented text-based editing tools that you can invoke from the command line that can make your programming life easier(e.g. grep, sed, cat). It will also put you closer to the machine in some fundamental ways while programming. If you're new to Linux, get Ubuntu. It's a nice distro that's pretty friendly to starters. If you need it, a book that teaches linux would be good. b) Start learning the basics of C++. C++ is a superset of C, meaning it does everything C does and more. It's fine to start with, because you'll be learning the exact same things whether you start with C or C++. With linux, you can compile from the command line with gcc (if this doesn't work try g++), the standard GNU C/C++ compiler. A good C++ book is "C++ Primer Plus" by Stephen Prata. It is both a great learning book and a great reference book. Use simple text editors to write your code. Avoid IDEs until you understand what they do for you. c) As you learn the basic concepts such as variables, loops, expressions, and functions, write programs that use them. For each thing you learn, you need to write code that uses it. You learn by doing. Write little programs that interest you. Most people like to make games. So you could start with very simple games like Bingo, Tic Tac Toe, pong, Towers of Hanoi, whatever. Then progress onto Checkers, Chess, Card games, and other things. Use poor-man graphics by just drawing things by writing them to the command line ("cout", in C++). If you like cars, write simple race car games. If you like physics, write simple physics games. If you like math, write a calculator. Programming is a creative endeavor, so use your imagination. 2) What should I know beforehand? Basic computer knowledge is what you need. You should have general concepts of an operating system, files, devices, system memory, disk memory, etc. I've you've been using a computer for any length of time you probably already know about these things. 3) What textbook? The C++ book I mentioned should be a good start. I regret I don't have a really good linux book to recommend. Modern Operating Systems by Andrew Tanenbaum is a fantastic book that will teach you everything you ever wanted to know about operating systems, and consequently how they are responsible for executing your programs and providing facilities for them to run with. It also teaches a number of essential programming concepts like deadlocks in a very straightforward manner. Google is your friend. You can find a lot of nice tutorials and communities in which you ask questions. Here's a simple one showing how to do simple compilation with gcc: http://users.actcom.co.il/~choo/lupg/tutorials/c-on-unix/c-on-unix.html
|
|
-
-
Benn


- Joined on 01-08-2008
- Derbyshire, UK
- Posts 69
|
Re: I want to learn how to program. Where should I start?
Spectre:And C is simple, why not?
Having been C'ing for over 20 years now, I think it's another of those 'hours to learn, lifetime to master' things. I agree though, and would personally recommend working though a copy of K&R (Sorry OP - "The C Programming Language" by Brian Kernigan & Dennis Ritchie - them wot wrote the language), as by the time you've absorbed that, you've learnt not only the basics of lowish-level programming, but you've got the syntax/keywords sussed for all the languages out there that derive from C, you've got a rough idea of what's going on "under the hood", and you know what's in stdlib and the rest. (I've been able to fake my way through many quick fixes in languages that I know next-to-nothing about simply through knowing C, and thus reasoning that strfoo() or whatever must be implemented in there somewhere!) And of course, no matter what hardware / OS you're presented with, you can pretty much guarantee there'll be a C compiler for it.
|
|
-
-
Spectre


- Joined on 05-09-2007
- Posts 455
|
Re: I want to learn how to program. Where should I start?
Nether:C++ is a superset of C, meaning it does everything C does and more.
Tee hee, actually it is not and does not.
╩юфют√ь ёЄЁрэшЎрь яюЁр эр яхэёш■.
Visit #TDWTF @ SlashNET - the semi-official WTF IRC channel.
|
|
-
-
tster


- Joined on 04-11-2006
- Natick, MA
- Posts 1,292
|
Re: I want to learn how to program. Where should I start?
Spectre: tster:also you should avoid learning VB like the plague.
tster:never learn PHP either
And I hate people who make such statements. It's not even funny anymore.
And C is simple, why not? those statements weren't meant to be funny. I was dead serious. Avoid VB because the syntax is god awful, and if you are going to learn a Windows only language there are so many better choices (try C# instead). I thin we've already covered why PHP sucks on this forum so I'm not going to go in to it here. As for using an IDE, Learning to program is not just learning to compile a little calculator app. Learning to be an effective programmer means learning to use a programmers tools. And a programmers most important tool is an IDE. It's best to start on these early so that you don't resist some of the features, and to save yourself the very steap learning curve of some of the command line tools. Sure you might have some problems down the road, but it should be easier to solve those problems because you will know more about the language. Anyways, if there's a time to spend 3 hours messing with classpath or linking errors it's probably not right when you start programming. Also, an IDE will help you start developing GUIs, and I think programming GUIs is a lot more fun that simple console applications.
The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting... see bio for the earth shattering ending.
|
|
-
-
Spectre


- Joined on 05-09-2007
- Posts 455
|
Re: I want to learn how to program. Where should I start?
tster:Avoid VB because the syntax is god awful, and if you are going to learn a
Windows only language there are so many better choices (try C# instead).
To be fair, neither VB nor C# are Windows-only. And 'awful' is subjective.
Besides, the fact that you don't like a language doesn't mean that you'll never be using it. E.g., PHP is pretty common, and chances are that you'll have to dig into some PHP code. I guess it's beter to be prepared beforhand, isn't it?
╩юфют√ь ёЄЁрэшЎрь яюЁр эр яхэёш■.
Visit #TDWTF @ SlashNET - the semi-official WTF IRC channel.
|
|
-
-
CodeWhisperer


- Joined on 02-27-2006
- Redmond, WA
- Posts 437
|
Re: I want to learn how to program. Where should I start?
MrKltpzyxm:Programming interests me. The problem I have is that generally speaking I have not been a very motivated individual.
I hate to be the one channeling asuffield today, but "Then don't bother."
Learning to program -- or, more to the point, learning to be a good programmer -- isn't easy. If you're not motivated to do it, you won't.
Now that might make me come across as a prick, but either this stuff excites you and you can't get enough of it, or it doesn't. If it doesn't, you should look for something that does.
If you start with a language like C, you will spend weeks wrestling with pointers vs. arrays vs. strings. If you're not motivated to stick to it and figure it out, you won't. Every language is going to have some weird little sticking point that absolutely will frustrate the hell out of you. If you're not prepared to get past it -- and on to the next frustrating issue, and then past that, and so on -- then this is just going to be a painful experience with little reward.
And that's just getting the syntax down. The road to being a good programmer will be a long one, and you only get better by doing things that challenge you.
Don't get me wrong, I hope you do decide that this is something you want to do. Lots of people start around your age, a lot start older than you are now. It certainly isn't too late. But if you start the conversation with "I'm lazy but want to be a good programmer", then the answer is "You won't be".
-cw
|
|
-
-
LieutenantFrost


- Joined on 02-29-2008
- Posts 27
|
Re: I want to learn how to program. Where should I start?
MrKltpzyxm:I do have a small amount of experience when it comes to programming. It is, however, a very small amount of experience.
In high school I would spend most of my math classes writing programs
on my TI-83+ calculator in its version of BASIC. (At least that seems
to be the closest think that I can compare it to) Someone else came out of the TI-83+ camp? Sweet. The first "official" language I picked up was Java, but that was the AP class in high school, and it really was a joke (the class, not the language). But there are a lot of resources available to help you get the basics, and there are quite a few good, simple IDEs to get you going. To this day, I still use JCreator (http://www.jcreator.com/) when I do small side-projects in Java. And for all the problems it has, you can still use VB.Net to learn. Just don't stick around for too long before moving on. You can get the express version of any .Net language IDE for free at Microsoft's site. The big thing to remember is to start small. As rudimentary as they seem, all the "Hello, world" programs are where 99.9% of decent programmers today started. The other 0.1% were setting the VCR clock at two weeks old. :)
"The world of technical support is like a reflecting pool. To those who exist outside, it appears to be a deep, mystical place; bottomless, terrifying, foreign. The truth, however, is that the pool is only about three feet deep, and the bottom is grainy silt over sharp, hurty rocks."
|
|
-
-
djork


- Joined on 09-28-2006
- Posts 647
|
Re: I want to learn how to program. Where should I start?
go nuts BTW: Is that the cop from Freakazoid in the OP's avatar?
"Frames securely mediate, by design. Secure multi-mediation is the future of all webbing."
|
|
-
-
javaweeny


- Joined on 02-18-2008
- Posts 5
|
Re: I want to learn how to program. Where should I start?
Go to school. Find a four year university and get a degree in Computer Science. Why do you want to learn? Do you have an idea for software you would like to develop or do you want to pursue a career as a developer? If you want a career, then attempting to learn by yourself will get you no where. If you have an idea, then learning by yourself will still leave so much material untouched that you would never know if you are developing something well or not. A Computer Science program can't teach you everything but it will give you a realistic grasp on what you are doing and how much stuff (languages, design principles, libraries, etc.) is out there. I know some people have built successful careers without a degree, but they probably have been geeks since they were in middle/high school. They probably had odd jobs when they were young to build their experience and resumes. Starting out at 22 with no experience and no education would make it very difficult to be taken seriously. Starting out at 26 with a little experience in college and a degree, you would be in good shape.
|
|
-
-
skippy


- Joined on 03-10-2006
- Calgary, AB
- Posts 180
|
Re: I want to learn how to program. Where should I start?
RayS:As in some of the above posts, some will tell you to use an IDE, others will tell you to use just a text editor and compiler. I'm in the "IDE" camp, especially when it comes to somebody with self-confessed motivation issues. Nothing's more likely to turn you off than 6 hours tracking down a stupid typo or finding the correct way to call a function, when a decent IDE will point out the obvious to you and get you going again.
Just as long as you use an editor/IDE that can handle something more than notepad. Things like syntax highlighting/smart-indenting are a necessity (I went for too long without it to know :P). I haven't used an IDE with "intellisense" to know the full benefits (I'm sure they are good though...). For me, it's about consistency since I work on multiple platforms. I want an editor that works the same everywhere. My fingers have been hard-coded to Vim, so that's what I'm "stuck with". And Vim does have some sort of Intellisense for C[++|#], but I haven't tried it.
|
|
-
|
|