Cover of Elements of programming

Elements of programming

by Alexander A. Stepanov · first published 2009

58mentions
31recommended by
50HN commenters
2009–2026first – last mentioned

62% recommend38% neutral

Why HN recommends it

Rigorous, math-driven foundation for generic programming: applies basic abstract algebra to algorithm design and explains the thinking behind the STL. Suits C++ programmers who can handle abstract theory.

Summarised by Claude from recommending comments

A mathematically oriented approach to practical programming with an emphasis on abstraction via mathematical generalizations.

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

80 2007: 0 mentions2008: 0 mentions2009: 2 mentions2010: 5 mentions2011: 2 mentions2012: 3 mentions2013: 3 mentions2014: 2 mentions2015: 2 mentions2016: 4 mentions2017: 5 mentions2018: 3 mentions2019: 2 mentions2020: 8 mentions2021: 1 mention2022: 4 mentions2023: 1 mention2024: 1 mention2025: 4 mentions2026: 1 mention200720172026

What Hacker News says

  • adamnemecek · Sep 21, 2016 · Recommends

    I've been recently trying to make my way though Elements of Programming (https://www.amazon.com/Elements-Programming-Alexander-Stepan...) by Alexander Stepanov and Paul McJones and it makes me say abstract algebra. It's the first and only rigorous foundation of software engineering…

    on “Ask HN: Which areas of math are practical to programming/algorithms and why?” ↗
  • gregjor · Mar 26, 2012 · Recommends

    Surprised Tufte's books aren't on the second list. I see programmers referring to Tufte but I doubt many have read his books. I recommend them. I nominate Stepanov's Elements of Programming to the second list. Beautiful, dense, and a perpetual shelf ornament. Stepanov's papers, especially the one that launched the STL, Fundamentals of Generic Programming (with James Dehnert) is a masterpiece.…

    on “Books Programmers Don't Really Read But Recommend” ↗
  • adamnemecek · Jan 18, 2017 · Recommends

    There's this book that I've been mentioning around here called Elements of Programming https://www.amazon.com/Elements-Programming-Alexander-Stepan... that makes exactly this claim, that we are writing too much code. It proposes how to write C++-ish (it's an extremely minimal subset of…

    on “Ask HN: Are we overcomplicating software development?” ↗
  • adamnemecek · Jan 16, 2017 · Recommends

    I'll give you a couple. Note that some of these are rehashes of my earlier comments. # Elements of Programming https://www.amazon.com/Elements-Programming-Alexander-Stepan... This book proposes how to write C++-ish code in a mathematical way that makes all your code terse. In this talk, Sean Parent, at that…

    on “Ask HN: What's the best computer science book you've read recently?” ↗
  • tom_b · Mar 1, 2011 · Recommends

    …modern C reference that is the successor to K&R (which doesn't seem to exist). Skiena instead of CLR? Hmmmm . . . not sure I'll agree with that. You might want to consider having a look at the Stepanov Elements of Programming book. I think there is a chance it could be a good follow-up for hackers interested in moving from Hanson's elegant looking code to a nice, minimal C++. I lack enough applied C/C++ experience for this…

    on “What is the single most influential book every programmer should read?” ↗
  • tezka · Feb 24, 2013 · Recommends

    …figures of speech etc. because he is too dumb to use them properly. There are poets and there are mba-style bullshit writers. Great C++ code can read as beautifully as poems in style and elegance (c.f. Elements of Programming by Stepanov).

    on “The Dark Side of C++ (2007) [pdf]” ↗
  • twoodfin · Feb 23, 2014 · Recommends

    If you can handle some abstract theory, the design of the STL is put into a useful context by Stepanov's Elements of Programming. Stroustrup's The Design and Evolution of C++ is another great "why" book, and I hope that Bjarne will decide to update it for C++11 or 14. It's older, but reading Lippman's Inside the C++ Object Model…

    on “The C++ and programming books I recommend” ↗
  • nikki93 · Sep 6, 2020 · Recommends

    …Scott Meyers (esp. for the chapters on smart pointers). Arthur O' Dwyer's "Mastering the C++17 STL" David Vandervoode and Nicolai Josuttis etc.'s "Templates the Complete Guide" The first chapter of "Elements of Programming" by Stepanov, and maybe the rest if you want. I think also, just kinda glancing over the spec. Bjarne's paper on the evolution of C++ from 2006 to 2020 is also important I think: https://dl.acm.org/doi/10.1145/3386320…

    on “C++20 has been approved” ↗
  • arximboldi · Oct 5, 2020 · Recommends

    Yes! Also the book Elements of Programming by Stepanov has a lot of "value orientation" in it.

    on “Principles of Data Oriented Programming” ↗
  • Suncho · Apr 11, 2018 · Recommends

    …generic algorithms. It's part of the standard libary. If you can understand how to use the STL properly, you're well on your way to becoming a profiicent C++ programmer. His books are fantastic too. Elements of Programming: https://www.amazon.com/Elements-Programming-Alexander-Stepan... and From Mathematics to Generic Programming: https://www.amazon.com/Mathematics-Generic-Programming-Alexa... If you prefer video lectures,…

    on “Ask HN: What is the best Modern C++ MOOC?” ↗
  • drallison · Jul 21, 2010 · Recommends

    Elements of Programming by Alexander Stepanov and Paul McJones (Hardcover - June 19, 2009) might be what you are looking for. Read the Amazon reviews. And, of course, there is always Knuth's Art of Computer Programming in…

    on “Ask HN: Programming books that are more like math books?” ↗
  • drallison · Aug 1, 2010 · Recommends

    …and the theories of machine independent (and dependent) optimization. Programming language design for general purpose use is one of the most difficult of human intellectual tasks. Suggested reading: Elements of Programming, by Alexander Stepanov and Paul McJones, published by Addison-Wesley Professional in June, 2009.

    on “If I could change the C language...” ↗
  • saurabhsharan · Apr 6, 2011 · Recommends

    Two suggestions: Elements of Programming (by Alexander Stepanov and Paul McJones) takes a mathematical approach to programming. Since its only prerequisite is a basic understanding of high school algebra, the book is very accessible and easy…

    on “Must Read CS Books For Self Self-Taught Programmers” ↗
  • ryanmolden · Jan 25, 2012 · Recommends

    Have you read Elements of Programming by Alexander Stepanov (he of STL fame) and Paul McJones? They take a similar approach as your examples except instead of declarative generation of code they break things down to very rudimentary mathematical…

    on “I want to fix programming” ↗
  • rohansingh · Jun 1, 2013 · Recommends

    …successfully in the past, I'm going to start doing it more regularly for personal projects as well. Learning just for the sake of learning — good point there. For example, I really have no good reason to read Elements of Programming. I'm not a compiler designer or anything. That said, it is still fun and interesting to read. Probably makes sense to split reading into stuff that is clearly productive and helpful and things that are…

    on “Ask HN: How do you finish things?” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help