Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] I have a basic question about programming

Expand Messages
  • Steven Gordon
    My experience as a former assistant professor of and current practitioner of both OO programming and AI programming is that: - recursion is essential to AI
    Message 1 of 30 , Nov 30, 2007
    • 0 Attachment
      My experience as a former assistant professor of and current
      practitioner of both OO programming and AI programming is that:
      - recursion is essential to AI programming no matter what language you
      are using, and
      - most people who do a lot of programming before learning recursion
      have difficulty mastering recursion later.


      On Nov 30, 2007 12:15 PM, Sean McMillan <reaper@...> wrote:
      > David Christopher La Pierre wrote:
      > > Okay, I am really having difficulty introducing myself to
      > > programming, and I was hoping some people here would be able to help.
      > > [snip]
      > > So... If anyone could explain to me how you actually program things,
      > > and then what I would need for the things I described, I would be
      > > very grateful!
      > >
      > Hi David,
      > That's always a hard question to answer. Most professional
      > programmers today learned to program using tools that aren't even
      > available anymore, and they weren't that good to begin with. So
      > suggestions can really only be about what we think would be good to
      > learn with, not what really is.
      > You said you know some HTML/CSS, so it might be good for you to
      > start with some form of CGI programming. (That's a program that runs on
      > a web server and generates the web page when it's requested.) If you
      > have someone nearby who can answer your questions, it's probably best to
      > start with what they know, because hands-on help will be the most
      > valuable kind.
      > It may be a while of doing simple things before you can do a
      > functional AI. Unfortunately, I don't think it's possible to teach how
      > to program at the same time that you teach how to program well, any more
      > than you would teach people how to write at the same time as you teach
      > how to write a novel. Expect your first hundred-or-so program to be bad.
      > When I learned, there was an explanation of programming that really
      > helped me to understand what I was doing: There are four constructs in a
      > program --
      > Linear: A, followed by B.
      > Conditional: if A then B
      > Looping: while A, repeat B over and over
      > Subroutine: You can name a piece of your program to allow you to
      > re-use it at multiple points (perhaps recursively, perhaps with
      > different parameters.)
      > All[0] programming languages are built on top of these constructs,
      > and you can build any program you want by applying them in the
      > appropriate fashion. Modern features like object orientation can be
      > considered higher-level uses of these four basic features.
      > Once you know how to build a program using those four features,
      > you'll discover that making changes can be very hard. Object Orientation
      > and Design Patterns will help you make a program that is easier to
      > change. Test Driven Development will help you to build OO/Patterned
      > programs without overdoing it. Refactoring will let you shift the
      > structure of your software when needs change, without having to throw it
      > away. XP will help you to do that in a project-focused environment with
      > more predictable time tables.
      > That's like a 10 year roadmap.
      > Oh, yeah. Look on sf.net for projects that interest you and read
      > their code. Try to figure out if it's good or not. Download the code for
      > a project that interests you and try to make a change you would like to
      > see. Nothing like hands-on coding to help you learn how.
      > I like python for a nice environment to write code in. It has an
      > interactive shell you can try things out in, and it's got lots of useful
      > libraries to use. There was some talk from the community about "Computer
      > programming for everybody," so there may be some useful "ground zero"
      > tutorials.
      > --Sean
      > [0] Attention Pedants: I know that there are other sets of basic
      > constructs that you can build a program out of. The most common and used
      > programming languages use the ones mentioned above. I know that
      > smalltalk and some lisps don't.
    Your message has been successfully submitted and would be delivered to recipients shortly.