Well, I'm reading Dive into Python 3, and it's a little filled with jargon (thank goodness for the ease of google). I know a little VB6, but I think it's time to put on my big-boy pants and learn a real, or 'real-er' programming language. Any suggestions?
[+] [-] ErrantX|16 years ago|reply
PHP might be good to learn (so long as you avoid the bad habits it invokes) if you interested in web programming. I know others might scoff a little at that suggestion: but the online documentation is stellar and you can pick up the basics in a few weeks.
C is also hellishly useful because it will teach you some core concepts. In fact I would poke around in C anyway whatever you choose - just for "background".
[+] [-] caffeine|16 years ago|reply
Option 1. Python is not a bad choice, and neither is Ruby. In either of those languages, in a couple weeks, I'd say you can write yourself a "Guestbook" or something. Spanning the Gamut of "Web 1.0 apps" like forum, guestbook, blog/cms, etc. in a language is a nice easy way to get the basics.
Completing option 1: You can hack together simple web apps. A bit more effort will get you enough Javascript to use jQuery.
Option 2. Start with Scheme. Check out HTDP and/or SICP (google the acronyms). You can write real, useful programs in Scheme and/or you can move into Clojure, which lets you write anything you could write in Java (i.e. the libraries are all available). Spend some time here - write some simple games, and then maybe a web app with the existing frameworks. Consider picking up a language in the ML family, or Haskell, to learn about purity. In fact - with Clojure and e.g. Ocaml, you've got enough speed & flexibility than you probably never need to learn anything else. But...
Next, learn C. C is a great beginner's language for imperative programming. It's less ulcer-inducing than assembly, but you're still close to the machine. You'll want to implement a book of basic CS data structures and algorithms in C, and deal with all the thorny issues involved in making them fast and stable. In particular, you'll notice that cool data structures are really just different ways of re-arranging pointers. Conversely - by re-arranging pointers, you can do a LOT of cool stuff!
Eventually, you'll have to learn about OOP despite all the functional craze these days, so go to Java. Much of the online literature about OOP was written for Java. Go to Java before C++ - but eventually, get to C++, because everybody uses it.
At the end of option 2, you will have a good layer of fundamentals. You will hopefully have done at least 1 or 2 projects in functional, close-to-the-metal, and OOP environments. Hopefully, you will have gone through and implemented the standard CS algorithms/data structures in each one, understanding the subtleties therein. You can confidently go on from here to learn the skills how to write video games, databases, trading platforms, custom server apps, etc.
[+] [-] dkersten|16 years ago|reply
C makes an excellent (and important) SECOND language, but a pretty terrible first, IMHO.
[+] [-] timwiseman|16 years ago|reply
If you like Python, you can be a easily be a professional Python programmer and learn other languages only to get a different perspective. You can make a career successfully with Python alone and it is as real (though perhaps less traditional) as any other language.
If on the other hand your goal is to learn programming in depth, I would first start with C to get a better feeling for how things work on a low level and I would then start moving on to representatives of different paradigms (a solidly oop language, a functional language, perhaps a domain specific language like SQL or two.)
If your goal is to get a job and be employable, I would learn VB.NET. It is in high demand(at least in the area I am in) and if you know it then learning C# (also in fairly high demand here) is practically effortless.
[+] [-] balding_n_tired|16 years ago|reply
[+] [-] SwellJoe|16 years ago|reply
For sheer ubiquity, JavaScript can't be beat. In five years, I suspect we will all be writing a lot more JavaScript, no matter whether we are frontend web developers or not. But, for now, the backend is still better written in one of the other languages I've mentioned (or PHP).
gdp mentioned HTDP and SICP. He's right, though you have to phrase your question differently...because the language of those books is not a language most real world programmers would suggest you learn. And yet, if you want to be a good programmer, there are probably no better resources. The books and lectures are available for free from various (legal) sources, and provide a really solid foundation on which to build your programming skills. I strongly suspect spending 3-6 months on these two resources and learning Scheme would accelerate your development in any other language enough to repay the upfront cost within a year or two. Becoming a programmer is a multi-year investment, so that's a really good deal, even if it looks like the long way around.
[+] [-] gdp|16 years ago|reply
If you want to become a good enough programmer that it becomes pretty much irrelevant which language you are asked to code in, I would recommend starting with something like Scheme, perhaps with the aid of either:
http://en.wikipedia.org/wiki/How_to_Design_Programs or http://en.wikipedia.org/wiki/Structure_and_Interpretation_of...
[+] [-] intellectronica|16 years ago|reply
You can use many languages to learn, but I'm pretty sure Python is indeed the best choice for a first language.
[+] [-] cpr|16 years ago|reply
It's freely available and runs on all major operating systems.
http://www.squeak.org/
And then if you get Peter Seibel's "Practical Common Lisp" book and learn Lisp, you'll be completely ruined for any "blub" language like Java or C++. But you'll be light-years ahead of the crowd...
[+] [-] cpr|16 years ago|reply
[+] [-] parse_tree|16 years ago|reply
http://download.savannah.gnu.org/releases-noredirect/pgubook...
I started out trying Scheme, Java, Ruby, etc. and was constantly in a state of confusion. I could never just go with it because I'd always want to understand the implementation of the commands before using them. Ruby was particularly bad - I had no clue how a language or computer worked and was constantly overwhelmed with all of the different options for doing something.
Programming in assembler you get a small set of commands that won't take long to memorize, and you'll have to build up from there. It's not as hard core as people make it out to be - when I was really into it, I could produce output in at a similar rate to C. Once you get a little assembler under your belt, you could begin mixing it with C, and you'll get a rock solid grip on C strings, callback functions, pointers, etc. that so many people have trouble with.
EDIT to add:
Also, using GDB (the Gnu DeBugger) with Emacs text editor is excellent for learning assembler - must use it!
[+] [-] jacquesm|16 years ago|reply
This will give you invaluable insight in how a computer works on the inside, then work your way 'up' from there.
That's much easier than to have this feeling that there is this 'magic carpet' that is holding you up in the air but you have no idea how it works.
Almost every high level language will make a lot more sense if you come from the basement up.
[+] [-] plinkplonk|16 years ago|reply
This is a great idea!
If for some reason you don't want to work with actual hardware, I reccomend this book(http://www1.idc.ac.il/tecs/) . Dr Schocken uses Java to build a variety of emulators all the way from flip flops to a small computer you can write Tetris for, using a compiler you build.
A google tech talk based on the book is here http://video.google.com/videoplay?docid=7654043762021156507
"Almost every high level language will make a lot more sense if you come from the basement up."
Exactly right.
[+] [-] cullenking|16 years ago|reply
The other consideration is to pick a language that has some sort of structure and encourages a good understanding of underlying concepts. Working with C for example, really forces you to know and understand how a computer works. Something like Ruby (my favourite) allows you to easily ignore these inner workings. This has a speed and ease of development advantage, but could be detrimental to your core understanding of CS.
I personally love programming with Ruby, however from personal experience I can say the large amount of different programming styles which Ruby can encompass can cause you to write some really odd and sloppy code while you are learning. Additionally, there are an infinite amount of crappy examples of Ruby code, and relatively small amounts of good code. My recommendation if you go the route of Ruby is to ignore many of the articles/blog posts on beginning Ruby (they are drumming up ad traffic), and dig around in the source code.
Additionally, you can writ Ruby in a multitude of styles. Flexibility is always good, however, it can lead to some real serious slop. My first year or two of writing programs that were more than simple scripts were with Ruby, and they are some awkward and sloppy programs. However, the pleasure of producing those programs was probably greater than if I had tried to struggle through with something like C.
I am lately leaning towards suggesting javascript or actionscript for a first learners language. First off, both have an awesome ability to quickly get you something tangible. They have a really good layout system (mxml or html/css), and you can easily share your creations with others. Both can can be written in a C style, or can be very object oriented. Neither require crazy development environments.
[+] [-] dejv|16 years ago|reply
If you want to take this route for taste of programming I will take a Haskell, it is much more easier to start with it if you do not have much experience with imperative paradigm.
[+] [-] jamongkad|16 years ago|reply
[+] [-] lallysingh|16 years ago|reply
Why? It's got many of the advantages of scheme, and it's a language that'll treat you well the rest of your programming career (assuming you continue to use emacs).
Also, the immediate feedback and lots of example source is pretty nice.
[+] [-] nopassrecover|16 years ago|reply
[+] [-] blackmac|16 years ago|reply
You will learn about pointers, which is important in ANY language, binary trees and stacks are good to know about too.
[+] [-] dkersten|16 years ago|reply
While I think C is a valuable language to learn and I agree with your reasons for learning it, I do not think it should be someones FIRST language. It would make a great second, though. Why? Because C (and C++) has a lot of confusing cruft that a beginner just doesn't need to know about. The noise in the language is too high and too much work is involved in achieving relatively simple things. A higher level language also has quicker returns, which definitely helps keep someone whos just starting out motivated. Most high level languages have better tools to learn with too, like an interactive read-eval-print-loop.
I would recommend Python. Not Python 3, but Python 2.6 - better library support. I recommend Python because it takes very little to get working and it comes with everything a beginner would need bundled. When you're learning, you don;t need direct hardware access, you don't need direct OS interfacing, you don't need high performance (and probably wouldn't get it anyway until you learn how to write good, fast C). You DO need to get things done quickly (its hard to learn, otherwise) and you DO need an environment that doesn't require much background knowledge to work in. In Python, a simple program is simple. Theres no need to learn about "main" (and therefore functions), about includes, printf format specifiers and so on - just to write a hello world. As your skill increases, you can gradually add more language features: conditional statements, loops, I/O, functions, data structures, classes, functional programming tools, libraries, metaprogramming. You dont have to deal with manual memory management and you'll get more meaningful error messages than "segfault".
You learn a lot about PRGOGRAMMING (rather than having to deal with the low level complexities of C) which can then be applied to almost any language. If you outgrow Python (and I don't think you ever would, I know people who write some amazing stuff in Python, including HIGH PERFORMANCE CODE) you can learn C. I'd recommend it as a second language. Everything you've learned from Python will be applicable in C too. At this stage you should be well versed and pointers should come a lot more easily. You can also use Python and C together - its not even that hard.
You could easily replace Python with Ruby in the above, if you prefer. Python and Ruby are pretty much equal players.
If you don't mind going a less mainstream, I'd suggest learning Factor: a fast, powerful, very dynamic, native compiled concatenative language. It has pretty much all of lisps powerful features, with some ideas taken from Forth, Smalltalk and others, has an active community and very clean codebase. (The library code is some of the highest quality code ive seen) being stack based, it may take some effort to get into the mindset though.
[+] [-] intellectronica|16 years ago|reply
I must say (not for the sake of picking a fight, but because this is the answer to a real person's question) that I think this is not good advice. If you get into programming, sooner or later you might want to learn C, but for now it will only make the experience frustrating for you.
[+] [-] nico|16 years ago|reply
Anyway, I think C could be an excellent second language to learn. Starting with something having a similar syntaxis like Javascript could be a good choice and pretty helpful in the future too. Plus, you won't need an IDE, a compiler, setting up a server or a database, only a browser.
[+] [-] Goladus|16 years ago|reply
Also, I only recommend learning C first if you plan to do a serious, thorough study of the language and need it for a low-level project. Get C, A Reference Manual by Harbison and Steele, read the whole thing, and tackle a significant project with that knowledge. You can make progress with a half-assed approach to learning Python. If you try that with C it will be very painful.
[+] [-] joeld42|16 years ago|reply
Don't listen to these scheme/functional wackos. It's great -- and once you've been programming for a few years you should definitely learn it, it will improve your programming and allow you to think more elegantly about problems. But starting with scheme is like tying sandbags to your ankles and then training for the hurdles -- in theory you'll be able to jump like superman when you take the sandbags off in a few years, but realistically it's just going to make a challenging task even harder.
Just my 2c, of course. I started with BASIC, then 6502ASM, them Pascal, then C/C++, then a bit of APL and lisp variants, then Python (which was like a dream), then some more scheme, and now I pretty much stick to Python/C++, with a bit of Javascript on the side.
[+] [-] nopassrecover|16 years ago|reply
[+] [-] joechung|16 years ago|reply
If you want to learn an advanced programming language, try Haskell, ML (F#), or Lisp (Scheme).
C is a good programming language to learn. It can be quite unpleasant to debug C programs though.
[+] [-] troels|16 years ago|reply
Yes, but if you can do that, you can debug anything. Literally - Most high level languages are implemented in C, so debugging them eventually means debugging C code.
[+] [-] bbsabelli|16 years ago|reply
Once you're happy there, a move to Python, PHP, Ruby or Java will be relatively easy.
You don't need to know a language like C unless you plan to work with the elders.
[+] [-] ogdoad|16 years ago|reply
[+] [-] nudded|16 years ago|reply
[+] [-] pclark|16 years ago|reply
[+] [-] CraigBuchek|16 years ago|reply
I think Ruby probably has more advanced topics (especially meta-programming). I'm not sure if that's good or bad for a beginner. It's good in that you can keep learning and use the language for a long time. But it's bad that you won't understand everything for a while. That said, I was able to take advantage of the meta-programming that other people supplied (Ruby on Rails) just fine without understanding it at first. Now that I understand it, I find Ruby to be a very powerful language, while still quite simple to use. To me, it has the perfect balance of simplicity/elegance and power.
[+] [-] pjonesdotca|16 years ago|reply
[+] [-] csbartus|16 years ago|reply
The most simplistic, user-friendly and well suited for all your tasks.
[+] [-] troels|16 years ago|reply
[+] [-] wlievens|16 years ago|reply