 |
Repeatable Code - a Step Up From Reusable Code
Author: George Gilbert  | Posted: 19-08-2007 | Comments: 0 | Views: 52 | Rating: (58) (?)
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.
Rate this Article:
Current: 5 / 5 stars - 1 vote(s).
Article Source: http://www.articlesbase.com/programming-articles/repeatable-code-a-step-up-from-reusable-code-200789.html
About the Author: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.
|
Submitting articles has become one of the most popular means of generating quality backlinks and targeted traffic to your website. Join us today - It's Free! |
|
Got a Question? Ask.
Ask the community a question about this article:
Frequently Asked Questions
API pH test kit freshwater color chart can you ...
By: Windie | 17-08-2008
API pH test kit freshwater color chart can you send me an email or stell me how to get a color chart taht comes with the test mine was'nt in there.
Any WOMAN near BRAINTREE I can help DP 2 night ?
By: canIhelpDPyourGIRL? | 16-08-2008
any WOMAN near BRAINTREE I can help DP 2 night ?
How can I get this code enforcement officer off my back and still maintain my right to personal property?
By: Jesse | 16-08-2008
I am being harassed by a code enforcement officer in Garden Grove California. She insist that I am running a garage door business out of my home. I install garage doors and receive phone calls from contractors needing my services and I do have certain garage door related materials at my home but I do not conduct business out of my home nor do I have the kind of activity going on that would be consistant with someone running a business out their home. This Code Enforcement officer has been seen by my neighbors snoping and trespassing on people's property and comes by my home at least 1-2 times per month taking pictures of my truck and anything that is visible on my property. How can I get this person off my back. She threatens me with her obtaining a warrent and going to the state attorney to prosecute me if I don't call her to make an appointment so that she can inspect my property.
I own a 104 year old multi family unit where the ...
By: Kara | 15-08-2008
I own a 104 year old multi family unit where the electrical breaker panels are not accessible by the tenants, only me. It been this way since it was broken up into multi unit over 50 years ago. c/o was granted at that time. Is that a violation of the NYS building code?
Looking for Busch Garden Tampa Promo Codes
By: nana811 | 15-08-2008
Need a coupon code for Busch Gardens in Tampa,FL.
I know about the FL resident, just need a cheaper price.
thanks to all!!!!
Neighbor makes 5 false police reports
By: Elaine | 15-08-2008
my neighbor in our apartment building has filed 5 false police reports in the last 7 months. Allegations include drug dealing, guns, elder abuse, ect. All untrue. We have to go through the whole imbarrassing proceedures, she also has gone so far as to tell these things to the new owner of the building. He has accused me and threatened to evict me. What can I do?
Q&A Powered by:
Latest Programming Articles
How to Succeed as a Abap Developer or Sap Abap Development Manager By: Deepak Mandrekar | 05/10/2008 For anyone working on an SAP implementation project, SAP implementation partners or consulting companies, you very well know that SAP ABAP skills are highly valued within the SAP industry. SAP ABAP developer supports implementation projects with customer specific enhancements, building reports to migrate data from legacy system into the SAP system, build web interfaces using Java Connectors (JCo) or Enterprise Services. Plus if you are creating enterprise services or integrating other third part
E-commerce and Web Portal Development in Vietnam By: Daniel Jowssey | 03/10/2008 VIETNAM, owing to its superior intellectual capital has emerged as the ultimate destination for low cost e-commerce and web portal development. Companies from all across the globe have found the quality of work delivered by VIETNAMn vendors to be far superior in quality as compared to vendors in their home countries. Another advantage is its location in a different time zone. Vendors based in VIETNAM can respond to the needs of Western clients faster than vendors based in the home country also.
Php Web Development Advantages By: Rightway Solution | 01/10/2008 PHP (PHP: Hypertext Preprocessor) is a powerful server-side scripting language for creating dynamic and interactive websites. PHP is a popular and widely used programming language used for website development.
Using Comments in Your Programming Source Code by Nicholas Brown By: Nicholas Brown | 30/09/2008 Save time and money by adding comments to your source code.
Data Transfer Methods of Cnc By: Gargi Nath | 28/09/2008 A CNC machine cannot function without a program. And a program cannot make its way to the machine without an effective data transfer system. So, what are the methods of data transfer and how effective are they in conveying data from one point to the next?
Software Development Life Cycle Models By: Paulita C. Lobrin | 27/09/2008 System Development Life Cycle (SDLC) models help in the complete development of a system, right from the conceptual stage to the customer delivery stage. SDLC is very useful if one has a complicated system to build. SDLC is the overall process of developing information systems through a multi-step process, from investigation of initial requirements to analysis, design, implementation and maintenance.
Types of Softwares By: pntglobal | 27/09/2008 Computer software is a general term used to describe a collection of computer programs, procedures and documentation that perform some task on a computer system. The term includes application software such as word processors which perform productive tasks for users, system software such as operating systems, which interface with hardware to provide the necessary services for application software, and middleware which controls and co-ordinates distributed systems.
Effetive Use of Pointers By: varadarajan t | 27/09/2008 pointers in c are one of the most striking features of c language. it has several advantages. it can save memory space effectively. using pointers we can handle array of data effectively. this article shows a basic idea of pointers and it usage.
More from George Gilbert
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.
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.
Writing Articles - Starting New Articles With a Repeatable Skeleton By: George Gilbert | 13/08/2007 | Article Writing Articles written for distribution on the Internet have common requirements. Having a repeatable skeleton to start each new article saves me time and helps keep the formats of my articles consistent. Starting a new article, with the exception of the text I write, is reduced to point and click.
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.
Tape Adding Machines – Bad Habit, Addiction or Comfy Loafers? By: George Gilbert | 13/08/2007 | Corporate The next time you’re in an office where personal computers are used, look on the desks. Chances are pretty good that you will see a mechanical tape adding machine sitting next to many of the computers. That makes no sense to me whatsoever.
|
 |