ONLamp.com Articles

LAMP and the Spread Toolkit
by Jason R. Briggs
The LAMP stack provides almost anything a Very Serious Business needs to run Very Serious Business Applications--except a reliable messaging system. The Spread toolkit is powerful and open and easy to use; it's a natural fit to add more power to LAMP. Jason Briggs demonstrates how LAMPS can handle almost any job you can imagine.
11/30/2006

Caching Dynamic Content with Apache httpd
by Rich Bowen
Dynamic websites tend to be easier to manage than large collections of similar static files, but they often get many times more reads than they do writes. Every database hit and page generation can eat up precious CPU cycles. Rich Bowen shows off mod_cache, which trades disk space or memory for CPU and can help improve performance on your servers.
11/16/2006

What's on Jason's Hard Drive
by Jason Hunter
Maybe this is you: it's easy to keep your computer organized, but it's really difficult to keep real-world papers out of huge piles. Jason Hunter solved this problem by moving everything to digital forms. Here's how he made a game out of keeping his real life organized digitally.
11/02/2006

Developing High Performance Asynchronous IO Applications
by Stas Bekman
When concurrency and latency are your bottlenecks, synchronous IO is a problem--even in a multithreaded or multiprocess model. This is especially evident when dealing with high volumes of incoming mail, especially if much of it is spam. Stas Bekman and his team at MailChannels recently built a scalable, modern, event-based system for asynchronous IO. Here's how they did it.
10/12/2006

Unit Testing Your Documentation
by Leonard Richardson
It's fairly easy to prevent errors in code from occurring and reoccurring; unit tests are an effective strategy to prevent regressions. What about the example code in your documentation? Errors there can frustrate and thwart readers and learners. Fortunately, it's possible to test your documentation almost as effectively. Leonard Richardson, co-author of the Ruby Cookbook, demonstrates how he kept his code examples correct.
09/07/2006

Understanding Newlines
by Xavier Noria
Munging text is familiar to agile language programmers. It's very straightforward, right? Text comes in, text changes, and text goes out. Yet in a multi-OS world with networks, internationalization, and character sets, is text really that simple? Xavier Noria delves into how computers handle text to explain the newline problem and how to work with it in agile languages.
08/17/2006

What Is OpenDocument
by Sam Hiser
The OpenDocument Format (ODF), an open source file format standard for electronic office documents, is poised to change the world from an application-centric model of computing to a document-centric model. Sam
Hiser looks at this new standard, how it implements XML for office documents, the technical and political wranglings in the standard, available tools, applications that offer ODF support, who's implementing ODF, and more.
07/27/2006

Free and Open Source Software at the United Nations
by David Boswell
Advances in technology have revolutionized the way people live, but the digital divide keeps vital technology out of third-world countries. As part of a series of initiatives to end global poverty by 2015, the United Nations is using, promoting, and creating free and open source software. David Boswell gives an overview of the plans and progress.
07/20/2006

Rethinking Community Documentation
by Andy Oram
Good documentation makes good software great. Poor documentation makes great software less useful. What is good documentation, though, and how can communities produce it effectively? Andy Oram explores how free and open source software projects can share their knowledge with users and how publishers and editors fit into the future of documentation.
07/06/2006

Managing Many-to-Many Relationships with PL/pgSQL
by David Wheeler
SQL gives you plenty of options for handling relationships--you can use joins and database relations, or you can make multiple queries and write complex logic on the client. What are the benefits and drawbacks of each? David Wheeler recently experimented with moving complex relationship logic into PostgreSQL's PL/pgSQL language; the results were stunning.
06/29/2006

The Long View of Identity
by Andy Oram
Who are you online? Your digital identity is a complex bundle of information--not just what you say about yourself, but what other people say about you and how trustworthy they are. O'Reilly editor Andy Oram recently attended the Identity Mashup conference at Harvard Law's Berkman Center and reports on one of the most vital issues of privacy and usability on the internet.
06/29/2006

Build Your Own AIM Answerbot
by Robert Treat
The easiest way to solve a thorny problem is to ask a guru... yet when you don't have access to a resident expert just across the office, what can you do? IRC bots solve this problem -- if you have access to IRC. Robert Treat redeployed that idea within his company across AIM with a bit of Perl, a database full of answers, and a couple of hours of time.
06/15/2006

Natural Language Game Programming with Inform 7
by Liza Daly
Natural language programming is a huge goal of certain programming language communities. Unfortunately, it once gave the world COBOL. Graham Nelson's latest version of the Inform language for writing interactive fiction resurrects the idea of natural language. Liza Daly demonstrates how writing code can be a truly literary experience.
06/08/2006

Building a Self-Healing Network
by Greg Retkowski
Wouldn't it be nice if your network services could detect their own failures and gracefully restart? Sure, you could have cron or FAM jobs always checking them, but that's so unrefined. Instead, consider Greg Retkowski's solution: building a small Cfengine and NAGIOS combination to detect and recover from failure.
05/25/2006

