How To Get Into Programming? 195
writermike asks: "Like many on Slashdot, I practically grew up with computers. I've had one or more since 1978. However, unlike a lot of people here, I simply never learned how to program. Twenty-seven years later, I still know nothing about 'programming.' I'm a fairly successful technology troubleshooter, having been in that role for 15 years, and I find as I delve deeper into why programs fail, my interest in programming rises, and I feel that not knowing the principles is a hole in my knowledge that hampers me a bit. There are so many books and courses out there that seem to focus less on principles and more on specific languages and/or the 'career-track'. I don't really want to code the next great web service. I want to learn principles, then begin to learn a language. Where can I begin the adventure I should have started back in 1978?"
To steal a line from the sneaker company (Score:5, Insightful)
Re:To steal a line from the sneaker company (Score:3, Insightful)
Mod parent DOWN! (Score:5, Informative)
I won't say this is completely wrong, because perl is a language where you can do an awful lot of useful things with a very small investment of time and effort, but the idea that one can learn "principles" of programming from our favorite hydra of a language is not a good one.
IMHO (which is not H, BTW), I would start with a language that has a more coherent design.
The big question is "objects" or "not objects." Secondarily, native compiler or scripted/VM language (which has more to do with getting used to the toolchain).
I'm going to assume that you would like all the software to be free of charge.
If you are going for objects, I would recommend starting with Java or Python. I would NOT recommend C++ because it is a complex hybrid of C and objects, doesn't have a single inheritance model, and gets enormously complex in its effort to cover all possible bases. Not that C++ can't be a great language, I just think it is not a best first stop.
If you are going for non-objects, believe it or not, I would recommend C.
Yes, C is full of pitfalls, but it is a simple language in design, easy to learn , but difficult to master. It can express powerful data constructs with simplistic data types and the experience of it translates well both "down" to assembly and "up" to other "safer" but more complex procedural languages. C is also a "classic native compiled" toolchain, which will stand you in good stead for all such similar toolchains.
Java I recommend from experience, Python from reputation (people I know, respect, and trust like Python -- I haven't yet had occasion to go much beyond the "Hello, world" stage with it).
As for how to start, for both of my "basic" choices, C and Java, I recommend beginning with a simple text editor and the command-line tools. Master using these for a few multi-file projects. In C, get used to writing and maintaining a Make file. Once you are comfortable with these basics, feel free to move to IDEs for simplifying/streamlining. But learn those low level skills so you don't become what I lovingly term a "tool junkie:" a person who can only be productive with a certain set of tools from a certain vendor.
Back to perl for a moment: Please folks, don't think I'm trying to get religious about perl. I love perl. I use perl every day. But a programmer learning programming from perl is like a chemisty student learning the definition of "exothermic" with dynamite. Perl is, by Larry Wall's own admission (nay, boast) "pathologically eclectic." Perl's whole philosophy is "there's more than one way to do it." For learning, I like a language where there is one right way to do it. That way you don't develop bad or confusing habits. Once you have discipline and style, you move to the more expressive languages and you make good code with them. Bad perl code is just plain terrifying. In my 20 years of programming, once I got beyond BASIC, which is very much a toy, I went to Pascal. Pascal is a great (IMHO) learning language. But I don't see a lot of Pascal development these days (outside of variants like Delphi, which, I'm afraid, take you down the "tool junkie" path).
Anyone got a great compiled procedural language suggestions besides C?
Re:Mod parent DOWN! (Score:2)
Next, it might be more helpful if I mentioned a few more details.
Any Linux distro will include all the tools you need to do free C development (and perl, and python, and, with just a little work, Java). Fedora Core 4 gives you an a
0, REDUNDANT (Score:3, Interesting)
Looks like it's a little too late for that, buddy. Thanks anyway, though.
To one of your main points, however, yes perl doesn't exactly force you to use good programming habbits, but certainly C does not abide by your "there's
Re:Mod parent DOWN! (Score:2, Funny)
These words deserve to be enshrined in the quotes database.
Re:Mod parent DOWN! (Score:4, Insightful)
That being said, I'd almost be inclined to start off with something like Python. It's a quick and easy way to be productive, it has good docs and it's more fun than C.
For the record, my language learning sequence went something like this: Fortran, C/C++ (beginner C++ is mostly C), MIPS assembly, Lisp, Perl, Java, C (for real this time), misc UNIX shell scripting, Python, Prolog. I'm planning to work through a Haskell tutorial this weekend.
Re:Mod parent DOWN! (Score:3, Interesting)
Re:Mod parent DOWN! (Score:5, Insightful)
These are good suggestions, including the one to avoid PERL. I think that where to start depends on the person's interests. If he wants to be able to write non-trivially useful code soon, one of the scripting languages would be best. On the other hand, if he wants to understand things at a fairly low level and is interested in hardware or operating systems, C is probably the best choice.
Of the scripting languages, I suggest that Tcl deserves serious consideration. One reason is that I don't think that object-orientation is best for a beginner. OO languages are very useful for some things, but they aren't ideal for everything, and object-orientation adds complexity and additional concepts that it's best for the beginner not to have to worry about. So I recommend against languages like Python and Ruby that are obligatorily object oriented.
Tcl also has a very simple syntax which makes it easy to learn. (Ironically, I think that Tcl is harder to learn for experienced programmers, who tend to make mistakes because they falsely assume that Tcl syntax is like that of Algol-class languages.) Tcl's other big virtue is the closely associated Tk toolkit, which makes it really easy to get started writing programs with GUIs.
Finally, Tcl has a very helpful newsgroup comp.lang.tcl on which beginners' questions are welcome as well as a helpful wiki [wiki.tcl.tk].
Re:Mod parent DOWN! (Score:2)
Re:To steal a line from the sneaker company (Score:5, Interesting)
The answer to that depends on what you hope to learn. Programming is a big topic and there are a lot of ways to approach it.
Probably most Slashdotters will answer this question with something practical and job-oriented. "Get a copy of Kernighan and Ritchie [amazon.com], C is a language everybody should know." "Download Perl." "Download the Java SDK." "Use the VBA engine in Word to write macros." Etc. All worth doing if you're looking for a career as a programmer. But I sense that this guy is motivated more by intellectual curiousity than by career development. (As he should be — the developer job market is a tad oversupplied.) He's used computers most of his life, but has an unsatisified curiousity about how the suckers work.
One good way to satisfy that curiousity would be with the very basics: machine language [wikipedia.org] and assembly language [wikipedia.org]. These are not useful skills for most programmers, who only need to know the high-level abstractions of the systems they work with. (Some people would disagree with me on that.) But for satisfying your curiousity about just what computers do, it's a nice exercise.
Or instead of going very low level, you can go very high level, and learn some basic computer science while you're at it. That the route if you read the classic Structure and Interpretation of Computer Programs [mit.edu] and work its Scheme [wikipedia.org] programming exercises.
Then again, learning programming on your own is not for everybody. If somebody has managed to be around computers for a long time, but has never go around to learning programming, he probably is the sort of person who needs some initial handholding. Community colleges often have good classes.
Re:To steal a line from the sneaker company (Score:5, Insightful)
Re:To steal a line from the sneaker company (Score:2)
If you want to learn how to *program*, then you need an itch you want to scratch. Taking a programming course, or reading a book and working the samples will teach you about programming, and maybe computer science (depending on the book), but won't teach you how to program. And learning about programming, or computer science, or computer hardware and engineering might be what you want - it's an interesting topic. But if what is bothering you is something like "
Re:To steal a line from the sneaker company (Score:5, Insightful)
Wow. Umm, throwing TAOCP at someone who's never programmed but wants to is a bit like throwing an aerodynamics book at someone who wants to fly. Sure, it will tell you how to fly, but it won't get you much anywhere unless you have a solid mathematical background and really good machinist skills. Seriously. I postulate that someone who has a decent math background has also seen some sort of programming in their life. That said, the amount of Sigmas, Pis, and Integral symbols in TAOCP is enough to scare someone way away from programming if they haven't seen such notation before. Don't get me wrong; I love the stuff, and I own and read all three volumes, but it's not something you want unless you have programming experience and/or strong interest in mathematics and preferably both.
Re:Please, what ever you do... (Score:2, Informative)
I dunno bud, if your defining black as something other than the opposite of white, then your doing something bad. Even if you consider that you might have other slots available in the bit slice you are considering, you really should make them Don't Cares for sanity.
!white = !00000000 00000000 00000000 = 11111111 11111111 11111111 = black.If you're having to think about things some other way, something is wrong. Or you're a mathematician
Anyw
Re:Please, what ever you do... (Score:2)
Hmmm... wherever I've seen things in Black and White, White was 0xF and Black was 0x0...
But then again, I'm a mathematician...
ANSI C (Score:3, Informative)
Languages to Learn (Score:4, Insightful)
C: like the parent says, it will give you a good insight into how computers store things at a low level, and of course it's useful if you want to do low level things yourself. If you really get into programming, you'll need to learn it sooner or later, but it might not be the best if you just want to learn a bit and get something done.
Tcl/Python/Ruby: Pick a scripting language and learn it as a good way to get things done quickly. Each has its advantages.
Smalltalk, Forth, Scheme: less useful, but mind-benders that will open your eyes to different ways of doing and thinking.
Re:Languages to Learn (Score:2, Insightful)
Re:Languages to Learn (Score:2)
Re:ANSI C (Score:3, Insightful)
1)The syntax is simple, and is the basis for every major language today.
2)It has most of the major features of other languages except inheretance and generics, both of which ought to be skipped until you understand procedural anyway.
3)It doesn't force you into OO, allowing you to examine other paradigms. Whatever some people will say, OO is not the best way to do everything.
4)It has good, freely available tools.
5)It forces you to deal with resource alloca
Re:Yeah, VB.Net if (Score:3, Interesting)
I would not recommend VB.NET as a "first language" to learn programming.
That said, I wouldn't discourage someone from learning it. There's a lot of work to be had developing in it.
But I wouldn't make it either the first or the only language I learn. It comes from one vendor and runs on one platform (Mono notw
Take a class (Score:5, Informative)
~
Re:Take a class (Score:3, Insightful)
Also, you should take a class in using the CLI if you haven't already picked up much proficiency yet. Using the CLI on *NIX as a serious tool will provide more opportunities to learn programming. I just recently decided to learn a little BASH programming to manage all of the CLI aliases I was putting into my ~/.aliases file -- so I
Maybe, maybe not. (Score:2)
I'd like to agree, but there are many teachers out there who teach bad programming.
As an example, Comments are good, but many teachers take that to mean each line needs a comment. So you end up with:
a = a + 1 # add one to a
Which should take off points, but instead is the only way to get points. A real programmer will know from the first part what it is doing, but will be wondering why add 1 to a right here.
If you can find a good course, yes you should take it. However at the beginner level you a
Re:Take a class (Score:2)
Re:Take a class (Score:2)
That said, colleges are pointless. The *best* way of learning is to pick a language and buy 3 or 4 tutorial books relating to that language off Amazon. It really doesn't matter which 3 or 4, because each will have their advantages and disadvantages, so with 3 or 4 you should get a good overall coverage. Just make sure you choose ones with good r
Re:Take a class (Score:2)
He certainly seems to think he wants to learn principles first.
Re:Take a class (Score:2)
Well, all the local community colleges around here offer introduction to programming classes as well but the vast majority of them simply don't teach you anything about the theory. In fact, the only ones that DO teach you more than the absolute minimum theory are the ones that count as university credit.
In fact, that's probably a good way to approach this. Does the course count as university credit? If not,
Re:Take a class (Score:2)
I can say that I learned to program by reading code (the non-closed source kind) to figure out how existing programs, the Linux kernel, its build system, etc worked. I never took a class.
If you're interested in programming, then figure out what kind of things do you want to program. Do you want to do dynamic web pages? I did, so I learned Perl and CGI, and then C, C++, and company. I did things like p
Just off the top of my head... (Score:2)
http://mindview.net/Books [mindview.net]
and here:
http://www.c2.com/cgi/wiki?WelcomeVisitors [c2.com]
and maybe here:
http://www.objectmentor.com/resources/articleIndex [objectmentor.com]
And although a lot of people around here would probably disagree, I think it would be worth your time to go back and try to get a Computer Science degree. Programming != Computer Science, but it's helpful to understand the scientific principles that modern software development is based on.
Low cost of entry/decent return on investment... (Score:5, Insightful)
Javascript is not the world's best language to get started with (not sure what is really), but it's good for instant graphical gratification. Make a
Another good language to start off with assuming you have a Windows setup is VBScript. This would be a better option teaching you control flow and how to structure a program. In spite of its reputation, it's a good "starter language". (Please, no replies about viruses or other results given from VBScript over the years--I'm being serious. As a teaching tool, it's a good start)
Re:Low cost of entry/decent return on investment.. (Score:2)
Re:Low cost of entry/decent return on investment.. (Score:3, Informative)
Actually, I would suggests starting with HTML. It's not programming per se, but it is a close relative, and many of the same skills are required. Just make sure you use a text editor to write your code, not a crutch web page generator, at least not for this purpose. Vi, emacs, or even something like notepad i
Re:Low cost of entry/decent return on investment.. (Score:2)
i got hired by a fluke into my first programming job. knowing what the job market was like at the point it was either learn programming fast or get fired and go hungry. i chose programming.
it is not the way i would recommend learning to program.
just look at different languages, find one that is pleasing to your eye, and learn it. buy more than one book on it, by more than one publisher, read through them while you manually type each example, a
Re:Low cost of entry/decent return on investment.. (Score:3, Insightful)
JS is enough to make someone stop programming and never look back. You need a compiled language first so the student can begin to understand syntax. After syntax you need to understand data types and flow. Then you can begin to create a program.
Browser Javascript provides little/no guidance in any of these persuits. Nor is there a truly coherent reference on just how each of the JS engines are implemented.
Compiled, well documented languages are a good place to start. Pascal or C are good bets.
Depends what kind of programming you want to try.. (Score:2)
If you're looking for something more meaty, perhaps check out Python or Ruby. Both have some pretty good tutorials around (linked from their homepages - use Google). Python in particular was designed to be a learning language anyway.
Take a class at a technical college (Score:2)
Syntax is easy, structure is hard. Any language will teach you the basics of conditions, looping, branching, subroutines and procedures, etc. Once you get the gist of algorithmic design, you're set to understand what programming is about.
Once you've done that, you may want to pursue learning object-oriented vs. non-oo languages (if that's what you started with) so you understand both paradigms.
Don't. But if you must, try this method (Score:2, Interesting)
However, I agree it could help you in other areas if you understood more- but don't go for it from a business or career standpoint. Pick your favorite form of art: drawing, music, animation. Once you have one of those three, pick your favorite artist: a painter, a composer, an animator. Then pick a language that has strong instructions in that arena, or a library you can take advantage of
Re:Don't. But if you must, try this method (Score:2)
I don't know where you live, but where I live that is most certainly not the case. One of our clients is a recruiting firm and they have literally 50 .NET/Java programming jobs they simply cannot fill. They pay $75,000 to $150,000 (in the midwest, where that is a very good salary) and are more than willing to accept applicants with "zero" college if you can prove you have actual coding skills. Still, the jobs sit desperately unfilled because of the small number of "rea
Re:Don't. But if you must, try this method (Score:2)
Re:Don't. But if you must, try this method (Score:3, Insightful)
It takes 5 minutes to learn how to drive a clutch, a hell of a lot longer to learn how to drive it well.
Theories from one language indeed can apply to another, but the nuances and awareness of an entire framework and what works "well" versus what "works" are what seperates the wheat from the chaff.
Re:Don't. But if you must, try this method (Score:2)
True enough- but that alone offers a gret way to turn chaff into wheat. *Offer training*. Don't just assume because some guy has
Re:Don't. But if you must, try this method (Score:2)
Re:Don't. But if you must, try this method (Score:2)
I live in the midwest. Last I checked, most places looking for java and .net wanted 10 years of the latter, and 5 of the former. (Java was released in 1994, .net in 2002, you figure out how many people can have that much experience with either)
I'm slightly interested, though I prefer to stick with hardware. Post some user info or something.
Re:Don't. But if you must, try this method (Score:3, Interesting)
Looks like it's working.
Re:Don't. But if you must, try this method (Score:2)
Re:Don't. But if you must, try this method (Score:2)
OTOH, you are correct in many ways- I don't interview well, I have no skills outside of coding (so while not paper thin, as deep and NARROW as a mineshaft). It doesn't help that most of my languages aquired since college have been in response to immediate on the job need- which limits one's ability to explore a language.
Re:Don't. But if you must, try this method (Score:3, Interesting)
My favorite is writing text editors and calculators.
Take your website for example; it looks terrible, is poorly organized and uses HTML that is long out of date.
Maybe to you- but to the people that website is marketed to, it does a lot with very little bandwidth, which *used* to be a key in web design (and damn well still should be).
Add up the facts that you admit
Re:Don't. But if you must, try this method (Score:2)
Maybe to you- but to the people that website is marketed to, it does a lot with very little bandwidth
Unless "the people that website is marketed to" are blind people with IQs below room temperature, I'd say it does very little with very little bandwidth.
Seriously - you're marketing web design skills with a site that looks like a smurf puked on it.
which *used* to be
Re:Don't. But if you must, try this method (Score:2)
Actually, I'm mainly (with that page at least) marketing spyware removal, virus removal, hardware and software setup, and LAN Parties...
I've only had one web design job in 10 years, and I'm not terribly good at it, I should remove any mention of that from that page.
And it still is (as far as I'm concerned). However, "low bandwidth" does not mean "ugly as sin." Get rid of the table, convert the page to valid H
Re:Don't. But if you must, try this method (Score:2)
Some things that are more fun to write and play with are cellular automata. Start with implementing John Conway's life, and then try changing the rules or extending it into 3-D.
Another fun one is CoreWars (http://www.corewars.org/ [corewars.org]). It requires that you write a machine emulator that executes code in a small (~10ish) instruction assembly language with maybe 4 addressing modes and the option to split your program into multiple threads. You also have to wr
Re:Don't. But if you must, try this method (Score:2)
That's why I long ago started tailoring each resume to *only* the languages that I know well and are in the job description- no more. Who gives a rip that I happen to know that the add instrution on a Verifone is not communitive? Nobody codes for verifones anymore.
You say 'narrow and deep' but I see "wide and sh
Re:Don't. But if you must, try this method (Score:4, Interesting)
Sure. My team is trying to hire a couple of Java programmers right now. We're talking about a very well-known company (hint: there's a Slashdot category for us), a Silicon Valley office, and a six-figure income.
And we're desperate. We finally (after much searching) managed to find a really great candidate for one of the positions, but the other one remains unfilled. I'd rather leave the position empty than lower my standards enough to pick some of the people we've talked to.
So, I suppose I agree that coders are a dime a dozen if you're looking for an idiot that doesn't even understand the difference between "a == b" and "a.equals(b)", but if you're looking for competent programmers, they're tough to find at any price.
Re:Don't. But if you must, try this method (Score:2)
And given the Ask Slashdot that this is in, which do YOU think a guy who's spent the last 20 years doing tech support is going to be? Competent programers- what you're looking for is software engineers. A decent programer in a given language isn't going to kno
basics (not basic) (Score:3, Insightful)
A couple of points: I can't stress enough achieving fluency in your editor of choice. Create a sample file, write down a list of changes, navigations, etc. and DO THEM ad nauseum... until it's second nature. The last thing you want in programming is the noise that is editing.
Also, learning debugging techniques is off-the-scale important. I was the pariah on a team I worked with because I fell a few days behing on some "assignments". The team was incredibly hostile. I was new to the environment and was spending up-front time learning the debugger of the environment. The team demanded I use print statements and I refused. Within a week (when I had caught up), team members asked how I was doing things looking over my shoulder. I soon had the rest of the team using the debugger and establishing that as the standard (I know, I know, what kind of team was that in the first place???, no comment).
Re:basics (not basic) (Score:2)
No -- a programmer with real skill can debug without a debugger. It may not be the most efficient way to debug, but in some cases you just can't use one. If a print statement "perturbs" your code enough to alter a bug's behavior, that in itself gives you a lot of informa
Re:basics (not basic) (Score:2)
Yes a programmer with real skill can debug without a debugger. I do it all the time. As for perturbed code altering a bug's behavior and giving information about the bug, I agree. But that can be nuanced behavior and I consider it more sophisticated detective work.
Re:basics (not basic) (Score:2)
If you have the buggy code in front of you, and you can reproduce the problem on your machine (or a machine in your office), then great. A debugger will get in there like a scalpel - clean, precise and no damage to the rest of the body.
But if the buggy code only manifests itself on one guy's machine in Romania (seriously, this has happened to me in one of my home OSS projects!) then you're screwed. Your Romanian friend is unlikely to have a debugger, and even
Re:basics (not basic) (Score:2)
That WAS my point... I didn't like perl when I first encountered it, but you can do things with it quickly, and I like its flexibility. And I think it's a good test for aptitude -- if you find yourself doing productive things with perl, it's a good bet you'll take to other languages. Is it the best or only first choice? No. But it can tell you a lot about your aptitude.
Using use strict; is a good suggestion also for starting (I think the Learning PERL book starts beginners with that (though I haven't l
Perfect timing (Score:5, Funny)
Do you want my job?
Just dive right on in and hope you can swim. (Score:2, Insightful)
Get a few reference books, for starters. (Score:2, Informative)
Teach yourself beginning programming in 24 hours [amazon.com]
Beginning programming for Dummies [amazon.com]
C for Dummies [amazon.com]
The C Programming Language [amazon.com]
Those could serve as a good start. If you need further help, I can get you a basic manual of ho
Here's the standard operating procedure (Score:2)
Re:Here's the standard operating procedure (Score:2)
Seriously, those are almost exactly the steps that I (and, apparently, many others) took to get to where we are now (I would place 2 after 5, but whatever). The unfortunate part is that I can't really tell you, in all good conscience, to leave any one of those steps out. They were all invaluable in teaching me how to become a good coder. You have to start out with something that makes you *think* like a computer (LOGO), then write something that's logical and linear (BASIC),
Re:Here's the standard operating procedure (Score:2)
Re:Here's the standard operating procedure (Score:2)
And step 15 is just too cruel, because it lets people think they might reach it...
Grab.
Doing it backwards (Score:5, Insightful)
Some advice from a casual, self-trained, hobbyist programmer:
1) You need an itch that has to be scratched. Find something you need, and code it. Outside of a classroom, you need to be extraordinarily self-motivated to learn in the absence of a defined project. Pick something, and *complete* it, despite the unexpeceted directions it will go.
2) Don't worry about principles now. Learn to hack a bit, get some feel for writing working code, and maybe then start working through real CS books. Honestly, half the "programmers" graduating with CS degrees are inert to the underlying principles. You can have plenty of fun without them.
3) For me, Qt/KDE was the tool that made it intuitive to jump from reading about objects and GUI programming to doing it. YMMV, obviously, but I'd recommend that as a place to start. Qt also has *the* best documentation in the open-source world.
Re:Doing it backwards (Score:3, Insightful)
p.s. I also second the Qt recommendation. To learn C++, I would recommend Practical C++ Programming [oreilly.com]. This is one of the very few C++ books suitable for a programming newbie.
Get a book (Score:2)
Type in the examples. Actually type them in - you'll learn what syntax errors look like
Do the questions. Do the practices.
Sure, you'll feel dumb for typing "print("Hello World");", but that's the way to learn it. Granted, there are other ways to learn it, but t
You need a problem first! (Score:2, Insightful)
Of course, learning to program is all about the concepts, the rest is just syntax. If you know C/C++, it's nothing to learn PHP, javascript, python, etc. So once you get started and get some real knowledge under your belt, it will get easier and easier.
Ask yourself what you want to accomplish, then learn what you need to meet t
Programming Concepts (Score:2)
Basically, it sounds like you're smart enough to read code but would like to know the why not the how. You don't want to learn all about design/editing/debugging but rather why is there a iteration used here.
Programming is abstractions, prgrammers take reality and then model that within the computer. The more types of abstractions available to a programmer the closer he can model reality. The easier the abstraction can be used the more likely a
Use and IDE to start (Score:3, Insightful)
My advice, download eclipse and get yourself a copy of Bruce Eckel's "Thinking in Java."
I originally learned on a C-64, moved to Pascal in highschool using a line editor and UCSD Pascal on an Apple IIe. In College, I got Turbo Pascal and the added advantage was extreme. There is nothing like stepping through your code in a debugger to really understand how it works. There were still a lot of things I didn't understand, the big one being memory management.
Once you learn thingsd in a high level language like Java, you can move down into the nuts and bolts of memory mangement, pointer math, and all those things you need to know to poke at the operating system.
At the same time, you might want to learn a scripting language. I tent to use Bash a lot, and it is not a bad place to start.
One of the most useful courses I took in college was comparative programming languages, where we learned how to learn a new language. But to get there, you need somewhere to start, and I would advise Java. It is designed for inexperienced programmers, and yet for accomplishing serious programming tasks. Once you know a language that has training wheels, you can take them off and attack things in C and assembly.
Good Luck, and may the source be with you.
my experience (Score:2)
Above all, have fun with it,
-l
A couple ideas (Score:4, Insightful)
Next, once you get past the simple tutorials, try to think of a simple program you'd like to write. My personal favorite target for learning exercises is reimplementing well-known Unix programs, or parts of them at least. So I might design a version of "cut" that does some things I want it to, like treat contiguous whitespace as a single delimiter. But maybe you already have something in mind, like a simple web app. If so, you should tailor your choice of language to what you want to do. Like if you want to make a simple web app first, you probably want to use PHP. (Which I didn't recommend earlier because it's a little harder to debug.)
At this point you can hopefully write nontrivial programs - programs 100 lines or so long that mostly do what you want on the first few tries. Now you should learn Java. The main reason for this is that you will need to learn C, or at least a C-like language, at some point, but you don't want to get into the complex parts of C yet. Java will handle most of them for you. It's also a compiled language, so it adds an extra step to the process (code-compile-test instead of just code-test). This is probably where you ought to learn most of the intermediate programming concepts, like basic data structures and algorithms. What you may find helpful is going back and forth between Java and the language you started with. Sort of sketch out the app's framework and decide how you want to do something in e.g. Python, then rewrite it in Java. This will not only let you use the language you're most familiar with, it will give you a valuable understanding of how programming languages work.
Finally, move to C. C++ would be an easier transition since it's much more like Java than C is. But what you want to learn is memory management and all the other hard shit, and there's no way to escape it in C (there are lots of ways to escape it in C++). Plus, once you have a solid grasp of C and Java, you will almost by default know C++. Then you can learn the advanced features of C++ without having to worry about anything else.
Once you're at this point, you will be able to pick up the basics of any new language in a week or two. If you still want to learn and didn't start with Scheme, you should learn it now. It's a very different way of programming than you'll be used to, and it'll teach you even more about how languages work and how to be a good programmer.
I'm assuming you want to do as much of this as possible on your own. The first two steps - learning your first language and writing some simple programs in it - can be done with books and online tutorials. Past that, however, I would advise taking classes. You will know enough by then to have questions which might not be answered in a book, but which an instructor could answer easily - maybe before you even know to ask. Instructors will also be giving you assignments which are neither too easy nor too hard (hopefully), which is really hard to do on your own. You'll quickly find that you can read a book and understand every word in it, but not be able to write a program that says "Hello, world!" on your own. You need to be practicing this stuff constantly as you learn it or all the books in the world will be useless.
Re:A couple ideas (Score:2)
(much deleted)
Yikes! I think I'd recommend doing it in the opposite order. Certainly Perl is not a good first language (though it may be a good last language)--it's not terribly readable, and even when you're fairly experienced it can take more than a little digging through reference books to fig
More advice (Score:2)
I'd say:
First decide why you're doing it. If it's for money, don't bother.
If there's some specific niche you're interested in, pick the appropriate first language for that niche. For example, if you build web sites, start with JavaScript. If you work in an all-Microsoft shop, learn VB.NET. If you want to help with ope
Computer Systems (Score:2)
A couple of books. (Score:3, Insightful)
python (Score:4, Insightful)
I recommend you start with python, for two reasons: there is a good book How to Think Like a Computer Scientist [ibiblio.org], and because the enforced whitespace will start getting you into good habits as far as code formating from the start.
Note that I said start. Python is a great language, I use it a lot for my real world stuff. It is not the be all, end all of programing. Programmers I trust strongly recommend Ruby. (I have not got around to learning it yet) You will need to learn both LISP (Scheme is great) and assembly (any assembly, doesn't matter which, x86 is about the worst choice you could choose to learn though) at some point if you want to become a good programmer. Do not get stuck in the rut of thinking that your first language is perfect for everything.
While you can learn perl, php, C, Java, C++, C#, basic, etc, I recommend you avoid them until you need them (though I have different reasons to not recommend each). Unfortunately all are fairly popular, so odds are you will be called upon to use one. They are however ugly, so you should avoid them until latter.
It has been said that it is impossible to become a good programmer if you start with basic. While this isn't strictly true, there is a lot of truth behind it.
Real programmers do not think about language. Real programmers know that all languages are Turing complete, and thus if you can do it in one language you can do it in another. (though sometimes the language will try to get in your way) Real programmers are concerned about data structures, algorithms, and other such things that have nothing to do with the syntax of the language. While you are learning the language keep in the back of your mind that the language itself isn't what is important.
I'm torn about the recommendation that you take a class. While classes can be good, there are a lot of teachers out there who know nothing about programing, but think they do. If you get a good teacher, take the class. However a bad teacher can teach bad habits. (Comments are good, but run from any teacher who makes you comment every line) Sadly as a beginner you will be unable to tell the difference between a good teacher, and a bad teacher.
Practice (Score:2)
RAD (Score:2)
You can simply just get some pretty windows displayed which just do nothing, just for the kicks
and then start working on things like a simple calculator
Might sound crazy but you can get yourself familiarised with different aspects of programming without getting pained a lot and once you feel comfortable take the plunge into the world of C
A platform everyone has (Score:2)
Sure, buttons and text boxes for input aren't the total representation of data input/manipulation, but like I said, its the basics. You only need to know wha
Summary of whats been said (and a critque) (Score:2, Insightful)
Read "The Art of Computer Programming" (Score:2)
it's not for the faint at heart though,
but it will teach you WAYS more than any of those
"programming for beginners" courses and books.
We're in the same boat... (Score:2)
Language not important as the Problem. (Score:2, Informative)
So if you wish to learn programming, the medium isn't as important as the problem you're trying to solve. If I were in your shoes, I would try approaching a classic computing problem (eg generating Fibonacci sequence) using several of the languages that app
Learn C++. (Score:2)
You can download dev-c++ (or even better, codeblocks IDE) for free (they're OSS), and get a c++ tutorial from the web. You know, hello-world stuff and the like.
Learning The Principles (Score:2)
A good theoretical undergraduate computer science degree should teach you things like algorithmic complexity, finite state machines and automata theory, sets and group theory (if your middle or high school didn't do that already), graph theory, data structures, and a bunch of other groundwork.
As other have said, you can pick up the MIT coursework for free, but what you can't get is the sessions with a tutor, the late-night hackin
Re:Learning The Principles (Score:2)
How I started (Score:2)
MacOS QBASIC
AmigaOS QBASIC
translate AmigaOS QBASIC to MacOS QBASIC for a simple word processor (yes, a number of idiosyncracies in both)
a little AREXX
PASCAL
BASH (this installer [comcast.net])
C (current hobby)
Learning Programming via Entertainment (Score:2)
1978 (Score:2)
Re:1978 (Score:2)
Now, I use perl/expect/bash for work, to make things easier for admining boxes. I guess its programming, but I never create much more than simple statistical
BTW, Have been tempted to start programming after seeing
Python (Score:2)
I'm teaching a weekly night class on Python to beginning programmers in my areas and they are picking it up very quickly.
When I started out over twenty years ago (Score:3, Interesting)
It's simply not true anymore. Any intelligent person with a knack for logic can program. The big issues now are in the domain of design. Much of your life isn't figuring out how to do something, it's figurign out how to make something somebody else has created (typically a framework or API) do something you want it to do. Keeping these things in mind, I'd say that programming langauge is not the issue. You can't get a sense of design until you've been deeply involved in one, either as a creator, or as somebody who has extensive experience in somebody else's design.
Therefore, I'd do this:
Make a list of some projects you'd like to get involved with.
Going down the list, look at the kind of things you'd like to do on them. Example: suppose you have something like JOE (Java Outline Editor) on your list, and you remember lots of things from a product like In-Control that you really liked that no outliner around seems to have. If you can't think of anything to do on the project, cross it off the list (Linux Kernel -- Hoo yah! Err, maybe not).
Pick a project that has lots of things you'd like to do with, and has at least one or two things that seem dirt simple enough. Look to to keep yourself invovled part time for a year (not as an official contributor -- yet), and diverse enough that if you're bored with A you can try B. Now find out more about it. Check out its developer mailing lists, find out what kind of reputation it has for design.
Examine the languages and tools you would have to learn, read some books, download the code. If things look like they make sense, dive in for a year or so.
Start with a high level language (Score:2)
Go to college? (Score:2)
I wasn't particularly concerned about this, h
great books (Score:2)
Squeak: Learn programming with robots [amazon.com]
Or at least, read the reader comments on amazon. Squeak is a Smalltalk implementation, which if you don't know, is a complete proramming & graphics environment designed to be easy enough for kids to learn. Check it out. And if it isn't interesting to you, then my advice is in the absence of any other specific direction, find a great book that appeals to you first, and let that decide for you what specific topic/language/environment you first learn. One of the
Why do C people recommend K&R? It sucks (Score:2)
It's good for the experienced programmer but gave me ulcers when trying to learn from it as a brand new programmer. I always thought it was overrated for learning C (yes, I know who the authors are) when I was in college. The same goes for Bjarne Stroustrop's book on C++. These books are much better for someone who already knows the language reasonably well and wants insights to the language, not to learn it from scratch