Live in southern Ontario? Attending dinner meetings is free.
PegaSoft's June Dinner Meeting
Date: June 16, 2005 at 7:00 pm
Location: The Office Bar and Grill
Attendance
Ken B, Mel W, William P, Chris A J, Equbay K, Jim M
Mike H was going to bring his son but couldn't make it.
Meeting BusinessAnnual Membership Renewals
PegaSoft memberships are $45.00 per year. Although you don't need to be a
member in order to join the mailing lists or attend our monthly dinner
meetings, membership entitles you to discounts on PegaSoft events and the
opportunity to participate in PegaSoft projects and teach in our workshops.
Membership also allows you to attend our annual PegaSoft Summer Retreat.
Members must sign the PegaSoft Employee Conduct Policy/NDA.
Deferred.
Summer Programming Challenge
2005 challenge: create an application that listens to sound, either through the
microphone jack or from a file, and interprets the sound in some way. For
example, drawing patterns in response to sounds. The project is due at the
PegaSoft Summer Retreat.
PegaSoft Summer Retreat
Each year PegaSoft holds a 3-day geek retreat at Ken's parent's house near
North Bay, Ontario. Activities include one day of Linux hacking plus a BBQ,
the annual river boat cruise and all-you-can-eat brunch. This year the
retreat is scheduled for August 26-29, 2005.
New Meeting Location
Orwell's pub was too noisy and had poor seating. The location for this month
was The Office Bar & Grill. The location was further from the subway,
and the menu was limited, but the service, noise and seating were better.
William P. requested a location with a restaurant menu.
Open Forum - Linux in the News
[Opinions are those of the participants.]
Fedora Core 4 Released [Slashdot]
The Fedora series suffers from limited testing. Ken tried FC4 and found
several important software packages missing from the distribution. For
example, the XMMS Winamp-style music player was missing and only a GNOME-based
player was included. Red Hat has begun a "Fedora Extras" download site at
fedoraproject.org containing additional software.
XMMS is not included on the DVD but is available at Fedora Extras.
Unlike most Linux distributions, Red Hat continues to release XMMS crippled.
FC3 had a Red Hat update to install the missing functionality but FC4 has no
update to repair it. It was pointed out that converting a music collection to
a different format compatible with Red Hat's XMMS was not worth the trouble.
XMMS would not compile from sources "out of the box" for FC4 but someone like
FreshRPMs would likely release an updated version within the next few weeks.
Ken tried FC4 because FC3 lacked Ada language support in its AMD x86_64
version. A bug in Red Hat's updater destroyed Ada support and a patch was
released for Red Hat Enterprise but no patch was released for the unsupported
Fedora.
FC4 also features the new GCC 4.0 with enhanced object code optimization.
Chris A J tried Ubuntu Linux.
BitTorrent Drops Need for Trackers to Monitor Downloads to Make File
Sharing "Easy and Disruptively Cheap" [ZDNet]
BitTorrent file sharing software uses a central site running "tracker" software
to improve download speed and monitor statistics. The tracker is optional and
BitTorrent can run with no tracker, subject to a performance penalty. The
author of BitTorrent has removed trackers completely from his latest design.
Trackers are the main way law officials track down torrent sites coordinating
illegal software downloads. The concern was that this would put additional
pressure on passing laws for Internet Service Providers, making them
responsible for their clients. Since the ISP's have little control over what
their clients are doing, this will likely mean more limitations to Internet
service at the expense of innocent clients looking to do legitimate work.
Stories were related to cable Internet companies issuing email warnings over
justified open network ports. For example, running a small web site showing
family photos or demoing a web site. Another case was related where a person
with encryption software on their computer was judged to be guilty of a crime
with no other proof. Encryption software is a standard part of most Linux
distributions and cases of ISP's stealing email addresses and other
confidential information show the need for encrypted communications to combat
theft.
Novell Launches New Microsoft Anti-Trust Case over WordPerfect and Quatro
Pro (4 other claims were thrown out as being too late.) [CNet]
Novell filed the new anti-trust case within days of settling with Microsoft
on the previous case. This raised questions of Novell's ethics and integrity.
The situation with SCO (a.k.a. Caldera Linux) suing their former partners and
customers was raised. There was no news on SCO.
VMWare Holds Free Workstation Software Giveaway [TLUG mailing list]
Ken B, Mike H and Robert B attended the VMWare seminar. VMWare was attempting
to justify large-scale use of virtual systems hosted on single computers,
primarily for (1) virtual computers images of systems in a large corporation
for testing purposes and (2) using virtual computers to consolidate old Windows
servers onto a single new server where the speed-loss of emulation was
unimportant. An IT manager from Hudson's Bay Company claimed to move dozens
of old, small servers onto 6 new servers running VMWare. The enterprise
version of VMware allowed roll out of images and scripting. The presentation
was boring, jargon-cluttered and had exaggerated claims. It was felt that
VMware might be good for understaffed IT departments looking to consolidate
legacy servers that they can no longer maintain, but was not a long-term
solution.
For the typical Linux developer, the only value of VMWare was to run Internet
Explorer without having to have a dual-boot system...and only then because the
current version of WINE, the free Windows emulator, is unstable and practically
unusable on recent Linux distributions.
Does Open Source Development Make Innovation More Difficult [PegaSoft mailing list]
During the previous month, Ken posted a article for discussion on the mailing
list and mentioning in passing that open source may make innovation more
difficult. There was a large response so Ken brought it up for discussion at
the meeting.
In university, Ken was told that when Digital Equipment Corporation (now part
of HP) created their VMS operating system, they sent two developers to the
Caribbean and were told to return in one year with a working operating system.
They did. During the 1980s when a version of AppleWorks (an office suite for
Apple IIe/c/gs computers) was released, it was built by less than 10 people
and was released on budget and on time. The same month, a new version of
Lotus 1-2-3 was released with over budget, a year past deadline, and with
dozens of developers. The point of the story was that small teams, especially
5 people or less, are more organized, more efficient, better able to work
toward common goals.
Most open source projects are thrown open to hundreds of developers on the
Internet, often with no design plan or end goal. Ken gave the example of a
music player. If someone starts a music player project, the project will
likely end up looking like WinAmp, the most popular music player, because most
contributing developers would be familiar with the dominant software. Features
like skins, play lists or plug-ins do no need to be stated because most
developers would automatically assume the music player would have them and
would write their source code accordingly.
To create an innovative project--a project that is entirely unlike anything
any of the contributing developers would have seen--means there is no
dominant software to compare to. Like the "blind leading the blind", 10
contributors might have 10 competing or conflicting goals. As Chris Crawford
said in his book "On Game Design", a game that tries to be a strategy game
and a first-person shooter will likely fail at both. Such a project also loses
interest and momentum quickly since nobody is sure what they are building, what
it will look like, or when it can be considered complete.
So open source lends itself best to copying, improving or debugging, but is not
as good in developing unique, original or hard-to-articulate projects.
Equbay K argued that distributed development with open licenses was an
evolutionary process. The role of the project coordinator is announce the
status of different portions of the project, or cut off conflicting or un-
promising lines of development in an emergency, but not to steer or guide the
development to any preconceived end goal. Good software will arise as the
bad features starve for lack of development. [KB-this raises the question of
how the coordinator can tell which development line is bad in the long term].
Equbay K added that when two sets of developers were unable to agree on the
best solution, whether the other team's work was a "bug" or a "feature", that
forking occurs and it's up to the project coordinator to deal with this.
The evolutionary approach assumes that development in the project responds to
needs. If a feature is needed, people will contribute source code to make it
happen. Ken said this had never happened in any of his open source projects.
How do people know they need a new feature unless they saw it in a similar
project? Python was originally a language with a unique design. Contributors
added features from other languages until Python became known as a
"P-language" (one of Python, Perl and PHP). Python lost its distinctive vision
because the needs were not implemented to the design. The Ada language has
objects, but they are implemented in an Ada-eque way and look nothing like
objects in other languages. Ada maintained its unique design mindset which
makes it a true alternative. The P-languages are variations of one another:
none of them offer significant advantages over each other.
Mel W asked if any open source project should be undertaken before reading a
book like "Design Patterns". Wouldn't open source be more efficient if,
instead of complete chaos, that participants should be required to understand
project design? There should be some basic ground rules for the project to
avoid forking over trivial issues. This would not interfere with feature
development and would channel the developers towards productive alternatives.
[KB-from http://www.objectmentor.com/writeUps/DesignPatterns: Design Patterns
started their rise to popularity when the book, "Design Patterns - Elements
of Reusable Object-Oriented Software," by Erich Gamma, Richard Helm, Ralph
Johnson, and John Vlissides, was published in 1995. The book won such
widespread acceptance by the software engineering community that the four
authors quickly became known as the Gang Of Four, and GoF (Gang of Four)
became a new TLA (Three Letter Acronym).]
Equbay K asked if porting open source projects to Microsoft Windows was a waste
of energy because that time could have been invested more productively in
creating new, useful features. William P said it was a matter of marketing:
few people would install Linux just to look at a single open source
application but they might install a Windows version to try it. The Apache
web server wouldn't be as popular as it is today if it couldn't be run on
Windows. (William also pointed out the problem of Linux and fonts: until the
most recent version of GTK, he couldn't use both English and Korean
simultaneously.)
Ken once said that Ada was the ultimate open source language because the
overall project can be designed and tested with GCC using package specification
files before any of the working code is created. This teamwork oriented
approach assumes an end goal. It was not clear if Ada was too restrictive for
an evolutionary process where the project cannot be specified beforehand where
the goals and features are not known. Ada does provide child packages to
extend capabilities...was this enough? Could Ada allow and support competing
specifications without being too restrictive on the design?
PegaSoft Member ProjectsBusiness Shell (BUSH) (Ken B)
BUSH has been updated for GCC 4.0 (Fedora Core 4) and Fedora/x86_64. Ken is
preparing for an interim release. The graphics library is not yet complete.
http://www.pegasoft.ca/bush.htmlBashDiff (William P)
William is looking at adding support for building GUI dialogs but is having
difficulty finding a widget toolkit written entirely in C. He does not want
to add C++ source code to Bash just for GUI support.
http://home.eol.ca/~parkw/index.html#bashPegaSoft Third Call for Projects
Mel W and William P wanted PegaSoft to initiate a project for its developers.
William P and Ken B were willing to give up their personal projects to work on
a joint project.
A number of projects were suggested including software for the hearing
impaired and software for doctors.
Ken said he would love to work on a video game, although he knew that such a
project would be impractical. Ken B jokingly said that if people paid money
for World of Warcraft...where half of your time is spent unable to do anything
as a ghost...perhaps people would pay for a game where you could do nothing at
all.
Chris A J suggested a game based on ideas from Piers Anthony's Photon/
Phase series. Ken mentioned Hover Bovver for the Commodore 64 as a rare
example of unique game design.
There was not enough time to decide on how to proceed.
Discussion: Introduction to PHP (Ken B)
- last June Ken did a survey of web development tools
- PHP is a scripting language
- began in 1995 and was based on and written in Perl, originally "Personal Home Page"
- it can run stand-alone scripts (like Bash or Perl) but is most often used for web pages
- used on 20% of web sites
- current version is PHP 5 and is tightly related to the Apache web server project
- PHP files (http://localhost/something.php) are scripts that produce a web page
- Why not Java, C# or JavaScript? Running scripts on the server eliminates the need to
transfer large amounts of data (e.g. database lookups) to the client's computer for
processing. Network connections are often the weak link in web design.
- PHP files are often web page templates with embedded PHP commands
<html>
<head>
<title>Test</title>
</head>
<body>
<?php print "hello world!"; ?>
</body>
</html>
- the web browser returns a web page with the output from <?php substituted
<html>
<head>
<title>Test</title>
</head>
<body>
hello world!
</body>
</html>
- to create a pure PHP script, create a web page file starting with <?php and ending with
?> and the whole file will be treated as one large substitution
- variables are typeless and do not need to be declared
- quote marks are not string delimiters: they are word substitution delimiters
- many built-in functions e.g. strlen(), strtrim(), strtolower()
- additional modules can be dynamically loaded with the require command
- the syntax of PHP is very similar to Perl (or the Bash shell)
- if ($y > 15) {...}
- for ($count=0; $count<=10; $count++ ) {...}
- PHP arrays are an important feature
- arrays are associative arrays (the index is a key to a value)
- $pets[ 'dog' ] = 'spot'; // dog is key, spot is value
- a variable is an array if the name is followed by square brackets
- if no key is given, PHP assigns numbers (0,1,2,...) as the keys
- PHP stores system information in a set of arrays (e.g. $_POST[] array contains the values
of all web page form input tags¦that use the POST form action method)
- $x = $_POST[ 'zipcode' ] assigns the web page input tag "zipcode" to x
- to loop through an array, use a foreach loop: foreach ($_POST as $key => $val ) {...}
- useful $_SERVER keys: PHP_SELF (this URL), QUERY_STRING, PATH_INFO, SERVER_NAME,
DOCUMENT_ROOT, REMOTE_HOST--these are all standard CGI variables
- print $_SERVER[ SERVER_NAME ]; // print web server name
<form method="post" action="os.php">
<input type="text" name="os_choice">
<input type="submit" name="submit">
</form>
// in os.php
print "You typed $_POST[ os_choice ]"; // would print linux
- to carry values forward, your script must create a new form on the resulting web page in order to hold the values
print<<<_DATA_
<form method="post" action="$_SERVER[ PHP_SELF ]">
<input type="text" name="os_choice" value="$_POST[ os_choice ]">
<input type="submit" name="submit">
</form>
_DATA_
- <<< is a "here file", a shorthand for multiple lines of text (_DATA_ can be anything)
- the action causes the form to be posted back to same script
- use htmlentitles() to convert to legal HTML
- $x = "What does > do?"; print htmlentities( $x );
- subroutines are declared with the function command
- function page_header() {...} // function with no parameters
- function page_header2( $title ) {...} // function with one parameter
- if the function has a return value, return it with the return command
function page_header() {
print "<html>";
print "<head>";
print "<title>Example Page</title>";
print "</head>";
}
- use page_header with page_header();
- variables outside of the function are not available unless you import them with a "global"
declaration or access them with $GLOBALS[]
- Advantages
- runs on most web servers (including Microsoft)
- popular and open source
- easy to learn if you know shell or Perl
- fast execution speed
- large number of add-on modules
- Disadvantages
- portability issues: numeric representation and rounding depend on your operating system
- debugging is difficult: no types, no declarations...only choice is to create objects that
check for things which is a cop-out
- PHP is sometimes too helpful: loose comparison operator and the boolean problem (The
Boolean problem - "hello" == 0 is false, (boolean) "hello" == (boolean) 0 is true
- may be hard to design and debug large scale projects
Next Dinner
Unless otherwise notified, the next dinner meeting is Tuesday, July 26, 2005
at The Office Bar and Grill. There would be no dinner meeting in August due
to the Summer Retreat.
« Truth Humility Communication Nobility Freedom Purity
Excellence Right Support Courage Compassion Quality Honesty Trust
Cooperation Challenge Education »
PegaSoft Canada - A Linux Association Since 1994