
How should I get started with programming? Which language should I learn first? - barredo
http://www.marco.org/3061580301
======
SoftwareMaven
I completely agree that the most important thing is to have a concrete
objective that you _really_ want to achieve that you are moving towards.

However, I disagree that every language is equally hard. There are three
challenges in learning programming: syntax, logic, and resource management.
Those can be optimized for beginners:

Syntax: A syntax that is more natural and less symbolic will be easier to
learn. There is a lot to be said about brevity for experienced programmers.
For new programmers, it is completely wrong.

Logic: While certain, highly mathematically-inclined people may be different,
most people understand the concepts involved with imperative programming (I do
this, then this, then this; if I do this thing a lot, I can abstract its
concept; etc.). Functional programming, "pure" object oriented programming,
etc., are concepts that add impedance.

Resource Management: Whether memory, pixels on the screen, or bytes to a
network connection, you've got to interact with the hardware at some point.
Different languages approach this in very different ways, from manage
everything directly to nearly complete abstraction.

Trying to learn all three at once for any but the most highly motivated is a
recipe for frustration and, ultimately, failure.

~~~
sliverstorm
On the flip side, it really makes little sense to learn a language that is
useless for what you want to do. If what you really want to do is program a
microcontroller, it is my opinion that PHP or Python would be a very poor
choice in first languages.

~~~
jefe78
I agree that programming a micro-controller would make python a poor choice.
That aside, I think its a great language.

I don't use it for months at a time. I proceed to forget everything. Shortly
after, a need arises so I pick it back up. A week later, I'm a pro again.

The error output is what make it so amazing.

~~~
tastybites
That is also why I prefer Python - I'm not a computer scientist, I am a
business owner who uses programming as a tool to achieve my goals. Sometimes
it's 2 weeks or more between writing code and Python is by far the best
language that fits into my workflow.

------
orangewarp
It really depends on your goals and background I would say. At my school
(education school) the point isn't to create students who can compete with
computer science majors next door. Rather, we focus on getting students to 1)
be able to understand the basics in order to communicate with more experienced
developers and 2) quickly be able to create interactive visual programs for
pilot research and the classroom. For us, the purpose is split between
programming theory and folding in their learning and instructional theory into
design. I used to teach Java which is great for focusing on OO concepts but
the end products that students were able to create didn't necessarily match
their visions. This discouraged a lot of students and turned them away from
code. So sad!

Currently, we use Flash with a focus on OOP with ActionScript 3 (not timeline
based loose junk). The advantage of this is that they can easily create rich
assets in a simple and familiar environment to make the code part more genuine
and purposeful for them. I've found that if you teach it this way they are
very motivated to learn the programming concepts to realize their visions
which are usually heavily tied to the visual and surface levels of a project.
Gotta admit things you directly see are pretty sexy to many people. Once this
"wow" moment is satisfied, it's much easier to point them in directions that
go back to the programming theory to improve the depth of their work.

If you have a purpose and drive to want to accomplish something concrete
you'll stick with the ups and downs so a programming language that supports
that goal I think, is an appropriate language. It works well for us, the class
is immensely popular and many of my students are very curious now of other
languages like JavaScript, objective C, etc. The concepts transfer well too
and some have even transitioned toward development. You can always learn new
languages later although one commenter poses a good question of how one's
starting language influences thinking. Don't have an answer for that one. But,
my take is just try to get a good foundation with a language that supports
what you want to do.

NOTE: I learned to program myself, and sought out specific programmers I
admired to teach me so I don't have the experience of what a typical compsci
program and curriculum is like. You might seek those opinions too. I would
consider myself pretty darn good at understanding education and learning
matters though so if you want any pointers, advice, or questions I'd be more
than happy to discuss on this thread. I'm excited that you want to dive into
programming. :-)

------
stanmancan
I made the mistake of learning Visual Basic 6 first. That's like starting a
race in last place.

~~~
terinjokes
While I feel your pain (and cringe on your behalf), I will say that many
winners of NASCAR races started in last place.

~~~
nightshowerer
I shudder to think of all programming languages being involved in an elaborate
NASCAR race.

~~~
dhs
If programming languages were cars...
<http://www.cs.caltech.edu/~mvanier/hacking/rants/cars.html>

------
macco
To make it easier for a newbie: Choose Python if you want to learn programming
for yourself - lean, lots of bindings for C-Frameworks, not much surprises and
a big community.

~~~
sliverstorm
(Presuming you want to learn programming _for it's own sake_ , rather than
work towards some specific goal that requires code)

~~~
macco
Absolutely true. If you have a certain task to do (programming a wordpress
plugin, etc.) - the programming language chooses itself :) If you don't know
yet, Python would be my best bet.

------
eduardosasso
Probably some people would kill me for that answer but i would say you should
learn PHP.

PHP is simple, good documentation and great community. Facebook is built on
top of PHP so as Drupal and Wordpress.

But the main point about my recommendation is that PHP is installed
everywhere, you don't have to spend much time configuring and doing sysadmin
stuff to make it work.

