View Single Post
  #4   (View Single Post)  
Old 6th February 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

I would have to second the Perl / Python bit; they are both excellent languages for dealing with the Internet and processing data. Perl is arguably one of the most expressive languages ever made (if there is anything more expressive for general programming, it would probably have to be ASM or LISP). Python can often be used to produce maintainable code that also gets the job done painlessly, although the maintainability part depends on the monkey.


Perl is however a huge language syntactically, and Python has many standard modules to choose from. Java is a very simple language to learn IMHO, but like virtually every major language -- it pays to have a "stdlib" reference on hand. With C, the UNIX manual pages serve the purpose well enough (and a few Richard Stevens books won't hurt). Python & Perl provides pydoc and perldoc respective, both with great online docs. Java is also documented online -- use the parts you need, don't worry about memorizing java.foo.bar;

C is a very small language, and I know of nothing smaller... unless you want to start comparing some instruction sets & assemblers with it.


If you want to study AI, rather then just explore on your own; you'll probably need to learn some Lisp sooner or later. A good way to pick up a little lisp would be to grab a copy of the Scheme standard and SICP.



C often boils down to write your own or find code written by someone else; there are many great libraries (and many not so great ones) for most common tasks. The C-Strings for example, very simple and very useful, complete with many common functions0; but they are also a pain in the ass occasionally. C++'s std::string, Javas String, and Pythons str can often be more expedient -- in Perl, look for regular expressions.


Every language is like that, just pick what batteries you need and learn them.




Quote:
Originally Posted by idefix View Post
[in Java] Just simply testing 2 objects for equality, forces you to write an error-prone equals method.
Input and output is organized in a tremendous amount of classes: Digest Outputstream, Deflater OutputStream, Checked OutputStream, Buffered OutputStream,....

What's your opinion about this? Is C suited for AI-programming? Is Java better?
Although I've never read his paper, I'll essentially quote Fred Brooks: there is no silver bullet, and add to it: use what works, and what works for you.


Some love C, some love QBASIC, whatever works ;-).
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote