Programming

Once you have your Linux box running, stable, and with all the basic applications you use daily, what next? Let me make a suggestion: programming.

It doesn't have to be difficult, trust me. I think many of you will find programming to be one of the most enojoyable and satisfying activities you can do with your Linux box.

Linux is made for programming, by programmers. The Bash shell (and other shells) are first and foremost, programmable. Read about the BASH shell. Read about shell programming. But then turn to an open source language, inspired by Unix shell programming, but, oh, so much more easy and powerful. I am referring of course, to Python.

Python comes pre-installed on almost all Linux, BSD, and other UNIX systems. It's there, comfortable and cozy, just like Basic was on the first DOS machines. Remember Basic? On the earliest PC's, Basic was actually one of the more useful programs available. Well, Python is easier than Basic, but infintely more powerful at the same time. It can do all that Basic can do and much, much more.

Python can also do all that shell programming languages can, but much more. You can also incorporate shell commands right into your Python code, to exploit every available feature of your Linux system. Python works great on Windows, too, but it is taylor-made and pre-installed on Linux.

OK, this is a little self serving, but you can find just about anythng and everything you may need to start learning and using Python, right here on this web site. You might start (*after* you finish reading this article ;-))) by going to Python City ./plf. and from there you can click to a list of 25 or so easy-to-use online tutorials ./tutorials. or to 25 or so Python book reviews ./book. or even to see a daily updated list of the latest web articles and Sourceforge projects related to Python ./output. (created and updated daily by an open source web spider written in Python, of course).

Or, you could even check out my own Sourceforge project page at http://sourceforge.net/projects/decision/ or also read more about it at ./python.

The Sourceforge project is about my little program Decision Analysis, and it is an ultra-easy project just perfect for newbies to cut their teeth on. You too can contribute actual working code to a real open source project! The code available for downloading is decide.py, a much updated (improved?) version of my very simple (yet functional, as in working, code) program which some folks on comp.lang.python helped me with a year ago, when I was a total newbie to Python. This decide.py file should run on any computer with Python installed, including any version on Windows or Linux.

The idea is this: newbies can use decide.py, and the Decision Analysis Sourceforge project, to learn new programming skills, and practice the Python techniques learned from books and tutorials. No one is too new, or too clueless, to contribute.

The ideas behind decide.py are very simple, and the code is well documented, if (certainly) not elegant. But there is much that can be added, and I am betting that almost any newbie can find ideas in their own head to add to decide.py, without hurting their nogin too much . ;-))

The general version of decide.py is a generalized decision maker. The same code can be easily altered to create new modules, of a specific nature, in any areas in which the individual coder is an "expert" Hey, we're all expert in somethings! For instance, one of the areas in which I claim vast expertise, and therefore I created a module for, is deciding where to go and what to eat for lunch on any given day. Others may be experts in nuclear physcis or world peace, and decide.py can just as easily be extended to incorporate their expertise as well!

Beyond adding new modules of exxpertise, which probably represent the easiest additions coders can make to decide.py, there are many other areas for coding, a short list of which follows:

1. Decision Analysis needs a GUI, any GUI. This will be relatively straight-forward, with one big caveat: one must be able to program GUI's in *some* (read *any*) Python GUI toolkit. How about a PythonCard version, a Tkinter version, a Java Swing vesion, a wxPython version...let a thousand flowers bloom...

2. The simple underlyng logic behind decide.py needs to be extended. Any one with a even a modicum of statistical knwoledge (as in more than me ;-))) should be able to come up with more interesting algorithms to use to supplement (or replace!) decide.py's current logic.

3. PDA's. ...I think that decide.py's kind of fun, easy, and lightweight programs are prefect for use on PDA's. I already have decide.py working perfectly well on my Sharp Zaurus, which is cool. But a version taylored just for a given PDA, with a lightweight GUI taylor-made for the PDA, with sliders say for data entry, would be really fun.

4. I have non-working code that uses simple semantic analysis of random questions to identify type of question and keywords involved, , and then uses the WWW and Google to do simple statistical anaysis to "answer" random questions. Could be a part of a new decide.py logic module someday, but the algorithm needs a lot of work. I will be uploading this code to the Sourceforge site, as soon as I get it into reasonable shape.(The existing code can be found on my web site, just look for askMerlin.py)

Remember, you can find all the files mentioned for dowloading at ./python.

Happy Linux programming!