I have a question on learning programming if you have no programming experience.
January 30, 2005 8:38 AM Subscribe
Inspired by this thread on programming languages, I have a question on learning programming if you have no programming experience. (more)
I didn't want to derail the other thread because the poster had a very specific question which was answered comprehensively...
If someone wanted to make a complete career shift and begin teaching themselves to code from the ground up, what would be the recommended strategy? For example, I know HTML fairly well, but I also know that HTML is not, in the pure sense, a programming language.
So, aside from the possible "How to Code for Dummies" idea, I'm curious if the more experienced could point someone who has never written a line of compiled code in his life in the right direction. Thank you.
I didn't want to derail the other thread because the poster had a very specific question which was answered comprehensively...
If someone wanted to make a complete career shift and begin teaching themselves to code from the ground up, what would be the recommended strategy? For example, I know HTML fairly well, but I also know that HTML is not, in the pure sense, a programming language.
So, aside from the possible "How to Code for Dummies" idea, I'm curious if the more experienced could point someone who has never written a line of compiled code in his life in the right direction. Thank you.
Funny, a pal of mine who works at IBM has been on a kick lately to get all the liberal arts thinkers he knows to learn programming. Says it's easy to make the kind of career switch you're talking about, plus the money's really good. He also says it's too bad comp sci gets filed under engineering at most schools, because the best programmers he knows are the ones who think like liberal artists.
posted by mediareport at 9:03 AM on January 30, 2005
posted by mediareport at 9:03 AM on January 30, 2005
In my experience, one hallmark of a great programmer is a decent understanding of what is actually going on at the hardware level. Without that foundation it's harder to know what your code is doing. If possible I would study a little assembly language - doesn't matter the platform, just something to understand what the computer is doing "down there". It may seem complex and incomprehensible, but the set of things to learn is pretty small.
As to higher level languages: I would NOT recommend starting in C, C++, or C#. Python is fine for learning, and I'd recommend Java for anything but front end (GUI) development (I work in java server-side development). One nice feature is that the source of all the classes you will be using is available, so there is a large & pretty well commented set of code for you to peruse as you learn.
As to what to do: Start working on small projects of your own. Maybe try and join an open source project. Maybe try and go back to school for one class after you teach yourself, even just for the team projects.
posted by true at 9:06 AM on January 30, 2005
As to higher level languages: I would NOT recommend starting in C, C++, or C#. Python is fine for learning, and I'd recommend Java for anything but front end (GUI) development (I work in java server-side development). One nice feature is that the source of all the classes you will be using is available, so there is a large & pretty well commented set of code for you to peruse as you learn.
As to what to do: Start working on small projects of your own. Maybe try and join an open source project. Maybe try and go back to school for one class after you teach yourself, even just for the team projects.
posted by true at 9:06 AM on January 30, 2005
Have some projects you really WANT to code. Having a cool visual or killer app idea in mind and figuring out how to achieve what you want keeps the whole process alive, and engrossing. Slogging through a text about "now this is how you instantiate class foo blah blah blah" just on the general principle of "Learning Coding" is a dead end.
You can learn in just about any language, but I do believe some are better for learners than others. I agree with Python as a good place to get started, as it lets you do simple things simply; Ruby is similarly good. They're also nice in the sense that they have fanatic adherents who will love to help you out. I don't recommend C++ as a first programming language, 'tho it has lots going for it in other respects.
Some will scoff, but you can learn a lot about algorithms, functions, and recursion - a typical stumbling block for CS neophytes - in a few sessions with a good Logo interpreter.
Whatever language(s) you settle on, get acquainted with the libraries and other repositories of free source code that are around - looking at, reading, and modifying other peoples' stuff is as important a skill as any, if you want to get serious projects done.
Knowing what goes on at the hardware level has frequently helped me out when doing work with C and its relatives, but please don't think of assembly language as a prerequisite to doing serious programming!
Say more about WHAT you want to accomplish - besides just the impossibly vague "learn coding" - and we'll be able to help much more.
posted by Wolfdog at 9:17 AM on January 30, 2005
You can learn in just about any language, but I do believe some are better for learners than others. I agree with Python as a good place to get started, as it lets you do simple things simply; Ruby is similarly good. They're also nice in the sense that they have fanatic adherents who will love to help you out. I don't recommend C++ as a first programming language, 'tho it has lots going for it in other respects.
Some will scoff, but you can learn a lot about algorithms, functions, and recursion - a typical stumbling block for CS neophytes - in a few sessions with a good Logo interpreter.
Whatever language(s) you settle on, get acquainted with the libraries and other repositories of free source code that are around - looking at, reading, and modifying other peoples' stuff is as important a skill as any, if you want to get serious projects done.
Knowing what goes on at the hardware level has frequently helped me out when doing work with C and its relatives, but please don't think of assembly language as a prerequisite to doing serious programming!
Say more about WHAT you want to accomplish - besides just the impossibly vague "learn coding" - and we'll be able to help much more.
posted by Wolfdog at 9:17 AM on January 30, 2005
Response by poster: Fair enough, Wolfdog. I was glad you mentioned having a goal in mind...
I actually have a couple in mind. There are a couple of applications I want to write in the telephony world....something along the lines of a specialized soft phone, for one, and a few other related things in telephony. I realized that telephony alone will require a specialized subset of knowledge, but I gotta start somewhere.
I want to do this because, well, I'm not seeing it done, and I'm egocentric enough to think that I can do it myself. It may be hubris, but I want to try.
I know enough to know that I know nothing about it, and I know there are some fundamental things that I have to learn before I can progress toward this goal.
Zooming out a bit....part of it is I just want to learn something new, use my brain creatively to solve what I perceive as a problem.
posted by TeamBilly at 9:27 AM on January 30, 2005
I actually have a couple in mind. There are a couple of applications I want to write in the telephony world....something along the lines of a specialized soft phone, for one, and a few other related things in telephony. I realized that telephony alone will require a specialized subset of knowledge, but I gotta start somewhere.
I want to do this because, well, I'm not seeing it done, and I'm egocentric enough to think that I can do it myself. It may be hubris, but I want to try.
I know enough to know that I know nothing about it, and I know there are some fundamental things that I have to learn before I can progress toward this goal.
Zooming out a bit....part of it is I just want to learn something new, use my brain creatively to solve what I perceive as a problem.
posted by TeamBilly at 9:27 AM on January 30, 2005
Another basic point is that the baggage involved in writing programs with a GUI is a major distraction from the essential problems you're going to be wrestling with. Learn by doing text stuff, from a command line.
Working with just a basic, familiar text editor and a command-line compiler ENORMOUSLY cuts down the potential confusion when things don't work as expected.
posted by Wolfdog at 9:28 AM on January 30, 2005
Working with just a basic, familiar text editor and a command-line compiler ENORMOUSLY cuts down the potential confusion when things don't work as expected.
posted by Wolfdog at 9:28 AM on January 30, 2005
I'm an English major who taught myself to program, and works in the tech industry (not as a programmer).
I started by learning C programming. In a way I'm glad I did, because it gave me a great appreciation for what goes on under the hood in the higher level languages. (Similar to true's suggestion that you start with assembly language, but at a higher level.) On the other hand, I doubt that I will ever need C for any of my programming tasks. It's like sharpening a pencil with a chainsaw, or buying a tractor-trailer to drive to work.
I then learned Perl, which I still love. Perl is very easy and fun to write. Perl naysayers will tell you that Perl is TOO easy, and lets you form sloppy habits, and that it's too easy to write incomprehensible Perl code. Well, they're right.
I've since learned Python, and I will second the above recommendations that it's a good starting language. You can do just about anything in Python (BitTorrent is written in Python), it's far easier than C, and requires more discipline than Perl.
NOTE: You have a specific goal in mind, writing a telephony application. If I were you, I would find some similar applications and find out what they were written in. Or, find out if any remotely similar telephony apps have been written in Python or Java.
posted by agropyron at 9:38 AM on January 30, 2005
I started by learning C programming. In a way I'm glad I did, because it gave me a great appreciation for what goes on under the hood in the higher level languages. (Similar to true's suggestion that you start with assembly language, but at a higher level.) On the other hand, I doubt that I will ever need C for any of my programming tasks. It's like sharpening a pencil with a chainsaw, or buying a tractor-trailer to drive to work.
I then learned Perl, which I still love. Perl is very easy and fun to write. Perl naysayers will tell you that Perl is TOO easy, and lets you form sloppy habits, and that it's too easy to write incomprehensible Perl code. Well, they're right.
I've since learned Python, and I will second the above recommendations that it's a good starting language. You can do just about anything in Python (BitTorrent is written in Python), it's far easier than C, and requires more discipline than Perl.
NOTE: You have a specific goal in mind, writing a telephony application. If I were you, I would find some similar applications and find out what they were written in. Or, find out if any remotely similar telephony apps have been written in Python or Java.
posted by agropyron at 9:38 AM on January 30, 2005
>I want to do this because, well, I'm not seeing it done, and I'm egocentric enough to think that I can do it myself. It may be hubris, but I want to try.
Well... whatever it is, that's exactly the sort of thing that drives successful learning. "I wanna do X, and nobody else is doing it."
(Re Perl: I was hesitant to mention it. But, after a long hiatus from programming, while I was preoccupied with other stuff, the thing that got me BACK and absolutely loving programming again was Perl. I honestly don't know how it would be as a new language to someone who doesn't already think of himself as a programmer, but if you view programming as an exercise in cleverness and puzzle-solving, I suspect it'd click with you. There's something about Perl where every new feature you meet seems to SUGGEST new programs to write; it's a sort of auto-inspiration that's uniquely perlish.)
posted by Wolfdog at 9:42 AM on January 30, 2005
Well... whatever it is, that's exactly the sort of thing that drives successful learning. "I wanna do X, and nobody else is doing it."
(Re Perl: I was hesitant to mention it. But, after a long hiatus from programming, while I was preoccupied with other stuff, the thing that got me BACK and absolutely loving programming again was Perl. I honestly don't know how it would be as a new language to someone who doesn't already think of himself as a programmer, but if you view programming as an exercise in cleverness and puzzle-solving, I suspect it'd click with you. There's something about Perl where every new feature you meet seems to SUGGEST new programs to write; it's a sort of auto-inspiration that's uniquely perlish.)
posted by Wolfdog at 9:42 AM on January 30, 2005
read this book (online for free), using this for the exercises.
posted by andrew cooke at 9:44 AM on January 30, 2005
posted by andrew cooke at 9:44 AM on January 30, 2005
MIT has free online courses including computer science. This free textbook from them looks like it should teach the basics.
Otherwise, there's a two step process:
1) Learn a language from a good text. C and Java are good iintro languages (not because they're easy, but because if you know one of them, you can pretty much learn anything else) with many good books. You need to learn the basics of compsi like syntax, variables, arrays, loops, recursion, functions, etc.
2) Make increasingly difficult computer programs, starting with the traditional program which prints "Hello World!" Look for actual programming assignments from classes.
posted by callmejay at 10:12 AM on January 30, 2005
Otherwise, there's a two step process:
1) Learn a language from a good text. C and Java are good iintro languages (not because they're easy, but because if you know one of them, you can pretty much learn anything else) with many good books. You need to learn the basics of compsi like syntax, variables, arrays, loops, recursion, functions, etc.
2) Make increasingly difficult computer programs, starting with the traditional program which prints "Hello World!" Look for actual programming assignments from classes.
posted by callmejay at 10:12 AM on January 30, 2005
Another Schemish recommendation is The Little Schemer. Scheme and Python are both fine first languages (but I don't think Learning Python is the best book for someone who's never programmed -- perhaps How to Think Like a Computer Scientist.)
posted by Zed_Lopez at 10:18 AM on January 30, 2005 [1 favorite]
posted by Zed_Lopez at 10:18 AM on January 30, 2005 [1 favorite]
I'm in the same situation as agropyron--I was an English major, but when my son was born I knew I probably wasn't the type to do any of the more financially lucrative things one can do with an English degree, so I switched. I'd always loved loved loved anything computer-related, and had mostly been ahead of the curve compared to friends, so it wasn't out of the blue or anything.
Anyway, I'm a sysadmin now, and I use Perl ALL THE TIME, every day, usually multiple times a day. The first language I learned was C++, then Java. I've piddled in lots of things, but Perl is my standout favorite. And my son never wants for Cheerios and Power Rangers and good books. :)
I agree with most of what's been said here, and agree it's great you have a project in mind. Sounds like you're well on your way. The only thing I could think to add is that my subscription to safari.oreilly.com pays off every day (almost as much as Google :>) and is a great one-stop when you want to pick up something new.
Good luck!
posted by littlegreenlights at 10:34 AM on January 30, 2005
Anyway, I'm a sysadmin now, and I use Perl ALL THE TIME, every day, usually multiple times a day. The first language I learned was C++, then Java. I've piddled in lots of things, but Perl is my standout favorite. And my son never wants for Cheerios and Power Rangers and good books. :)
I agree with most of what's been said here, and agree it's great you have a project in mind. Sounds like you're well on your way. The only thing I could think to add is that my subscription to safari.oreilly.com pays off every day (almost as much as Google :>) and is a great one-stop when you want to pick up something new.
Good luck!
posted by littlegreenlights at 10:34 AM on January 30, 2005
Response by poster: Thank you all for the advice. I've started reading a bit about Scheme already. I wish I had a better background in math....
Off to Half-Price books this week to see if I can find any supplementary titles mentioned here.
Thank you again.
posted by TeamBilly at 11:06 AM on January 30, 2005
Off to Half-Price books this week to see if I can find any supplementary titles mentioned here.
Thank you again.
posted by TeamBilly at 11:06 AM on January 30, 2005
i read learning perl over two days a few summers back (could barely put it down). this book lit a fire in my brain--and under my arse--to start programming. very useful in *nix environment. if you're not in/around one frequently, it may not be worth it--i haven't used activestate perl enough to offer an opinion on perl for windows.
i second the command line as a training tool. if you're able to access a *nix box--even via cheap *nix webhosting--jump right into shell scripting to do simple things.
also, plenty of hosts allow you to do your own cgi, which is a good way to harness your knowledge of html to actually create things. it helps to build on what you know.
posted by mdpc98 at 11:11 AM on January 30, 2005
i second the command line as a training tool. if you're able to access a *nix box--even via cheap *nix webhosting--jump right into shell scripting to do simple things.
also, plenty of hosts allow you to do your own cgi, which is a good way to harness your knowledge of html to actually create things. it helps to build on what you know.
posted by mdpc98 at 11:11 AM on January 30, 2005
Perl would almost certainly be a terrible language to learn as your first. I expect you would be so utterly confused that you will never program again. Hell, I know several languages, including 6502 assembly, Pascal, C, COBOL, AppleScript, JavaScript, and more than a smidge of the mind-fucking FORTH, and I have started Learning Perl several times and simply cannot finish it. It always begins with me suspending judgment, patiently waiting for things to come together and make some kind of sense, but halfway through I realize that they never will and that the author, incredibly, seems fine with that. So far as I can tell, there is no sense to Perl, no philosophy, no "big picture," which leaves the learner armed with only a disjointed collection of incoherent fragments and no conceptual framework on which to hang them. Instead it's bits and pieces from various sources that you will be assumed to have already used extensively. I have no doubt that people can learn to program in Perl if they try hard enough, but I can't imagine it being anything but frustrating for a rank beginner.
posted by kindall at 11:37 AM on January 30, 2005
posted by kindall at 11:37 AM on January 30, 2005
I wish I had a better background in math....
ah. then instead off the book i recommended, try this (again, it's online for free).
posted by andrew cooke at 11:47 AM on January 30, 2005
ah. then instead off the book i recommended, try this (again, it's online for free).
posted by andrew cooke at 11:47 AM on January 30, 2005
Some thoughts, somewhat late:
What are you trying to accomplish? If you're planning to Do It Right, you probably need to follow along with a CS degree course - you need to know what's going on at the hardware level, you need discrete maths for the theoretical underpinnings, and you need to at least touch on top-down (C), object-oriented (Java/C#) and functional programming (Haskell/Scheme), preferably learning top-down and OO pretty well.
If you mainly want to solve problems and play around, I'd suggest PHP/SQL. Any computer scientist will tell you that PHP is a dog of a language, and will let you develop all kinds of bad habits, but learning alone you're probably going to develop those anyway, at least at first. More importantly, most of the interesting problems you're likely to want to solve are going to be web apps (nobody writes desktop applications any more), and PHP is without doubt the web language with the easiest learning curve.
If you go the second route, I'd suggest buying an O'Reilly "Learning..." title, bookmaking the manual at php.net, pulling some scripts off the net that do roughly what you want, and adapting them. When you get stuck, ask questions on mailing lists. That's the way most of the people in my generation (80s home computer explosion kids) started out - typing in listings from books and magazines and playing around with them.
posted by Leon at 11:54 AM on January 30, 2005
What are you trying to accomplish? If you're planning to Do It Right, you probably need to follow along with a CS degree course - you need to know what's going on at the hardware level, you need discrete maths for the theoretical underpinnings, and you need to at least touch on top-down (C), object-oriented (Java/C#) and functional programming (Haskell/Scheme), preferably learning top-down and OO pretty well.
If you mainly want to solve problems and play around, I'd suggest PHP/SQL. Any computer scientist will tell you that PHP is a dog of a language, and will let you develop all kinds of bad habits, but learning alone you're probably going to develop those anyway, at least at first. More importantly, most of the interesting problems you're likely to want to solve are going to be web apps (nobody writes desktop applications any more), and PHP is without doubt the web language with the easiest learning curve.
If you go the second route, I'd suggest buying an O'Reilly "Learning..." title, bookmaking the manual at php.net, pulling some scripts off the net that do roughly what you want, and adapting them. When you get stuck, ask questions on mailing lists. That's the way most of the people in my generation (80s home computer explosion kids) started out - typing in listings from books and magazines and playing around with them.
posted by Leon at 11:54 AM on January 30, 2005
andrew cooke beat me to it, but that was the book I was going to recommend.
posted by AmaAyeRrsOonN at 12:01 PM on January 30, 2005
posted by AmaAyeRrsOonN at 12:01 PM on January 30, 2005
I'm currently reading this beginner's guide to Ruby. It's written light heartedly but is very informative. I'm having fun and I'm not a programmer by trade--or hobby--by any stretch.
posted by Tacodog at 1:23 PM on January 30, 2005
posted by Tacodog at 1:23 PM on January 30, 2005
To repeat some of what I posted in the other thread: javascript might be a good choice to start. It's free, all you need is the editor and browser available on any platform and it can run un-modified on any platform, you know HTML well which will help (or at least not hinder) you, there are a few billion examples to refer to (i.e. most web pages), and there are lots of tutorials and sample scripts available online or in print. Javascript is (somewhat) object-oriented, which is how almost all programming is done these days (and which is probably easier for a novice to learn than someone who comes to OO with a lot of non-OO programming experience). Javascript has a syntax that's in the C/C++/Java family so you'll have a leg up on learning any of those languages.
posted by TimeFactor at 1:36 PM on January 30, 2005
posted by TimeFactor at 1:36 PM on January 30, 2005
One other aspect: a good development environment with an integrated debugger to allow you to watch what your program is doing when (not if) it goes wrong will make the learning process far easier. For "free" languages such as Python and Perl you can get the Personal version of Active State Komodo for a minimal cost.
And I'd agree with Kindall on Perl - I've gone through exactly the same process. Whether this is down to Perl itself or the mindset of a programmer who's used to more conventional algorithmic languages is another question; I struggled in a similar fashion with Lisp.
posted by arc at 1:43 PM on January 30, 2005
And I'd agree with Kindall on Perl - I've gone through exactly the same process. Whether this is down to Perl itself or the mindset of a programmer who's used to more conventional algorithmic languages is another question; I struggled in a similar fashion with Lisp.
posted by arc at 1:43 PM on January 30, 2005
Yeah, find something you want to write. As you know HTML you could start with a server-side language that automates the generation of it.
Generally though starting by choosing a language isn't a good way of doing it. Find a good programmer, in person, and get them to teach you because you'll need to be able to talk things through. If all else fails go with a popular language online, like PHP or Python or Perl.
posted by holloway at 1:52 PM on January 30, 2005
Generally though starting by choosing a language isn't a good way of doing it. Find a good programmer, in person, and get them to teach you because you'll need to be able to talk things through. If all else fails go with a popular language online, like PHP or Python or Perl.
HTML is not a programming language in any sense.Well... if you're writing for Netscape 4 you've pretty much got if/else constructs.
posted by holloway at 1:52 PM on January 30, 2005
I'm currently reading this beginner's guide to Ruby. It's written light heartedly but is very informative. I'm having fun and I'm not a programmer by trade--or hobby--by any stretch.
Thanks for the tip. I'd had almost no impetus to learn ruby before but that book looks kinda fun.
posted by juv3nal at 2:57 PM on January 30, 2005
Thanks for the tip. I'd had almost no impetus to learn ruby before but that book looks kinda fun.
posted by juv3nal at 2:57 PM on January 30, 2005
I second Python as a first language; there are a few good tutorials on python.org, there is also the pretty good online book Dive into Python. And if you want to get into telephony apps, there is Shtoom, a pure Python SIP toolkit (SIP is basically how you start a phone call over the internet; I think the voice coding part is done separately, but I am not a VoIP guy).
posted by costas at 3:40 PM on January 30, 2005
posted by costas at 3:40 PM on January 30, 2005
For that ease of use, instant gratification, good structured language feel I'd reccomend borland delphi. The site appears to be down so I'm not going to give you links, but they have a personal version that is free of charge.
posted by seanyboy at 3:54 PM on January 30, 2005
posted by seanyboy at 3:54 PM on January 30, 2005
If you're just starting, I'd actually recommend a language that doesn't have everything rather than something does. Something like pascal/delphi or php with perhaps some database stuff thrown in so you can do useful stuff. Worrying about the low level stuff (sockets, advanced file-handling, etc) and reading all the copious documentation will put you off programming.
posted by BigCalm at 3:35 AM on January 31, 2005
posted by BigCalm at 3:35 AM on January 31, 2005
Ignore the advice of anyone who says to start with a compiled language. Bah. Start simple.
You know HTML. Do you know Javascript? Javascript is a programming language that integrates beautifully with HTML. Learning JS will teach you the core "ideas" about programming that can take you much further- if/then, looping, functions, methods and properties.
You can also look at most javascript source codes on the web. If you come across an interesting piece of functionality, grab the source and see if you can understand it. Nothing teaches like example.
Oh, and skip the softphone idea. I'm sure it's a great one, but you've got a long way to go before you get there.
posted by mkultra at 6:55 AM on January 31, 2005
You know HTML. Do you know Javascript? Javascript is a programming language that integrates beautifully with HTML. Learning JS will teach you the core "ideas" about programming that can take you much further- if/then, looping, functions, methods and properties.
You can also look at most javascript source codes on the web. If you come across an interesting piece of functionality, grab the source and see if you can understand it. Nothing teaches like example.
Oh, and skip the softphone idea. I'm sure it's a great one, but you've got a long way to go before you get there.
posted by mkultra at 6:55 AM on January 31, 2005
Perl's my favorite language; I agree that it's probably not a good choice for a first language. (Notice I didn't mention it above.)
There is a coherent philosophy behind Perl; it just includes several elements that are antithetical to most other languages'. Whether you love or hate Perl, I think, depends upon your temperament. If you're a Perl person, you'll find most other languages horribly constrictive; if you're not a Perl person, you'll find Perl hopelessly chaotic.
posted by Zed_Lopez at 7:23 AM on January 31, 2005
There is a coherent philosophy behind Perl; it just includes several elements that are antithetical to most other languages'. Whether you love or hate Perl, I think, depends upon your temperament. If you're a Perl person, you'll find most other languages horribly constrictive; if you're not a Perl person, you'll find Perl hopelessly chaotic.
posted by Zed_Lopez at 7:23 AM on January 31, 2005
I'll also recommend Eric Raymond's How to Become a Hacker, a short essay on developing related skills and the importance of learning several languages.
posted by Zed_Lopez at 7:25 AM on January 31, 2005
posted by Zed_Lopez at 7:25 AM on January 31, 2005
I'd like to third HtDP and DrScheme, though in the interest of full disclosure I'm now a member of the team that makes them (I wasn't when they came out). I've been involved in a number of classes that taught beginners, and the HtDP/DrScheme ones seem to me (subjectively) to have had the best results.
posted by jacobm at 11:28 AM on January 31, 2005
posted by jacobm at 11:28 AM on January 31, 2005
This thread is closed to new comments.
If I wanted to start programming with zero experience, I'd start with Learning Python.
posted by grouse at 8:53 AM on January 30, 2005