Write Great Code, Volume 2
Thinking Low-Level, Writing High-Level
By Randall Hyde
Publisher: No Starch Press
Released: March 2006
Pages: 634

The second volume in the Write Great Code series supplies the critical information that today's computer science students don't often get from college and university courses: How to carefully choose their high-level language statements to produce efficient code. Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level, teaches software engineers how compilers translate high-level language statements and data structures into machine code. Armed with this knowledge, a software engineer can make an informed choice concerning the use of those high-level structures to help the compiler produce far better machine code--all without having to give up the productivity and portability benefits of using a high-level language.

Table of Contents
Product Details
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyWrite Great Code, Volume 2
 
5.0

(based on 1 review)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

Reviewed by 1 customer

Displaying review 1

Back to top

(2 of 2 customers found this review helpful)

 
5.0

Help your compiler write better code

By Anonymous

from Undisclosed

Comments about oreilly Write Great Code, Volume 2:

I earned my Computer Science degree several years ago. During my studies I learned languages like Assembly, Modula-2, C and C++ and even a little VB in a computer graphics class. I learned quite a bit about how computers work at the binary level and even got into some Electrical Engineering topics.

As you might expect, I don't use any of those languages in my career today. It's all Java, LotusScript, and other high-level languages for me these days. I rarely find myself shifting bits or thinking about logic gates. Does this mean my CS degree was a waste of time? Absolutely not. Although it would have been nicer if I had been learning Java... :-)

It's not the languages I learned that gave the education its value. It's the algorithms, patterns and logic that have come to my aid again and again. An understanding of what's going on inside the computer can be very helpful at times. That's why I was so interested in reading Randall Hyde's book: Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level.

This book teaches the following concepts (Chapter 1 excerpt):

- Why it's important to consider the low-level execution of your high-level programs

- How compilers generate machine code from high-level language (HLL) statements

- How compilers represent various data types using low-level, primitive, data types

- How to write your HLL code to help the compiler produce better machine code

- How to take advantage of a compiler's optimization facilities

- How to "think" in assembly language (low-level terms) while writing HLL code

The general goal of this book is to teach you how to think like a compiler so you can anticipate what the compiler will do with your code. Randall Hyde is also the author of The Art of Assembly Language. It would be an understatement to say he has a good handle on this subject. Chapter 3 goes into detail on 80x86 assembly for the HLL programmer while chapter 4 looks at the Power PC. Chapter 5 looks at compiler operation and code generation. This chapter gave me major flashbacks to compiler class.

In chapter 9, the author includes a great discussion of arrays and how they are handled by various languages. Another topic, in chapter 12, that I found very interesting was the discussion of variant data types. (Us LotusScript developers mustn't forget to use 'Option Declare.') Chapter 15 includes a description of various types of loops and hammers home the importance of coding efficient loops.

We spend so much time these days trying to abstract everything and think at a high-level. That's all fine and good but we can make better high-level decisions by understanding the low-level workings of compilers. Readers who are experienced developers with a genuine interest in writing quality code will get a lot out of this book. I especially recommend it for career developers who didn't have the benefit of formal Computer Science training.

At the end of the book is a teaser for the next book in the series: Write Great Code, Volume 3: Engineering Software. In this book, Hyde will discuss "personal software engineering" and will focus on craftsmanship, art, and pride in workmanship. I'm looking forward to that one too.

-Jim (WithaT.com (http://withat.com) )

Displaying review 1

Back to top

 
Buy 2 Get 1 Free Free Shipping Guarantee
Buying Options
Immediate Access - Go Digital what's this?
Ebook: $35.95
Formats:  ePub, Mobi, PDF
Print & Ebook: $49.45
Print: $44.95