Remember Me
forgot your password?

Repeatable Code - a Step Up From Reusable Code

I think a generally acceptable definition of reusable code could be "code or functionality that will probably be useful in one or more future projects." It's a category of code that few managers or developers, in my experience, seem to pay much attention to until they need it.

This is unfortunate since, in my opinion, reusable code, when upgraded to repeatable code, has the potential to save big on development costs.

What Is Reusable Code?

From what I can gather, there are five primary sources of reusable code.

* Components (objects) that expose their functionality through an interface.

* User controls.

* Repositories that use a database and accept a limited number of languages.

* Web sites where code snippets and sample projects are freely exchanged.

* Other projects.

Components and user controls are great if the reusable code is appropriate for encapsulation. You don't have to be concerned with reusing code, only with reusing functionality. There is, however, a plethora of reusable code that would be very nice to have handy, but, doesn't work in a component or user control. Code repositories address this type of reusable code.

Unfortunately, code repositories tend to be limited. They can usually only be used with a few languages (normally one). In addition, repository programs typically use a database which makes the sharing of stored code less than easy.

While code repositories are typically very intelligent with the language they are designed to store, they are, in my opinion, usually not known for their flexibility when preparing that code for insertion into a new project. The ability to easily adapt reusable code to new situations "on the fly" is essential, in my option, if code is to be truly repeatable.

Exchange sites make reusable code readily available to anyone with access to the Internet. This free exchange of knowledge and specific coding solutions is ideal in concept. The usual implementation, however, has, in my opinion, room for improvement. Retrieving immediately useful code snippets from exchange sites is great when it happens. Unfortunately, code that can be retrieved and plugged directly into the project you are working on is, in my opinion, rare on exchange sites.

Similar to exchange sites, the store of fully or partially completed projects that a developer has worked on provide a gold mine of reusable code. However, this type of reusable code, like gold, must be found and then mined.

The search for, and mining of reusable code in other projects is normally done only by the developer of the project because that person is usually the only one who has any idea what nuggets are to be found. This "one person show" type of reusable code makes this buried code of limited availability to anyone else.

Components and user controls serve well for their intended purpose. I think the main shortcomings in the reusable code arena are with repositories, exchange sites and other projects. Repeatable code addresses the shortcomings of these code sources by taking the entire concept of reusability to a new level.

Repeatable Code Is A Step Up

Repeatable code extends the concept of reusability by incorporating the advantages of speed, simplicity, predictability, portable documentation and ease of sharing. These advantages are realized with a well written repeat text writer.

* Speed. Repeatable code is stored in libraries that are easy to navigate. Source libraries are organized in any way that makes sense to the user. Once a library has been opened in the repeat text writer, the duplication of any source file in that library can be started with one mouse click.

Markers embedded in the source text enable customization of repeated code "on the fly" every time a source file is repeated. Ready-to-compile code can be generated with a very few keystrokes.

* Simplicity. Markers in source files can be set up such that duplication and customization of source files requires little, if any, knowledge of the language in which the source text is written. Repeatable code thus becomes even more valuable by extending the reusability of complex code to entry level developers.

* Predictability. Code stored in repeatable source files remains unchanged even though each new duplicated version of the code can be very different. How much repeatable code can be customized "on the fly" depends on the embedded markers.

Regardless of how much repeated code is changed, as long as the code in the source file is sound, each new duplication of the code can usually be counted on to be ready to compile.

* Portable Documentation. A source library overview feature lets you write any documentation you feel is needed for users of the source files that you create. Users of the library can view this documentation as a reference whenever they are duplicating files by opening the Float Overview window. Each time a library is packaged and sent to someone else, the overview can travel with the code.

In addition to the library overview, there can be a note pad for each source file, plus inline messages within source files. Note pads can be used to keep file specific information that is accessible from the program's main window. Inline messages are embedded in source files and can optionally be displayed whenever encountered during each duplication.

* Ease Of Sharing. Entire libraries (including the overview, source files and note pad files) can be easily packaged and sent to other repeat text writer users.

With built in packaging and unwrapping functions, entire libraries can be packaged into one file with a few mouse clicks. Recipients of library exchange files can unwrap packaged libraries just as quickly. The recipients of packaged source libraries can immediately begin repeating ready to compile code from newly unwrapped libraries.

Conclusion

When I finish writing reusable code that I've never written before, I make an effort to store that reusable code in a repeatable library. Using a repeat text writer has had a profound effect on the way I think about, and do my coding.

I honestly don't think I would enjoy developing software nearly as much if I didn't have a tool for repeating customizable code so easily. Code that I use often, or code that is complex to integrate into new projects is made readily available and simple to use with a repeat text writer.

George Gilbert

