The State of Software Engineering Research
At the 2016 Foundations of Software Engineering conference, a panel discussed the state of software engineering research. The panelists were asked to reflect on three questions.
Continue reading "The State of Software Engineering Research"
Revision Control Smells
As software developers, we talk about
design smells, and even
While reviewing some code, it occurred to me that
revision control smells are also distinguishable and important.
Here are some obvious ones and my recommendations for avoiding them.
An orderly revision control repository is a sign of professionalism.
Continue reading "Revision Control Smells"
Grady Booch on the Future in Software Engineering
I was privileged to hear Grady Booch deliver a keynote on the Future in Software Engineering.
Here are my notes of some important statements and interesting soundbytes.
Continue reading "Grady Booch on the Future in Software Engineering"
First, Do No Harm
Let’s face it: not all software developers are superstar programmers (and, trust me, not all luminary developers program in a sane way.) This means that when we maintain existing code, we must be very careful to avoid breaking or degrading the system we work on. Why? Because a failure of a running system can affect operations, people, profits, property, and sometimes even lives. Here are the rules.
Continue reading "First, Do No Harm"
Service Orchestration with Rundeck
Increasingly, software is provided as a service. Managing and controlling the service’s provision is tricky, but tools for service orchestration, such as Rundeck, can make our lives easier. Take software deployment as an example. A well-run IT shop will have automated both the building of its software using tools like make, Ant, and Maven and the configuration of the hosts the software runs on with CFEngine, Chef, or Puppet (see the post “Don’t Install Software by Hand”). Furthermore, version control tools and continuous integration will manage the software and the configuration recipes, handling developer contributions, reviews, traceability, branches, logging, and sophisticated workflows. However, these tools still leave a gap between the software that has been built and is ready to deploy, and the server that has been configured with the appropriate components and libraries and is ready to run the software.
Continue reading "Service Orchestration with Rundeck"
Developing in the Cloud
Running a top-notch software development organization used to be a capital-intensive endeavor, requiring significant technical and organizational resources, all managed through layers of bureaucracy. Not anymore. First, many of the pricey systems and tools that we developers need to work effectively are usually available for free as open source software. More importantly, cheap, cloud-based offerings do away with the setup, maintenance, and user support costs and complexity associated with running these systems. Here are just a few of the services and providers that any developer group can easily tap into
(you can find many more listed here):
Continue reading "Developing in the Cloud"
In the 1920s, the Ford Motor Company embarked on an ill-fated attempt to establish an industrial town in an Amazon rainforest as a way to secure a cultivated rubber supply for its cars’ wheels. At the time, it already owned ore mines, forests, and a steel foundry to produce the raw materials for its cars; today, it buys from external suppliers, even its cars’ electronic control units. How do these two phases of the automotive industry’s history relate to the way we currently develop and adopt infrastructure in our profession?
Continue reading "Bespoke Infrastructures"
The Frictionless Development Environment Scorecard
The environment we work in as developers can make a tremendous difference on our productivity and well-being. I’ve often seen myself get trapped in an unproductive setup through a combination of inertia, sloth, and entropy. Sometimes I put-off investing in new, better tools, at other times I avoid the work required to automate a time-consuming process, and, also, as time goes by, changes in my environment blunt the edge of my setup. I thus occasionally enter into a state where my productivity suffers death by a thousand cuts. I’ve also seen the same situation when working with colleagues: cases where to achieve a simple task they waste considerable time and energy jumping through multiple hoops.
Continue reading "The Frictionless Development Environment Scorecard"
If estimating the time needed for implementing some software is difficult, coming up with a figure for the time required to debug it is nigh on impossible. Bugs can lurk in the most obscure corners of the system, or even in the crevices of third-party libraries and components. Ask some developers for a time estimate, and don’t be surprised if an experienced one snaps back, “I’ve found the bug when I’ve found the bug.” Thankfully, there are some tools that allow methodical debugging, thereby giving you a sense of progress and a visible target. A method I’ve come to appreciate over the past few months is differential debugging. Under it, you compare a known good system with the buggy one, working toward the problem source.
Continue reading "Differential Debugging"
Portability: Goodies vs. the hair shirt
“I don’t know what the language of the year 2000 will look like, but I know it will be called Fortran”
Continue reading "Portability: Goodies vs. the hair shirt"
How to Create Your Own Git Server
Although I'm a happy (also paying) user of GitHub's offerings,
there are times when I prefer to host a private repository
on a server I control.
Setting up your own Git server can be useful
if you're isolated from the public internet,
if you're subject to inflexible regulations,
or if you simply want features different from those offered by GitHub
(and other similar providers).
Setting up a Git server on a Unix (Linux, Mac OS X, *BSD, Solaris, AIX)
machine isn't difficult,
but there are many details to observe.
Here is a complete guide.
Continue reading "How to Create Your Own Git Server"
Systems software is the low-level infrastructure that applications run on: the operating systems, language runtimes, libraries, databases, application servers, and many other components that churn our bits 24/7. It’s the mother of all code. In contrast to application software, which is constructed to meet specific use cases and business objectives, systems software should be able to serve correctly any reasonable workload. Consequently, it must be extremely reliable and efficient. When it works like that, it’s a mighty tool that lets applications concentrate on meeting their users’ needs. When it doesn’t, the failures are often spectacular. Let’s see how we go about creating such software.
Continue reading "Systems Software"
Software Tools Research: SPLASH Panel Discussion
Written by Dennis Mancl and Steven Fraser
At the recent SPLASH (Systems, Programming, Languages and Applications: Software for Humanity) conference, one of us (Steven Fraser) organized an international group of experts to discuss challenges in software tools research.1 The panelists included Kendra Cooper (University of Texas, Dallas), Jim “Cope” Coplien (Gertrud & Cope), Junilu Lacar (Cisco Systems), Ruth Lennon (Letterkenny Institute of Technology), Diomidis Spinellis (Athens University of Economics and Business), and Giancarlo Succi (Free University of Bolzano-Bozen).
Continue reading "Software Tools Research: SPLASH Panel Discussion"
The Importance of Being Declarative
A declarative programming style focuses on what you want your program to do rather than how to perform the task. Through diverse programming techniques, libraries, and specialized languages, you end up with code that sidesteps nitty-gritty implementation details, dealing instead with a task’s big picture.
Continue reading "The Importance of Being Declarative"
APIs, Libraries, and Code
Let’s say you want to display a JPEG-compressed image, calculate Pearson’s correlation coefficient, parse an XML file, or create a key-value store. You can often choose between using the functionality of the application’s platform (Java EE or .NET), calling one of several available external libraries, or writing the code on your own. It isn’t an easy choice because you have many factors to consider. Specifically, you must take into account the task’s complexity, as well as the licensing, quality, and support of competing alternatives. See how you can narrow down your choice by eliminating alternatives at the earliest possible decision point.
Continue reading "APIs, Libraries, and Code"
Programming Languages vs. Fat Fingers
A substitution of a comma with a period in project Mercury's working Fortran code compromised the accuracy of the results, rendering them unsuitable for longer orbital missions.
How probable are such events and how does a programming language's design affect their likelihood and severity?
In a paper I recently presented at the
4th Annual International Workshop on Evaluation and Usability of Programming Languages and Tools
I showed results obtained by randomly perturbing similar programs written in
diverse languages to see whether the compiler or run-time system
would detect those changes as errors,
or whether these would end-up generating incorrect output.
Continue reading "Programming Languages vs. Fat Fingers"
The virtual machine (VM) is the most dazzling comeback in information technology. IBM implemented a VM platform architecture in the late 1960s in its CP/CMS operating system. The company’s goal was to provide the time-sharing capabilities that its batch-oriented System/360 lacked. Thus a simple control program (CP) created a VM environment where multiple instances of the single-user CMS operating system could run in parallel. Thirty years later, virtualization was rediscovered when companies like VMware found ways to virtualize the less accommodating Intel x86 processor architecture. The popularity of Intel’s platform and the huge amount of software running on it made virtualization an attractive proposition, spawning within a decade tens of proprietary and open source virtualization platforms.
Continue reading "Virtualize Me"
Don't Install Software by Hand
An IT system’s setup and configuration is a serious affair. It increasingly affects us developers mainly due to the proliferation and complexity of internet-facing systems. Fortunately, we can control and conquer this complexity by adopting IT-system configuration management tools.
Continue reading "Don't Install Software by Hand"
Importing an RCS Project into Git
RCS stands for Revision Control System.
You may have never heard it, because it's more than a quarter-century old;
describing it was published in 1985.
Although its commands are still available in most Unix distributions
and it's one of the easiest systems to use in a single-user scenario,
it is clearly showing its age when compared to more modern systems.
Here is how to move an existing project managed with RCS to the
21st century and Git,
while preserving all its history.
Continue reading "Importing an RCS Project into Git"
Even by our field’s dizzying rate of progress I wouldn’t expect to revisit the subject of version control just six years after I first wrote about it in this column (Version Control Systems. Software, 22(5):108–109, September/October 2005). Yet here we are. The new kid on the block is git, a distributed revision control system available on all mainstream development platforms through a Free Software license. Git, a brainchild of Linus Torvalds, began its life in 2005 as the revision management system used for coordinating the development of the Linux kernel. Over the years its functionality, portability, efficiency, and third-party adoption have evolved by leaps and bounds to make it its category’s leader. (Two other systems with similar characteristics are Mercurial and Bazaar.)
Continue reading "Git"
Package Management Systems
DLL hell was a condition that often afflicted unfortunate users of old Microsoft Windows versions. Under it, the installation of one program would render others unusable due to incompatibilities between dynamically linked libraries. Suffering users would have to carefully juggle their conflicting DLLs to find a stable configuration. Similar problems distress any administrator manually installing software that depends on incompatible versions of other helper modules.
Continue reading "Package Management Systems"
Refactoring on the Cheap
The refactorings that a good integrated development environment can perform are impressive. Yet, there are many reasons to master some cheap-and-cheerful alternative approaches. First, there will always be refactorings that your IDE won’t support. Also, although your IDE might offer excellent refactoring support for some programming languages, it could fall short on others. Modern projects increasingly mix and match implementation languages, and switching to a specialized IDE for each language is burdensome and inefficient. Finally, IDE-provided refactorings resemble an intellectual straightjacket. If you only know how to use the ready-made refactorings, you’ll miss out on opportunities for other code improvements.
Continue reading "Refactoring on the Cheap"
Lessons from Space
By Diomidis Spinellis and Henry Spencer
Continue reading "Lessons from Space"
This column is about a tool we no longer have: the continuous rise of the CPU clock frequency. We were enjoying this trend for decades, but in the past few years, progress stalled. CPUs are no longer getting faster because their makers can’t handle the heat of faster-switching transistors. Furthermore, increasing the CPU’s sophistication to execute our instructions more cleverly has hit the law of diminishing returns. Consequently, CPU manufacturers now package the constantly increasing number of transistors they can fit onto a chip into multiple cores—processing elements—and then ask us developers to put the cores to good use.
Continue reading "Faking it"
How I Dealt with Student Plagiarism
a colleague at the
NYU Stern School of Business,
received considerable media attention when,
in a blog post he subsequently removed,
he discussed how his aggressive use of plagiarism detection software
on student assignments poisoned the classroom atmosphere and
tanked his teaching evaluations.
As detailed in
a story posted on the Chronicle of Higher Education blog,
Mr. Ipeirotis proposes instead that professors should design assignments that
cannot be plagiarized.
Along these lines here are two methods I've used in the past.
Continue reading "How I Dealt with Student Plagiarism"
When the facts change, I change my mind. What do you do, sir?
Continue reading "Agility Drivers"
Code Verification Scripts
Which of my classes contain instance variables?
Which classes call the method
Continue reading "Code Verification Scripts"
but don't call the method
These and similar questions often come up when you want to verify
that your code is free from some errors.
For example, instance variable can be a problem in servlet classes.
Or you may have found a bug related to the
and you want to look for other places where this occurs.
Your IDE is unlikely to answer such questions,
and this is where a few lines in the Unix shell can save
you hours of frustration.
Choosing and Using Open Source Components
The developers of the SQLite open source database engine estimate that it’s deployed in roughly half a billion systems around the world (users include Airbus, Google, and Skype). Think of the hundreds of thousands of open source components, just one click away from you. If you know how to choose and use them effectively , your project can benefit mightily.
Continue reading "Choosing and Using Open Source Components"
Sure, you can write English right to left. You can also write software code to look like a disc or even a train (see www.ioccc.org/1988/westley.c and 1986/marshall.c). However, you can’t then complain when you have to fight with your magazine’s editor or production staff about accepting your column’s title for publication, or if your colleagues refuse to touch your code with a 10-foot pole. Writing code in a readable and consistent style is difficult, uninteresting, tedious, underappreciated, and, extremely important.
Continue reading "elytS edoC"
Farewell to Disks
A classic web-comic illustrates how idle Wikipedia browsing can lead us from the Tacoma Narrows Bridge to Fatal hilarity (and worse). The comic doesn’t show the path leading from A to B, and finding it is an interesting challenge—think how you would engineer a system that could answer such questions. I believe that this problem and a solution I’ll present demonstrate some programming tools and techniques that will become increasingly important in the years to come.
Continue reading "Farewell to Disks"
The innumerate misleading the illiterate.
— Stan Kelly-Bootle, “The Devil’s DP Dictionary”
A mechanical engineer who sees the symbol ⊥ in a diagram will immediately realize that a feature is specified to be perpendicular to another. In contrast, a software engineer looking at a diagram’s line ending with the symbol ◊ will, at best, wonder whether it denotes aggregation (as in UML), or a “zero or one” cardinality (as in IDEF1X), or something else invented by a creative academic. Worse, many developers will simply scratch their head in bewilderment.
Continue reading "UML, Everywhere"
Technical prose is almost immortal.
Continue reading "Code Documentation"
Ron Heifetz on Crisis Leadership
Earlier today I had the privilege to attend a lecture on
crisis management by the Harvard Senior Lecturer
Here is a list of points that struck me
(in the form of slightly edited tweets),
and my view of their relevance to software development.
Continue reading "Ron Heifetz on Crisis Leadership"
A generous car reviewer might praise a vehicle’s handling by writing that it turns as if it’s running on railroad tracks. Indeed, tracks offer guidance and support. When you run on tracks you can carry more weight, you can run faster, and you can’t get lost. That’s why engineers, from early childhood to old age, get hooked on trains. Can we get our software to run on tracks?
Continue reading "Software Tracks"
Basic Etiquette of Technical Communication
Parents spend years trying to teach their children to be polite, and some of us had to learn at school how to properly address an archbishop. Yet, it seems that advice on courteousness and politeness in technical communication is in short supply; most of us learn these skills through what is euphemistically called “on the job training.” With enough bruises on my back to demonstrate the amount and variety of my experience in this area (though not my skill), here are some of the things I’ve learned.
Continue reading "Basic Etiquette of Technical Communication"
My colleague, who works for a major equipment vendor, was discussing how his employer was planning to lay off hundreds of developers over the coming months. “But I’m safe,” he said, “as I’m one of the two people in our group who really understand the code.” It seems that writing code that nobody else can comprehend can be a significant job security booster. Here’s some advice.
Continue reading "Job Security"
Software Architecture Challenges in the 21st Century
A wonderful workshop, titled
Software Architecture Challenges in the 21st Century, took place
at the University of Southern California on June 8th.
The workshop was co-sponsored by IEEE Software,
USC's Center for Systems and Software Engineering,
and UC Irvine's Institute for Software Research (ISR).
Here is my personal summary of the talks; the presentation slides
Continue reading "Software Architecture Challenges in the 21st Century"
1 Word = 1 Millipicture
It’s no accident that in all engineering branches, our colleagues often communicate using drawings and diagrams. Given many artifacts’ scale and complexity, a drawing is often the best way to describe them. Uniquely, in software development we can easily derive pictures from code, and sometimes even code from pictures.
Continue reading "Drawing Tools"
Start With the Most Difficult Part
There’s not a lot you can change in the process of constructing a building. You must lay the foundation before you erect the upper floors, and you can’t paint without having the walls in place. In software, we’re blessed with more freedom.
Continue reading "Start With the Most Difficult Part"
Visualizing Revision Logs with a UML Sequence Diagram
How can you visualize the developers' contributions in a collaborative
One way involves drawing timelines adorned with marks indicating
each developer's contribution.
This is a simple UML sequence diagram,
a diagram that allows you to see the interactions of objects,
but in this case the objects are the actual developers and the
interactions are their contributions.
Continue reading "Visualizing Revision Logs with a UML Sequence Diagram"
What are the ingredients of robust, elegant, flexible, and maintainable software architecture?
Over the past couple of years, my colleague
and I worked
on answering this question through a collection of intriguing essays
from more than a dozen of today's leading software designers and architects.
Continue reading "Beautiful Architecture"
The World's Smallest Domain-Specific Language
Domain-specific languages, also known as little languages, allow us
to express knowledge in a form close to the problem at hand.
In contrast to general-purpose languages, like Java or C++,
they are specialized for a narrow domain.
Earlier today I wanted to initialize a rectangular array of Boolean
values to represent the stick figure of a human.
For that I devised a tiny domain-specific language (DSL) consisting of
two symbols (representing an on and an off pixel) and wrote its
commensurably simple interpreter.
Continue reading "The World's Smallest Domain-Specific Language"
The Value of Computing Paradigm Diversity
Today I wrote a combinatorial optimization algorithm to match members of
teams according to the psychological traits of each pair's members.
The program appeared to rearrange the initial random allocation of pairs
in a way that might match my specifications.
However, as I'll use this allocation for an experiment that I'll be able
to perform only once, I realized that I wanted to carefully verify the results.
How does one verify the operation of such a program?
Continue reading "The Value of Computing Paradigm Diversity"
A Look at Zero-Defect Code
National Security Agency
has released a case study showing how to
develop zero-defect code in a cost-effective manner.
The researchers of the project conclude that,
if adopted widely, the practices advocated in the case study
could help make commercial software programs more reliable and less vulnerable.
I examined a small part of the case study's code, and was not impressed.
Continue reading "A Look at Zero-Defect Code"
Saving the Editor's History
I recently spent a few days writing some tricky bit-twiddling code to
implement a radix tree.
I found myself making many programming mistakes, and I thought it would be
interesting to study them, examine their contributing factors, and
think how each of them could be prevented.
Continue reading "Saving the Editor's History"
The Way We Program
If the code and the comments disagree, then both are probably wrong.
Continue reading "The Way We Program"
Open and Closed Source Kernels Go Head to Head
Earlier today I presented at the
30th International Conference on Software Engineering a
research paper comparing the
code quality of Linux, Windows (its
research kernel distribution),
For the comparison I parsed multiple configurations of these systems (more than ten million lines), and stored the results in four databases, where I could run SQL queries on them. This amounted to 8GB of data, 160 million records.
(Iíve made the databases and the SQL queries available
The areas I examined were file organization, code structure, code style, preprocessing, and data organization.
To my surprise there was no clear winner or looser, but there were interesting differences in specific areas.
Continue reading "Open and Closed Source Kernels Go Head to Head"
The tools and processes we use to transform our system’s source code into an application we can deploy or ship were always important, but nowadays they can mean the difference between success and failure. The reasons are simple: larger code bodies, teams that are bigger, more fluid, and wider distributed, richer interactions with other code, and sophisticated tool chains. All these mean that a slapdash software build process will be an endless drain on productivity and an embarrassing source of bugs, while a high-quality one will give us developers more time and traction to build better software.
Continue reading "Software Builders"
Over the past few days I worked over a large code body correcting various
accumulated errors and style digressions.
When I finished I wanted to see who wrote the original lines.
(It turned out I was not entirely innocent.)
Continue reading "Assigning Responsibility"
Losing the War
The following gem comes from the user manual of the spanky-new Sony Ericsson
K770i (3G) mobile phone.
It demonstrates amply the state of the art in software engineering as
Continue reading "Losing the War"
An Update on UMLGraph
Today I released version 5.0 of UMLGraph.
This release contains a couple of important changes: six new shapes
(components, nodes, collaborations, use cases, notes, and active classes),
a facility for adding notes, and the hosting and packaging under its
own domain name
Continue reading "An Update on UMLGraph"
Cooperative Development at the Speed of Light
The agility and responsiveness of major open-source endeavors never
ceases to amaze me.
Continue reading "Cooperative Development at the Speed of Light"
Abstraction and Variation
“Master, a friend told me today that I should never use the editor’s copy-paste functions when programming,” said the young apprentice. “I thought the whole point of programming tools was to make our lives easier,” he continued.
The Master stroked his long grey beard and pressed the busy button on his phone. This was going to be one of those long, important discussions.
Continue reading "Abstraction and Variation"
The Tools we Use
It is impossible to sharpen a pencil with a blunt ax. It is equally vain to try to do it with ten blunt axes instead.
— Edsger W. Dijkstra
Continue reading "The Tools we Use"
Of Wine and Software
Today, following the yearly IEEE Software
we visited the Casa Valduga winery near Bento Gonçalves at Rio Grande do Sul.
The guide told us that the winery nowadays made all its
wine in stainless steel vats, which have largely replaced the traditional
Continue reading "Of Wine and Software"
Silver Bullets and Other Mysteries
It seemed like a good idea at the time.
—Ken Thomson, on naming the Unix system call to create a file "creat"
When conference participants interrupt a speaker with applause, you know the speaker has struck a chord. This happened when Alan Davis, past editor in chief of IEEE Software, gave a talk on improving the requirements engineering process at the NASSCOM (Indian National Association of Software and Services Companies) Quality Summit in Bangalore in September 2006. He was explaining why a marketing team will often agree with developers on additional features and a compressed delivery schedule that both sides know to be unrealistic. The truth is that this places the two parties in a Machiavellian win-win situation. When the product's delivery is inevitably delayed, the developers will claim that they said from the beginning that they couldn't meet the schedule but that marketing insisted on it. The marketing people also end up with a convenient scapegoat. If the product launch is a flop, they can say they missed a critical marketing time window owing to the product's delay. Where else are we playing such games?
Continue reading "Silver Bullets and Other Mysteries"
Modularity and Troubleshooting
A residual current device trips leaving the house in the dark.
How do I fix the problem?
Continue reading "Modularity and Troubleshooting"
Make vs Ant: Observability
I've long felt uncomfortable with ant
as a build management tool.
I thought that my uneasiness stemmed from the verbose XML used for
describing tasks, and the lack of default dependency resolution.
Today, email from a UMLGraph user
struggling with a complex ant task
made me realize another problem:
lack of observability.
Continue reading "Make vs Ant: Observability"
Software Rejuvenation is Counterproductive
In the February issue of the Computer magazine
Grottke and Trivedi propose four strategies for
fighting bugs that are difficult to detect and reproduce.
operation and replicating software are indeed time-honored and practical
solutions. When coupled with appropriate logging, they may allow an
application to continue functioning, while also alerting its maintainers
that something is amiss. On the other hand, the proposal to restart
applications at regular intervals (rejuvenation as the authors call
it), doesn't allow us to find latent bugs, sweeping them instead under
the carpet. This lowers the bar on the quality we expect from software,
and will doubtless result in a higher density of bugs and increasingly
complicated failure modes.
Continue reading "Software Rejuvenation is Counterproductive"
A Peek at Beautiful Code
An exciting new book is about to hit the shelves,
and I consider myself very lucky to be among its contributors.
subtitled "leading programmers explain how they think",
contains 33 chapters where contributors describe some code
they consider noteworthy.
Although I don't consider myself worthy of the book's subtitle,
I love coding, and
I'm extremely happy that code is taking the leading role among such an
Here is the complete table of the book's contents.
Continue reading "A Peek at Beautiful Code"
Open source as a paradigm for evolving complex systems
Scientists in the 1980s hotly debated the feasibility of US's proposed Strategic Defence Initiative, commonly known as Star Wars. One argument concerned the amount of software needed to control the missile detectors and weapons.
Continue reading "Open source as a paradigm for evolving complex systems"
Cracking Software Reuse
[Newton] said, "If I have seen further than others, it is because I've stood on the shoulders of giants." These days we stand on each other's feet!
— Richard Hamming
Sometimes we encounter ideas that inspire us for life. For me, this was a Unix command pipeline I came across in the '80s:
Continue reading "Cracking Software Reuse"
Yesterday my research group and our partners officially launched the
a Software Quality Observatory for Open Source Software.
Continue reading "SQO-OSS Launched"
Choosing a Collection: A Discussion with Kent Beck
Recently I reviewed the mansucript of Kent Beck's upcoming
book Implementation Patterns.
I will certainly put it in the list of books any professional programmer
When discussing collections (containers in C++ STL parlance),
Kent mentions that
his overall strategy for performance coding with collections is to use the
simplest possible implementation at first and pick a more specialized collection
class when it becomes necessary.
My view is that
we should choose the most efficient implementation from the start.
With prepackaged collections this doesn't have any cost associated with
it, and it avoids nasty surprises when a dataset increases beyond the
size the programmer envisaged.
I added a comment to that effect in my review, and later I sent him
an email with a supporting citation, which
kindled an interesting exchange.
I reproduce our email exchange here, with his permission.
Continue reading "Choosing a Collection: A Discussion with Kent Beck"
The Verbosity of Object-Oriented Code
As I refactored a piece of code from an imperative to an
object-oriented style I increased its clarity and reusability,
but I also trippled its size.
This worries me.
Continue reading "The Verbosity of Object-Oriented Code"
UML Class Diagrams from C++ Code
I needed a UML class diagram of the classes I use in the implementation of
CScout refactoring browser.
I drew the last such diagram on paper about four years ago, so it was
definitely out of date.
I always say that whenever possible documentation should be automatically
generated from the code, so I decided to automate the task.
Continue reading "UML Class Diagrams from C++ Code"
NASSCOM Quality Summit 2006
Last week I attended NASSCOM's 2006 Quality Summit in Bangalore, India.
There I gave a tutorial on tooling with open source software, and
delivered a talk on Global Software Development in the FreeBSD Project.
It was an edifying trip.
Continue reading "NASSCOM Quality Summit 2006"
SeaMonkey vs Internet Explorer Revisited
In an older blog entry
I compared the complexity of Mozilla with that of Internet Explorer
by looking at the components each linked to.
Recently, comments to a Slashdot posting I made, noted
that I was comparing the two products on different platforms and
source with binary dependencies.
I therefore set out to compare the binary dependencies of the two
Continue reading "SeaMonkey vs Internet Explorer Revisited"
Choosing a Programming Language
A language that doesn't have everything is actually easier to program in than some that do.
— Dennis M. Ritchie
Computer languages fascinate me. Like a living person, each one has its own history, personality, interests, and quirks. Once you've learned one, you can use it again after years of neglect, and it's like reconnecting with an old friend: you can continue discussions from the point they were broken off years before. For a task I recently faced I adopted a language I hadn't used for 15 years, and felt enlightened.
Continue reading "Choosing a Programming Language"
Surprising Findings on Software Reuse
Kevin DeSouza and his colleagues in a recent
article in the
Communications of the ACM published some surprising
findings regarding software reuse:
reuse happens more by novices rather than by experts,
within projects rather than across them, and in
transient teams rather than permanent ones.
The statement regarding the higher propensity of rookies to reuse
compared to older professionals rang particularly true to my ears.
Continue reading "Surprising Findings on Software Reuse"
Code Quality: The Open Source Perspective
My new book
Code Quality: The Open Source Perspective
three years after I started writing it.
The book owes more to open source software than any of the books
dealing with Linux, PHP, Apache, Perl or any other book covering
a specific technology.
Continue reading "Code Quality: The Open Source Perspective"
Project Asset Portability
It's said that real computer scientists don't program in assembler; they don't write in anything less portable than a number two pencil. Joking aside, at the end of the 1970s, the number of nonstandard languages and APIs left most programs tied to a very specific and narrow combination of software and hardware. Entire organizations were locked in for life to a specific vendor, unable to freely choose the hardware and software where their code and data would reside. Portability and vendor independence appeared to be a faraway, elusive goal.
Continue reading "Project Asset Portability"
Version Control Talk Demystified
One indication of the importance an
endeavor has in our lives is the vocabulary associated with it. If developers employ a tool or a method,
inevitably they will come up with words to describe their corresponding work in
an accurate and concise way. I recently
heard a colleague describe version control systems (also formally known as
configuration management tools) as boring. I hope that this dictionary
will dispel this myth by documenting a rich technical and social
vocabulary. If you donít work with a
VCS I believe this list will give you plenty of reasons to look at what these
systems can do for you and your projects. On the other hand, if you already use a VCS I hope you will find ideas
on how to use it more productively and how to improve your configuration management
process. And, no matter to which group
you belong to, I am sure youíll find here some new words worth knowing.
Continue reading "Version Control Talk Demystified"
Version Control Systems
A source code control system [is] a giant UNDO key—a project wide time machine.
— A. Hunt and D. Thomas
Sane programmers don't write production code without the help of an editor and an interpreter or a compiler, yet I've seen many software projects limping along without using a version control system. We can explain this contrast if we think in terms of the increased startup costs and the delayed gratification associated with the adoption of a VCS. We humans typically discount the future, and therefore implementing version control in a project appears to be a fight against the human nature. It is true that you can't beat the productivity boost that compilers and editors have provided us, but four decades after punched card programming in assembly language has gone out of fashion we must look elsewhere to reap our next gains in efficiency. And if you or your project is not using a VCS, adopting one may well be the single most important improvement you can undertake.
Continue reading "Version Control Systems"
Tool Writing: A Forgotten Art?
Merely adding features does not make it easier for users to do things—it just makes the manual thicker. The right solution in the right place is always more effective than haphazard hacking.
— Brian W. Kernighan and Rob Pike
In 1994 Chidamber and Kemerer defined a set of six simple metrics for object-oriented programs. Although the number of object-oriented metrics swelled to above 300 in the years that followed, I had a case where I preferred to use the original classic metric set for clarity, consistency, and simplicity. Surprisingly, none of the six open-source tools I found and tried to use fitted the bill. Most tools calculated only a subset of the six metrics, some required tweaking to make them compile, others had very specific dependencies on other projects (for example Eclipse), while others were horrendously inefficient. Although none of the tools I surveyed managed to calculate correctly the six classic Chidamber and Kemerer metrics in a straightforward way, most of them included numerous bells and whistles, such as graphical interfaces, XML output, and bindings to tools like ant and Eclipse.
Continue reading "Tool Writing: A Forgotten Art?"
I have updated the UMLGraph program to
run under Java 1.5.
Continue reading "UMLGraph Update"
An Open Source Java Metrics Toolset Is Hard to Find
I spent many hours looking for a stand-alone open source metrics toolset
for Java programs.
Unfortunately, I was not able to find a single tool that would
fit my (relatively modest) requiremets.
Continue reading "An Open Source Java Metrics Toolset Is Hard to Find"
Maintainability of the FreeBSD System
Last November Ioannis Samoladas and his colleagues published an article
in the Communications of the ACM  that compared the maintainability
of open-source versus-closed source projects.
I applied the maintainability index  they used on the FreeBSD source
repository following the code's maintainability over time, and comparing
the maintainability of different modules.
Here are the results.
Continue reading "Maintainability of the FreeBSD System"
The Tools at Hand
The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.
— Edsger W. Dijkstra
With a shovel excavator a single operator can effortlessly move 720 tons of earth with a single movement; a VLSI fabrication plant allows a designer to create elaborate sub-micron structures. Without tools the thousands employed in a car factory are nothing, with tools they can assemble a car in 18 effort hours. Sometimes, tools can even subsume the importance of their operators. The violinist Ivry Gitlis, considered one of the most talented musicians of his generation, said of his Stradivarius: "I have a violin that was born in 1713. I don't consider it my violin. Rather, I am its violinist; I am passing though its life." Tools are clearly an important and defining element of any profession and activity: tools help us move boulders and atoms, tools help us reach the Moon and our soul.
Continue reading "The Tools at Hand"
Software Complexity: Open Source vs Microsoft
In a readable and interesting paper titled
CyberInsecurity: the cost of a monopoly
seven notable security experts argue that the Microsoft's near monopoly
in the desktop operating system and office productivity markets is creating
a dangerous monoculture that exacerbates the effect of security vulnerabilities.
Continue reading "Software Complexity: Open Source vs Microsoft"
Code Reading: The Open Source Perspective
In July 2000, while working on a paper on the use of slicing for
choosing parts of an application to develop in a scripting language
(don't ask), I found myself searching open-source programs for
motivating examples, and experimenting with a tool for annotating the
corresponding source code. At some point, a loud click sound in my mind
brought to my attention the fact that although most books and courses
teach us how to program, we actually spend most of our time reading code
others have written. I reasoned that by applying my annotation tool on
open source software I could write a book to present the ideas,
techniques, and tools that go behind code reading.
Continue reading "Code Reading: The Open Source Perspective"