Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(When) Should I learn compilers?

According to this http://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html article, I defnitely should.

Quote Gentle, yet insistent executive summary: If you don't know how compilers work, then you don't know how computers work. If you're not 100% sure whether you know how compilers work, then you don't know how they work.

I thought that it was a very interesting article, and the field of application is very useful (do yourself a favour and read it) But then again, I have seen successful senior sw engineers that didn’t know compilers very well, or internal machine architecture for that matter, but did know a thing or two of each item in the following list :

  • A programming paradigm (OO, functional,…)
  • A programming language API (C#, Java..) and at least 2 very different some say! (Java / Haskell)
  • A programming framework (Java, .NET)
  • An IDE to make you more productive (Eclipse, VisualStudio, Emacs,….)
  • Programming best practices (see fxcop rules for example)
  • Programming Principles (DRY, High Cohesion, Low Coupling, ….)
  • Programming methodologies (TDD, MDE)
  • Design patterns (Structural, Behavioural,….)
  • Architectural Basics (Tiers, Layers, Process Models (Waterfall, Agile,…)
  • A Testing Tool (Unit Testing, Model Testing, …)
  • A GUI technique (WPF, Swing)
  • A documenting tool (Javadoc, Sandcastle..)
  • A modelling languague (and tool maybe) (UML, VisualParadigm, Rational)
  • (undoubtedly forgetting very important stuff here)

Not all of these tools are necessary to be a good programmer (like a GUI when you just don’t need it) but most of them are. Where do compilers come in, and are they really that important, since, as I mentioned, lots of programmers seems to be doing fine without knowing them and especially, becoming a good programmer is seen the multitude of knowledge domains almost a lifetime achievement :-) , so even if compilers are extremely important, isn't there always stuff still more important?

Or should i order 'The Unleashed Compilers Unlimited Bible (in 24H..))) today?

For those who have read the article, and want to start studying right away :

Learning Resources on Parsers, Interpreters, and Compilers

like image 742
Peter Avatar asked Apr 09 '09 06:04

Peter


People also ask

Should I learn about compilers?

It is useful for a computer scientist to study compiler design for several reasons. Anyone who does any software development needs to use a compiler. It is a good idea to understand what is going on inside the tools that you use. Compilers are sophisticated text processors.

What should I learn before compiler design?

You should have good knowledge and understanding of any programming language such as Java or C to learn the concept of compiler design. Also, good knowledge about the concept of Assembly Programming would be an added advantage for learning the concept of compiler design.

Is compiler design a difficult subject?

The project is building a compiler and it is incredibly difficult. This course involves knowledge from 1501,1502,1550, 449, 447, and 445.

Why we do study of compiler?

A competent computer professional knows about high-level programming and hardware. A compiler connects the two. Therefore, understanding compilation techniques is essential for understanding how programming languages and computers hang together.


1 Answers

If you just want to be a run-of-the-mill coder, and write stuff... you don't need to take compilers.

If you want to learn computer science and appreciate and really become a computer scientist, you MUST take compilers.

Compilers is a microcosm of computer science! It contains every single problem, including (but not limited to) AI (greedy algorithms & heuristic search), algorithms, theory (formal languages, automata), systems, architecture, etc.

You get to see a lot of computer science come together in an amazing way. Not only will you understand more about why programming languages work the way that they do, but you will become a better coder for having that understanding. You will learn to understand the low level, which helps at the high level.

As programmers, we very often like to talk about things being a "black box"... but things are a lot smoother when you understand a little bit about what's in the box. Even if you don't build a whole compiler, you will surely learn a lot. You will get to see the formalisms behind parsing (and realize it's not just a bunch of special cases hacked together), and a bunch of NP complete problems. You will see why the theory of computer science is so important to understand for practical things. (After all, compilers are extremely practical... and we wouldn't have the compilers we have today without formalisms).

I really hope you consider learning about them... it will help you get to the next level as a computer scientist :-).

like image 109
Tom Avatar answered Sep 20 '22 09:09

Tom