#40 overallEvergreen
Compilers
Coursera
11 recommenders · 16 threads · recommended in 9 years, 2012–2024 · score 14.0
A Stanford-taught compilers course offered on Coursera by Alex Aiken, covering lexing, parsing, semantic analysis, and code generation through a project building a compiler for the Cool language. Commenters note it can be taken self-paced.
Commenters call it excellent and say it made building a compiler feel achievable, with several saying it dispelled the idea that only wizards can write one.
Programming Languagesintermediatefreevideo lectures#compilers#parsing#code generation#cool language#aiken
Recommendations by year
20062026
It’s a bit more theoretical, but working my way (slowly, with many re-watches of certain videos) through the Coursera compilers course was a major milestone for me: I highly recommend finding an accessible way to do one of the CS things you think only Wizards can do: once you tackle one or two such projects, and realize that it’s hard, but mostly just slogging your way through it, it can be an enormous confidence boost :-)
I’m always happy to help anyone going down this path: zellyn@(most things) if anyone reading this wants to try but is feeling nervous.
Have taken two of his courses (Compiler and SICP) and highly recommend them. The only thing that is stopping me from taking more is I live at the other end of the world and have to stay awake the whole night for 5 days.
I did the Coursera Compilers course (highly recommended), so I implemented a toy language... but have never created one :-)
I highly recommend the Coursera compilers class: you don't have to work though it in synch with a class; just sign up and work at your own pace. If you have to watch the same video two or three times, you can. None of this stuff actually turns out to be that complicated: it just takes a little while to get the lingo and concepts.
I implemented the entire parser, typechecker, and compiler in Go here: https://github.com/zellyn/gocool
I then went back and hand-wrote a recursive descent parser, just for fun: Cool is such a simple language that it really wasn't difficult.
I can also highly recommend the Coursera Compilers class. Sign up for it after it's over, and just work through things at your own pace.
The provided scaffolding code is either Java or C++, but with a bit more work, it's perfectly reasonable to re-write it in whatever language you desire. Here's mine, in Go: https://github.com/zellyn/gocool
Admittedly, it is the world's dumbest compiler (uses a single register, and there's no optimization), but it's still fun to actually "slay the dragon" and stop believing that only wizards can build a compiler. :-)
Conquering a couple of things that intimidated me, that I thought only wizardly programmers could do: took the Coursera Compilers class and built a compiler. Built an emulator.
The author says he turned to Coursera, but doesn't mention the course(s) he took, but I'm going to guess it's the the 'Compilers' class from Stanford[0]. I've heard good things about the course and the lecturer (Alex Aiken) so I really wanted to take the course while it was being offered but was too busy last year. I hope they offer it again this year.
https://www.coursera.org/course/compilers
You can keep learning, just slowly. But it works: I decided a while ago to go back and learn the parts of CS that I skipped that felt unreachably wizardly to me. I'm currently working, very slowly, through the excellent Coursera compilers class, 25 minutes at a time on the bus to and from work. I say go for it :-)
You could take a look at Marc Cournoyer's course http://createyourproglang.com, check out the compiler course on Cousera https://www.coursera.org/course/compilers and watch Rob Pikes talk on lexical scanning http://www.youtube.com/watch?v=HxaD_trXwRE.b
That should get you going. Oh and don't forget to have a look at Go language specification as well.
I'm working on the Coursera compilers class right now, which is excellent: https://class.coursera.org/compilers-004
The code generation portion of the class covers this material from the other end, i.e. at the point where the AST is transformed into assembly code, and it has been super interesting.
This is obvious in retrospect but wasn't to me beforehand: if you're interested in reverse engineering, it's very helpful to study how the assembly was written in the first place.
I'm self taught :)
Algorithms in a Nutshell does a great job of introducing data structures and algorithms. It's also very short. Data structures and particularly basic graph algorithms (DFS, BFS, DSP) are very powerful and can solve a lot of common problems.
After that, study Math. Algebra, Set Theory, Automata and Calculus were real eye openers. Schaum's Outline of Discrete Mathematics is a good start in discrete math.
Automata: if you can, try and get hold of the Coursera course on the subject. It's excellent. It is hard work, but it got it through my thick skull :)
Then, compilers! They're awesome. They changed the way I think about development, and also in one feel swoop destroyed a lot of respect I had for the industry. I read "Engineering a Compiler" and followed the excellent Coursera course.
Did learning that make me a better developer? In some ways, yes. I'm capable of solving problems that I thought were impossible a few years ago. On the other hand, it is now clear to me that our industry is building castles on sand too often, and that makes me sad.
I feel like Algernon.
Check out the Coursera courses:
https://www.coursera.org/course/automata https://www.coursera.org/course/compilers
Great advice. I'd also recommend the Compilers course on Coursera. Although it is already underway, you can take the self paced version. https://www.coursera.org/course/compilers
The quality of the courses I have followed was excellent:
Coursera:Cryptography I - Dan Boneh
Coursera:Functional Programming Principles in Scala - Martin Odersky
Coursera:Compilers Alex Aiken
class2go.stanford.edu Introduction to Databases Jennifer Widom
Also affecting Coursera: https://twitter.com/coursera
It's rather annoying as the first assignments for the Alex Aiken's excellent Compilers course are due today.
I'm looking at the same problem at the moment. PGM sounds really interesting, but I think that the time investment just isn't going to be workable for me unless I drop several of my other classes. My current plan is to watch the PGM videos and try to keep up with the programming assignments as long as I can, but if it comes down to a choice of one or the other, PGM will be the one to go.
As far as "dumbing down", I've found that the Coursera classes that I've taken (Compilers, Automata Theory, Algorithms 1, SaaS and Machine Learning) have varied in difficulty quite widely. Compilers and Automata were both challenging and enjoyable, Algorithms 1 was about what I'd expect from a freshman/sophomore algorithms class and SaaS and Machine Learning were easy enough that they should be approachable to anyone with basic programming experience.
I don't feel that the difficulty in the classes that I've taken had any particular correlation with teaching effectiveness. I found Andrew Ng's ML class to be simple, but still interesting and informative - you come out of it with enough of a basic understanding to implement simple ML techniques as well as a place to start if you wish to learn more. I think that while a theory-centric class would be a nice thing to have, he's done an amazing job of making a class that can appeal to a wide range of potential students and introduce them to a field that's usually very difficult to approach.
I also live in the Bay Area (SF). Here's a small sampling of things I do when I'm not working:
* Write. Every weekday morning, I go to a coffee shop downtown and write for 30-60 minutes. I've written two full-length novels and two novellas so far, though they are all as-of-yet unpublished. Someday...
* Run. I run 3-4 nights per week, either along Embarcadero or through Golden Gate Park. I started off with the Couch to 5K program in January 2012 and I've worked up to four half-marathons in the last 12 months.
* Disc golf. There's a disc golf course in Golden Gate Park. Grab a beginner set (20 bucks from Amazon: http://www.amazon.com/Innova-Disc-Golf-3-Disc-Colors/dp/B000...), grab a friend, and go play. It's super fun.
* Nerd Nite. http://sf.nerdnite.com - 8 bucks. It's like the Discovery Channel -- with beer! (Side note: it's also where I met my girlfriend, and I go every month.)
* Rock climbing - check out Planet Granite (http://www.planetgranite.com/) or Mission Cliffs (http://www.touchstoneclimbing.com/mission-cliffs)
* Meetups - I've attended a dozen Meetups, including the SF Rust meetup. Very fun way to meet new people.
* Biking - Go to Roaring Mouse bikes in Crissy Field (http://www.roaringmousecycles.com/) and buy a bike. Then bike to work, bike to Golden Gate Park, bike across the GG bridge to Sausalito, to Tiburon, to Marin. There are a million awesome places to bike in the Bay Area, and there are huge communities around it. It's something you can do by yourself or with a group. Super fun.
* Anything from sf.funcheap.com. Like the site says, it's a list of fun, cheap things to do in the Bay Area.
* Take online classes (http://coursera.org). I'm currently taking the Machine Learning course and the Compilers course. It's very fun to learn new things!
* Become a Stormtroooper (http://www.goldengategarrison.com) - I'm not a member, but I know a lot of people who build their own Stormtrooper armor and then do volunteer activities with the 501st (the official Stormtrooper organization). Very cool way to give back to the community, especially if you're a Star Wars geek!
* Volunteer! There's a great organization in the city called One Brick (http://sfbay.onebrick.org/). You basically pick an event and just show up. It's volunteering a la carte! You're not making long term commitments -- just one event at a time. And you meet TONS of good, kind-hearted people. It's a win/win!
* And being Hacker News, I would be remiss if I didn't mention: start your own business. Find a problem domain you know something about, and solve that problem. Get out there, meet some co-founders, crank out some code, save the world, and get the cheerleader. Or maybe it was save the cheerleader? Whatever.
* And so much more. I do all of the above things regularly (sometimes daily, sometimes weekly, sometimes monthly), but there are a huge list of things I just don't have the time or memory to mention. There's a whole world out there. Get outside and explore!
Good luck!