Writing PostgreSQL Functions with PL/pgSQL
by David Wheeler
One of the most powerful features of PostgreSQL is its support for user-defined functions. The language to learn is PL/pgSQL, an unpronounceable but powerful way to write UDFs. David Wheeler introduces the language and demonstrates why UDFs are useful.
05/11/2006

Smart Pointers in C++
by Julio M. Merino Vidal
C++ is a powerful language that allows fine-grained control over almost all aspects of your program. Of course, low-level code has its disadvantages too. Manual memory management can be complex and difficult to get right. Fortunately, the RAII idiom and smart pointers can help you write correct and efficient code. Julio M. Merino Vidal demonstrates.
05/04/2006

From Weblog to CMS with WordPress
by John McCreesh
Weblog software is now so easy to use that almost anyone can keep a weblog up-to-date. In some cases, it's almost powerful enough to replace a more traditional content management system. John McCreesh describes how he replaced his CMS with WordPress to run a community site.
04/20/2006

Advanced MySQL Replication Techniques
by Giuseppe Maxia
MySQL Cluster is a powerful peering system to add high availability and replication across multiple database servers. It's not perfect, though. Using features of MySQL 5.0 and 5.1, it's possible to build a master/slave replication system with fail-over. Giuseppe Maxia shows how.
04/20/2006

Regular Expressions in C++ with Boost.Regex
by Ryan Stephens
Searching and parsing text can be a messy business, especially in C++. Instead of building your own token-based state machine, spend an hour learning regular expressions and use a good package such as the regular expression library from the Boost library. Ryan Stephens demonstrates how to match, search, and parse text with Boost.Regex in C++.
04/06/2006

The Software of Space Exploration
by David Boswell
Free software advocates often appeal to the open discovery, disclosure, and discussion practices of modern science as justification for sharing information. As software becomes more valuable for scientific research, free and open source software continue to grow in popularity. David Boswell looks at some of the software used in space exploration and usable by armchair scientists.
03/30/2006

Apple's High-Water Mark?
by Adrien Lamothe
Apple's latest moves have impressed observers, but the environment is about to change drastically, with Apple likely facing its greatest challenges. Where do the company and its users face competition? IBM, Sony, and ... Linux? Adrien Lamothe explores the computing landscape of 2006.
03/23/2006

System Administration with ooRexx
by Howard Fosdick
and Jon Wolfers
Rexx is one of the world's first scripting languages. Its portability, power, and open source implementations make it useful for all sorts of system administration features. Howard Fosdick and Jon Wolfers show how Open Object Rexx makes it easy to build a useful, usable GUI sysadmin tool even for platforms such as Windows.
03/02/2006

What Corporate Projects Should Learn from Open Source
by Jennifer Greene, Andrew Stellman
Many corporate projects fail to produce quality software, yet many large-scale open source projects succeed, and under much more difficult conditions: no budget, a geographically distributed team, and a volunteer workforce, to name a few. So
how do open source project teams ensure success? Andrew Stellman and Jennifer Greene introduce five basic principles in their new book, Applied Software Project Management, that will help any project succeed, open source or proprietary. The authors detail these principles in this article.
02/27/2006

A Canary Trap for URI Escaping
by Robert Spier
As web applications talk to each other more and more, the issue of URI escaping becomes more important--and more difficult. Escaping reserved characters correctly is vital to preserving user security and proper behavior, but it's neither idempotent nor free. Robert Spier shows how to build a canary trap into your URIs to help you escape and unescape data appropriately, effectively, and sufficiently.
02/23/2006

Introducing Lua
by Keith Fieldhouse
Scripting is highly important to extensible applications. Not only is it easier to write logic in higher-level languages, but also it's often safer. It can be effective, too--consider that World of Warcraft and other games embed the Lua language and use it for scripts, AI, configuration, and even user interface management. Why Lua? Keith Fieldhouse introduces the language and explains why it's so appropriate.
02/16/2006

Black Box with a View, Part 2
by George Belotsky
Erstwhile hardware hackers, rejoice! Programming microcontrollers doesn't have to be assembly language and pinouts and unmaintainable hacks. George Belotsky demonstrates development techniques for hobbyists that make building embedded systems much, much easier.
02/02/2006

Testing C with Libtap
by Stig Brautaset
Regression and unit tests are your first line of defense against bugs, bad design, and silly mistakes. Unfortunately, C programmers rarely use the good testing tools of other languages--but now there's libtap. Stig Brautaset explains how to test your C code using libtap and the wonderful Perl testing tools.
01/19/2006

There Is No Open Source Community
by John Mark Walker
Conventional wisdom argues that open source success is the result of individual iconoclasts who work against the economic grain to institute a methodology of sharing. That's nice--but it ignores strong economic trends that push open source development and adoption. John Mark Walker explains why the myth of the open source community is wrong and even harmful to business.
01/12/2006

Analyzing Web Logs with AWStats, Part 2
by Sean Carlos
If you don't know where you are and what you're doing, how do you know where you're going? A crucial part of any successful web site is statistical analysis. AWStats is a powerful open source tool for collecting, summarizing, and reporting web statistics. Sean Carlos shows how to interpret the reports--not just what they say, but what they mean.
01/09/2006

