Article Options
Premium Sponsor
Premium Sponsor

 »  Home  »  Reviews  »  Book Reviews  »  Write Great Code – Volume 2: Thinking low-level, writing high-level by Randall Hyde
Write Great Code – Volume 2: Thinking low-level, writing high-level by Randall Hyde
by Fadzai Chamba | Published  09/24/2006 | Book Reviews | Rating:
Fadzai Chamba
Fadz has been coding since 1993 when he was 13 years old when he first saw a computer that worked at St. Ignatius College in Harare Zimbabwe. His first programming experience was in GWBASIC. He thought he was learning the basics of computers and before long he was the renouned 'computer expert'. He later learned to use COBOL, Pascal, C, C++, PROLOG, Visual Basic, Java and Visual C++. Because of his first experiences he chose to ply his trade in Visual Basic. He came across .NET in July/August of 2003 and has been using it since. He has worked with VB(6) since October 2000, first as a Free lance developer, then for a company back to free lance. This yo-yo experience has continued to this day when he is now a Free Lance developer and starting a business in the Multi media field. He is a vbCity Guru who goes by the alias 'fabulous' and Spends a lot of his time inside .NET and the VB.NET and C# compilers. Fadz is also a DevCity .NETFella Award winner and constantly studies to improve his skills in .NET. 

View all articles by Fadzai Chamba...
Introduction

Introduction

This book, the second in a series, is based on the premise that, "in order to write the best high level code, one needs to learn assembly language." The good thing about it is that you don't have to lay the book down and enroll in an assembly language course before reading; the book will teach it to you.

Before I proceed, I must mention that although this is a site dedicated to .NET, this book is not about .NET. You will not find comparisons between datasets and data readers or C# and Visual Basic.NET. This is a rare gem that is relevant to all languages. In it you will find code samples in C/C++, Pascal (Delphi), Basic (Visual Basic) and different dialects of assembly language, including the author’s own High Level Assembler (HLA).

The prospect of learning assembly language might seem daunting, particularly to those who once tried and failed, or those without formal IT education. If that is you, you'll be pleased to know that contained in these pages is a two chapter crash course on assembly languages for the 80x86 and PowerPC CPU architectures. While this isn’t enough for you to start coding in assembly, you will be able to read assembly code with some idea of what's going on.

What you will learn

At one point I had to put the book down and get a notepad (the paper version) in order to take some notes because, particularly in the first quarter of the book, I was learning something new about the low-level details of memory addressing and CPU architectures on every page.

Randall Hyde challenges a lot of assumptions that developers may have about their code and leads you much further than you may have gone in the past.  For instance, when I did my CS course, a variable was defined in one sentence. Later as a teacher, I defined it in a paragraph and a couple of examples.

Hyde devotes 49 pages to telling readers what a variable really is, how it works and where it is stored.  Quality stuff, I tell you.  As if that isn't enough, there are 37 quality pages on arrays, 32 pages on strings and hope for those who gave up on C++ because pointers are effectively demystified.

You will learn the concepts of compiler operation and how to analyze compiler output. How debuggers work and how to step through your code looking not at the source code, but at the assembly generated for it through the disassembly window as I have been doing for a while now. This allows you to really compare what assembly code is generated for your high level statements and make intelligent and informed decisions on which statements you use.

 

Chapters of interest

The chapters on 80x86 and PowerPC assembly for high level language programmers are of great interest. These chapters contain invaluable information on CPU registers, and memory addressing modes that give you a greater understanding of how your code is working.

The chapters on variables, strings, arrays and pointers are very informative. You also get the low down on control structures and programmatic decisions. And there is a great chapter on  functions and procedures which covers their calling conventions and the overheads associated with them.


Sponsored Links