02
Sat, Nov
2 New Articles

The Linux Letter: The Right Format for the Job

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Let me start this month's column by apologizing in advance for using it as a forum to rant a bit....OK, a lot. Usually, I can control my irritation when I'm confronted with this situation, but for some reason, my most recent encounter with it really ticked me off.

What has my blood pressure spiking? It is the use of formats other than simple text for tasks where simple text would be the most appropriate choice.

Choosing an inappropriate format is a problem typically borne out of inadequate training or poor product design--circumstances for which we can't really hold the user totally responsible. But sometimes a user's (or a design team's) choice is made out of laziness and total lack of consideration for the people who have to deal with it down the line. It is those situations that have me reaching for a double dose of blood pressure medication and for my keyboard to write this rant. I'm mad as hell about wasted time, bandwidth, and productivity, and I'm not going to take it anymore!

Emotional Outburst

By now, you must be wondering what dramatic event evoked this emotional outburst. To make a long story short, I received a visit from a user who told me that she had received an email message containing an attachment that she couldn't open. Further investigation revealed the offending attachment to be a Microsoft Word document. For some unknown, reason, her browser (she's using SquirrelMail) lost the association between the attachment with an extension of ".doc" and the OpenOffice.org office suite. The quick workaround was to click on the "download" link and bring the file to her desktop, where she could open the file using the standard "open file" dialog. (We fixed the association later.)

What did the Word document contain? Was it some important contract with fill-in fields? No. Was it an instruction manual with lots of pretty pictures? Again, no. This document, which caused so much confusion and aggravation, contained a meeting agenda consisting of six (count 'em--six) short lines of text. No special formatting. No graphics. In fact, there was nothing about it that would justify the bandwidth to turn a 200-character message (at best) into a 17,000 character, MIME-encoded message, not to mention the time we wasted trying to open the thing.

What was the author of this missive thinking? I can easily guess the sequence of events that led up to the delivery of this bloated email. First, he (the author's name was clearly masculine) created the agenda for the upcoming meeting using Microsoft Word and then printed the 30+ copies that he would need to hand out at the meeting. Next, he composed a short email message to the attendees (along the lines of "Here's the agenda"), attached the Word document, and hit the Send button. Satisfied that he can now cross "send meeting agenda" off of his to-do list, he doesn't give it another thought.

If, however, he had taken just a moment longer to cut and paste the agenda from Word directly into the email, then I wouldn't be complaining. In the same amount of time it took him to attach the Word document to his email, he could have cut and pasted its contents, saving my company roughly 10 minutes of time.

While it may appear as though I'm being overly dramatic, consider this: Many of us forward email to our pagers and cell phones. So if a user chooses to send a message using a proprietary format and it ends up on one of our cell phones, she shouldn't complain when we don't respond. We can't even read it! You can never assume that a message's recipient will have the appropriate software available to read an inappropriately formatted message. In addition, I'm sure that all of your users have been properly admonished not to open attachments that they aren't expecting. Thus, while the recipient tries to verify the message's authenticity, the content that is embedded in a binary attachment will not be opened and read. (At least, I'm hoping that the user wouldn't blindly open it!) Such a delay could be fatal (e.g., "Dear John: Your donor heart is now available....").

I teach my users that, when sending email, they should use binary attachments only when they are warranted and only when their content cannot be conveyed in plain text. The text is the message. Fancy formatting is (for the most part) superfluous to the message. (I'll save my rant about the evils of HTML-formatted email for another time.)

Text Is Not Just for Emails

Now that I've vented about non-text email, let me stand back up on my soapbox again, this time to espouse the virtues of text-based configuration files (since I've recently had some unpleasant experiences with some software that kept its configuration in binary files). If you use a UNIX-like system, you're already aware of the virtues of the text configuration files that are stored in the '/etc' directory. If you don't, odds are that at some time you have had to either reload your system because "the registry" (hereinafter referred to as "the abomination") got corrupted or purchase software to let you "clean" or "repair" the abomination. Granted, incidences of abomination corruption have become less frequent as the OS that uses the abomination has improved. But no matter how good that OS becomes, the lack of good ol' text-based configuration files deprives computer professionals of two key advantages:

Text Is Transparent

First, text configuration files are transparent. You don't need some obscure (or potentially expensive) utility to read a file that is text-based. Assuming you have the proper privileges, you can read or write a text-based config file using a simple editor. This is a nice attribute during normal system operations, but it is a godsend should you find yourself booted to some recovery media because of a hardware or software failure. Helping someone debug a failing system is much easier if he can send to you (or post to a newsgroup) his current configuration files. And cloning services between servers is a snap when all you need to do is copy a file, edit it, and then send it to the new server. Oh sure, I know that you can import and export "hives" using specialized tools. (I always thought that hives were some kind of medical condition.) But the ease of importing/exporting hives pales in comparison to what can be done when you can actually read and make sense of the file you're working with. The config files that I have seen always seem to have sufficient, if not copious, documentation concerning each of the parameters and their options, which is something lacking in ".reg" files.

Text Is Scriptable

The second major attribute of text config files (or any text-based files, for that matter) is that they are scriptable. I can easily use any of the plethora of system utilities to create textual config files or to make changes to them. As an example, we recently reconfigured our internal DNS to change domain names. Most of the employees have their Firefox browsers pointing to our intranet as their startup home page. After the domain name change, I wanted to reconfigure their browsers to point to the new home page. Since their roaming profiles are stored on my Samba server, it was a trivial task to write a quick script to find their preferences files and make the change:

find /path/to/profile/data -name "prefs.js"   
| xargs -i sed -i 's/old.domain/new.domain/' {}

I made a similar edit to their bookmarks files as well. All of it was made easy because the developers of the Mozilla and Firefox browsers know the elegance of text for storing this type of information.

Text Leads to Sanity

I feel so much better now. I'm sure all of you know how good it feels to vent your frustrations every once in a while. Fortunately, there are others out there who feel as I do. Readers who also are Java programmers already use text-based configuration files; they're called properties files. If you store your configurations in XML, you're still dealing with text files. They're just a bit more cluttered when viewed with an editor. That the configuration file is "zipped" or "jarred" is of minimal consequence; it just adds a layer of complexity.

Which brings me to the exciting news that has hit all of the technology Web sites: The Massachusetts state government has ordained that all electronic documents "created and saved" by state employees will have to be based on open formats. The open formats blessed by this edict are PDF and OpenDocument, which is XML-based. The switch is scheduled to be fully implemented by January 2007.

As more and more states adopt these formats, I'll be able to exchange documents more easily without resorting to specialized import/export filters. All I will need is a PDF reader and my favorite office suite, OpenOffice.org (which fully supports the OpenDocument format in its upcoming release, V2). Of course, it won't be long before the person who sent the .doc file attachment will be attaching OpenDocument binaries instead, and I'll be back where I started. Here I go again....

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms for over 21 years. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He co-authored the book Understanding Linux Web Hosting with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

Barry Kline 0

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms since the early 1980s. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He co-authored the book Understanding Web Hosting on Linux with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: