<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PENCELAND.com - Programming</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="penceland.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >

<style type="text/css">
.brace {font-family: Verdana; color: #337147}
</style>

<!-- Determine the level of JavaScript supported by the browser. -->
<script type="text/javascript" language="JavaScript"> var jslevel = "1.0"</script>
<script type="text/javascript" language="JavaScript1.1"> jslevel = "1.1"</script>

<script type="text/javascript" language="JavaScript">
<!-- Hide the code from non-JavaScript-enabled browsers

var cPath = window.location.pathname;
var initialPage = cPath.substring(cPath.lastIndexOf('/') + 1);

function onload() {
log_this_visit();
}

// Use AJAX for perl call so webpage will not exit
function log_this_visit() { // non-IE browsers
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
if (XMLHttpRequestObject) {
var url = 'cgi-bin/log_visits.pl?webpage=program.html';
XMLHttpRequestObject.open('GET', url);
XMLHttpRequestObject.send(null);
}
}

// Preload images
if (jslevel >= "1.1") {
homeOn = new Image(100,20); homeOn.src = "images/homei.gif";
homeOff = new Image(100,20); homeOff.src = "images/homeo.gif";
gbar = new Image(800,6); gbar.src = "images/grnbar1.gif";
ptitle = new Image(171,19); ptitle.src = "images/pentitle.gif";
topOn = new Image(100,20); topOn.src = "images/topi.gif";
topOff = new Image(100,20); topOff.src = "images/topo.gif";
wBullet = new Image(15,15); wBullet.src = "images/wbullet.gif";
littleP = new Image(15,15); littleP.src = "images/littler_p.gif";
}

// Switch On and Off button images
function imageSwap(imgID,imgName) {
if (jslevel >= "1.1") {
document.images[imgID].src = eval(imgName + ".src")
}
}

function go_to_videos() {
self.location.href = document.getElementById('videos').value;
document.getElementById('videos').selectedIndex = 0; // reset to default for return to page
}

function playVideo(ref,target,width,height) {
var parms = 'width=' + width + ',height=' + height + ',left=200,top=200,resizable=1'
popupWindow=window.open(ref,target,parms);
var wplus = 20;
//var hplus = 55;
var hplus = 90;
var ie7 = ((document.all) && (navigator.appVersion.indexOf("MSIE 7.") != -1));
if (ie7) {
hplus = 90;
}
else {
// Opera browser needs some special considerations
ua = navigator.userAgent.toLowerCase();
this.ua = ua;
this.isOpera = (ua.indexOf("opera") != -1);
if (this.isOpera) {
if (ref.match(/show_video.pl/)) {
hplus = 5;
}
else {
hplus = 55;
}
}
}
var rwdth = width + wplus;
var rhght = height + hplus;
popupWindow.resizeTo(rwdth,rhght);
popupWindow.focus();
}

function goto_ajax_page() {
self.location.href = document.ajax_form.ajax_pages.options[document.ajax_form.ajax_pages.selectedIndex].value;
document.getElementById('ajax_pages').selectedIndex = 0; // reset to default for return to page
}

function windowOpener(ref, target, parms) {
popupWindow=window.open(ref, target, parms);
popupWindow.focus();
}

// Stop hiding this script -->
</script>

</head>

<body onLoad="onload()">

<a name="top"></a>

<!-- Insert the header from an external file -->
<script type="text/javascript" language="JavaScript" type="text/javascript" src="header.js"></script>

<table width="100%">
<tr>
<td align="left" width="50%" nowrap>
<span title="Programming" class="pagetitle"><img src="images/builder.gif" align="absmiddle" hspace="10" height="65" width="65">
Programming</span>
</td>
<td align="right" valign="top" width="50%">
<table>
<tr>
<td align="right" valign="top">
See also my pages for: &nbsp;
</td>
<td valign="top">
<a href="js.html" class="blueul"><b>JavaScript</b></a><br>
<a href="onlinetips.html" class="blueul"><b>Online&nbsp;Tips</b></a><br>
<a href="windows.html" class="blueul"><b>Windows</b></a>
</td>
<td width="20"></td>
</tr>
</table>
</td>
</tr></table>

<p>
<center>
<table width="80%">
<tr>
<td style="font-style: italic; font-size: 10pt; font-weight: bold; color:#333399">
&quot;The computer programmer ... is a creator of universes for which he alone is the
lawgiver ... No playwright, no stage director, no emperor, however powerful, has ever
exercised such absolute authority to arrange a stage or field of battle and to command
such unswervingly dutiful actors or troops.&quot;&nbsp;&mdash;&nbsp;Joseph&nbsp;Weizenbaum,&nbsp;Computer&nbsp;Power&nbsp;and&nbsp;Human&nbsp;Reason
</td>
</tr>
</table>
</center>
<p>
<center>
<a href="#coding" class="menu">Coding standards</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#perl" class="menu">Perl</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#varpg" class="menu">VisualAge&nbsp;RPG</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#java" class="menu">Java</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#oop" class="menu">OOP</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#alternative" class="menu">Alternatives</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#vb" class="menu">Visual Basic</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#computer" class="menu">Miscellaneous&nbsp;links</font></a> <img src="images/dot.gif" height="10" width="4" hspace="1" title="|">
<a href="#newsgroups" class="menu">Newsgroups</font></a>
</center>

<p>
<table>
<tr>
<td>&nbsp;</td>
<td>
The quote above describes pretty well why I love my profession. I may sound like a real control freak but my <a href=
"http://www.funderstanding.com/brain/right-brain-vs-left-brain/" class="green"<i>left</i>-brain</a> needs an environment where it can exercise its desire
for logic and order without causing too many waves, and programming is it. In my job with <a href="http://www.safetyinsurance.com/" class=
"greenb">Safety Insurance</a> in Boston, I create software for use by our independent insurance agents throughout Massachusetts, who have web
access to their policies and claims on our databases. I have created this software in several formats: Windows (previously OS/2) client/server
applications installed on each PC, <i>Java</i> applets and <i>JavaServer Pages</i> that reside on the server and are run from a web browser,
web-based (<i> Perl</i> driven) front ends connecting via XML to the AS/400 (<i>RPG</i> driven) back ends through <a href=
"http://www-306.ibm.com/software/integration/wmq/" class="green"><i>WebSphere&nbsp;MQ</i></a> message queues, and <i>Perl</i> applications that
use <i>SQL</i> to get data from the AS/400 and Sequel servers. In September of 2000, this software, named <a href="images/powerdesk.jpg" class=
"blueul" target= "powerdesk" onClick=
"javascript:windowOpener(this.href, this.target,'width=430,height=320,resizable=no,scrollbars=no'); return false;"><i><b>PowerDesk</b></i></a>,
was part of a system that earned Safety Insurance the first place Partnership Award from <a href=
"http://www.safetyinsurance.com/about/news/10_00_winning_teams_BeyondComp.pdf" class="green" target= "beyond_computing" onClick=
"javascript:windowOpener(this.href, this.target,'width=800,height=900,resizable=no,scrollbars=no'); return false;"> <i>Beyond Computing Magazine</i></a>,
honoring Safety for the strategic alliance of technology with its business objectives and for development of internal software. Using
<i>XML</i> and <i>Perl</i> looks like the way we will continue to do development at Safety, and one of my first enjoyable tasks using the MQ was
writing an <i>XML</i> parser for our claim entry application.
<p>
Disclaimer: As I stated on my main webpage, technology changes can occur faster than I can keep up, so this page may sometimes be outdated.
</td>
</tr>
</table>
<img src="images/clearspacer.gif" height="5"><br>


<a name="coding"></a>
<hr>
<img src="images/clearspacer.gif" height="5"><br>

<font size="+1"><b>Coding standards</b></font>
<img src="images/code_block.gif" align="middle" vspace="5" hspace="10" width="27" height="27" title="Coding standards" border="0">
<br>

<table>
<tr>
<td><font size="+2">&nbsp;</font></td>
<td>
<p>
I have been programming since the early 80s in a variety of languages, depending on the job and platform. For the last several years I have been
developing web-based server applications in <i>Perl</i>, and as you can see from my website, I also do a lot with <i>HTML</i>, <i>JavaScript</i>,
and a bit of <i>Java</i>. The following quote is from a Perl book but it applies to all languages.
<p>
<center>
<table width="95%">
<tr>
<td>
<span style="color:#333399">
&quot;You will typically spend at least four times longer maintaining code than you spent writing it [<i>Boehm's Law</i>]. So it makes sense to optimize your programming
style for readability, not writability. Better yet, try to optimize for comprehensibility: easy-to-read and easy-to-understand aren't necessarily
the same thing.&quot;</span> <i>&mdash; Damian Conway, Perl Best Practices</i>
</td>
</tr>
</table>
</center>
<p>
I strongly stress the importance of making your code readable by others. In some languages (HTML and Perl are a couple of examples) you can
combine multiple elements in the same line (you could theoretically write all the code for a webpage or script in a <i>single</i> line), but
this makes it difficult to decipher the logic when your code is being worked with. I always make my opening and closing tags and any lines in
logic blocks line up vertically, and opening and closing braces, <b class="brace">{</b> ... <b class="brace">}</b>, line up in a consistent,
fixed pattern. This makes it so much easier to interpret the structure of the code when you are looking at it. You can see this in any <a
href= "cgi-bin/print_source.pl?src=../program.html" class="blueul" onClick=
"javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;">code&nbsp;examples</a> I
provide on my website. Just spending a little extra time to do this when creating code can save a tremendous amount of time for anybody
(including yourself) who modifies it later.
</td>
</tr>
<tr>
<td></td>
<td>
And remember:
<p>
<center>
<table width="95%">
<tr>
<td>
<span style="font-style: italic; font-size: 10pt; font-weight: bold; color:#333399">
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
</span> <i>&mdash; Damian Conway, Perl Best Practices</i>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<img src="images/clearspacer.gif" height="5"><br>

<a name="perl"></a>
<hr>
<img src="images/clearspacer.gif" height="5"><br>

<font size="+1"><b>Perl</b></font>
<a href="http://www.perl.com/"><img src="images/camel.gif" align="middle" vspace="5" hspace="10" width="39" height="44" title="Perl" border="0"></a>
<br>

<!-- using table to indent -->
<table>
<tr>
<td><font size="+2">&nbsp;</font></td>
<td>
Professionally I am a web programmer, and <i>Perl</i> is my primary language. One of my first projects using <i>Perl</i> was to make the listings of
current job openings on our company website dynamically load instead of being typed into a static webpage. Previously, the Human
Resources (HR) department would email information for new job openings to the web development department, where it would be formatted in HTML, and
when the job was filled the page would have to be edited again to remove it. I wrote an application that enables the HR department
to enter the job descriptions into a database, and then I modified the <a href= "http://www.safetyinsurance.com/about/careers.pl" class="green"><span
title= "Current Openings"><i> Current&nbsp;Openings</i></span></a> page of the website to run a script that querys this database and
lists the available jobs. If you click on a specific job title on the list it will read the database and display the job description. When the job is
filled the database is updated and the job will not longer display on the webpage. Both the web-based maintenance application
and the listings pages were done in <i>Perl</i>.
</td>
</tr>
</table>
<p>
<b>&nbsp;Perl tips &amp; examples</b><img src="images/info.gif" align="middle" vspace="5" hspace="15" width="34" height="33" title="Perl tips">
<br><img src="images/clearspacer.gif" height="5"><br>
<table>
<tr>
<td><img src="images/clearspacer.gif" width="10"></td>
<td>
I thought an easy way to show some Perl <i>how-to</i> info was to display some scripts I have created.
<ul>
<li>Click on the <a href="javascript:void()" class="blueulb" title="Run application">Title</a> to run the application
<li>Click on the <a href="javascript:void()" class="greenul" title="view source">name.pl</a> to view the source
</ul>
<a name="myscripts"></a>
<p>
<table cellpadding="3">
<tr>
<td valign="top" ><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top"><a href="show_perl.html?run=cgi-bin/create_link.pl" class="blueulb"><span title="Create link">Create link</span></a><br>
(<a href="cgi-bin/print_source.pl?src=create_link.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">create_link.pl</span></a>)</td>
<td valign="top">&ndash;</td>
<td>At times I have wanted to download a file that is embedded in the HTML of a webpage and I would have to create a
little webpage with a link to the file so I could use the <i>Save&nbsp;Target&nbsp;As</i> option on the the right mouse button context menu.
This script will allow you to just type in the URL and a web link is created automatically. Since
creating it I have found it useful for other things, for instance, at work I wanted my initial Perl script in
one application to show a button to go back to the previous webpage if the script is called from a link (using
$ENV{'HTTP_REFERER'}), but not if the script was run from a shortcut or typed into the <i>address bar</i> of the
browser. I used the <i>Create link</i> script to quickly create a link to call my script for the test.</td>
</tr>
<tr><td><img src="images/clearspacer.gif" height="2"></td><tr>
<td valign="top"><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top" nowrap>
<a href="my_songs.html" class="blueulb"><span title="My songs">My songs</span></a><br>
(<a href="cgi-bin/print_source.pl?src=ipod/playsongs.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">playsongs.pl</span></a>)
<p>
<a href="my_songs.html"><img src="images/ipod_listen.gif" align="center" width="57" height="51" border="0" title= "My songs"></a></span>
</td>
<td valign="top">&ndash;</td>
<td>I am always telling people about songs I have on my <i>smartphone</i> (previously <i>iPod</i>), so to share some of these songs with others I
              uploaded them to a folder on my web server and wrote a script to show a list of the songs in that folder.
<p>
<font color="#993333"><b>Please note: &nbsp; </b></font> I used to share these as playable MP3s, but they had to be removed from the server (<a href="dmca.html"
class="blueul">see explanation</a>) so the <a href="my_songs.html" class="blueul">My&nbsp;songs</a> page has been changed.
<p>
<i>All</i> the songs on my <i>smartphone</i> are stored in a folder on my PC, and to show a list of those songs I wrote two scripts:
<table cellspacing="2">
<tr>
<td width="10">&nbsp;</td>
<td valign="top"><a href="cgi-bin/print_source.pl?src=ipod/listsongs.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;">listsongs.pl</a></td>
<td valign="top">&middot;&middot;&middot;</td>
<td valign="top">builds a file of the songs which I then upload to the server</td>
</tr>
<tr>
<td width="10">&nbsp;</td>
<td valign="top"><a href="cgi-bin/print_source.pl?src=ipod/viewsongs.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;">viewsongs.pl</a></td>
<td valign="top">&middot;&middot;&middot;</td>
<td valign="top">displays that uploaded file as a <span title="List songs"><a href="show_perl.html?run=cgi-bin/ipod/viewsongs.pl" class="blueul">list of songs</a></span> (display only, not playable)</td>
</tr>
</table>
<img src="images/clearspacer.gif" height="5"><br>
</td>
</tr>
<tr><td><img src="images/clearspacer.gif" height="2"></td><tr>
<td valign="top"><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top" nowrap>
<a href="cgi-bin/plus_minus/plus_minus.pl" class="blueulb"><span title="Expand/contract list">Expand/contract list</span></a><br>
(<a href="cgi-bin/print_source.pl?src=plus_minus/plus_minus.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">plus_minus.pl</span></a>)
</td>
<td valign="top">&ndash;</td>
<td>I wanted to try to emulate Windows Explorer, where if a folder has a sub-folder you get a <img src=
"cgi-bin/plus_minus/images/button_plus.gif" width="14" height="14"> button in front of it that you click on to expand the tree. This
changes to a <img src="cgi-bin/plus_minus/images/button_minus.gif" width="14" height="14"> which you can click on to contract it. Because
of the stateless nature of Perl, coding this was a little more elaborate than I anticipated when I started working on it, but I accomplished it.
</td>
</tr>
<tr><td><img src="images/clearspacer.gif" height="2"></td><tr>
<tr>
<td valign="top"><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top" nowrap>
<a href="./mypics/index.htm" class="blueulb">Mypics</a><span title="Mypics"><br>
(<a href="cgi-bin/print_source.pl?src=mypics/showpics.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">showpics.pl</span></a>)<br>
(<a href="cgi-bin/print_source.pl?src=mypics/show_thumbs.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">show_thumbs.pl</span></a>)
</td>
<td valign="top">&ndash;</td>
<td>When I started taking digital photos, first with a camera then with my phone, I wanted to show some friends the photos I was taking so I made a script to list them dynamically as links. When I present photographs
on a webpage I usually create a thumbnail of the photo to click on to see an enlargement, so I wrote a Perl script (<a href=
"cgi-bin/print_source.pl?src=mypics/show_thumbs.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">show_thumbs.pl</span></a>) to create the
thumbnails dynamically, specifying a <font color="#000099">width</font> attribute on the <font color="#000099">&lt;img&gt;</font> tag
for the thumbnail which creates a <font color="#000099">height</font> with the same aspect ratio as the original image. One
consideration when using this technique is that all the image files have to download completely before the page is entirely formatted
with the thumbnails, but most people I know have high-speed Internet connections now so that was not a problem. The
<a href="./mypics/index.htm" class="blueul">Mypics</a> webpage runs both of these using <a href="js.html#ajax" class=blueul>Ajax</a>
(that is one of the best methods to embed Perl in HTML pages). I have since cloned these scripts to show photos I take with my <a
href="gallery.html#cellphone" class="blueul">cellphone</a>.
</td>
</tr>
<tr><td><img src="images/clearspacer.gif" height="2"></td><tr>
<td valign="top"><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top" nowrap>
<a href="show_perl.html?run=cgi-bin/skip.pl" class="blueulb" title="Reunion Photos">Reunion Photos</a><br>
(<a href="cgi-bin/print_source.pl?src=skip.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">skip.pl</span></a>)</td>
<td valign="top">&ndash;</td>
<td>My high school classmate Skip sent me 68 printed photos from a class reunion, which I had offered to scan in and put on my <a href="payette.html#reunions"
class="blueul">Class Reunion</a> page. There were so many photos that rather than create thumbnails individually like I had done for all the rest of
the photos on my Reunion page I decided to clone <a href="cgi-bin/print_source.pl?src=mypics/show_thumbs.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="view source">show_thumbs.pl</span></a>
above to create them, and I am using <a href="js.html#ajax" class=blueul>Ajax</a> to put them on the reunion page.
</td>
</tr>
<tr><td><img src="images/clearspacer.gif" height="2"></td><tr>
<tr>
<td valign="top"><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top" nowrap>
<form name="ajax_form">
<span class="bluebold" title="Perl/Ajax/HTML">Perl/Ajax/HTML</span><br>
<select id="ajax_pages" onChange="goto_ajax_page()" style="font-size: 9pt; width: 110px" class="drop_down">
<option selected value="#ajax">Ajax pages...</option>
<option value="dog_walks.html">Dog walks</option>
<option value="my_songs.html">My Songs</option>
<option value="gallery.html#photography">More photography pages</option>
<option value="show_perl.html?run=cgi-bin/skip.pl">Class reunion photos</option>
<option value="aerials.html">Aerial photos</option>
<option value="awcrap.html">Things that make you say, "AW Crap!!!"</option>
<option value="cranes_at_work.html">Truck cranes at work</option>
<option value="seen_it_all.html">Maybe you haven't seen it all</option>
<option value="good_ideas.html">Just when you thought all the good ideas were taken...</option>
<option value="time_on_hands.html">Too much time on your hands?</option>
<option value="imagination.html">Some people have incredible imagination</option>
<option value="europe_photos.html">Europe photos</option>
</select>
</form>
</td>
<td valign="top">&ndash;</td>
<td valign="top">One technique I like to use on my website is having a simple HTML template use <a href="js.html#ajax" class=blueul>Ajax</a>
to call perl to format the content. This is especially useful when you have a lot of items you wish to list or display and you don't
want to tediously create all the HTML to present them. You can put them in a single folder and have perl read and list them. You can
even dynamically create thumbnails for photos, which I do on some of these pages.
</td>
</tr>
<tr><td><a name="showvideos"></a><img src="images/clearspacer.gif" height="2"></td><tr>
<tr>
<td valign="top"><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top" nowrap>
<span class="bluebold" title="Videos">Videos<br>
</td>
<td valign="top">&ndash;</td>
<td>I used to show all videos on my website in popups using Perl scripts.<br>
(I now show each video in a webpage <a href= "cgi-bin/print_source.pl?src=../play_video.html" class="greenul" onClick=
"javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span
title="view source">template</span></a> using <a href="js.html#embed_video" class= "blueul">Javascript</a> that gives you
a URL for the video you can share with others.)
<p>
<b>Using Popups</b>

<table cellspacing="10">
<tr>
<td valign="top"><a href="cgi-bin/print_source.pl?src=play_flv.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;">play_flv.pl</a></td>
<td valign="top">&middot;&middot;&middot;</td>
<td valign="top">I wrote this script to play <i>Flash</i> videos (<b>flv</b> files) on my server with this <a href="flv_player.html">Flash&nbsp;Video&nbsp;Player</a>.<br>
Example usage: <font color="#333399">&lt;a href=&quot;cgi-bin/play_flv.pl?filename=somefile.flv&width=400&height=360&title=Window%20Title&quot;&gt;</font>
<p>
To see local <b>flv</b> in popup . . .<br>
<a href="cgi-bin/play_flv.pl?filename=top10_bush_moments.flv&width=500&height=375&title=Top%2010%20George%20W.%20Bush%20Moments"
class="blueul" onClick="playVideo(this.href,'my_video',520,385);return false;">
<img src="images/top10_bush_moments.jpg" width="93" height="70" vspace="2" border="0" align="absmiddle" title="Letterman Top 10"><br>
Letterman Top 10</a>
</td>
</tr>
<tr>
<td valign="top"><a href="cgi-bin/print_source.pl?src=show_video.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;">show_video.pl</a></td>
<td valign="top">&middot;&middot;&middot;</td>
<td valign="top">I wrote this script to play other video formats, including <b>mpg</b>, <b>wmv</b>, and <b>avi</b>.<br>
Example usage: <font color="#333399">&lt;a href=&quot;cgi-bin/show_video.pl?filename=somefile.wmv&width=400&height=360&title=Window%20Title&quot;&gt;</font>
<p>
To see local <b>wmv</b> in popup . . .<br>
<a href="cgi-bin/show_video.pl?filename=GrannyAirBag.wmv&width=315&height=325&title=Granny%20air%20bag" onClick=
"javascript:playVideo(this.href,'my_video',325,340);return false;" class="blueul"> <img src="images/grannyairbag.jpg" width=
"91" height="70" vspace="2" border="0" align="absmiddle" title="Granny air bag"><br>
Granny air bag</a>
</td>
</tr>
<tr>
<td valign="top"><a href="cgi-bin/print_source.pl?src=video_embed.pl" class="greenul" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;">video_embed.pl</a></td>
<td valign="top">&middot;&middot;&middot;</td>
<td valign="top">Most of the videos on my website are on my server, but sometimes I like to link to videos on a remote site like YouTube, showing them in my own popups.
Some browsers don't like linking directly to the videos in JavaScript, so I wrote this script to play the videos using &lt;object&gt; and &lt;embed&gt; tags.<br>
Example usage: <font color="#333399">&lt;a href=&quot;cgi-bin/video_embed.pl?video=http://www.youtube.com/v/6gmP4nk0EOE?autoplay=1&width=400&height=360&title=Window%20Title&quot;&gt;</font><br>
You have to know the path to the video (<font color="#333399">&quot;http://www.youtube.com/v/...&quot;</font>), which is often shown in the &lt;embed&gt; instructions on the remote video page.<br>
If the URLs to videos already have CGI characters (which would be confused with my usage), I replace ? with | and & with ` and they will be restored in video_embed.pl.<br>
<b>Please note.</b> Sometimes you are prohibited from embedding an uploaded video in a webpage so this will not work with those.
<p>
To see remote video in popup . . .<br>
<a href="cgi-bin/video_embed.pl?video=http://www.youtube.com/v/ona-RhLfRfc?autoplay=1&width=485&height=390&title=Monty%20Python%20-%20Nudge,%20Nudge"
onClick="javascript:playVideo(this.href,'my_video',490,395);return false;" class="blueul">
<img src="images/monty_nudge.jpg" vspace="2" width="93" height="70" border="0"><br>
Monty Python</a>
</td>
</tr>
<tr>
<td valign="top" colspan="3">
<a name="popup_link"></a>
<br>
This HTML link calls the popup function with the video to play.
<pre><div class="frame"><font color="#333399">&lt;a href="cgi-bin/play_flv.pl?filename=somefile.flv&width=500&height=375&title=Window%20Title"
onClick="showVideo(this.href,520,385);return false;"&gt;
</font></div></pre>
<a name="jspopup"></a>
This JavaScript creates a popup containing the output from the Perl script that is specified in the first parameter in the link.
<pre><div class="frame"><font color="#333399">function showVideo(ref, width, height) {
var parms = 'width=' + width + ',height=' + height + ',left=200,top=200,resizable=yes'
var target = 'myvideo'; </font><font color="#888888">// using the same target name makes all videos use the same window object</font><font color="#333399">
popupWindow=window.open(ref, target, parms);</font><font color="#888888">
// make the window dimensions slightly larger than the video</font><font color="#333399">
var wplus = 10;
var hplus = 55;</font><font color="#888888">
// increase height for IE7 to accomodate location toolbar</font><font color="#333399">
var ie7 = ((document.all) && (navigator.appVersion.indexOf("MSIE 7.") != -1));
if (ie7) {
hplus = 90;
}
var rwdth = width + wplus;
var rhght = height + hplus;
popupWindow.resizeTo(rwdth,rhght);
popupWindow.focus();
}</font></div></pre>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top"><img align="top" src="images/wbullet.gif" title="o" width="16" height="16"></td>
<td valign="top" nowrap>
<a href="cgi-bin/print_source.pl?src=print_source.pl" class="blueulb" onClick="javascript:windowOpener(this.href,this.target,'width=875,height=700,left=25,top=100,scrollbars=1');return false;"><span title="print_source.pl">print_source.pl</span></a></td>
<td valign="top">&ndash;</td>
<td>This is the script I wrote to display the source code in the above applications here on my website (which
I am using here to display its <i>own</i> source). The way it works is that it reads in the source-file
and modifies some of the elements to make them browser-friendly&mdash;for example, substituting <a href=
"http://www.htmlhelp.com/reference/html40/entities/special.html" class="green">entities</a> for <font
color="#000099">&lt;</font>&nbsp;and&nbsp;<font color="#000099">&gt;</font> brackets, <font
color="#000099">&lt;br&gt;</font> for newline, and spaces for tab&mdash;then displays it in the browser
to look just like it does in the editor.</td>
</tr>
</table>
</td>
</tr>
</table>
<b>&nbsp; &nbsp;More . . .</b>
<ul>
<li><b>Using cookies</b> <a href="#perl"><img src="images/up_arrow.jpg" align="absmiddle" width="15" height="15" hspace="4" border="0" title="Go to top of section"></a>
<br><img src="images/clearspacer.gif" height="4"><br>
Cookies provide a great way to communicate between scripts or different instances of the same script, and you
can even interact with another language that supports cookies like <a href="js.html#cookies" class="blueul">JavaScript</a>.
<p>
<pre><div class="frame"><font color=#888888># Read a cookie</font><font color=#333399>
use CGI;
my $q = new CGI;
my $cookie_value = $q->cookie('cookie_name');</font></div></pre>
<p>
<pre><div class="frame"><font color="#888888"># Write a cookie</font><font color="#333399">
use CGI;
my $q = new CGI;
my $cookie = $q->cookie(-name=>'cookie_name',
-value=>'cookie_value',
-expires=>"+1d");
print header(-cookie=>$cookie);</font></div></pre>
<p>
I wrote one multi-screen Perl application that was going to be linked from an unknown webpage, and I wanted to have an <i>
Exit</i> button on the first screen that would return to the referring webpage. The environment variable 'HTTP_REFERER' holds
the URL of the previous webpage, but if you were returning from a screen within the application it would point to that page.
To make sure this button would always exit the application I saved the original <i>referer</i> value in a cookie to be
retrieved on returns to the first screen.
<br><img src="images/clearspacer.gif" height="10"><br>
Here is how I did this.
<pre><div class="frame"><font color=#333399>use CGI;
my $q = new CGI;
my $header_printed = '';</font><font color=#888888>
# Check for existing cookie containing referer URL</font><font color=#333399>
my $exit_link = $q->cookie('application_name');
if (!$exit_link) {</font><font color=#888888>
# If first visit to page create cookie with no expiration date to expire at session end</font><font color=#333399>
$exit_link = $ENV{'HTTP_REFERER'};
my $cookie = $q->cookie(-name=>'application_name', -value=>$exit_link);
print header(-cookie=>$cookie);
$header_printed = 'y';
}
if (!$header_printed) {
print $q->header();
}</font><font color=#888888>
# (this is an abbreviated version of the print method, without escaped quotes)</font><font color=#333399>
print "&lt;a href="$exit_link"&gt;&lt;img src="images/btn_exit.gif" title="Exit" width="120" height="20" border="0"&gt;&lt;/a&gt;";</font></pre>
</div></pre>

<img src="images/clearspacer.gif" height="4"><br>
<li><b>Build a list of all files in a directory</b> <a href="#perl"><img src="images/up_arrow.jpg" align="absmiddle" width="15" height="15" hspace="4" border="0" title="Go to top of section"></a>
<br><img src="images/clearspacer.gif" height="4"><br>
In several of my Perl examples above I use this technique to make a list of files in a directory on the server. Once you have this list
there are many things you can do with it, including getting specific information about each file.
<p>
<pre><div class="frame"><font color=#888888># Load an array with the names of the files</font><font color=#333399>
my @dir_contents = '';
my $work_dir = "<i>directory-including-relative-path</i>";
opendir(DIR,$work_dir) || die("Cannot open directory $work_dir!\n");
@dir_contents = sort readdir(DIR);
closedir(DIR);</font><font color=#888888>

# Make a list of the name of each file from the array</font><font color=#333399>
my $files = '';
foreach $filename (@dir_contents) {</font><font color=#888888>
# Replace certain characters with entities for html display</font><font color=#333399>
$display_name =~ s/&amp;/&amp;amp;/g;
$display_name =~ s/\//&amp;frasl;/g;</font><font color=#888888>
# Get the file size</font><font color=#333399>
my @stats = stat($work_dir.'/'.$file);
my $filesize = int($stats[7]/1000).'kb';</font><font color=#888888>
# Add the file name and size to the list to be printed</font><font color=#333399>
$files = &quot;$files$display_name - $filesize&lt;br&gt;&quot;;
}</font></div></pre>

<img src="images/clearspacer.gif" height="4"><br>
<li><b>Validate a URL</b> <a href="#perl"><img src="images/up_arrow.jpg" align="absmiddle" width="15" height="15" hspace="4" border="0" title="Go to top of section"></a>
<br><img src="images/clearspacer.gif" height="4"><br>
Here is how to check the accessibility of a file on a remote server.
<p>
<pre><div class="frame"><font color=#888888># Set up the user-agent</font><font color=#333399>
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
</font><font color=#888888>
# Check the link</font><font color=#333399>
my $link_url = "http://www...";
my $response = $ua->get($link_url);
if $response->is_success { </font><font color=#888888># Link is OK</font><font color=#333399>
...
}
else { </font><font color=#888888># Check specific codes on bad link</font><font color=#333399>
my $rc = substr($server_response,0,3);
if ($rc eq '400') { </font><font color=#888888># Bad Request</font><font color=#333399>
...
}
elseif ($rc eq '401') { </font><font color=#888888># Unauthorized</font><font color=#333399>
...
}
elseif ($rc eq '403') { </font><font color=#888888># Forbidden (<i>love the sound of that</i>)</font><font color=#333399>
...
}
elseif ($rc eq '404') { </font><font color=#888888># Not Found</font><font color=#333399>
...
}
}</font></div></pre>

<img src="images/clearspacer.gif" height="4"><br>
<li><b>Using Backticks ( ` ` ) to execute and capture output</b> <a href="#perl"><img src="images/up_arrow.jpg" align="absmiddle" width="15" height="15" hspace="4" border="0" title="Go to top of section"></a>
<br><img src="images/clearspacer.gif" height="4"><br>
I was working on a project where I needed a way to pass information from a called script to the calling script. In this example <i>script1</i>
calls <i>script2</i>, which executes and formats a value to be used in <i>script1</i>. My project was much more elaborate than this but this is
the jist of what I did.
<p>
<pre><div class="frame"><font color=#888888># Script1: use backticks around the perl command to execute it</font><font color=#333399>
my $result = `perl script2.pl $arg1 $arg2`;</font><font color=#888888>
# $result has a value formatted in script2...

# Script2: output a value to STDOUT where script1 can retrieve it</font><font color=#333399>
my $result = (do something to produce this...)
print $result;
exit;
</font></div></pre>

<img src="images/clearspacer.gif" height="4"><br>
<li><b>Closing a browser window</b> <a href="#perl"><img src="images/up_arrow.jpg" align="absmiddle" width="15" height="15" hspace="4" border="0" title="Go to top of section"></a>
<br><img src="images/clearspacer.gif" height="4"><br>
I had an application that loaded a list of records on a screen that gave links to another script which ran in a new tabbed
window. After the user was finished using this second interactive script he would click on a submit button and I wanted to return
to the list of records without reloading them (which a re-direct would have done)&mdash;in other words, close the tab. What's on
the screen at this point is the webpage that was just input to the script. I just replace this with a fresh, empty webpage that
closes on load.
<br>Please note&mdash;if you run this on the only webpage on a browser it closes the browser.
<p>
<pre><div class="frame"><font color=#888888># The header has not been printed at this point in the script</font><font color=#333399>
print &quot;Content-type: text/html\r\n\r\n&quot;;
print &quot;&lt;html&gt;&lt;body onLoad='javascript:window.close()'&gt;&lt;/html&gt;&quot;;
exit;
</font></div></pre>

<img src="images/clearspacer.gif" height="4"><br>
<li><b>Break out of an if statement using 'last' logic</b> <a href="#perl"><img src="images/up_arrow.jpg" align="absmiddle" width="15" height="15" hspace="4" border="0" title="Go to top of section"></a>
<br><img src="images/clearspacer.gif" height="4"><br>
Sometimes you may have a large if statement and want to exit out in the middle. The 'last' operator only works in loops. You can
create this by putting the if statement in a named loop.
<p>
<pre><div class="frame"><font color=#333399>FOO: {
&nbsp; if (logic test) {
&nbsp; &nbsp; do something here
&nbsp; &nbsp; do something here
&nbsp; &nbsp; if (another test) {</font><font color=#888888> # Want to exit here</font><font color=#333399>
&nbsp; &nbsp; &nbsp; last FOO;
&nbsp; &nbsp; }
&nbsp; &nbsp; do something here
&nbsp; &nbsp; do something here
&nbsp; }
}
</font></div></pre>

<img src="images/clearspacer.gif" height="4"><br>
<li><b>Open a URL in a new window</b> <a href="#perl"><img src="images/up_arrow.jpg" align="absmiddle" width="15" height="15" hspace="4" border="0" title="Go to top of section"></a>
<br><img src="images/clearspacer.gif" height="4"><br>
I had an application that needed to open a URL in a new tab but not close the existing window. This works fine in all browsers I
have tried, but for security reasons IE won't let a new window receive focus unless you have &quot;Always switch to new tabs when
they are created&quot; checked.
<p>
<pre><div class="frame"><font color=#888888># Redisplay the current window here, then...</font><font color=#333399>
&nbsp; print &quot;&lt;html&gt;
&nbsp; &lt;head&gt;
&nbsp; &lt;script&gt;
&nbsp; function open_win() {
&nbsp; &nbsp; var new_win = window.open('http://www.somename.com');
&nbsp; &nbsp; new_win.focus();
&nbsp; }
&nbsp; &lt;/script&gt;
&nbsp; &lt;/head&gt;
&nbsp; &lt;body onload='open_win()'&gt;
&nbsp; &lt;/body&gt;
&nbsp; &lt;/html&gt;&quot;;
</font></div></pre>

</ul>
<p>
<center><a href="#top" class="topofpage">Top of page</a></center>
<p>
<a name="varpg"></a>
<hr>
<font size="+1"><b>VisualAge RPG</b></font>
<a href="http://www-01.ibm.com/software/awdtools/wdt400/about/varpg.html"><img src="images/VA.gif" align="middle" vspace="5" hspace="10" width="42" height="42" title="VisualAge RPG" border="0"></a>
<br>

<!-- using table to indent -->
<table>
<tr>
<td><font size=+2>&nbsp;</font></td>
<td>This section has been removed and is now a <a href="varpg.html" class="blueul">separate page</a>.
</td>
</tr>
</table>
<p>

<a name="java"></a>
<hr>
<font size="+1"><b>Java</b></font>
<a href="http://java.sun.com/"><img align="absmiddle" src="images/java_logo.gif" width="48" height="61" title="java.sun.com" hspace="10" border="0"></a>

<table>
<tr>
<td width="20">&nbsp;</td>
<td>
<img src="images/clearspacer.gif" height="10"><br>
For years I had a <a href="java.html" class="blueul">Java</a> page on my website (back when I was a Java programmer) that is no longer linked on my main page.
Maybe some day I will just put all the content here.<br>
<img src="images/clearspacer.gif" height="20"><br>
</td>
</tr>
</table>

<a name="oop"></a>
<hr>
<font size="+1"><b>Object-oriented programming</b></font>
<img src="images/oop.gif" align="middle" width="100" height="60" hspace="15" title="OOP">

<table>
<tr>
<td>&nbsp;</td>
<td>What is object-oriented programming? OOP could be described as a collection of objects (called classes) exchanging messages to
achieve a common objective. This might seem a little vague without a good metaphor. The following is from the book, <a href=
"http://docs.rinet.ru/J21/" class="green"><i>Teach yourself Java in 21 days</i></a>, by Laura Lemay and Charles L. Perkins.
<p>
<table>
<tr>
<td>&nbsp;&nbsp;</td>
<td>
<i><font color="#333399">&quot;You can walk into a computer store and, with a little
background and often some help, assemble an entire PC computer system from various
components: a motherboard, a CPU chip, a video card, a hard disk, a keyboard, and so
on. Ideally, when you finish assembling all the various self-contained units, you
have a system in which all the units work together to create a larger system with
which you can solve the problems you bought the computer for in the first place.
<br><img src="images/clearspacer.gif" height="8"><br>
Internally, each of those components may be vastly complicated and engineered by different companies with
different methods of design. But you don't need to know how the component works, what every chip on the board
does, or how, when you press the A key, an "A" gets sent to your computer. As the assembler of the overall
system, each component you use is a self-contained unit, and all you are interested in is how the units
interact with each other. Will this video card fit into the slots of the motherboard and will this monitor
work with this video card? Will each particular component speak the right commands to the other components it
interacts with so that each part of the computer is understood by every other part? Once you know what the
interactions are between the components and can match the interactions, putting together the overall system is
easy.
<br><img src="images/clearspacer.gif" height="8"><br>
What does this have to do with programming? Everything. Object-oriented programming works in exactly the same
way. Using object-oriented programming, your overall program is made up of lots of different self-contained
components (objects), each of which has a specific role in the program and all of which can talk to each other
in predefined ways.&quot;</font></i>
</td>
<td>&nbsp;&nbsp;</td>
</tr></table>
<p>
Popular object-oriented programming languages are C++, Smalltalk, <a href="#vb" class="blueul">Visual Basic</a>, and
<a href="java.html" class="blueul">Java</a>. The concepts which I think most define OOP languages are:
<br>
<table>
<tr><td height="5"> </td></tr>
<tr valign="top">
<td>&nbsp;&nbsp;</td>
<td><img src="images/dot.gif" title="o" width="4" height="10"></td>
<td><b><i>Encapsulation</i></b></td>
<td> -</td>
<td>including in an object everything it needs, hiding elements that other objects, which communicate with it through
<i>public</i> interfaces<font color=#990000>&sup1;</font>, needn't know about
</tr><tr valign="top">
<td>&nbsp;&nbsp;</td>
<td><img src="images/dot.gif" title="o" width="4" height="10"></td>
<td><b><i>Inheritance</i></b></td>
<td> -</td>
<td>creating a new type of object from an existing one, in which the new object (subclass) <i>inherits</i> all the elements from the existing one (superclass)
</tr><tr valign="top">
<td>&nbsp;&nbsp;</td>
<td><img src="images/dot.gif" title="o" width="4" height="10"></td>
<td><b><i>Polymorphism</i></b></td>
<td> -</td>
<td>different objects, with their own, unique versions of the same methods, responding to the same message in different ways
</tr>
<tr><td height="5"> </td></tr>
</table>

This <a href="http://www.sum-it.nl/enoo.html"><span class="blueul"><i>cup of coffee</i></span></a> example
illustrates these three principles using the interaction between customer, waiter, and kitchen.

<br><img src="images/clearspacer.gif" height="10"><br>
<table>
<tr valign="top">
<td valign="top"> <font color=#990000>&sup1;</font></td>
<td>"VCRs, watches, cars, and other real-world objects are excellent examples of the kind of objects we wish to
emulate, because they successfully hide all the myriad complexities behind really simple interfaces."&nbsp;
&nbsp;--&nbsp;Sriram&nbsp;Srinivasan, <i>Advanced&nbsp;Perl&nbsp;Programming</i>
</td>
</tr>
</table>

</td></tr>
<tr><td><font size="1">&nbsp;</font></td>
</tr></table>

<table><tr><td height="25" valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>OOP links</b></td></tr></table>
<a href="http://java.sun.com/docs/books/tutorial/java/concepts/"><img align="top" src="images/sun_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://java.sun.com/docs/books/tutorial/java/concepts/">Object-Oriented Programming Concepts</a> &ndash; from <b>The Java Tutorial</b> at Sun</br>
<a href="http://whatis.techtarget.com/definition/0,289893,sid9_gci212681,00.html"><img align="top" src="images/whatis_icon.gif" title="o" hspace="5" width="16" height="16" border="0">Object-Oriented Programming</a> &ndash; from whatis?com<br>
<a href="http://foldoc.org/object-oriented+programming"><img align="top" src="images/foldoc_icon.gif" title="o" hspace="5" width="16" height="16" border="0">Object-Oriented Programming</a> &ndash; from FOLDOC<br>
<a href="http://vbcity.com/forums/topic.asp?tid=15587&#RID54313"><img align="top" src="images/vbcity_icon.gif" title="o" hspace="5" width="16" height="16" border="0">Object-Oriented Programming Jokes</a><br>
<a href="http://www.ibiblio.org/javafaq/course/week3/01.html"><img align="top" src="images/cafelaut_icon.gif" title="o" hspace="5" width="16" height="16" border="0">What is Object Oriented Programming?</a>- writer/teacher Elliotte&nbsp;Rusty&nbsp;Harold<br>
<a href="http://www.sum-it.nl/enooplin.html"><img align="top" src="images/sumit_icon.gif" title="o" hspace="5" width="16" height="16" border="0">Links on OOP</a> &ndash; from <i><b><font color="#0000ff">SUM</font><font color="#ff0000">it</font></b></i>, a Dutch company<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.marcocantu.com/papers/ooplang.htm">Comparing OOP Languages: Java, C++, Object Pascal</a><br>

<center><a href="#top" class="topofpage">Top of page</a></center>
<a name="alternative"></a>
<hr>
<font size="+1"><b>Alternatives . . .</b></font>
<img src="images/linux.gif" align="middle" width="40" height="47" hspace="15" title="Alternatives">

<!-- using table to indent -->
<table>
<tr>
<td>&nbsp;</td>
<td>
Sometimes it may seem as if it's a Microsoft world where software for IBM-compatible computers is concerned. However, there is alternative
software that is quite resilient, and even superior to Windows products. As operating systems go, as I mentioned above, I used to write for
OS/2, and I re-booted much less frequently than I do in Windows. My company switched to Windows when IBM moved from OS/2 to Windows 95 as the
development environment for <a href="#varpg" class="blueul">VisualAge-RPG</a>. Another operating system, Linux, has a reputation for being very
stable, and servers running Linux can operate for months without being re-booted. We have Linux on our servers at work, and my website runs on
a Linux server, so I have to understand the basics of the language (particularly using <i>permissions</i> and being aware of it being
<i>case-sensitive</i>). I still use Windows on my PC at work and I use the <a href="http://www.tortoisecvs.org/faq.html" class="green">TortoiseCVS</a>
version control to integrate the Linux servers to Windows Explorer.
<p>
I believe strongly in the <a href="http://www.opensource.org/" class="green">Open Source</a> concept of programming. In the early 90s, when I
first became interested in learning HTML, there were not that many books on the subject, but I was able to review the code in the browser and
see how the various tags performed. You may say that HTML is only an <i>interpreted</i> lanquage, and the source-code must be present in the
browser at run-time, but the concept is the same, and I have always been stirred up by those who make postings to web-authoring <a href=
"onlinetips.html#newsgroups" class="blueul">newsgroups</a> about wanting to hide their JavaScript source-code from others, probably for some <i>
selfish, profit-oriented</i> motive. Linux is getting all the press as the current darling of the Open Source movement. However, I still prefer
to work in a graphical environment, and even though there are graphical front-ends for Linux, that still smacks of running Windows 3.1 on DOS.
Anyway, as I said, I support the concept, and I am proud to be in the brotherhood of programmers that are subscribing to it. I even put a <a
href="http://en.wikipedia.org/wiki/Copyleft"><img align="top" src="images/cpystick.gif" title="copyleft.net" width="15" height="15"
border="0"></a> (Copyleft) sticker on the back of my car.
<p>
When I was writing Java applets I was creating objects that are not fully supported by Microsoft (MS has their <i>own</i> version, which has gotten them into
trouble with Sun), but thanks to plug-ins and runtimes by Sun and others these objects can run on a Windows platform. Java is aligned with the
Open Source movement and there are some links relating to this on my <a href="java.html" class="blueul">Java</a> page.
</td>
</tr>
</table>
<p>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.opensource.org/">Open Source Initiative (OSI)</a> &ndash; an idea whose time has come<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href = "http://www.stallman.org/">Richard Stallman's Personal Page</a> &ndash; leader of the free software movement<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.gnu.org/">GNU's Not Unix!</a> &ndash; the GNU Project and the Free Software Foundation<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.cptech.org/altos/">Alternative Operating Systems</a> &ndash; from Consumer Project on Technology (CPT)<br>
<a href="http://www.freebsd.org/"><img align="top" src="images/freebsd_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.freebsd.org/">The FreeBSD Project</a> &ndash; an advanced free OS from UC Berkeley<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.copyleft.net/">Copyleft.net</a> &ndash; <i>Geek chic!</i><a href="http://www.copyleft.net/"><img align="top" src="images/cpystick.gif" title="copyleft.net" hspace="5" width="15" height="15" border="0"></a><br>
<a href="http://www.slashdot.org/"><img align="top" src="images/slashdot_icon.gif" title="o" hspace="5" width="15" height="15" border="0"></a><a href="http://www.slashdot.org/">Slashdot</a> &ndash; News for Nerds. Stuff that matters.<br>
<a href="http://www.apache.org/"><img align="top" src="images/apache_icon.gif" title="o" hspace="5" width="15" height="15" border="0"></a><a href="http://www.apache.org/">The Apache Software Foundation</a><br>
<a href="http://www.perl.org/"><img align="top" src="images/camel_icon.gif" title="o" hspace="5" width=14 height=16 border="0"></a><a href="http://www.perl.org/">Perl Mongers</a> &ndash; the Perl advocacy people<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.mozilla.org/">The Mozilla Organization</a><br>
<!--img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://devedge-temp.mozilla.org/index_en.html">Netscape DevEdge Online</a> &ndash; Netscape source-code available here<br-->

<table><tr><td height="25" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Linux</b></td></tr></table>
<a href="http://www.redhat.com/"><img align="top" src="images/redhat_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.redhat.com/">Red Hat -- Linux, Embedded Linux and Open Source Solutions</a><br>
<a href="http://www-1.ibm.com/linux/"><img align="top" src="images/ibm_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www-1.ibm.com/linux/">IBM Linux Portal</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/dot.gif" title="-" hspace="5" width="4" height="10"><a href="http://www-1.ibm.com/linux/links/index.shtml">Linux links</a><br>
<a href="http://www.linux.org/"><img align="top" src="images/linuxo_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.linux.org/">Linux Online</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/dot.gif" title="-" hspace="5" width="4" height="10"><a href="http://www.linux.org/info/sounds/english.au">How to Pronounce "Linux"</a> &ndash; audio clip of Linus Torvalds pronouncing the word "Linux"<br>
<a href="http://www.linuxjournal.com/"><img align="top" src="images/linuxj_icon.gif" title="o" hspace="5" width="15" height="15" border="0"></a><a href="http://www.linuxjournal.com/">Linux Journal</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://metalab.unc.edu/LDP/">Linux Documentation Project</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.linuxprogramming.com/">LinuxProgramming.com</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.linux-center.org/en/">Linux Center</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://rhlufaq.synfin.net/">Red Hat Linux User's FAQ</a><br>
<a href="http://www.linuxquestions.org/"><img align="top" src="images/linux_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.linuxquestions.org/">LinuxQuestions.org</a><br>

<table><tr><td height="25" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>OS/2</b> &nbsp;(I guess this is a little dated now)</td></tr></table>
<a href="http://www.software.ibm.com/os/warp/"><img align="top" src="images/ibm_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.software.ibm.com/os/warp/">IBM OS/2 Warp</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.mit.edu:8001/activities/os2/os2world.html">The OS/2 WWW Homepage</a> &ndash; MIT site includes links to many other OS/2 sites<br>
<a href="http://dir.yahoo.com/Computers_and_Internet/Software/Operating_Systems/OS_2/"><img align="top" src="images/yahoo_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://dir.yahoo.com/Computers_and_Internet/Software/Operating_Systems/OS_2/">Yahoo! Computers and Internet &gt; Software &gt; Operating Systems &gt; OS/2</a><br>

<p>
<center><a href="#top" class="topofpage">Top of page</a></center>

<a name="vb"></a>
<hr>
<table><tr><td valign="middle">
<font size="+1"><b>Visual Basic</b></font>
</td><td valign="middle">&nbsp; &nbsp;<font size=+3 color="#006699"><b><i>VB</i></b></font>
</td></tr></table>

<!-- using table to indent -->
<table>
<tr>
<td>&nbsp;</td>
<td>I studied VB at M.I.T. and it was my first experience with GUI programming and a visual-programming IDE.</td>
</tr>
</table>
<br>

<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://msdn.microsoft.com/vbasic/">Microsoft Visual Basic Home</a><br>
<a href="http://shareware.about.com/msub_drivers_vbrun.htm"><img align="top" src="images/about_icon.gif" title="o" hspace="5" width="15" height="15" border="0"></a><a href="http://shareware.about.com/msub_drivers_vbrun.htm">VBRun Drivers</a><br>
<!--img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.vbonline.com/vb-mag/">Visual Basic Online Magazine</a><br-->
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.visualbasicjobs.com/">Visual Basic Jobs - Job Listing Service for Visual Basic</a><br>
<!--img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.cgvb.com/">Carl &amp; Gary's Visual Basic Home Page</a><br-->
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.vbxtras.com/otherweb.asp">VBxtras</a> &ndash; other Visual Basic sites on the web<br>
<!--img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.vb400.com/">IBM Redbook &amp; AS/400 and Visual Basic Book: Using Microsoft Visual Basic with the AS/400</a><br-->
<a href="http://search.devx.com/search.cfm?q=visual+basic&a=1&f=1&s=0&sa.x=18&sa.y=15"><img align="top" src="images/devx_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.devx.com/gethelp/gethelp.asp?Area=Visual+Basic">VB Help at DevX</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://searchvb.techtarget.com/">searchVB.com</a><br>
<a href="http://www.mvps.org/vbnet/"><img align="top" src="images/mvps_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.mvps.org/vbnet/">VBnet</a> &ndash; developers resource centre<br>
<a href="http://www.vbip.com/"><img align="top" src="images/vbip_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.vbip.com/">vbip.com</a> &ndash; Visual Basic Internet Programming<br>
<a href="http://vbwire.com/"><img align="top" src="images/vbwire_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://vbwire.com/">VBWire</a> &ndash; Visual Basic News &amp; Information Source<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.vbcode.com/">Visual Basic Code at VBCode.com</a><br>

<p>
<center><a href="#top" class="topofpage">Top of page</a></center>
<a name="computer"></a>
<hr>
<p>
<font size="+1"><b>Miscellaneous programming and computer links</b></font><br>
<img src="images/pc.gif" align="middle" width=36 height=37 vspace=10 hspace=15>(see more at <a href="onlinetips.html#links" class="blueul">Internet &amp; Technology links</a>)

<table><tr><td height="20" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>IBM</b></td></tr></table>
<a href="http://www-1.ibm.com/servers/eserver/iseries/"><img align="top" src="images/ibm_icon.gif" title="o" hspace="5" vspace=1 width="16" height="16" border="0"></a><a href="http://www-1.ibm.com/servers/eserver/iseries/">iSeries and AS/400: e-servers from IBM, Integrated Application Servers</a><br>
<a href="http://www.ibm.com/"><img align="top" src="images/ibm_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.ibm.com/">IBM Corporation</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/dot.gif" title="-" hspace="5" width="4" height="10"></a><a href="http://www.ibm.com/Search/">IBM Search</a> &ndash; search IBM's sites<br>
<a href="http://www-3.ibm.com/software/ts/mqseries/"><img align="top" src="images/ibm_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www-3.ibm.com/software/ts/mqseries/">WebSphere MQ</a> (formerly <i>MQSeries</i>)<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.iseriesnetwork.com/as400forums/">iSeries Network</a> &ndash; <i>iSeries</i> forums (formerly <i>News400.com</i>)<br>
<a href="http://faq.midrange.com/data/cache/1.html"><img align="top" src="images/midrange_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://faq.midrange.com/data/cache/1.html">AS/400 FAQ</a> &ndash; uses <a href="http://faqomatic.sourceforge.net/fom-serve/cache/1.html">Faq-O-Matic</a><br>
<a href="http://archive.midrange.com/index.shtml"><img align="top" src="images/midrange_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://archive.midrange.com/index.shtml">MIDGRANGE.COM Mailing List Archive</a> &ndash; years of searchable threads<br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.search400.com/">search400.com</a> &ndash; the <i>iSeries-</i>specific search engine<br>
&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/dot.gif" title="-" hspace="5" width="4" height="10"><a href="http://search400.techtarget.com/featuredTopic/0,290042,sid3_gci837742,00.html">Best iSeries websites</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.searchdomino.com/">searchDomino.com</a> &ndash; the <i>Domino</i>-specific search engine<br>

<table><tr><td height="25" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Other</b></td></tr></table>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.mqseries.net/">MQSeries.net</a><br>
<a href="http://www.rocketaware.com/"><img align="top" src="images/rcktaware_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://www.rocketaware.com/">RocketAware</a> &ndash; Programmer's Webliography and Index<br>
<!--img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.netti.fi/~simos/oasis/">Programmer's Oasis</a><br-->
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.developer.com/">Developer.com</a><br>
<a href="http://home.netscape.com/"><img align="top" src="images/ntround_icon.gif" title="o" hspace="5" width="16" height="16" border="0"></a><a href="http://home.netscape.com/">Netscape Home Page</a><br>
<img align="top" src="images/wbullet.gif" title="o" hspace="5" width="16" height="16"><a href="http://www.microsoft.com/">Microsoft Homepage</a><br>
<p>
<center><a href="#top" class="topofpage">Top of page</a></center>
<a name="newsgroups"></a>
<hr>
<p>
<font size=+1><b>Newsgroups</b></font><img src="images/discussion.gif" align="middle" hspace="15" width="41" height="31" title="Newgroups">

<!-- using table to indent -->
<table>
<tr><td>&nbsp;</td>
<td>I used to have all the related usenet groups listed here but they don't seem to function in browsers anymore, so I am just providing links to
Google Groups, where they are offered in a web format.
</td>
</tr>
</table>

<table><tr><td height="25" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Windows</b></td></tr></table>
<a href="http://groups.google.com/groups/dir?sel=usenet%3Dcomp.os.ms-windows"><img align="top" src="images/google_groups_icon.gif" title="o" hspace="5" vspace=1 width="16" height="16" border="0">comp.os.ms-windows</a><br>

<table><tr><td height="25" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Linux</b></td></tr></table>
<a href="http://groups.google.com/groups/dir?sel=usenet%3Dcomp.os.linux"><img align="top" src="images/google_groups_icon.gif" title="o" hspace="5" vspace=1 width="16" height="16" border="0">comp.os.linux</a><br>

<table><tr><td height="25" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Perl</b></td></tr></table>
<a href="http://groups.google.com/groups/dir?sel=usenet%3Dcomp.lang.perl"><img align="top" src="images/google_groups_icon.gif" title="o" hspace="5" vspace=1 width="16" height="16" border="0">comp.lang.perl</a><br>

<table><tr><td height="25" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Java</b></td></tr></table>
<a href="http://groups.google.com/groups/dir?sel=usenet%3Dcomp.lang.java"><img align="top" src="images/google_groups_icon.gif" title="o" hspace="5" vspace=1 width="16" height="16" border="0">comp.lang.java</a><br>

<p>
&nbsp;&nbsp;There are more programming newsgroups on my pages for
<a href="js.html#newsgroups" class="blueul"><b>JavaScript</b></a>,
<a href="windows.html#newsgroups" class="blueul"><b>Windows</b></a>, and
<a href="onlinetips.html#newsgroups" class="blueul"><b>Online Tips</b></a>.
<p>

<!-- Insert the footer from an external file -->
<script type="text/javascript" language="JavaScript" type="text/javascript" src="footer.js"></script>

</body>
</html>