Organizing Files
by Karl Vogel
Is your home directory full of thousands of poorly organized files? Do you have deep directory hierarchies you are unable to navigate and barely remember creating? Are you sinking in a sea of data and just can't get out? Karl Fogel explains how he organized his life and his home directory.
12/15/2005

Managing TV with XMLTV
by Brian Murray
XMLTV is a set of open source utilities for working with television schedules. It's not just for people building their own PVRs, though--with a little cleverness, you can build your own schedule applications. Brian Murray shows how he manages his family's entertainment time.
12/08/2005

ONLamp 2005 Survey Results
by chromatic
We recently ran a survey on ONLamp.com to find out more about our readers. Here are some of the interesting tidbits of information we learned.
12/02/2005

Analyzing Web Logs with AWStats
by Sean Carlos
If you don't know where you are and what you're doing, how do you know where you're going? A crucial part of any successful web site is statistical analysis. AWStats is a powerful open source tool for collecting, summarizing, and reporting web statistics. Sean Carlos shows how to install, configure, and understand the output of the program.
12/01/2005

Modern Memory Management, Part 2
by Howard Feldman
Modern Unix-like operating systems have their own characteristics for allocating and using memory. Howard Feldman explains how modern programming languages use memory, why this matters, and how to avoid memory and resource leaks.
11/23/2005

TCP Tuning and Network Troubleshooting
by Brian Tierney
Information doesn't travel across networks in one big chunk--it goes in little packets wrapped in packets wrapped in packets. Sure, you know that, but did you know that a bit of measuring and a bit of tweaking can improve your networking performance by two orders of magnitude? Brian Tierney shows how.
11/17/2005

Analyzing Statistics with GNU R
by Kevin Farnham
Analyzing and graphing statistical data doesn't have to be as dry and boring as it sounds. With the GNU R programming language, it can be as easy as writing a few lines of code--R is to statistics and analysis as Perl is to text files. Kevin Farnham shows how easy it is to use GNU R productively with just a little bit of training.
11/17/2005

Processing XML with Xerces and SAX
by Q Ethan McCallum
It's rare to write an application these days and not run into the use of XML as a data interchange format. Perl, Java, Python, C#, Ruby, JavaScript, and PHP all have good XML processing libraries. Where's the love for C++ applications? It's in Xerces, a capable open source library. Ethan McCallum shows how to use Xerces and C++ to process, manipulate, search, and write valid XML with the event-based and memory-lean SAX processing model.
11/10/2005

Modern Memory Management
by Howard Feldman
Modern memory management isn't as simple as knowing that you have 150MB of programs to run and 256MB of memory to do it in. Modern Unix-like operating systems have their own characteristics for allocating and using memory. Howard Feldman explains how this works and shows how to analyze and reduce the memory consumption of your programs, no matter what language you use.
10/27/2005

What Is Ruby on Rails
by Curt Hibbs
Ruby on Rails is an impressive web development framework that will soon reach version 1.0. While there's a lot of buzz, it can sometimes be difficult to discern the steak beneath the sizzle. Curt Hibbs walks through the features and pieces of Ruby on Rails to show how it fits together and where its big benefits come from.
10/13/2005

Company-Wide Instant Messaging with Jabberd
by Oktay Altunergil
Instant messaging is becoming as valuable a business tool as email, the telephone, or the computer. While public networks are free (but not under your control) and private installations are under your control (but expensive), you can easily run your own secure, free server using the open standards of the Jabber protocol. Oktay Altunergil shows how to install and configure jabberd and to integrate it into an existing business directory system.
10/06/2005

What Is Free Software
by Karl Fogel
Today, free software is a large body of high-quality code on which much of the internet depends for critical functions. But free software is much more than a collection of programs. Karl Fogel examines free software under three different lights: as a political movement; as a programming methodology; and as a business model. Karl is the author of Producing Open Source Software.
09/29/2005

RMS: The GNU GPL Is Here to Stay
by Federico Biancuzzi
Though some in the open source world claim that the GPL is now unnecessary, RMS and the Free Software Foundation are still working night and day to promote the idea of software freedom. Part of that is a revision to the popular GNU General Public License. Federico Biancuzzi recently chatted with Richard Stallman about the goals and plans and successes of the GPL.
09/22/2005

What Is Open Source
by Dan Woods
Answering the question "What is open source?" used to be a lot simpler than it is today. Dan Woods provides some insight by first explaining how open source software is developed, then delving into how different groups define the term, and closing with a look at how open source institutions continue to advance the cause. Dan is coauthor of Open Source for the Enterprise.
09/15/2005

Processing XML with Xerces and the DOM
by Q Ethan McCallum
It's rare to write an application these days and not run into the use of XML as a data interchange format. Perl, Java, Python, C#, Ruby, JavaScript, and PHP all have good XML processing libraries. Where's the love for C++ applications? It's in Xerces, a capable and open source library. Ethan McCallum shows how to use Xerces and C++ to process, manipulate, search, and write valid XML.
09/08/2005