Hacker Courses The online courses programmers keep recommending, ranked from 20 years of public forum comments.
i
#117 overallEvergreen

6.005 Elements of Software Construction

MIT OpenCourseWare

3 recommenders · 8 threads · recommended in 6 years, 2010–2023 · score 3.8

Go to course ↗

MIT OpenCourseWare's software engineering course taught in Java, covering design, state machines, functional programming, invariant reasoning, and writing programs that are correct, easy to understand, and ready for change. Commenters cite the 2008 version's lecture notes, and note that later versions by a different professor use Python.

Commenters call it an outstanding, design-centred introduction to software construction that improved their programming in any language, and praise its coverage of state machines and functional programming.

Programming Languagesintermediatefreemixed#software design#state machines#functional programming#java#jackson

Recommendations by year

20062026

What commenters said (8)

  1. Strongly recommendscharlysl2018in “The Rise of the State Machines”

    Elements of Software Construction [1] (MIT OCW 6.005 2008) has an excellent practical introduction to programming with the State Machine paradigm.

    It uses Java but is applicable to any language because it's a design centric approach. In particular, lectures [2] [3] [4] [5].

    It relies on a very lightweight notation and presents a choice of 4 design patterns (not just GoF State) to synthesise the code directly from the design [3].

    [4] shows how to apply invariant reasoning to State Machine design, which is an extremely powerful reasoning tool.

    [5] is very interesting because it explains how to deal with structured traces, which are modelled as streams using a regular grammar. This turns out to be a very simple but powerful design approach that is applicable to many situations, and very straightforward to implement using JSP (nothing to do with Java, stands for Jackson Structured Programming). Because this is basically a parser (at a very abstract level), the course then follows naturally to the FP paradigm.

    It also includes a couple of very cool hands-on exercises:

    Multipart file transfer [6] [7]

    Midi piano player [8]

    In fact, the whole course is outstanding.

    [1] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [2] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [3] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [4] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [5] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [6] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [7] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [8] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

  2. Strongly recommendscharlysl2017in “Ask HN: CS papers for software architecture and design?”

    I am a big fan of Daniel Jackson's approach to teaching programming, and really like his courses, in particular the mindblowing "Elements of Software Construction" [1], which is, by a mile, the best programming course I have come across, and which I believe is sadly underrated; I know there are more recent versions of this course, by a different professor, that use the more popular (at least in this forum) Python instead of Java, but IMHO with all due respect, they are a bit dumbed down and I believe that you won't get the same out of them. It is not really a Java course, it has improved my programming (and, very specially, design) in general, in any language. It completely changed the way I look at design patterns, for instance; it made me really understand functional programming and state machines; what OO really is about; how to choose a software paradigm for a given problem; and now I use JSP stream processing to model many programs (nothing to do with java JSP, it was created by his dad in the 70s, "the other Michael Jackson").

    To really appreciate how much thought went into the design of this course, I recommend reading "A New Approach to Teaching Programming" [2]

    As for the Concepts and Purposes you refer to, there is more on this in [3] [4] [5] in the MIT 6.170

    [1] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

    [2] http://people.csail.mit.edu/dnj/articles/teaching-6005.pdf

    [3] https://stellar.mit.edu/S/course/6/fa16/6.170/courseMaterial...

    [4] https://stellar.mit.edu/S/course/6/fa16/6.170/courseMaterial...

    [5] https://stellar.mit.edu/S/course/6/fa16/6.170/courseMaterial...

  3. Strongly recommendsgagagababa2016in “MIT Design and Analysis of Algorithms (Spring 2015)”

    You can find a lot of other courses if you poke around the net. For example, 6.005 - Elements of Software Construction is "As taught in 2011" on OCW [1], but you can find the latest notes here [2]. The content hasn't changed a lot since 2011 though, and the changes are mostly in the order of which the content is presented. As a side note, this is is easily the best course out there for novice/intermediate programmers. No videos though.

    Another great course (started it yesterday) is 6.172 Performance Engineering of Software Systems [3] and it also has videos available.

    All in all, there are a lot of great courses for any level of experience/knowledge. It's best that you check them out and see what you like yourself. This [4] is the list of all the EE/CS subjects that are offered on OCW. Some of them have videos, others don't. Note however, that almost all of them have comprehensive lecture notes and if you get stuck, you can always look for more information elsewhere. Finally, if you want to check what they offer every semester, see here [5] (note: their EE/CS courses start with 6).

    [1] http://ocw.mit.edu/courses/electrical-engineering-and-comput... [2] http://web.mit.edu/6.005/www/fa15 [3] http://ocw.mit.edu/courses/electrical-engineering-and-comput... [4] http://ocw.mit.edu/courses/#electrical-engineering-and-compu... [5] https://stellar.mit.edu/courseguide/#course_6_sp16

  4. Recommendscharlysl2023in “Ask HN: Is SICP/HtDP still worth reading in 2023? Any alternatives?”

    This.

    That was my journey as a self-taught programmer who at one point realized had to learn the timeless foundations.

    And then MIT's 6.005 [1], where you will apply all this with a realistic language (Java, although the concepts carry to any language), and learn how to design, code and test programs that "have no bugs, are easy to understand and ready for change".

    And also learn a bit about algorithms, I don't think that one can design and understand properly without. And what is O(2^n) today will still be that in 100 years. MIT's 6.006 is amazing, both professor and TA [2].

    I've seen Knuth's TAOCP recommended around here. Don't even consider that, do a course like 6.006 first, the Everest shouldn't be the first mountain you climb. Likewise favour HtDP over SICP at first, I've been there.

    If after all this you are still interested in LLMs, I recommend EdX's "Large Language Models: Application through Production" [3]

    [1] https://ocw.mit.edu/courses/6-005-software-construction-spri...

    [2] https://ocw.mit.edu/courses/6-006-introduction-to-algorithms...

    [3] https://www.edx.org/course/large-language-models-application...

  5. Recommendscharlysl2019in “Functional programming in C++ (2012)”

    I am by no means an expert, but I find this article to be very superficial, and not very useful for people new to this in terms of learning the core concepts. For instance there is no mention of the Interpreter, Visitor and Composite GoF design patterns, which are crucial to doing functional programming in OO languages. If you are curious about this, it is very well explained in some of the lectures (10, 11, 13, 14, 15) of the OCW MIT course "Elements of Software Construction" 2008 version [1].

    For a much more in depth and accurate discussion of the trade offs between functional and OO programming, I recommend the book "Concepts, Techniques, Models of Computer Programming". For instance, this book explains the technique of Impedance Matching to deal with programs where different components have different degrees of what the article's author (very losely) calls "purity".

    [1] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

  6. Recommendscharlysl2018in “Programming Paradigms for Dummies: What Every Programmer Should Know (2009) [pdf]”

    This is not the way to do FP in Java though. Even before lambdas were introduced, you could do FP in Java. This is actually the whole point of GoF design patterns such as Interpreter and Visitor, which together with Composite are the way to write recursive data definitions (and functions that operate on them) in Java (or C++). The whole idea of "Little Languages" is FP, representing operations as data, as an AST.

    How to do FP in Java is very well explained in the MIT OCW course 6.005 "Elements of Software Construction", 2008 [1], in particular in lectures 10, 11, 13, 14 & 15.

    Remember that you can create closures with inner classes.

    As for the fact that in Java you could have state inside, say, a Visitor, the program can still be FP, if you know what you are doing. The point is that when doing FP in a language like Java, you are adopting a definitional approach to FP, which is totally legit: any operation is FP if it is deterministic and has no visible side-effects (a corollary is that then it wouldn't have any observable state of its own, it would be reactive). This is sort of a "if it walks like a duck ..." approach to FP.

    In fact, this is exactly what is going on when you are doing reactive programming in a non FP language like Javascript, where there are no restrictions to doing destructive assignment anywhere. This doesn't stop you from doing reactive programming, as long as you follow certain guidelines (because the language won't stop you from infringing them and having state).

    How is this possible? The reason is that the OO computation model subsumes FP: anything you can express in an FP language, you can express in an OO language, and then some (although not as naturally, there is more plumbing in the way).

    The reverse is not true, and this is a good thing, it is exactly what allows FP to have all those desirable properties.

    [1] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

  7. Recommendscharlysl2018in “How to teach yourself hard things”

    For learning how to program, How To Code [1] (based on How to Design Programs [2]) is tragically underrated given that it's hands down the best approach to learn how to program (actually, more importantly, how to think about programming) of the many I have looked at. Wish I had known this years ago. Rarely the best learning resources are widely know, so sad.

    I decided to give this course a go after reading the eye-opening paper The Structure and Interpretation of the Computer Science Curriculum [3], and then discovered the edx course in HN [4] [5].

    Although having programmed for many years it totally changed the way I look at programming; I followed this with the sadly unfinished but still excellent How to Design Classes [6], which consistently extends this initially FP approach to OO. To check how this approach is language neutral, have a look at Design Recipes in C [7].

    Another neglected but wonderful resource is MIT OCW Elements of Software Construction (the 2008 version) [8], which, like the above, is centered around design rather than coding.

    What did I get out of all this? A systematic approach to programming.

    [1] https://www.edx.org/course/how-code-simple-data-ubcx-htc1x

    [2] https://htdp.org/

    [3] https://cs.brown.edu/~sk/Publications/Papers/Published/fffk-...

    [4] https://news.ycombinator.com/item?id=9810542

    [5] https://news.ycombinator.com/item?id=16455240

    [6] http://www.ccs.neu.edu/home/matthias/htdc.html

    [7] https://hci.uni-hannover.de/files/prog1script/script.html

    [8] https://ocw.mit.edu/courses/electrical-engineering-and-compu...

  8. Recommendskoenigdavidmj2010in “Ask HN: A Self-Taught Programmer's Library”

    MIT hosts a lot of their course materials online at http://ocw.mit.edu/index.htm . Dig through some of their classes.

    I'm not sure at what level you mean by 'beginner', but my recommendation is to run through 6.001 (Structure and Interpretation of Computer Programs). MIT has a new Python-based intro class that has since replaced 6.001, but the old class is still a very well-baked and well-respected curriculum.

    After that, if you want, dig into a couple data structures and algorithms classes (like 6.006) to build up your theoretical background.

    Next look into a software engineering course (theirs is 6.005). This should get you a bit of feel for diving into a large system without getting lost, or organising one of your own.

    After that, just start poking around at things that look interesting. Build something shiny. (That's the great thing about our industry---you can get your tools for free, and build something useful without making a huge initial investment. That would not happen in a lot of other fields.)

Related courses

Keyboard

In the course grid
←↑→↓
Move between courses
Home End
Start / end of row (with Ctrl: first / last)
PgUp PgDn
Jump several rows
Enter
Open course
S
Save / unsave course
1–5
Best, Trending, Hidden gems, Evergreen, Saved
[ ]
Previous / next topic
On a course page
← →
Previous / next course in your list
S
Save / unsave
O
Open the course website
Esc
Back to the grid
Everywhere
/
Search
T
Light / dark theme
?
This help