Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Tutorial: Write your own operating system

Up
vote
Down

A rather ambitious tutorial.
Writing an operating system is something that can not only be interesting (if you're one of those people that get turned on by Int 13....) but it is also a great learning experience. Through creating your own operating system you will learn exactly what goes on behind the scenes, elevating you above the average programmer...
[In addition to the tutorial linked from [read more] below, you might also be interested in this FAQ on developing your own OS. -Ed] read more...
mail this link | permapage | score:8755 | -Ray, June 18, 2003 (Updated: August 24, 2008)

PHP vs. ASP

Up
vote
Down

While PHP is a runaway winner in cost as well as platform portability, there are several other good reasons to use PHP instead of ASP...
Both ASP and PHP are languages used to build Dynamic Web sites that can interact with Databases and exchange information. ASP (Active Server Pages) is from Microsoft and is used with IIS (Internet Information Server) that runs on Microsoft Servers. PHP (Personal Home Pages) is from Rasmus Lerdorf, who originally designed this parsing language which was later modified by different people. It runs on Unix and Linux servers and it also has an NT server version.

There are a lot of differences between ASP and PHP.
read more...
mail this link | permapage | score:8744 | -Ray, December 25, 2005

Programming Language Tradeoffs: 3GL vs 4GL

Up
vote
Down

Level of Abstraction
The level of abstraction that a programming language provides is all about tradeoffs. Lower level languages (I'll inaccurately call them 3GL's) supply a few small operations which can be combined with great flexibility to accomplish almost anything. The cost, of course, is in the time-consuming detail in which each and every bit of code must be cast. Conversely, high level languages (loosely, 4GL's) and application generators include meta-operations which provide much more functionality for a given amount of code. Once again, there is a cost. Here the big penalty is a loss of flexibility -- which is proportional to the size of the functional units. There are a prohibitively large number of ways in which a few small operations can be combined to create large ones. Therefore, only the most common of these large functions can be reasonably implemented in a high level language before the point of diminishing returns is reached. As the language integrates more large functions into its syntax, its complexity eventually reaches a point where a high level of skill is required to use it effectively.

Special-purpose Libraries
The original distinction between 3GL and 4GL languages has long been blurred by the availability of prepackaged libraries. For example, there are a wide variety of special-purpose function and class libraries on the market for C and C++. These tools lets experienced programmers use their general-purpose language skills while adding only the specialized components needed to complete an application. The details of using the library follow the patterns that they already know, leaving them to learn only the minimum necessary to write their specialized program.

Applications Generators
Meanwhile, programming with some application generators no longer resembles traditional coding -- but the same type of decisions are being made and the same kind of work is being done. The units of functionality are larger, of course, and the methods of manipulating the chunks of logic are usually different as well. Only if the generator is a good match for the application, however, will the potential productivity advantage of this approach be fully achieved. In selecting such a tool, the same tradeoffs that apply to the choice of 4GL's versus 3GL's must be considered. Application generators don't represent a fundamental change in the nature of programming but rather just another point in the continuum of low and high-level programming.

Intermediate Code
To blur the distinction further, the ability of some 4GL's to generate 3GL intermediate code would seem to give the developer the best of both worlds. It retains the productivity of high-level programming and provides access to the machine efficiency and low-level flexibility of a 3GL -- just as the libraries for 3GL's seem to do. While this approach should result in an environment that is as flexible as the 3GL alone, it comes with a tradeoff. To exercise the flexibility of the 3GL it becomes necessary to program in two languages, which increases maintenance costs and training requirements.

The Right Tool for the Job Versus Expertise
Further complicating the issue is the matter of expertise. A very specialized language may be the most productive for a particular application. However, experts in a more generalized language might complete the application on schedule more predictably than would neophytes with a special-purpose language. Of course, the practitioners of the general-purpose language get more opportunities to hone their skills.

Because of this effect, choosing the best language for each particular application might not always be the optimum overall strategy.


[The author codes in C and PHP and no longer uses COBOL, Atari BASIC, Visual BASIC, FORTRAN, ALGOL, Natural, RPG, or IBM 370 Assembly.]
mail this link | permapage | score:8736 | -Ray, June 24, 2001 (Updated: November 29, 2002)

The Real Microsoft Monopoly

Up
vote
Down

The courts have ruled that Microsoft holds a monopoly position in Intel PC Operating Systems. Business users have long been aware of Microsoft's lock on office productivity applications that require them to use MS Office in order to remain compatible with their business partners and customers. And web-surfing users are now using Internet Explorer in a ratio of about 8:1 over alternative browsers.

But one aspect of Microsoft's monopoly is more fundamental than any of those; the investment in skill, experience, training, and tools of Windows software developers themselves.

Those programmers, who have logged many long sessions of coding for the Windows environments, and with their deep immersion in its assumptions, tools, and API's, represent millions of person-years of Microsoft assets.

For years it has been a difficult decision for a professional developer to choose an environment other than Windows. The scale of that market dwarfs its competitors and opens to developers many more specialty markets than any alternative platform. Further, the sheer size of the Windows installed base is seen as a hedge against market change. Windows is perceived as a platform that will be with us for a long time to come.

Because it can take years of effort to reach the highest levels of productivity in a complex development environment, Windows-specialized programmers have, through economic necessity, been unable to switch to a different platform. With a large majority of developers writing code for Windows, the continued dominance of Windows applications was also assured. The monopoly was elegantly self-perpetuating.

Many companies, failing to appreciate the depth of Microsoft's monopoly and its determination to defend it, squandered valuable resources probing Microsoft's markets for an opportunity. After several spectacular failures, it seemed nearly impossible for such a locked market to break free of this cycle.

It seemed impossible, that is, until recently. Windows is no longer leading the growth curve among operating systems. The near perfect seal at the margins of the monopoly, it turns out, is only effective against competitors with a requirement to make money.

While Microsoft once made the fending off of mighty IBM look easy, the Linux phenomenon presents a very different kind of challenge. It needs no profits, corporate partnerships, or investors in order to succeed. Linux depends only on hobbyists' passion for programming and their self-imposed standards of quality in their own work. Further, the Linux community seems to draw motivation from its dissatisfaction with the computing landscape that Microsoft has created.

This noncorporate juggernaut has grown so large that it is spilling into commercial markets on many fronts. Now, with the additional support of several large corporations, the expansion rate of Linux could actually accelerate.

Much of the continued growth of Linux will come at the expense of Microsoft. Others will lose business along the way, of course, but the ubiquitous presense of Microsoft astride the market presents many targets that are simply too broad to miss.

Unfortunately for Windows programmers, at some point the rapid growth of Linux will force the saturated Windows market to start shrinking. Soon thereafter, the seller's market for Windows programming services will become a buyer's market -- and pay scales will begin to drop. Although the computer industry has experienced many of these disruptions in the past as new competition entered the market, this will be the largest such contraction by far.

Confidence in the impenetrable market lock of MS Windows is slowly fading. Some years from now when this trend reversal is complete and documented, we will look back to a single turning point to call the end of Windows' dominance. I'm making my pick a little prematurely. I think the critical point was IBM's decision to support and invest heavily in Linux.
mail this link | permapage | score:8732 | -Ray, July 9, 2001 (Updated: April 18, 2007)

Tutorial: Write a Qt program with Qt Designer

Up
vote
Down

Write Hello, World! using Qt Designer...
Here are some simple steps to create a 'Hello, World!' application in Qt using Qt Designer. Aim is to create a Window with a push button on it and when clicking on the push button, "Hello, World!" will be shown on the terminal window. All these steps are tested on a Fedora Core 2 machine with Qt 3.3.2 and KDE 3.2
read more...
permapage | score:8727 | -Ray, October 29, 2004

A multithreaded web server for Linux (source code)

Up
vote
Down

A nice example if you're building a multithreaded server...
The only one source file has been modified is server.c
Instead of fork new process to handle each incoming client's connection,
as procedure server_run ( ) does in [1], we start pool of 1024 threads
accepting as parameter descriptor of passive socket.

The procedure run by each thread is asynchronous BSD socket’s server utilizing
select() system call (see for example [2],chapter 13(5)) to switch between
handling incoming client's requests by accept() system call and receiving "http"
requests from clients already connected to server utilizing procedures
handle_request() and handle_get() from [1],chapter 11.
read more...
mail this link | permapage | score:8717 | -Ray, April 29, 2005

Install WebSphere MQ on Linux

Up
vote
Down

This article shows you how to get started installing and configuring WebSphere MQ on Linux and developing Java applications for the MQ environment, using sample applications for sending messages to and receiving messages from a queue. read more...
permapage | score:8709 | -Ida Momtaheni, May 24, 2007

Programming the Sony PS3 SPE cores under Linux

Up
vote
Down

Take even greater advantage of the synergistic processing elements (SPEs) of the Sony PS3 in this installment of Programming high-performance applications on the Cell BE processor. Part 2 looks in depth at the Cell Broadband Engine processor's SPEs and how they work at the lowest level, while Part 1 showed how to install Linux on the PS3 and explored a short example program. read more...
mail this link | permapage | score:8705 | -Ida Momtaheni, February 21, 2007

Online Ruby Interpreter

Up
vote
Down

Try Ruby online with this online tutorial / interpreter. It runs in your browser.
Ruby is a programming language from Japan (available at ruby-lang.org) which is revolutionizing the web. The beauty of Ruby is found in its balance between simplicity and power.

Try out Ruby code at the prompt above. In addition to Ruby's builtin methods, the following commands are available:
read more...
permapage | score:8700 | -Ray, November 30, 2005

The life cycle of a programmer

Up
vote
Down

  • binary age(*) 0 > 1 (baby): learns structure of first language

  • 1 > 10 (toddler): walks, learns many keywords of first language and significance of context, develops philosophy of life

  • 10 > 100 (little kid): violates rules of language, is housetrained (usually)

  • 100 > 1000 (brat): violates intent of language, starts school to learn new ways to abuse language

  • 1000 > 10000 (big kid): reaches physical maturity, reverts to subset of language with local variations -- causing parsing errors among programmers of all other ages

  • 10000 > 100000 (trainee): reaches mental maturity (usually), learns new languages, starts to work (usually), marries (maybe)

  • 100000 > 1000000 (programmer): reaches emotional maturity (usually) and begins to decline physically, works, dreams of times of no work both past and future, divorces (usually), remarries (maybe)

  • 1000000 > 10000000 (curmudgeon): forgets languages, declines in usefulness; almost all programmers are retired during this age range, although in the past some remained working well into this range to deactivate millenium(**) bugs in their older code

  • => 10000000 (zombie): this is currently not possible due to the age field having been defined as a signed char; while negative ages are not logically possible, it is believed that the negative range was once used for returning errors from age-related functions and this definition has been retained for historical compatibility (the language committee apologizes for any inconvenience this may cause)
* age expressed in complete cycles around the main energy object

** primitive languages used an obsolete numbering system called 'base ten' which somehow encouraged programmers to create date bugs related to the value 11111010000 (?)
mail this link | permapage | score:8678 | -Ray, June 15, 2000 (Updated: April 18, 2007)

perl dispatch table examples

Up
vote
Down

Dispatch Table: The fancy name for a hash of code-refs...
In perl, code is a first class data type... you can talk about it in the same way you would talk about arrays or hashes, you can take references to them (giving you a code-ref ) and you can de-reference them (which runs the code);

Code-references are just scalars that refers to something, and you get them by using the reference-to operator:
read more...
permapage | score:8634 | -f00li5h, December 17, 2010

Java J2EE Tutorial: Secret Santa Web Application

Up
vote
Down

In the spirit of the season, Santa's helper Merlin Hughes, who doubles in real life as a Java developer, presents the design and implementation of a J2EE-based secret Santa Web application, along with a discussion of the tools and technologies that can be used to ease the development of such applications. The articles provide a broad overview of how to build a J2EE application from the ground up, using some modern tools and frameworks, with details of how these different technologies work together to produce the end result. While not intended as detailed treatises on any individual technology, these articles instead serve as guides to developing a Web application with J2EE. This first article focuses on the beans, their design and implementation, and the use of XDoclet to accelerate their development and deployment.

Part 1: The beans
Part 2: The controller
Part 3: The view read more...
mail this link | permapage | score:8627 | -solrac, December 19, 2003

Tutorial: Install the Aptana AJAX IDE on Ubuntu

Up
vote
Down

This tutorial shows how to install the Aptana IDE on an Ubuntu Edgy Eft system. The Aptana IDE is a free, open-source, cross-platform, JavaScript-focused development environment for building Ajax applications. It features code assist on JavaScript, HTML, and CSS languages, FTP/SFTP support and a JavaScript debugger to troubleshoot your code. read more...
permapage | score:8617 | -falko, March 14, 2007

Unix: Shell Script Wrapper Examples

Up
vote
Down

Shell script wrappers can make the *nix command more transparent to the user. The most common shell scripts are simple wrappers around third party or system binaries. A wrapper is nothing but a shell script that includes a system command or utility.

Linux and Unix like operating system can run both 32bit and 64bit specific versions of applications. You can write a wrapper script that can select and execute correct version on a 32bit or 64bit hardware platform. In cluster environment and High-Performance computing environment you may find 100s of wrapper scripts written in Perl, Shell, and Python to get cluster usage, setting up shared storage, submitting and managing jobs, backups, troubleshooting, invokes commands with specified arguments, sending stdout to stdout and stderr to stderr and much more.

In this post, I will explains how to create a shell wrapper to enhance the basic troubleshooting tool such as ping and host. read more...
mail this link | permapage | score:8592 | -nixcraft, June 24, 2012

Mac Shell Scripting Tutorial

Up
vote
Down

A tutorial on scripting for the Mac, from Apple.
This document assumes that you already have some basic understanding of at least one procedural programming language such as C. It does not assumes that you have very much knowledge of commands executed from the terminal, though, and thus should be readable even if you have never run the Terminal application before.

The techniques in this document are not specific to Mac OS X, although this document does note various quirks of certain command-line utilities in various operating systems. In particular, it includes information about some cases where the Mac OS X versions of command-line utilities behave differently than other commonly available versions such as the GNU equivalents commonly used in Linux and some BSD systems.
read more...
mail this link | permapage | score:8587 | -Ray, October 10, 2006

Monitor a Linux service with watchdog scripting

Up
vote
Down

Monitor your web server, or just possibly, that program that mysteriously disappears occasionally...
Old Unix hands already know this, but new Unix (Linux) users may be asking, ‘What is a “watchdog script”?’ Basically it is a bash or other script that is run via cron periodically to check on a persistent service. The watchdog script takes actions based on the state of the service it monitors.
read more...
permapage | score:8582 | -Ray, May 19, 2010

Tutorial: Write plugins for Nagios

Up
vote
Down

Nagios is open source monitoring software that scans hosts, services, and networks for problems. Learn more about Nagios and find out what new system monitoring possibilities exist with this software.
You can use Nagios to monitor all sorts of hardware and software. The opportunity to write your own plug-ins makes it possible to monitor everything that your Nagios server can communicate with. As you can use any computing language that manages command-line arguments and exit status, the possibilities are almost endless!
read more...
mail this link | permapage | score:8579 | -BlueVoodoo, July 19, 2007

Perl tips

Up
vote
Down

Ten perl one-liner tips and tricks...
The core of any perl one-liner is the -e switch, which lets you pass a snippet of code on the command-line:

perl -e 'print "hi\n"' prints "hi" to the console.

The second standard trick to perl one-liners are the -n and -p flags. Both of these make perl put an implicit loop around your program, running it once for each line of input, with the line in the $_ variable. -p also adds an implicit print at the end of each iteration.
read more...
mail this link | permapage | score:8561 | -Ray, June 1, 2010

Best practices for XML in Java programming

Up
vote
Down

The following series of tutorials provides sophisticated topics for manipulating XML documents with Java technology. Author Doug Tidwell shows you how to do tasks such as generate XML data structures, manipulate those structures, and interface XML parsers with non-XML data sources. You will learn how to use XML parsing in the Java language and get a good look at some of the more esoteric features of DOM, SAX, JDOM, and JAXP.

XML programming in Java technology, Part 1
XML programming in Java technology, Part 2
XML programming in Java technology, Part 3 read more...
mail this link | permapage | score:8523 | -solrac, August 28, 2004

Tutorial: Using Eclipse to develop grid services

Up
vote
Down

This IBM tutorial requires you to create an account on their website, if you don't already have one.
This tutorial illustrates how to use the versatile Eclipse environment to facilitate development of Globus Toolkit V4 (GT4) grid services. It is written for Web service and grid developers who would like the convenience of orchestrating the whole grid service development process from within the Eclipse IDE on Windows-based platforms.
read more...
permapage | score:8513 | -Ray, June 13, 2005
More coding articles...
Abstract Art in Tallahassee

coding headlines

Apache Derby Tutorial

HTML5: Drag and Drop to a webpage

Command line functions

Scripting: Bash Array Tutorial

Tutorial: Android development environment on Fedora 14

kdb: Initial steps of dump analysis

BASIC for Linux

Open source Cloud Computing with PHP and MySQL

Tutorial: Install and test C, C++ Compilers in Ubuntu

Tutorial: Database Connection Management with Spring

PHP / MySQL Cheat Sheet

GWT and PHP

Tutorial: Creating graphics with PHP

How to debug a Linux Shell Script

String matching in regular expressions

GDB and SSH Tunneling

Porting 32-bit Linux code to 64-bit systems

xmldiff: Create XML patch files

Linux Debugging Tools for C

sed and awk tips

Create native looking Firefox web apps

Java API: NamespaceContext sample code

Tutorial: UDP socket based client server C programs

Free Linux Game Engines

Tutorial: Linux game programming with Ogre 3D

Tutorial: Build a grid application using Python

Example code: A PHP/Ajax chat application

Porting C / C++ code from Windows to Linux / Unix

C Programming Tutorials

Create Flex 4 and Java web apps

Download: Java 5 for Linux

Build an Android Twitter app with XML and JavaScript Object Notation

Learn HTML5 with these quick coding examples

bash scripting: Looping through a list

C Language Data Types: A guide for beginners

Tutorial: Writing a Linux device driver

Primer: The C fork() function

Perl: Build a wireless network sniffer

perl1line.txt: A handy Perl script collection

First look at Eclipse Process Framework Project

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin