Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of A retargetable C compiler

    A retargetable C compiler

    Christopher W. Fraser · 1995

    Features: discusses the implementation and design tradeoffs made while constructing a real ANSI C compiler, illustrating the interaction between theory and practice; covers compiler theory only as needed to understand the implementation of Icc, focusing instead on practical, applied issues; encourages a deeper understanding of programming in C, by providing C programmers with a tour of the language from the perspective of compiler authors; includes coverage of code generators for the MIPS R3000, SPARC, and Intel 386 and its successors; and provides access to the full source code for the Icc compiler, the three back ends, and the code-generator generator, either on disk or via FTP. This new text examines the design and implementation of Icc, a production-quality, retargetable compiler, designed at AT&T Bell Laboratories and Princeton University for the ANSI C programming language. The authors' innovative approach - a "literate program" that intermingles the text with the source code - gives a detailed tour of the code that explains the implementation and design decisions reflected in the software. And while most books describe toy compilers or focus on isolated pieces of code, the authors have made available the entire source code for a real compiler.

    Computer ScienceProgramming
    Open LibraryAmazon
    Stats for nerds
    9recommend
    23mentions
    16people
    2010–2026years
    57% recommend39% neutral4% critical

    Mentions per year

    201020122014201620182020202220242026

    What Hacker News says

    1. camel-cdrMay 2024
      The list is missing "Retargetable C Compiler, A: Design and Implementation", which is one of my favorite programming books. It's a literate program of a full c compiler.
      thread
    2. pjmlpMar 2022
      If besides the author's book (good work), you want to delve into how others approach the subject, check

      - Retargetable C Compiler, A: Design and Implementation

      - Compiler Design in C

      thread
    3. plinkplonkJan 2020
      This might be relevant

      A Retargetable C Compiler: Design and Implementation by David Hanson and Chritopher Fraser

      https://www.amazon.com/Retargetable-Compiler-Design-Implemen...

      Written in a literate programming style.

      thread
    4. pjmlpDec 2017
      Anyone that wants to write C compilers has two good books for it.

      "A Retargetable C Compiler: Design and Implementation", from David R. Hanson and Christopher W. Fraser

      "Compiler Design in C", from by Allen I. Holub

      A bit old, but there are not significant changes to C since they were written, other than optimizers taking advantage of UB.

      thread
    5. cessorJun 2017
      Here are my recommendations. Each is a placeholder for a complete discussion :)

      Psychology of Programming

      =========================

      1. "Psychology of Computer Programming" - Gerald M. Weinberg

      2. "Software Design – Cognitive Aspect" by Francoise Detienne

      3. "Thinking Fast and Slow" by Kahneman and Tversky

      4. "Drive: The Surprising Truth About What Motivates U" by Daniel Pink

      Book 1 is a really nice read and touches a lot of the social and workplace aspects of computer programming. Book 2 is more focused on modern research of program comprehension in relation to cognition. It's a little older, and often just scratches the surface, but they both nicely show that a lot of social and psychological factors are relevant for programming, independent of the programming languages developers use. 3. and 4. add some more background infos to it if you want to dive deeper.

      Career Development

      ==================

      - "Hackers and Painters" - Paul Graham

      - "The Passionate Programmer" - Chad Fowler

      In addition to the Pragmatic Programmer which has been mentioned in other comments, these books really helped me understand where I wanted to be as a programmer.

      Technology

      ==========

      With a stronger focus on technology I recommend:

      - "Language Implementation Patterns" - Terence Parr

      - "A Retargetable C Compiler: Design and Implementation" - Hanson, Fraser

      I found them more helpful than the Red Dragon Book. The latter is good, but as a beginner I felt a little lost and Terence Parr's book was much more helpful.

      Practice & Karate

      =================

      - "Elegant Objects" by Yegor Bugayenko

      - "Working Effectively With Legacy Code" - Michael Feathers

      - "Growing OO Software, Guided by tests" - Pryce, Freeman

      - "Test Driven Development" by Kent Beck

      And, this last one I can't recommend enough:

      "XUnit Test Patterns" by Gerard Meszaros

      Kent Beck's TDD is good book to start with. Even if you feel like you have got testing figured out, you should try TDD. It has more to do with discipline and getting things done, rather than writing code fast or smart or efficiently. Someone I follow on twitter once called it "thinking at sustainable pace", which is really what TDD is about. A lot of people are simply offended by the idea to "test first". To me, "test first" is roughly equivalent to "think before you code". Maybe this is what others find offensive.

      As for an advanced view on testing, Gerard Meszaros's book is really good. It is a catalogue of testing patterns that helps to structure testing code in a nice way.

      Depending on OP's skill I would recommend the following: Be very carefull with the following books:

      - Design Patterns - Gang of Four

      - Patterns of Enterprise Application Architecture

      - {Doing Anything with} Domain Driven Design

      These books are really valuable, but somewhat problematic. Sometimes they will give you a hammer and make everything look like a nail. Sometimes they make it easy to focus on the wrong things. They come over as precise and clear, but really aren't, which will cause discussions and poor choices. On the surface, they sound nice, simple and friendly, but on a deeper level, they are really difficult to understand.

      If you want to read them, I encourage you to do so with your colleague and discuss them critically. Maybe you can have a wednesday afternoon bookclub meeting at your company. We once did that for "Working Effectively with Legacy Code".

      I collected some more suggestions on a trello board a while ago, which should be accessible here:

      https://trello.com/b/lw96ei6d/books

      If you wish to contribute, just let me know. Then initial collection started when we got together after an open space.

      BTW: Thank you all for your suggestions! I will add some of your recommendations to the trello board.

      thread
    6. plinkplonkFeb 2017
      A Retargetable C Compiler: Design and Implementation

      https://www.amazon.com/Retargetable-Compiler-Design-Implemen...

      A most excellent grimoire.

      thread

    Related

    Cover of Modern Compiler Design
    2009–2016

    Modern Compiler Design

    David Galles
    1 recommend · 2
    Cover of Compiler design in C
    2011–2026

    Compiler design in C

    Allen I. Holub
    11 recommend · 28
    Cover of Modern compiler implementation in C
    2010–2024

    Modern compiler implementation in C

    Andrew W. Appel
    8 recommend · 13
    Cover of C interfaces and implementations
    2008–2026

    C interfaces and implementations

    David R. Hanson
    46 recommend · 114
    Cover of The C Programming Language
    2007–2026

    The C Programming Language

    Brian W. Kernighan
    246 recommend · 604
    Cover of Advanced compiler design and implementation
    2008–2025

    Advanced compiler design and implementation

    Steven S. Muchnick
    13 recommend · 25
    Cover of Compiler construction
    2008–2026

    Compiler construction

    Niklaus Wirth
    30 recommend · 81
    Cover of Modern compiler implementation in ML
    2009–2024

    Modern compiler implementation in ML

    Andrew W. Appel
    24 recommend · 68