~~~
jefe78
So is Python!

I don't feel that a newbie should be learning a web language as his first. It
just seems like an unintuitive learning process to me.

~~~
danneu
Ruby/Python don't have that same "click and drag into FTP client then load up
in browser" ease, though.

I'd definitely recommend PHP to anyone who wants to jump into web development.

------
flexd
My first language was QBasic i think, been through VB since then but i can't
remember anything. I then began learning C/C++ which i still understand to
this day but i keep a book close. Since then mostly Python and Ruby but really
only Ruby since 2007 or so. I feel i have good understanding of code now at
22, still without CS education. I helped my friend with Java problems his
second year in CS without having used Java past hello world, i know there are
holes in my knowledge based on lack of experience but i feel i can read most
languages without much trouble now. I think the main objective of learning to
code should be to learn how to think as a programmer, learn how to understand
code and really most importantly learn how to search the web.

Once you can master understanding programming syntax regardless of language,
how to write good code and how to solve problems then you are well on your way
to becoming a good developer.

------
pennyfiller
I started wit Python. Still learning..

------
bpeters
Could always do it the academic way.... C, then C++, then Java, back to C++,
back to Java. Once you graduated you will have learned no language mastery,
just how to to think like a programmer... If that is what you want

~~~
2arrs2ells
Is this really the standard "academic way"?

At my school, CS classes started in C, did a touch of PHP/JS, then a
functional language (was scheme, now OCaml), and then a giant hodgepodge of
whatever you/the professor wanted.

~~~
wlievens
We started with Scheme, then in the second year C++ and some Common Lisp.
Later Smalltalk. You learned Java on your own, which is near trivial if you
know C++ and Scheme.

------
wlievens
Classic question, classic answer. Buy SICP and learn Scheme. You probably will
never build any "production" software with it, but you will learn a solid base
for the rest of your carreer.

------
sayemm
Zed Shaw's "Learn Python the Hard Way" is a great way to start and test the
waters - <http://learnpythonthehardway.org>

------
buckwild
Although I never learned Java, I would point you to that language. I would
also suggest C# or Objective-C. Really anything with a gui or IDE will work
just fine for beginners. Contrary to most folks, I view being able to write
efficient and fast scripts with python in a plan-text editor quickly, as much
more advanced than using something like microsoft visual studio to help code.
Of course, I code this way so I have my biases :-D

------
dougk7
I started with Delphi in High school but moved to Python. In retrospect,
starting with Delphi was a good thing, but using it for more than a year was a
very bad thing! Now I'm into PHP, Java, C++ and other weird languages in
addition to Python which is still my favorite

------
TimJYoung
If one is just dipping one's toes in the programming waters, then Delphi is a
good start for native Windows development. It allows one to see positive
results very quickly, which is important for beginners.

------
danielparks
I'm really curious about how the first language you learn influences your way
of thinking about programming. I suspect that over the long term, it doesn't
matter, but I wonder if it might make a big difference in the first few years.

For example, I started with BASIC, and then moved to C. Thinking in loops was
really hard for me at first (as opposed to using goto).

What would be like if your first language was a Lisp?

Less seriously, what about Unlambda? Or Brainfuck?

~~~
Zaak

       (1) DO INTERCAL
           DO FORGET #1
           PLEASE GIVE UP

------
scythe
I'm going to break the rules here and answer _two_ languages.

First, you should learn one of the easy dynamic languages. This means Perl,
PHP, Python, Ruby, Lua, Clojure. I think Ruby is a good choice because it has
a lot of cool concepts built in to the core language that the others lack, and
so it can be a foundation for learning many different styles of programming --
it does this, in my opinion, better than Python, and has a nicer syntax than
Perl. _why's poignant guide to ruby is a bit outdated but still a pretty
awesome and cool introduction.

<http://mislav.uniqpath.com/poignant-guide/>

Second, and this might come as a shock, some form of basic assembler. I
recommend LC-3 assembler. And the main reason here is that a decent
understanding of the memory model is going to help you a _lot_ when it comes
to dealing with pointers, complex data structures, or anything, really. You'll
probably never write a program longer than 100 lines in LC-3, but the short
things you do write will give you a deeper understanding of your code
everywhere else.

<http://en.wikipedia.org/wiki/LC-3>

[http://highered.mcgraw-
hill.com/sites/0072467509/student_vie...](http://highered.mcgraw-
hill.com/sites/0072467509/student_view0/lc-3_simulator.html)

There may actually be a newer "learning assembler"-styled language out there,
but I am not aware of it. LC-3 is showing its age, but it was great when I
learned to program, and I learned as much programming for three months in LC-3
as two years prior in Java.

That said, you should definitely familiarize yourself with control structures
prior to jumping into assembler or you could break your brain.

~~~
SoftwareMaven
Learning some assembly should be required for anybody who wants to make a
career writing software and is very valuable for hobbyists. I don't know that
I would start there, but at some point along the way, understanding what that
nice, high level language is really doing down at the metal makes for much
better engineers.

