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
    Exercises in Programming StyleCristina Videira Lopes

    Exercises in Programming Style

    Cristina Videira Lopes · 2014

    "Exercises in Programming Style consists of over 30 renditions of the same simple program written in various programming styles. The book illustrates the richness of human computational thought, and the teachings that have been accumulated during more than fifty years of computer programming. These teachings are scattered around, and are mostly passed to new generations of programmers by mentoring and self-teaching. The book presents this knowledge in a package that can be understood and referenced by all programming professionals and students, so that they have a more global vision of the conceptual tools at their disposal"

    Programming
    Open LibraryAmazon
    Stats for nerds
    11recommend
    17mentions
    14people
    2016–2025years
    76% recommend24% neutral

    Mentions per year

    2016201720182019202020212022202320242025

    What Hacker News says

    1. taericAug 2025
      As the sibling says, CL can be written in most any style. Which, I think it is fair to say for any general programming language? The book Exercises in Programming Style highlights that. That said, CL feels far friendlier to the various styles than other languages, to me.

      Link to book on Amazon: https://www.amazon.com/dp/0367350203

      thread
    2. sn9Feb 2024
      You might want to check out Exercises in Programming Style (2nd Edition) by Cristina Videira Lopes.

      It's a little known book that explores different ways of solving the same problem under different constraints.

      thread
    3. sn9Dec 2023
      A little known book that many might find interesting is Cristina Lopes's Exercises in Programming Style which takes a single problem and solves it in 40 different ways using Python. [0]

      https://www.amazon.com/Exercises-Programming-Style-Cristina-...

      thread
    4. psyklicNov 2023
      You might enjoy the book "Exercises in Programming Style (Second Edition)" by Cristina Videira Lopes. It looks at how you can compute term frequency using 40 different coding patterns, explaining the how/why of each.
      thread
    5. JohnDeHopeOct 2022
      I enjoy this sort of "one example, multiple different lenses" style of discussion. It reminds me of this book... Exercises in Programming Style by Cristina Videira Lopes.
      thread
    6. svatJul 2022
      See also a different comparison (on ~the same problem) at StackExchange: https://codegolf.stackexchange.com/questions/188133/bentleys...

      (Copying from my comment the last time this was posted: https://news.ycombinator.com/item?id=26467684)

      There's also a nice book "Exercises in Programming Style" about just this problem.

      thread

    Related

    Cover of The art of computer programming
    2007–2026

    The art of computer programming

    Donald Knuth
    336 recommend · 1,799
    The psychology of computer programmingGerald M. Weinberg
    2009–2026

    The psychology of computer programming

    Gerald M. Weinberg
    44 recommend · 122
    Cover of How to Design Programs
    2007–2026

    How to Design Programs

    Matthias Felleisen
    277 recommend · 776
    Cover of Concepts, techniques, and models of computer programming
    2007–2026

    Concepts, techniques, and models of computer programming

    Peter Van Roy
    70 recommend · 133
    Cover of The elements of programming style
    2008–2026

    The elements of programming style

    Brian W. Kernighan
    30 recommend · 96
    Cover of Literate programming
    2009–2026

    Literate programming

    Donald Knuth
    18 recommend · 128
    Cover of User Interface Design for Programmers
    2007–2026

    User Interface Design for Programmers

    Joel Spolsky
    18 recommend · 26
    Cover of The Practice of Programming
    2007–2026

    The Practice of Programming

    Brian W. Kernighan
    90 recommend · 184