l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2002 Aug 26 10:18

The following is an archive of a post made to our 'vox mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox] [OT] Learning to program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox] [OT] Learning to program

Matthew Johnson writes:

 > > Learning a programming language and learning to program are very
 > > different things - many people who know a language (or even three)
 > > don't know very much about programming. A good text, such as
 > > Sedgewick's "Algorithms in C", is necessary for learning to program
 > > (unfortunately, that book, as well as many others, assumes already
 > > that you know a particular language). Many of the best books on
 > > programming presuppose knowledge of a language, so that may be where
 > > you should begin.
 > >
 > Algorithms? How important is math to programming? Actually...Can you learn 
 > good math whilst programming?

What has algorithms got to do with math? Math might be used in an
algorithm, but exactly how can you program anything without an
algorithm? It's not possible.

Strong understanding of basic computer science problems which have
been thoroughly solved and which come up often in everyday
circumstances is very important for helping you to keep a very
important rule for all programmers: always avoid reinventing the

But to answer your question - good math is tremendously helpful to
programming. And yes, it is possible to learn some math whilst
programming; but generally, learning math tends to add tools to your
programmer's belt, whereas I haven't frequently found that programming
adds tools to your mathematician's belt that much...

 > Learning C...Rings a bell, not a book I have (course I took was C and C++). I 
 > do have learning Perl though, but will investigate learning C (waiting for 
 > Nerdbooks to say soemthing :)).

Perl is a great programming language, but it's very high level - all
of the decisions you'd make in choosing algorithms for sorting,
searching, and what not are already made for you for the most part, so
you are less likely to learn about good programming in general, than
to learn good *Perl* programming.

 > At what point will you have strong C? Is it easier to get better by hacking 
 > someone elses code and then compiling it to see what affect your changes 
 > have?

Experimentation can be helpful; it can also be dangerous -
experimentation can lead you to conclusions which may be true for
*most* C implementations, but not for all. Or, even if true for all,
it may not be guaranteed for future implementations of C. A thorough
"theoretical" knowledge of C (from books) is necessary to avoid that.

Of course, purely theoretical knowledge needs its balance of practical
experience, too - there is always a balance.

In general, I've found the majority of Free Software/Open Source
Projects to be lacking in source code quality, so while it can be a
good learning tool, it should not be your chief tool.


Another thing that I meant to mention, but completely forgot to: It's
very important to learn how to write quality code; code that's
easy-to-read, easy-to-maintain when major *or* minor changes come
along, and easy-to-port to other platforms or software projects. For
this, studying Free Software can be very helpful; but as I said, a lot
of it is cruft. Many of the very large projects have decent code, and
nearly all of them have *something* to be learned; the trouble is
figuring out which stuff is good and which is bad. Try to imagine how
easily the code you're viewing could be adapted to another similar
scenario. But really, comp.lang.c makes a great resource for learning this
as well.

Also, knowing something about clearly defining your projects in the
requirements and design phases are important. This isn't something you
can learn from studying source code - you need to get involved in an
actual software project, where the developers employ such
techniques. Many projects don't - the big ones usually do, since they
quickly become muck if they don't.

vox mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.