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 Elements of programming

    Elements of programming

    Alexander A. Stepanov · 2009

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

    Programming
    Open LibraryAmazon
    Stats for nerds
    31recommend
    58mentions
    50people
    2009–2026years
    62% recommend38% neutral

    Mentions per year

    2009201120132015201720192021202320252026

    What Hacker News says

    1. rramadassJan 2025
      Pointing to Algebraic structures is not an argument since it is fundamental to mathematics and hence to programming in any language. What do you think a Type/ADT is? Why do you think user-defined types exist in any language? It is a given, the only difference is the strict pov taken by functional languages vs. imperative (procedural/OO) languages. There is a reason i pointed to the example of linking the derived type's contracts (i.e. properties) with the base type's because that would have made the isomorphism between two algebraic structures clearer (which you didn't seem to understand). Repeating some slogan is not knowledge. You have to go beyond the immediate notation/syntax in any language to the abstract concept it is trying to express. That is the heart of mathematics and programming.

      Since you brought up algebraic structures, C++ can express it directly using template syntax and relationships between them using parametric polymorphism non-OO style. Not only that, but because in C++ genericity is unconstrained, we actually can use OO inheritance for a type hierarchy and then using it to get constrained genericity. This flexibility is quite powerful and you get full type checking.

      To understand all this (and apply the concepts in any other language) see the books by Alexander Stepanov viz. From Mathematics to Generic Programming and Elements of Programming.

      thread
    2. igibbsNov 2023
      'Elements of Programming' by Stepanov and McJones

      'Software Fundamentals' by Hoffman and Weiss,

      'Writing Solid Code' by Maguire,

      'Code Complete' by McConnell

      thread
    3. menaerusOct 2022
      Yes, I agree, my experience is also that OOP is taught as something orthogonal over procedural imperative programming whereas it should be taught as an extension to it. But even with that said I honestly cannot think of many examples where OOP provides more elegant solution to the problem. Quite the contrary, any larger and more complex OOP-style codebase is quite an unreadable mess despite all the standard promises about the readability, maintainability, "testability", clean abstractions etc.

      I think that the biggest bend in my mind was when I set myself a goal to try to digest "Elements of Programming" by A. Stepanov and "Modern C++ Design" by A. Alexandrescu. Don't let the "modern" in the title trick you, it's a book from 2001.

      But irrelevant of the programming language, which in my example happens to be the C++, these two books triggered me to start challenging the tunnel vision I had up until then. It took me some time and a lot of experimentation to basically unlearn the OOP way of approaching the problems and trying to embrace a totally different, I'd say, almost mathematical way of looking at the things. It felt like a relief and it really had a huge impact not only on my code style but the way I think about the problems.

      Since then I think I started producing much simpler and, what I think, non over-engineered code of better quality without a lot of unnecessary cruft.

      thread
    4. jabajabaduAug 2022
      Elements of Programming by Alexander Stepanov and Paul McJones gives a very engaging introduction to applying basic abstract algebra to algorithm design.

      http://elementsofprogramming.com/

      thread
    5. wealthyyyMar 2021
      This guy wants to write an implant in Rust, but he forgets that Rust is like C, and its very easy RE.

      Oh, I do remember we had cool kidz writing implants in Go, C#

      What a failure! That's why the NSA and GRU selected Modern C++!

      He selected the wrong tool for the job. Take a look at Flawedgrace, it is written in modern C ++ and very complex to RE. It uses OOP heavily.

      Rust is a subset of modern C ++

      The Rust people have mastered Alexander Stepanov's vision for C ++

      Have a look at Alexander Stepanov's Elements of Programming.

      This post just a hidden marketing for his "Blackhat" book.

      C++ didn't make any mistakes. The language didn't but the developers did.

      It's pity that people portray C++ as dead and horrible lang.

      The ecosystem of programming languages has become more like the Ponzi Crypto industry, where every night you get shiny cryptocurrency and then charge for consultations and speaking.

      thread
    6. morelispNov 2020
      It's extremely formalized, but at least for me the foundation I always come back to to try to explain type systems is the taxonomy in chapter 1 of Stepanov and McJones's Elements of Programming[0]. Type systems help ensure your binary data are well-formed value (and your bits are numbers, your numbers are temperatures, etc. up various hierarchies). I find this is more convincing initially for mechanically sympathetic programmers (including myself) than any taxonomy of endofunctors.

      [0] http://elementsofprogramming.com/

      thread

    Related

    Cover of From Mathematics to Generic Programming
    2014–2025

    From Mathematics to Generic Programming

    Alexander A. Stepanov
    12 recommend · 31
    Cover of Low-Level Programming
    2019–2026

    Low-Level Programming

    Igor Zhirkov
    3 recommend · 8
    Cover of Modern C++ Design
    2007–2026

    Modern C++ Design

    Andrei Alexandrescu
    29 recommend · 83
    Cover of The elements of programming style
    2008–2026

    The elements of programming style

    Brian W. Kernighan
    30 recommend · 96
    Art of Writing Efficient ProgramsFedor G. Pikus
    2022–2026

    Art of Writing Efficient Programs

    Fedor G. Pikus
    2 recommend · 4
    Cover of Program development in Java
    2010–2026

    Program development in Java

    B. Liskov
    3 recommend · 9
    Cover of The Elements of Computing Systems
    2008–2026

    The Elements of Computing Systems

    Noam Nisan
    204 recommend · 344
    Cover of A Tour of C++
    2013–2026

    A Tour of C++

    Bjarne Stroustrup
    65 recommend · 150