[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

learning programming (was: Re: Fixing arabic related bugs)



Chahibi Youssef wrote:

> What way do you think is the 
> best to learn programming ? I learnt web design with flash and xhtml/css my 
> self without books, only by reading some short tutorials, reading source 
> codes and analysing how web page are made. After that I was able to make my 
> first web site at 14-15 and a second one this summer. Do you think I can 
> learn programming that way ?
> 

Hi,

I wouldn't recommend learning programming purely by looking at examples.
  Programming is probably deeper than you think it is.  Of course you
always want to learn programming by reading and writing programs.  But
there's a great deal of good training material available that can save
you a lot of time and make sure you learn the underlying principles
involved; best to go with that.  The problem is choice:  Which language?
 Which tutorial?  Etc.

The  best thing I ever did to improve my programming skill was learn
Scheme, even though Scheme is almost never used in the business world
and isn't very common even in the open source community.  I strongly
recommend you start by learning it, for several reasons.  The main
reason is, it teaches you to think about the nature or programming
itself, at a high level of abstraction.  The language itself is
exceptionally simple; it takes about 5 minutes to learn the syntax.
(Some people say "Ew!  Too many parentheses!".  Take my word for it,
this is not a big deal if you have a good editor.  After a few hours you
don't even notice the parentheses.)

Maybe the best reason is that programming in Scheme is just plain fun.

Online resources for Scheme are terrific, and many good free
implementations are available.  (See http://www.schemers.org)  It is
widely used as a teaching language because of its simplicity and power.
 There are two great resources in particular.  First is  "Structure and
Interpretation of Computer Programs" (quite famous, known as "SICP",
pronounced "sick-pee", and as "the Wizard book" because of the cover).
When I was learning Scheme this wasn't available online, but now the
full text is available at
http://mitpress.mit.edu/sicp/full-text/book/book.html

It's a terrific text, but a little math-heavy (after all, it originated
at MIT).  Note that it doesn't have any details about how to obtain,
install, and write programs in Scheme.  It assumes you have the basics,
and talks about the nature and art of programming.  A great quote from
the intro:

"Underlying our approach to this subject is our conviction that
``computer science'' is not a science and that its significance has
little to do with computers. The computer revolution is a revolution in
the way we think and in the way we express what we think. The essence of
this change is the emergence of what might best be called procedural
epistemology -- the study of the structure of knowledge from an
imperative point of view, as opposed to the more declarative point of
view taken by classical mathematical subjects."

The second resource is a bit more practical:  another online publication
from MIT press called "How to Design Programs" (http://www.htdp.org/).
It is accompanied by problem sets, etc. - everything you need for a
complete course in program design.  It is designed to work with a very
nice Scheme implementation (by the same authors) called DrScheme
(http://www.drscheme.org/), which is also designed specifically to teach
programming.

You might want to have a look at http://www.teach-scheme.org/Overview/,
which talks about about the TeachScheme! Project:  "The TeachScheme!
Project wants to turn Computing and Programming into an indispensable
part of the liberal arts curriculum. Computing and Programming teach
skills just as fundamental as, and closely related to, essay writing in
English and problem solving in mathematics. Students who learn to design
programs properly learn to analyze a problem statement; express its
essence, abstractly and with examples; formulate statements and comments
in a precise language; evaluate and revise these activities in light of
checks and tests; and pay attention to details. This benefits all
students, not just those who wish to study computing. For students who
want to pursue other disciplines, this curriculum shows how they can use
computing to model the phenomena they will encounter elsewhere."

(Personally I think that's a pretty cool idea, but not widely
recognized, which is why I bring it up.)

Everything you learn about programming while learning Scheme - which is
pretty much everything there is to know about programming - will be
directly applicable to all other programming languages.  Once you start
learning a second language, you will realize that you already have all
the conceptual knowledge you need, and it is just a matter of learning
some new syntax.  Python, Ruby (my pick for Next Big Language), Java,
you name it - if you've mastered Scheme you will be able to pick of any
of them in a day or two.  That probably will not be the case if you
start with one of those other languages - you may learn the language,
but you may or may not learn the  general principals that apply across
languages.

Finally, I recommend you follow Scheme with... Assembly language!  Yes,
I'm serious!  Why?  Well, for one thing it's fun to do a little assembly
programming.  You wouldn't want to do it for big projects (usually), but
some of the techniques used in assembly are quite clever.  And it's
quite satisfying to know that you know *exactly* what the machine is
doing when it runs your code.  Also, all those high level languages
ultimately get translated into assembly language, so there is a basic
unity involved.  Most importantly, if you plan to help with Arabic
support in software, you will certainly do programmming in C at some
point, and knowledge of assembly language is *very* helpful for C
programmers.  It's not uncommon for C to be used almost as a kind of
fancy assembly language.  And, in the end, let's face it:  assembly
programming separates the men from the boys.  ;)

Actually there's a pretty good practical reason to learn assembly for
Arabic support.  Consider the kinds of processing required: a bidi
algorithm, morphlogical analysis, arabic-sensitive search, etc.
Judicious use of assembly code can lead to significant performance
increases for stuff like that.

Unfortunately I have no idea where the best online resources are.  I
have used NASM (http://nasm.sourceforge.net/wakka.php?wakka=HomePage)
and it's pretty good.  If you google "Assembly language" you'll find a
surprisingly large number of resources.  "The Art of Assembly Language
Programming" (http://webster.cs.ucr.edu/) looks like a promising site.

One last thing.  Plan to spend quite a lot of time mastering a
programmer's editor.  Pick one that is available on all platforms and
master it.  I prefer emacs; others prefer vi (or vim or another vi
flavor).  You can't go wrong with either one, but both take a fairly
long time to learn to use well.  However, in the end you'll be very glad
you put in the time.

Sorry to go on so long.  I hope something in there is helpful.  And
don't hesitate to post questions to Arabeyes if you ever need help with
a programming problem.

-gregg