To people out here who work as programmers & computer scientists :
I don't have a degree in CS and I have taught myself to code using Java & Python. These are languages which have garbage collections & no explicit references to memory locations(i.e pointers). I chose these languages as I found it much easier to learn & implement algorithms. And because of this, when I attend software developer interviews, I am unable to answer questions about memory leaks, pointers, etc. Even companies which don't use C or C++ seem to enjoy asking these questions.
Have I have handicapped myself by not learning C or C++ ?
I see that for Udacity's CS101, Python is going to be used as the language. Shouldn't a basic programming course be taught using C so that people understand what is going on inside the machine? (and perhaps be able to answer interview questions in the future.)
Which language should be taught in a first CS class is a non-trivial question. For what it's worth the first languages I learned (in order) were Basic. Fortran, Scheme, C, CLU, Pascal, C++. I think Python is a decent choice. I was going to elaborate, but think this link does it better than I would: http://mcsp.wartburg.edu/zelle/python/python-first.html
I don't know if you have handicapped yourself by not learning C/C++, but I would recommend at least learning C. I think it has a major role in the evolution of programming languages and IMHO the K&R book is a model of concise exposition. It also almost defines the "worse is better" school (http://www.jwz.org/doc/worse-is-better.html ) and I think it is valuable to have a sense of both this and "the right thing" school as part of learning to make tradeoffs in software design.
You might be interested in some of the discussions from when MIT switched from 6.001 in Scheme to 6.01 in Python (Google will find more if you like).
First of all, nothing prevents you from learning C or C++ if you wish so.
At the same time a lot of people make a successful and satisfying carrier in software development without ever learning these languages. So don't feel that you must learn them. (But if you decide to learn it, I think you will find it a rewarding experience.)
C or, by extension of your logic, Assembler would be a bad choice for introductory class for couple of reasons:
With C++ it's all of the above, plus, because of its size, complexity and heritage, freshman students will end up scared shitless of it, and unfortunately most likely programming in general.
answered 14 Feb '12, 22:08
I learned how to program using this excellent book : http://www.htdp.org/ .
Though this was not exactly related to you question , but I thought I should share this excellent resource.
answered 15 Feb '12, 01:12
I don't think there is anything wrong with not having a degree and teaching yourself to program. However, there are many benefits with learning other paradigms in programming. Every language has its strengths and weaknesses. And learning the deep down internals of HOW computers operate (i.e. assembler) is very useful and makes you a better programmer.
This topic makes me think of a paper/web page I read by Dr. Novig, "Teach Yourself Programming in Ten Years" (http://norvig.com/21-days.html). Learning to program isn't about syntax. Anyone can google the syntax. In fact, when you learn to code in many different languages, sometimes the syntax walks over each other as you switch from one to another. However, what syntax does not teach you are concepts. And some of those concepts are very important.
Yes, having the language do garbage collection for you makes life nice and easy but there are many times where auto-GC can bite you in the ass. And not knowing why it's doing GC or when can hurt you too. Also, as you've noticed, many questions get asked of GC, pointers, memory leaks, and other topics. This isn't to make you necessarily look bad but instead are probably being asked so that the person understands your breadth of knowledge.
This makes me think of a problem I had at work about 15 or so years ago when I worked for SGI. We had a customer who had an issue with some of their hardware when they upgraded to a newer system. Ultimately it turned out to be a timing issue at the hardware layer between the system and their 3rd party where it was our system's timing being off by mere miliseconds... but still being out of spec. This was only determined by looking at the output of a protocol analyzer.
I only was able to detect this because I knew what the timing specification was and my mind had a glimmer of "what... that doesn't look right." But not knowing the underlying process, I'd never been able to solve the problem. Note that this customer had this issue for a good 6 months by the time engineering (us) had been asked to take a look.
answered 15 Feb '12, 20:23
A good system (and application) language with static/inference typing, garbage-collection, solid co-routine/channel like concurrency, easy and practical syntax, full compilation, near-or-equivalent C performance, many libraries and a large and supportive community is Google's new (2+ years) Go language (http://golang.org). There is excellent documentation, also a number of books and online-learning resources available (the go-tour from the home page). The language has been evolving as a new language does, but has reached a maturity level with a long-term stable "Go 1" release imminent. I believe we'll see many CS courses adopting Go along with Python as the system/dynamic languages of choice. I can certainly personally recommend it as a good and modern alternative to C, C++ and Java. I have adopted Go and Python for all my ML/AI work.
answered 14 Feb '12, 23:49
I think that the programming language is a secondary problem.
I've also taken a look at http://mcsp.wartburg.edu/zelle/python/python-first.html and I don't like the idea of start with an easy language, I believe that people have to learn how to write "perfect" code from the beginning, even if it's hard, because if you code an algorithm in "correct" way, the language you use is irrelevant.
I think that if you really want to learn something about programming the best way is following a book like the one suggest by @chota, the programming language doesn't matter.
answered 15 Feb '12, 06:00
If you already know how to program and are just looking at other languages to fill in concepts, I'd suggest you look at Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages by Bruce A. Tate. I was planning to go through it before I got sucked in to online classes by aiclass. In fact it might be a good basis for a class we run ourselves (AKA AIQUniverSity).
It's not going to make you an expert in any of them but it sounds like fun/another chance to fry your brain with overwork.
Learn a bunch of languages. As a professional programmer, I can tell you these are useful:
Lua is particularly handy when used with C or C++.
Also you should learn assembly, Lisp, and a functional language such as Haskell, even though you may never use them, they will affect you.
Also learn JSON, XML, CSS, and other languages.
answered 15 Feb '12, 23:11
When applying for a job without a degree, the employer doesn't have a strong base to know if you have the background to be a program. And if you only know one language, you probably don't. (You've said you know two languages, I did read your post.) Not knowing the concept of a memory leak or pointer is problematic. A lot of languages have the concept of pointers/references. And you can have a memory leak in Java even where there is garbage collection. Think about static collections.
answered 14 Feb '12, 22:07
I think you should learn langages that use different paradigms. Learn both staticly typed, dynamicly typed languages, the only untyped langage I know of is Assembely, and you should learn that too. Learn functional, and logic programming. I recomend the book Concepts, Techniques, and Models of Computer Programming
answered 15 Feb '12, 06:45