Journal Articles
Browse in : |
All
> Journals
> CVu
> 316
(11)
All > Topics > Programming (877) Any of these categories - All of these categories |
Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.
Title: Reviews
Author: Bob Schmidt
Date: 01 January 2020 20:16:13 +00:00 or Wed, 01 January 2020 20:16:13 +00:00
Summary: The latest roundup of reviews.
Body:
We are always happy to receive reviews of anything that may be of use, or of interest, to software developers. The emphasis will tend to be on technical books, but we are also interested in less-technical works – for example, the humanities or fiction – and in media other than traditional print books.
Do you know of something you think deserves – or does not deserve – a wider audience? Share it here. We're keen to highlight differing opinions on the same work, so if you disagree with a review here do send in your own! Contact Ian Bruntlett at reviews@accu.org.
The Art of Debugging with GDB, DDD, and Eclipse
By Norman Matloff and Peter Jay Salzman, published by No Starch Press, 2008, 280 pages, ISBN: 078-1-59327-174-9
Reviewed by Ian Bruntlett
I have, in my time, debugged programs in a variety of ways and debuggers. I bought this book to become familiar with the debuggers in the GNU toolchain – that is gdb and ddd – but this book also covers the Eclipse IDE. A Linux/Unix-like environment and the C programming language is assumed although some coverage of C++ in the main text and some coverage of Java, Perl, and, Python is present in the final chapter.
Chapter 1, ‘Some Preliminaries for Beginners and Pros’, is well-meaning but I found its example (of an insert sort) to be confusingly written and a bad example to beginner coders. Also, the text refers to source code line numbers heavily so it would have been helpful to have line numbers for that example. However, the source code of examples is available for downloading so this is less of a problem (see nostarch.com/debugging.htm).
Chapter 2, ‘Stopping to take a look around’, is about breakpoints which can not only act as breakpoints but also as watch points and catch points. However, you will need to see the GNU gdb documentation to get info on catch points.
Chapter 3, ‘Inspecting and Setting Variables’, has an example of using a binary tree to sort input data. Whilst the examples given are good for debugging they make serious design compromises, presumably in the interest of demonstrating the debugger’s facilities.
Chapter 4, ‘When a Program Crashes’, goes into detail about how Linux handles virtual memory and has an extensive debugging session fixing a badly broken C string handling library.
Chapter 5, ‘Debugging in a Multiple-Activities Context’, covers client/server network programs, multi-threading and parallelprogramming, all of which are currently out of my depth.
Chapter 6, ‘Special Topics’, covers syntax errors, shared and dynamic libraries, and debugging curses programs.
Chapter 7, ‘Other Tools’, covers how text editors (vim in this case), the compiler, strace, ltrace, static code checkers (e.g. splint – C only) can all be used to prevent or deal with bugs and finishes off with a section on debugging dynamically allocated memory (malloc etc, free) using tools like Electric Fence, mtrace and MALLOC_CHECK_.
Chapter 8, ‘Using GDB/DDD/Eclipse for Other Languages’, covers Java, Perl, Python, SWIG, and (32-bit Intel) assembly language debugging.
A good book, especially if used alongside the dedicated manuals available for the tools covered here (www.gnu.org/manual/manual.html is a good place to start). You will need a background in C and Linux/Unix to get the most out of this book.
The C Programming Language 2e
By Brian W. Kernighan and Dennis M. Ritchie, published by Prentice-Hall, 1988, 288 pages, ISBN: 0-13-110362-8
Reviewed by Ian Bruntlett
This is the classic introduction to the C programming language. The first edition was originally published in 1978 and this second edition was published in 1988. A lot of things have changed since then but this is a worthwhile introduction nevertheless. There are other books on C but I am not sure which books to read after this one – if I could have a modern bibliography for this book, it would come in very handy – I intend to review other C books, in time.
After an introductory chapter, the basics of the language are catered for in this order:
- Types, operators, and expressions
- Control flow
- Functions and program structure
- Pointers and arrays
- Structures
- Input and output
After that, there is a chapter on ‘The UNIX System Interface’, which features interesting albeit limited implementations of fopen, getchar, putchar, opendir and malloc.
The appendices round off the book. The Reference Manual is based on the draft ANSI standard and presents a grammar of the language. The Standard Library appendix complements the grammar by offering up a summary of the standard library. The final appendix summarises the changes made to the language since the publication of the first edition of this book.
The source code for this book is available to download but I found the organisation of the code to be lacking. Fortunately, a kind soul has reorganised the code and made it available on GitHub (https://github.com/caisah/K-and-Rexercises-and-examples). Most Internet searches for this book bring up sites that either want to sell you the book or give you a pirate PDF copy. Because of that, I’m citing an errata page (https://s3-us-west-2.amazonaws.com/belllabs-microsite-dritchie/cbook/2ediffs.html)
The code examples are for tuition purposes only – this isn’t the place to go looking for production code – however the UNIX System Interface chapter comes close.
Finally, the book ends with an index – a glossary would have been welcome, too. This book does show its age a bit but it still should be on the reading list of any would-be C programmer.
Notes:
More fields may be available via dynamicdata ..