Re: [vox] [OT] Learning to program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox] [OT] Learning to program
Tim Riley writes:
>
>
> Micah Cowan wrote:
>
> > <snip>
>
> > 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.
>
> In my opinion, learning to write quality code is the most important skill
> a programmer could develop. It is healthy to assume that the human readers of
> your code are busy and need to understand it quickly.
> To learn to write quality code, it's helpful to take a good software engineering
> and data structures course at a CS school.
Yeah, that's why it sucks that I somehow completely forgot to mention
it.
Aside from readibility, a rule of thumb I *try* to follow that governs
most of what I do and produces maintainable code is: use data
structures over "code" whenever possible.
For instance, rather than writing a function which can validate the
correctness of a URI, you can invent a data structure which can describe
lexical constraints for any string of characters you should care to
describe, and a set of functions which can interpret those structures
and use them to evaluate strings. Oh, hey, that's what regexes are :)
Sometimes generalizing everything this way isn't worth the work
necessary. But, my idea of the perfect program would be lots and lots
of data structures, and barely enough code to interpret them. :)
As far as taking good software engineering and data structures classes
at a CS school: Pete and I have both stated we've barely taken any
classes at all, so do you think I'm likely to recommend it? ;) IMO,
you can learn anything offered in a class from a good book, and even
better from excellent examples to study.
In this vein, MIT's OpenCourseWare is due to be made freely available
to the public in September (http://web.mit.edu/ocw/); they'll be
supplying the core teaching materials from their classes - you'll be
able to get exactly the same education as a student at MIT (but no
degree credit, naturally).
-Micah
_______________________________________________
vox mailing list
vox@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox
|