General Development Archive

Finite State Machines in C++; Generic C++ for Networks

Before tackling a seemingly complex code problem with lots of functions and complex logic, Jeff Cogswell recommends trying a finite state machine - a set of states and appropriate rules and actions that go with those states - to greatly simplify your coding. Service oriented architectures sound complicated and daunting, but they're not so hard to implement. The concepts involved are actually fairly simple, and this article describes them by using examples drawn from the networking domain. Software consultant Stephen B. Morris describes some of the principles of service orientation in the down-to-earth contexts of C++ and networking.

LLVM 1.7 Released

LLVM 1.7 has been released. "This release contains a completely rewritten llvm-gcc (based on GCC 4.0.1), a brand new SPARC backend, supports GCC-style generic vectors, supports SSE and Altivec intrinsics, support for Objective C/C++, the X86 backend generates much better code and can produce Scalar SSE code, this release has initial DWARF debugging support, includes a new llvm-config utility, has initial support for GCC-style inline assembly, and includes many target-independent code generator and optimizer improvements."

Leave Eclipse Plug-in Headaches Behind with OSGi

"Find out how to write extensions in code for other plug-ins while not creating a binary dependency on those other plug-ins with the Eclipse V3.2's dynamic-extensions API. Accomplish all of this and more with the Open Services Gateway Initiative services API and the dynamic APIs. This article shows an example of one plug-in taking in XML to register extensions for a defined extension point. We accomplish this complete decoupling of components by having the plug-ins Extension Registry aware and providing an OSGi service."

C++: Defect Removal vs. Defect Survival

Defect removal is preferred over defect survival. If some defect slips through the cracks, however, the C++ exception handling mechanism helps to fortify your software's fault tolerance, as Cameron and Tracey Hughes explain. Also, elsewhere on the same site, old maps were marked with the phrase "Here be Dragons" to help seafarers steer away from dangerous places; in programming the best way to avoid dealing with bad code is to avoid writing it. Diomidis Spinellis points out 10 giveaways to spot bad code that you (or others) may have written.

Demystifying Regular Expressions

"In this article a simple usage of regular expressions is described. Its intention is to bring users to try the most powerful search and replace paradigm available and hopefully start using it. This however can not replace good tutorials available on the sites that are also mentioned in this article. The article is written reproducing actual steps I took to complete my task, to show the specifics and possible problems."

C++ Inheritance and Polymorphism

Good news! Inheritance and polymorphism can facilitate more concise code, which reduces waste throughout the lifecycle of a C++ product. By pushing more generic code into base classes, you can help reduce application code clutter as well as cutting down on code duplication. In this article, software consultant Stephen Morris insists that less code means less testing, lower maintenance costs, and easier upgrades.

Debugging Code Using ptrace

"Nobody can write perfect code, since errors can creep in from anywhere. Hence we need some way to debug the programs. One such way is to use ptrace() system call. Debugging programs like gdb are dependent on this system call. This call gives one process control over another process. The process under control can be run step-by-step and its contents can be read and modified, i.e. you can change the core image of it."

Eiffel To Offer Dual Licensing for EiffelStudio

"Eiffel Software today announced that the latest version of its cross-platform IDE EiffelStudio is now available under dual licensing, enabling users to choose between a license for commercial development and a license for open source development. Eiffel Software's dual licensing model is based on the principle of fair exchange. Users who write commercial proprietary software must purchase the corresponding licenses and may freely choose how to distribute their software. Users who donate their source code to the open source community can use the open source version and must distribute their software under the same license." The sourcecode is available via SVN and is licensed under the GNU General Public License.

Secure Programming in GNU/Linux Systems: Part I

"This article is a first in series that deals with secure programming and related issues. Before we begin though, let's first define secure programming. A 'secure program' is an application that sits on a security boundary, taking input from a source that does not have the same access rights as the program. Such programs include application programs used as viewers of remote data, web applications (including CGI scripts), network servers, and setuid/setgid programs."

Thinking Recursively with C++

Algorithms can often be implemented recursively or nonrecursively; the decision rests with the programmer, who might shy away from a recursive solution because the algorithm might not terminate or that performance might be poor. In reality, recursion can allow for very elegant code as well as facilitating an interesting and economical type of code reuse. Software consultant Stephen B. Morris explores this interesting topic with a data-centric application drawn from the field of networking.

Explore Eclipse’s Embedded Rich Client Platform

"Get an introduction to the embedded Rich Client Platform. Learn about the various components that make up eRCP and get some examples on how to use them in your applications. The embedded Rich Client Platform came about as a way to bring the advancements of the Eclipse Rich Client Platform and apply it to the embedded space. The eRCP is made up of the following components: Standard Widget Toolkit, eJFace, eWorkbench, and eUpdate. We will discuss each of these components and use code examples where appropriate."

ROTOR (SSCLI) 2.0 Released

"I'm happy to announce today that ROTOR 2.0 has released to the web. You can download the release here. ROTOR contains most of the CLR and base class libraries found in our commerical product. It is released under the shared source program. There are several new things in this release: generics implementation; Lightweight Code Generation; stub-based dispatch support; new reflection and reflection emit; new C# features like Anonymous Methods, Anonymous Delegates and Generics."