Code Quality

An open source perspective


Book review With his first book, Code Reading, Diomidis Spinellis broke new ground. Here was a major book on the oft-neglected but important skill of reading source code.

Given that software maintenance is a huge and ever-growing burden that all developers have to endure, it is surprising that the major emphasis in education and in the industry at large is on writing code. Yet being able to quickly read and understand code is such an important - and obvious - skill yet there are few courses or books devoted to it.

Now, with this follow-up study, Spinellis continues to champion the skills required to understand and maintain large bodies of code.

As with the first book, Spinellis focuses his attention on a range of large open source applications for his examples - including the Apache web server, Tomcat, NetBSD, and the HSSQLDB Java database. This isn't to pick on open source software as being hard to maintain or buggy by default, it's more a recognition that for his purposes real software is more useful than manufactured examples or contrived snippets of code. And of course, it's easy to supply the source code to readers, who can download it or use the CD that accompanied Code Reading.

Code quality itself is a slippery term, it means different things to different people, and so the book begins by defining the key quality attributes that it addresses: reliability, security, time performance, space performance, portability and maintainability. Each of these gets a chapter, along with a final chapter devoted to floating point arithmetic.

Within each of these chapters there is very detailed discussion of specific topics - buffer overflows in the security, for example - and within these topics there is a focus on looking at concrete examples, with plenty of C, C++ and Java source code to illustrate the points.

The choice of C, C++ and Java reflects a preponderance of these languages in the open source world. While this limits the usefulness of the code examples for developers in other languages, many of the principles are generic, particularly when dealing with algorithmic or data structure issues.

Of necessity, this is a book that's heavy going at times; it's difficult to see how it could be otherwise. But the nitty gritty of this bit of code versus that bit of code is always contextualised. There's plenty of computer science here, with reference to major concepts in terms of data structures, architecture, algorithmic analysis, software metrics and the like. In this respect, it's more than an exercise in scouring source code for the sake of it. However, this isn't the sort of book that is designed to be read cover to cover. The organisation of the material makes it easy to navigate to individual topics very quickly, making it useful as a reference book to turn to in day to day situations.

Code Quality

code quality

Verdict: While this book doesn't break new ground in the way Code Reading did, the focus of the book and the emphasis on using real code makes it a useful and interesting read.

Author: Diomidis Spinellis

Publisher: Addison Wesley

ISBN: 0321166078

Media: Book

Buy this book at Cash 'n' Carrion


Other stories you might like

  • Tesla driver charged with vehicular manslaughter after deadly Autopilot crash

    Prosecution seems to be first of its kind in America

    A Tesla driver has seemingly become the first person in the US to be charged with vehicular manslaughter for a deadly crash in which the vehicle's Autopilot mode was engaged.

    According to the cops, the driver exited a highway in his Tesla Model S, ran a red light, and smashed into a Honda Civic at an intersection in Gardena, Los Angeles County, in late 2019. A man and woman in the second car were killed. The Tesla driver and a passenger survived and were taken to hospital.

    Prosecutors in California charged Kevin George Aziz Riad, 27, in October last year though details of the case are only just emerging, according to AP on Tuesday. Riad, a limousine service driver, is facing two counts of vehicular manslaughter, and is free on bail after pleading not guilty.

    Continue reading
  • AMD returns to smartphone graphics with new Samsung chip for your pocket computer

    We're back in black

    AMD's GPU technology is returning to mobile handsets with Samsung's Exynos 2200 system-on-chip, which was announced on Tuesday.

    The Exynos 2200 processor, fabricated using a 4nm process, has Armv9 CPU cores and the oddly named Xclipse GPU, which is an adaptation of AMD's RDNA 2 mainstream GPU architecture.

    AMD was in the handheld GPU market until 2009, when it sold the Imageon GPU and handheld business for $65m to Qualcomm, which turned the tech into the Adreno GPU for its Snapdragon family. AMD's Imageon processors were used in devices from Motorola, Panasonic, Palm and others making Windows Mobile handsets.

    Continue reading
  • Big shock: Guy who fled political violence and became rich in tech now struggles to care about political violence

    'I recognize that I come across as lacking empathy,' billionaire VC admits

    Billionaire tech investor and ex-Facebook senior executive Chamath Palihapitiya was publicly blasted after he said nobody really cares about the reported human rights abuse of Uyghur Muslims in China.

    The blunt comments were made during the latest episode of All-In, a podcast in which Palihapitiya chats to investors and entrepreneurs Jason Calacanis, David Sacks, and David Friedberg about technology.

    The group were debating the Biden administration’s response to what's said to be China's crackdown of Uyghur Muslims when Palihapitiya interrupted and said: “Nobody cares about what’s happening to the Uyghurs, okay? ... I’m telling you a very hard ugly truth, okay? Of all the things that I care about … yes, it is below my line.”

    Continue reading

Biting the hand that feeds IT © 1998–2022