George Gilbert writes software for personal computers. Titles include myOwn10-Key, myOwnPayday, Person On Call, Trend Importer and Double Text. Find out more about these innovative, award winning programs at 2goodsoftware.com.

Rate this Article: 5 / 5 stars - 1 vote(s)
Print Email Re-Publish

Add new Comment



Captcha

  • Latest Programming Articles
  • More from George Gilbert

Hire PHP Expert

By: linksswap | 22/12/2009
(Web Art Sense) PHP enabled websites are making the businesses run online. But what it takes to develop such powerful open source websites? Have you ever seriously thought on it? Open source technology is the advanced technology that allows customized web development operations. PHP websites are developed by team of experts. The team is divided into different groups that look into different aspects of website development.

Build Robust Web Applications using Spring Persistence with Hibernate

By: Swati | 22/12/2009
Packt is pleased to announce a new book, Spring Persistence with Hibernate that helps explore the features of Hibernate and helps developers integrate it with Spring to design their applications effectively. Written by Ahmad Seddighi, this book helps developers build and run persistence solutions for their enterprise Java applications using Spring and Hibernate frameworks.

iPhone Web Development Company: Helping You Get the Best of Web Applications

By: Arun Kumar | 22/12/2009
One gadget that has stunned the entire pool of gadget freaks through its awe-inspiring features and looks is the exquisite iPhone, a gem of a product from the Apple stable. It’s a device that everyone would like to touch, everyone would love to explore!

Joomla – Best Open Source Content Management System You Can Get

By: ali momin | 21/12/2009
Joomla is an open-source content management system (CMS) used to make a websites. Open-source means all underlying code is offered for free use and modification. So, there may be many applications running in a Joomla-built website, but they are usually free software available to use or modify.

Know the knowledge about photo accessories

By: Henry Miller | 21/12/2009
Lots of photo accessories websites have large ranges of professional photography and photograhic equipments in the world market.

Offshore ASP.NET Application Development

By: Daviodjones035 | 21/12/2009
Semaphore-Software has been offering asp.net application development services significantly. Nowadays the most famous websites make use of Asp.net application development. A strong and talented team is working magnificently

Know more knoeledge about ps2 games

By: Carolynsherwin | 21/12/2009
Consumers should know that ps2 games are also called as PlayStation2 games released on Blu-ray disc in themarket. consumers can visit List of downloadable PlayStation2 games for knowning the list of downloadable PlayStation Network in many countries.

Facebook Applications – Are you promoting your business?

By: facebook guru | 21/12/2009
Facebook is the leading social network with the largest user base in the world. The platform equips a marketer with extensive features which help in increasing brand awareness and in promoting business. One of the most successful and effective method of promoting your business is Facebook Applications.

Myown10-key - How to Balance your Checking Account Without First Entering All of your Transactions

By: George Gilbert | 24/08/2007 | Finance
Balancing your checking account with the aid of your computer does have to mean first entering all of your account transactions into a program.

Repeatable Code - a Step Up From Reusable Code

By: George Gilbert | 19/08/2007 | Programming
Reusable code is a category of code that few managers or developers seem to pay much attention to until they need it. Maybe they would pay more attention to repeatable code.

Double Text - Starting the Program From Within Visual Studio

By: George Gilbert | 13/08/2007 | Programming
Make Double Text readily available whenever you are working on any language in Visual Studio.

Personal Finances - How I Achieved More Money Than Month

By: George Gilbert | 13/08/2007 | Finance
Are you familiar with the phrase "More Month Than Money?" It means running short of money either before the end of the month or before your next payday. It's a condition with which most wage earners are familiar. It was my problem for many years.

Personal Finances - K.i.s.s.ing your Checking and Credit Card Accounts

By: George Gilbert | 13/08/2007 | Finance
Successfully managing your personal finances requires making some lifestyle choices. Whether you have done so consciously, or unconsciously, you have already made your choices. Are they the right ones?

Personal Finances - Getting Off the Paycheck to Paycheck Roller Coaster

By: George Gilbert | 13/08/2007 | Finance
Budgeting, accumulating spending history and living from paycheck to paycheck are the three traditional methods of managing personal finances. None of these methods work for most people. There is a new approach.

Tape Adding Machines – a Very Expensive, Unnecessary Addiction

By: George Gilbert | 13/08/2007 | Corporate
The mechanical paper tape adding machines setting on corporate desks next to high priced personal computers are not normally thought of as an inordinate expense. In fact, it is my experience that those mechanical machines are considered by companies to be a necessity. Nothing, in my opinion, could be further from the truth on either count.

Submit Your Articles Free: Signup
Article Categories




Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2008 Free Articles by ArticlesBase.com, All rights reserved. (0.51, 6, w3)