Feeds

Code scavenging goes formal

Careful what you consume

Secure remote control for conventional and virtual desktops

Scott Hackett at SlickEdit has blogged its time to update the time-honored practice of code scavenging. According to Hackett, taking a more formal approach could help to improve developer productivity.

He argues that, while software re-use has historically concentrated on higher level frameworks and larger objects, there are also potential benefits in using code scavenging to fulfill the smaller (and less glamorous) "bite-size tasks" that developers face every day.

Hackett makes some good points, but can scavenging for scraps really turn you into a master programmer, and is it possible - or even desirable - to institutionalize this "make-do" approach?

Code scavenging is seen as the most frequent and least complex way of re-using code and has been common practice at an informal level since programming first began. Programming is difficult to teach and most programmers learn their chops by looking at working code and using it as the basis for building their own programs. In other words, they "scavenge" the good bits and tweak them to a new purpose.

The term scavenging appears to have first surfaced as a formal concept in a 1992 paper by Charles Krueger of Carnegie Mellon University. It was tested by academics in the 1990s but rejected because it yielded few gains for a lot of effort.

According to Hackett, code scavenging is worth re-visiting because the Web makes it easier to find code and re-use it. He points to sites where massive amounts of existing code are available for potential scavenging such as Google code search, Sourceforge, Code Project, Microsoft's Codeplex, and O'Reilly's Code Search. Others include the Free Software Foundation (FSF), FreeVBcode.com, Freecountry and Freshmeat.

He accepts that there are a few problems with scavenging for "bite-size tasks" however. The tools to find code at this level do not yet exist and it is difficult to define and package small-scale code components so they are identifiable. You are unlikely to find what you want with a simple Web search

Techniques such as literate programming could possibly be used to create an appropriate syntax that makes small code components easier to define. But as programming guru Edsger Dijkstra pointed out many years ago, although mastery of language is just as important in good programming practice as mastery of logic and numeracy, it is not as common as it should be.

The biggest barrier to formal code scavenging, however, is the problem of trust. Programmers are, quite rightly, suspicious of code they did not create themselves and any scavenged artifacts will need thorough testing to ensure they do what they are supposed to do - and nothing else. This could be so time consuming as to negate any potential productivity gains.®

Secure remote control for conventional and virtual desktops

More from The Register

next story
Microsoft boots 1,500 dodgy apps from the Windows Store
DEVELOPERS! DEVELOPERS! DEVELOPERS! Naughty, misleading developers!
Apple promises to lift Curse of the Drained iPhone 5 Battery
Have you tried turning it off and...? Never mind, here's a replacement
Mozilla's 'Tiles' ads debut in new Firefox nightlies
You can try turning them off and on again
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
Scratched PC-dispatch patch patched, hatched in batch rematch
Windows security update fixed after triggering blue screens (and screams) of death
prev story

Whitepapers

5 things you didn’t know about cloud backup
IT departments are embracing cloud backup, but there’s a lot you need to know before choosing a service provider. Learn all the critical things you need to know.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Backing up Big Data
Solving backup challenges and “protect everything from everywhere,” as we move into the era of big data management and the adoption of BYOD.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?