Sort
Profile photo for Paul Dagnelie

You don't really need to take 312; it may provide some interesting background, and help you think better about some of the more theoretical parts of the compiler, but 213 is enough. I would also say that you absolutely should not take it without 213; a good knowledge of how a computer actually works is required (assembly, registers, calling conventions, etc).

The work is spread fairly evenly throughout the semester; each assignment is similarly sized, and they all have the same amount of time, roughly. It is however, a lot of work; these assignments would be considered, in a normal course, difficult assignments. If you've taken or heard of OS, it's like doing P2 every two weeks all semester. Thus, you spend basically all semester working hard but not drowning in it.

Scala is a fine language to write it in, as long as you have experience with scala. Ultimately the most important criteria are 1) do you have experience? 2) is the language stable (i.e. not Rust or some other language still in dev)?, and (less importantly) 3), do they release base code in that language? If you can answer yes to all three, then it's probably fine. I did SML, which went well (except when we found bugs in sml NJ's compiler).

Basically, 411 is hard, but very interesting. I learned a lot in it.

Profile photo for Victor Eijkhout

I'd say that the compiler course I took is the best example of something I never use that I'm grateful for having learned. I don't work in languages (I use C++ and python) and never have to write anything remotely resembling a compiler. But I do program a good deal, and knowing how a parser works, what syntax trees are, the trade-offs in code generation, all informs my work on an almost subconscious level. It means that when I program I don't consider the translation process as black magic, but actually have a mental model for how the translation happens. And understanding what you're doing is

I'd say that the compiler course I took is the best example of something I never use that I'm grateful for having learned. I don't work in languages (I use C++ and python) and never have to write anything remotely resembling a compiler. But I do program a good deal, and knowing how a parser works, what syntax trees are, the trade-offs in code generation, all informs my work on an almost subconscious level. It means that when I program I don't consider the translation process as black magic, but actually have a mental model for how the translation happens. And understanding what you're doing is always a good idea.

Where do I start?

I’m a huge financial nerd, and have spent an embarrassing amount of time talking to people about their money habits.

Here are the biggest mistakes people are making and how to fix them:

Not having a separate high interest savings account

Having a separate account allows you to see the results of all your hard work and keep your money separate so you're less tempted to spend it.

Plus with rates above 5.00%, the interest you can earn compared to most banks really adds up.

Here is a list of the top savings accounts available today. Deposit $5 before moving on because this is one of th

Where do I start?

I’m a huge financial nerd, and have spent an embarrassing amount of time talking to people about their money habits.

Here are the biggest mistakes people are making and how to fix them:

Not having a separate high interest savings account

Having a separate account allows you to see the results of all your hard work and keep your money separate so you're less tempted to spend it.

Plus with rates above 5.00%, the interest you can earn compared to most banks really adds up.

Here is a list of the top savings accounts available today. Deposit $5 before moving on because this is one of the biggest mistakes and easiest ones to fix.

Overpaying on car insurance

You’ve heard it a million times before, but the average American family still overspends by $417/year on car insurance.

If you’ve been with the same insurer for years, chances are you are one of them.

Pull up Coverage.com, a free site that will compare prices for you, answer the questions on the page, and it will show you how much you could be saving.

That’s it. You’ll likely be saving a bunch of money. Here’s a link to give it a try.

Consistently being in debt

If you’ve got $10K+ in debt (credit cards…medical bills…anything really) you could use a debt relief program and potentially reduce by over 20%.

Here’s how to see if you qualify:

Head over to this Debt Relief comparison website here, then simply answer the questions to see if you qualify.

It’s as simple as that. You’ll likely end up paying less than you owed before and you could be debt free in as little as 2 years.

Missing out on free money to invest

It’s no secret that millionaires love investing, but for the rest of us, it can seem out of reach.

Times have changed. There are a number of investing platforms that will give you a bonus to open an account and get started. All you have to do is open the account and invest at least $25, and you could get up to $1000 in bonus.

Pretty sweet deal right? Here is a link to some of the best options.

Having bad credit

A low credit score can come back to bite you in so many ways in the future.

From that next rental application to getting approved for any type of loan or credit card, if you have a bad history with credit, the good news is you can fix it.

Head over to BankRate.com and answer a few questions to see if you qualify. It only takes a few minutes and could save you from a major upset down the line.

How to get started

Hope this helps! Here are the links to get started:

Have a separate savings account
Stop overpaying for car insurance
Finally get out of debt
Start investing with a free bonus
Fix your credit

Profile photo for Lawrence Stewart

My degrees are in electrical engineering rather than CS, so feel free to wait for answers from people who know what they are talking about. On the other hand, I’ve been working in CS as a career for over 40 years.

The two things I regret not learning about in school are linear algebra and compilers.

Regarding compilers, there have been many times during my career when problems have been made substantially easier by writing a special purpose “language” to handle it. I can write lexers and parsers but then I get stuck. I can write, essentially, interpretive languages but I’ve never been able to “g

My degrees are in electrical engineering rather than CS, so feel free to wait for answers from people who know what they are talking about. On the other hand, I’ve been working in CS as a career for over 40 years.

The two things I regret not learning about in school are linear algebra and compilers.

Regarding compilers, there have been many times during my career when problems have been made substantially easier by writing a special purpose “language” to handle it. I can write lexers and parsers but then I get stuck. I can write, essentially, interpretive languages but I’ve never been able to “generate code” and that has been unfortunate. So yes, if you want to leave college with a full toolbag of techniques and a comfort level with things, then knowing about compilers should be pretty high on your list.

Similarly, if you are interested in graphics or high performance computing or machine learning, then achieving a comfort level with those things is worth doing.

I never took an OS course either, but I learned about them by doing. It really is quite important to realize that the OS is just another program, not some magical black box.

I don’t think four years is really enough to be well educated in CS. There is too much there. Take the time to learn about OS, systems, compilers, cryptography, networking, machine learning, theory, architecture, signal processing, data compression and coding, data structures, algorithms, and a few other things too.

Profile photo for Assistant
Assistant

Before taking 15-411 Compiler Design at Carnegie Mellon University, students should be familiar with several key concepts and skills:

  1. Programming Proficiency: Strong programming skills, particularly in C or C++, are essential since much of the coursework involves implementing compiler components in these languages.
  2. Data Structures and Algorithms: A solid understanding of fundamental data structures (like trees, graphs, and hash tables) and algorithms (such as sorting and searching) is crucial, as these will be used extensively throughout the course.
  3. Formal Languages and Automata Theory: Familiarity with concepts from formal languages, including regular expressions, context-free grammars, and finite automata, is important for understanding the theoretical underpinnings of compiler design.
  4. Computer Organization: A basic understanding of computer architecture and assembly language will help students grasp how high-level language constructs are translated into machine code.
  5. Previous Coursework: It is beneficial to have completed courses like 15-211 (Principles of Software Construction) and 15-122 (Principles of Imperative Computation), which cover important software engineering practices and programming paradigms.
  6. Problem-Solving Skills: The ability to approach complex problems methodically and think critically about design choices will be essential for successfully developing a compiler.
  7. Collaboration: Since many projects may be team-based, being able to work well with others and communicate effectively will enhance the learning experience.

Familiarity with these topics will help students navigate the challenges of the course and engage more deeply with the material.

Profile photo for Paul Dagnelie

251, in addition to teaching you a huge amount of discrete mathematics, teaches you how to work in groups, how to write up proofs in a sane and legible fashion, how to not give up, how to acknowledge that you are no longer the smartest person in your school (or your company, etc. This is supremely valuable, and having interviewed people who haven't learned that, they're almost intolerable to talk to), and just how cool math can be. It will kick your ass, but it was a great class and I don't regret it.

Profile photo for Quora User

Here’s the thing: I wish I had known these money secrets sooner. They’ve helped so many people save hundreds, secure their family’s future, and grow their bank accounts—myself included.

And honestly? Putting them to use was way easier than I expected. I bet you can knock out at least three or four of these right now—yes, even from your phone.

Don’t wait like I did. Go ahead and start using these money secrets today!

1. Cancel Your Car Insurance

You might not even realize it, but your car insurance company is probably overcharging you. In fact, they’re kind of counting on you not noticing. Luckily,

Here’s the thing: I wish I had known these money secrets sooner. They’ve helped so many people save hundreds, secure their family’s future, and grow their bank accounts—myself included.

And honestly? Putting them to use was way easier than I expected. I bet you can knock out at least three or four of these right now—yes, even from your phone.

Don’t wait like I did. Go ahead and start using these money secrets today!

1. Cancel Your Car Insurance

You might not even realize it, but your car insurance company is probably overcharging you. In fact, they’re kind of counting on you not noticing. Luckily, this problem is easy to fix.

Don’t waste your time browsing insurance sites for a better deal. A company called Insurify shows you all your options at once — people who do this save up to $996 per year.

If you tell them a bit about yourself and your vehicle, they’ll send you personalized quotes so you can compare them and find the best one for you.

Tired of overpaying for car insurance? It takes just five minutes to compare your options with Insurify and see how much you could save on car insurance.

2. Ask This Company to Get a Big Chunk of Your Debt Forgiven

A company called National Debt Relief could convince your lenders to simply get rid of a big chunk of what you owe. No bankruptcy, no loans — you don’t even need to have good credit.

If you owe at least $10,000 in unsecured debt (credit card debt, personal loans, medical bills, etc.), National Debt Relief’s experts will build you a monthly payment plan. As your payments add up, they negotiate with your creditors to reduce the amount you owe. You then pay off the rest in a lump sum.

On average, you could become debt-free within 24 to 48 months. It takes less than a minute to sign up and see how much debt you could get rid of.

3. You Can Become a Real Estate Investor for as Little as $10

Take a look at some of the world’s wealthiest people. What do they have in common? Many invest in large private real estate deals. And here’s the thing: There’s no reason you can’t, too — for as little as $10.

An investment called the Fundrise Flagship Fund lets you get started in the world of real estate by giving you access to a low-cost, diversified portfolio of private real estate. The best part? You don’t have to be the landlord. The Flagship Fund does all the heavy lifting.

With an initial investment as low as $10, your money will be invested in the Fund, which already owns more than $1 billion worth of real estate around the country, from apartment complexes to the thriving housing rental market to larger last-mile e-commerce logistics centers.

Want to invest more? Many investors choose to invest $1,000 or more. This is a Fund that can fit any type of investor’s needs. Once invested, you can track your performance from your phone and watch as properties are acquired, improved, and operated. As properties generate cash flow, you could earn money through quarterly dividend payments. And over time, you could earn money off the potential appreciation of the properties.

So if you want to get started in the world of real-estate investing, it takes just a few minutes to sign up and create an account with the Fundrise Flagship Fund.

This is a paid advertisement. Carefully consider the investment objectives, risks, charges and expenses of the Fundrise Real Estate Fund before investing. This and other information can be found in the Fund’s prospectus. Read them carefully before investing.

4. Earn Up to $50 this Month By Answering Survey Questions About the News — It’s Anonymous

The news is a heated subject these days. It’s hard not to have an opinion on it.

Good news: A website called YouGov will pay you up to $50 or more this month just to answer survey questions about politics, the economy, and other hot news topics.

Plus, it’s totally anonymous, so no one will judge you for that hot take.

When you take a quick survey (some are less than three minutes), you’ll earn points you can exchange for up to $50 in cash or gift cards to places like Walmart and Amazon. Plus, Penny Hoarder readers will get an extra 500 points for registering and another 1,000 points after completing their first survey.

It takes just a few minutes to sign up and take your first survey, and you’ll receive your points immediately.

5. Get Up to $300 Just for Setting Up Direct Deposit With This Account

If you bank at a traditional brick-and-mortar bank, your money probably isn’t growing much (c’mon, 0.40% is basically nothing).

But there’s good news: With SoFi Checking and Savings (member FDIC), you stand to gain up to a hefty 3.80% APY on savings when you set up a direct deposit or have $5,000 or more in Qualifying Deposits and 0.50% APY on checking balances — savings APY is 10 times more than the national average.

Right now, a direct deposit of at least $1K not only sets you up for higher returns but also brings you closer to earning up to a $300 welcome bonus (terms apply).

You can easily deposit checks via your phone’s camera, transfer funds, and get customer service via chat or phone call. There are no account fees, no monthly fees and no overdraft fees. And your money is FDIC insured (up to $3M of additional FDIC insurance through the SoFi Insured Deposit Program).

It’s quick and easy to open an account with SoFi Checking and Savings (member FDIC) and watch your money grow faster than ever.

Read Disclaimer

5. Stop Paying Your Credit Card Company

If you have credit card debt, you know. The anxiety, the interest rates, the fear you’re never going to escape… but a website called AmONE wants to help.

If you owe your credit card companies $100,000 or less, AmONE will match you with a low-interest loan you can use to pay off every single one of your balances.

The benefit? You’ll be left with one bill to pay each month. And because personal loans have lower interest rates (AmONE rates start at 6.40% APR), you’ll get out of debt that much faster.

It takes less than a minute and just 10 questions to see what loans you qualify for.

6. Lock In Affordable Term Life Insurance in Minutes.

Let’s be honest—life insurance probably isn’t on your list of fun things to research. But locking in a policy now could mean huge peace of mind for your family down the road. And getting covered is actually a lot easier than you might think.

With Best Money’s term life insurance marketplace, you can compare top-rated policies in minutes and find coverage that works for you. No long phone calls. No confusing paperwork. Just straightforward quotes, starting at just $7 a month, from trusted providers so you can make an informed decision.

The best part? You’re in control. Answer a few quick questions, see your options, get coverage up to $3 million, and choose the coverage that fits your life and budget—on your terms.

You already protect your car, your home, even your phone. Why not make sure your family’s financial future is covered, too? Compare term life insurance rates with Best Money today and find a policy that fits.

Profile photo for Anthony Buchanan
  • Paint the Fence
  • Go to Half-Price at Mad Mex and Fuel and Fuddle
  • Visit the Tower of Learning/Phallus of Ignorance
  • Play Capture the Flag with Stuff
  • Do the CMU Underground Tour
  • Visit a Pirates, Pens, or Steelers Game
  • Figure out you limit for all nighters
  • Attend movies in the UC
  • Go to one of the free museums and Falling Water
  • Hang out in the CS lounge/art studio/etc - some place not your major
  • See a School Play (Drama or Scotch and Soda)
  • Spring Carnival - Help with Buggy or Booth
  • Join a Club about your Interest
  • Do research, independent study or a special project with a teacher you like
Profile photo for Ben Sarah Golightly

Compilers specifically? Its a fascinating field with very mature research and no shortage of outstanding learning material. But you don't have to go too deeply into the subject if its not an area you want to go into.

However, the fundamentals of compiler theory, such as automata theory (think state machines) and formal language theory, have applications everywhere. While compilers are a specific application of these theories, the theories are still useful in the general sense as rich, simple to implement, but theoretically rigorous conceptual frameworks with applications including modelling sim

Compilers specifically? Its a fascinating field with very mature research and no shortage of outstanding learning material. But you don't have to go too deeply into the subject if its not an area you want to go into.

However, the fundamentals of compiler theory, such as automata theory (think state machines) and formal language theory, have applications everywhere. While compilers are a specific application of these theories, the theories are still useful in the general sense as rich, simple to implement, but theoretically rigorous conceptual frameworks with applications including modelling simulations of discrete systems, automated goal planning, provably safe concurrency, and formal proofs of safety.

These theories, too, will give you an understanding of the general theory of computation: what can or cannot in principle be computed at all, what models of computation exist, how we can classify problems as "hard", and even how we can reduce one hard problem to another, and concentrate our efforts by using one technique to attack both problems at the same time.

Language theory, and formal grammars, can be applied outside of "human" language to other areas, which is useful in procedural generation. For example, what if trees have a grammar? The L-system is an example of how formal language theory can be used to procedurally generate all sorts of things - like trees or buildings.

50% of IT pros run workloads in the multi-cloud and 32% take a hybrid approach to the cloud in 2025.
Profile photo for Ken Gregg

While it’s true that most software developers will not be working on developing compilers during their careers, a good compiler construction course (or series of courses, as was the case when I was in college) can provide valuable insight into your understanding of what’s really going on in the system, how some important data structures and algorithms are applied in a non-trivial project, what optimization really does for you, relating your source code to the machine instructions (or bytecode or CIL) that implement them as you debug, etc.

Whether you take the course or not is up to you. But not

While it’s true that most software developers will not be working on developing compilers during their careers, a good compiler construction course (or series of courses, as was the case when I was in college) can provide valuable insight into your understanding of what’s really going on in the system, how some important data structures and algorithms are applied in a non-trivial project, what optimization really does for you, relating your source code to the machine instructions (or bytecode or CIL) that implement them as you debug, etc.

Whether you take the course or not is up to you. But not understanding how compilers work puts you at a disadvantage, and knowing how compilers work can make you a better software developer, if you pay close attention. So, if you don’t take the course, I would recommend learning the material anyway on your own, and really learning it will involve a project or two.

Keep in mind also that you never really know when you might need to put your compiler construction knowledge to use. While I didn’t explicitly head into compiler construction jobs, I have frequently had to put those skills to use in several projects over the past few decades, directly or tangentially related to compiler development. Had I not had that background, someone else would have been assigned the work, and I would have missed out on some very interesting and challenging projects.

I always worry when I hear/read that a student is shying away from a course because it’s difficult. In the real world, a professional software developer is faced with difficult problems all the time, and is often required to learn and comprehend a bunch of new technical information quickly, and is expected to be able to apply it appropriately and efficiently to the project at hand. As a hiring manager, I tended to favor candidates who faced challenges head-on with interest, energy, and enthusiasm. Those who said it would be too much work or was not worth their time didn’t score points.

Although the compiler construction sequence of courses was a requirement for my specific degree program, I would have taken it even if it wasn’t required. In fact, one of the factors I used in choosing which undergrad school to attend was the very strong emphasis on compilers and operating systems. I was interested in learning all I could about both areas, working on non-trivial projects in both areas, and both areas have proven to be very valuable in the projects I have worked on since. I have ended up working, at various times, directly or indirectly on projects in these areas. Had I shied away from them, I would have missed out on some very cool stuff.

Best wishes with your decision.

Profile photo for Abhinav Sharma

What Robert Harper said in the comments is completely true. First, statistically, about 20-30% of people get an A in each of these courses. They each test different skillsets, most people end up liking one of these areas far more than the other. So, if you don't get straight As in all of them, you are perfectly normal and there is nothing to freak out about.

Now that its out of the way, most 1xx and 2xx classes are about diligence more than raw intelligence. Sure, some of them (especially 15-251) may not seem like it because some people come in better prepared than others (went to Math camp, ar

What Robert Harper said in the comments is completely true. First, statistically, about 20-30% of people get an A in each of these courses. They each test different skillsets, most people end up liking one of these areas far more than the other. So, if you don't get straight As in all of them, you are perfectly normal and there is nothing to freak out about.

Now that its out of the way, most 1xx and 2xx classes are about diligence more than raw intelligence. Sure, some of them (especially 15-251) may not seem like it because some people come in better prepared than others (went to Math camp, are from a country/school with a more rigorous math curriculum, etc).

What's really good about the intro courses is that there is a lot of help available if you're willing to go out and ask for it. There are a lot of TAs and they're there for a reason. We expect a lot of people will struggle and we want to help them out. Sure, we won't solve your problems for you, and you'll get varying levels of help from the TAs depending on the course and individual TA, but it doesn't hurt to ask. Get to know your TAs well. If you struggle, go to office hours, ask questions in recitations, and most of all, come prepared and show your TA/Professor that you've tried hard and you know exactly what you're stuck at. There's nothing we hate more than a conversation that goes like:

Student: "Uhh, I don't know how to do this"
TA: "Ok, what have you tried so far?"
Student: "Uhh, I don't get it"

Read the notes, and the relevant techniques, its much better to try 5 different things and fail because they turn out to be not useful than just staring at the problem and giving up because "it looks hard"

To sum up, I'd give the following advice:

  • Start homework early, its easy to procrastinate because everyone else around you does, but if you find yourself struggling as a result, you have nobody to blame but yourself for slacking off when the TAs were free to help out and then piling on for help the same time as 50 other people.
  • Ask for help. Ask early, ask often. Email your Professor/TAs for help. They're there to help you and all of the 15-1xx and 2xx courses have a lot of redundancy built into their support system.
  • Try first. While they say there's no such thing as a stupid question, "Uh, can you tell me how to do this" is way worse than "I tried X,Y and Z and nothing worked"


Congratulations on getting in and good luck on your time here!

Your response is private
Was this worth your time?
This helps us sort answers on the page.
Absolutely not
Definitely yes
Profile photo for Elizabeth Thrasher

Passionate ones.

CMU is a very diverse school and has many prominent majors in a variety of topics. The most famous ones include Drama, and Computer Science. However, because of the broad nature of the school and the question, it is hard to say more than that. For instance, I can’t say “really smart” because all the drama kids may not be really smart (or at least not traditionally book smart). And that’s okay, for their major it is more important to be emotionally smart. However, around campus, almost everyone has passion about something, either related to their major or not. I know CS students

Passionate ones.

CMU is a very diverse school and has many prominent majors in a variety of topics. The most famous ones include Drama, and Computer Science. However, because of the broad nature of the school and the question, it is hard to say more than that. For instance, I can’t say “really smart” because all the drama kids may not be really smart (or at least not traditionally book smart). And that’s okay, for their major it is more important to be emotionally smart. However, around campus, almost everyone has passion about something, either related to their major or not. I know CS students that love everything about CS. They eat, breathe, and sleep CS. They do research and TA and take advanced courses because they are passionate about their field of study and how it is growing. I also know an ECE major who is a passionate DJ. He goes out and works parties and concerts many weekends. I am passionate about my sport, volleyball, as well as my academic interests in ECE, Psychology, CS and how they all mix together, especially in education. Everyone has a drive. Everyone want to be better and do better in the world for one interest area or another. Everyone has a passion.

Hard Working.

CMU is a very tough school. There are lots of homework assignments and tests, projects, etc. I’m not saying other schools don’t have these, it just seems like when I talk to my friends CMU has more. In fact, there are many school around the country that borrow our curriculum for various courses, but often water it down for their students. Most courses have 12–15 hours a week of work to do for them and you must take at least four of these to remain a full time student. You have to learn to balance your time and don’t mind getting the work done. After all, the school’s motto, a quote from Andrew Carnegie, is “My heart is in the work.”

Wealthy (or at least don’t mind taking on big loans).

Carnegie Mellon is a very expensive private university. It does not have as large an endowment as many of the other private schools, and often a much smaller donation pool from its alumni. Therefore, it does not give out much financial aid at all and those that come here are willing to pay the price.

Profile photo for Johnny M

I once met a man who drove a modest Toyota Corolla, wore beat-up sneakers, and looked like he’d lived the same way for decades. But what really caught my attention was when he casually mentioned he was retired at 45 with more money than he could ever spend. I couldn’t help but ask, “How did you do it?”

He smiled and said, “The secret to saving money is knowing where to look for the waste—and car insurance is one of the easiest places to start.”

He then walked me through a few strategies that I’d never thought of before. Here’s what I learned:

1. Make insurance companies fight for your business

Mos

I once met a man who drove a modest Toyota Corolla, wore beat-up sneakers, and looked like he’d lived the same way for decades. But what really caught my attention was when he casually mentioned he was retired at 45 with more money than he could ever spend. I couldn’t help but ask, “How did you do it?”

He smiled and said, “The secret to saving money is knowing where to look for the waste—and car insurance is one of the easiest places to start.”

He then walked me through a few strategies that I’d never thought of before. Here’s what I learned:

1. Make insurance companies fight for your business

Most people just stick with the same insurer year after year, but that’s what the companies are counting on. This guy used tools like Coverage.com to compare rates every time his policy came up for renewal. It only took him a few minutes, and he said he’d saved hundreds each year by letting insurers compete for his business.

Click here to try Coverage.com and see how much you could save today.

2. Take advantage of safe driver programs

He mentioned that some companies reward good drivers with significant discounts. By signing up for a program that tracked his driving habits for just a month, he qualified for a lower rate. “It’s like a test where you already know the answers,” he joked.

You can find a list of insurance companies offering safe driver discounts here and start saving on your next policy.

3. Bundle your policies

He bundled his auto insurance with his home insurance and saved big. “Most companies will give you a discount if you combine your policies with them. It’s easy money,” he explained. If you haven’t bundled yet, ask your insurer what discounts they offer—or look for new ones that do.

4. Drop coverage you don’t need

He also emphasized reassessing coverage every year. If your car isn’t worth much anymore, it might be time to drop collision or comprehensive coverage. “You shouldn’t be paying more to insure the car than it’s worth,” he said.

5. Look for hidden fees or overpriced add-ons

One of his final tips was to avoid extras like roadside assistance, which can often be purchased elsewhere for less. “It’s those little fees you don’t think about that add up,” he warned.

The Secret? Stop Overpaying

The real “secret” isn’t about cutting corners—it’s about being proactive. Car insurance companies are counting on you to stay complacent, but with tools like Coverage.com and a little effort, you can make sure you’re only paying for what you need—and saving hundreds in the process.

If you’re ready to start saving, take a moment to:

Saving money on auto insurance doesn’t have to be complicated—you just have to know where to look. If you'd like to support my work, feel free to use the links in this post—they help me continue creating valuable content.

Profile photo for Donald Duo Zhao

It's worth taking a compilers course at some point, although it usually takes more efforts than the academic credit assigned for the course.

Two years ago, I took a compiler's class as my third CS course, followed by Data Structures (in Java) and Operating Systems (coding in C). It was quite challenging at that time, but I've got its own benefits.

First, I start to learn new languages more easily and quickly. Every programming language would only look different at the surface after a compiler's class. It's easier to understand why some syntax work and others not. How identifiers and functions

It's worth taking a compilers course at some point, although it usually takes more efforts than the academic credit assigned for the course.

Two years ago, I took a compiler's class as my third CS course, followed by Data Structures (in Java) and Operating Systems (coding in C). It was quite challenging at that time, but I've got its own benefits.

First, I start to learn new languages more easily and quickly. Every programming language would only look different at the surface after a compiler's class. It's easier to understand why some syntax work and others not. How identifiers and functions are resolved in hierarchy. Understanding the resolved data flow gives a better view of the languages themselves. In web programming, it includes quite diverse languages and frameworks. Know what underlying happens would let us switch from one to another more easier and less confused.

Second, Algorithm implementation practice. I got a real practice for tree traversal algorithms, like DFS and BFS for the first time from the syntax trees, using hash tables to resolve identifiers. Learning OOP and design patterns, many structs involves inheritances and we applied the visitor pattern to traverse. Learn assembly languages: the compiler will emit low level code and debugging in a lower level gives coding a different perspective.

Third, programing efficient code. I got start not all compiler are all smart to get perfect optimization. I got start to know where to define a variable could possible result in efficient code, e.g. variables insider/outside a loop, global/local. In high performance computing, it takes a lot difference.

p.s. A less intensive but comprehensive course you may consider is programming language concepts. It includes a small compiler but talks more various language features, procedural, functional, etc.

Profile photo for Anonymous
Anonymous

This is not from someone who got high grades in all the introductory classes. Quite the opposite, in fact. So I will recommend above all that you remain vigilant in watching for potential problems before they become problems.

I was extremely sick during 251 and 213. For a month, it seemed like I spent every moment either sleeping or vomiting, and during that month I had to take all my midterms. In addition to this, I was overloading quite dramatically (not a great idea with 251), I suffered minor organ failure the weekend before finals, while working on proxy, and starting pretty early in the s

This is not from someone who got high grades in all the introductory classes. Quite the opposite, in fact. So I will recommend above all that you remain vigilant in watching for potential problems before they become problems.

I was extremely sick during 251 and 213. For a month, it seemed like I spent every moment either sleeping or vomiting, and during that month I had to take all my midterms. In addition to this, I was overloading quite dramatically (not a great idea with 251), I suffered minor organ failure the weekend before finals, while working on proxy, and starting pretty early in the semester I was dealing with some increasingly serious emotional problems.

Don't wait until finals week to go to your advisor and tell him that you haven't been able to deal with anything all semester. If you get sick enough that it's likely to impact an exam grade, tell your professors as soon as possible. Do not try to muscle through.

Vigilance may not get you that A you're so hoping for, but it'll keep you afloat.

Profile photo for Gerry Rzeppa

To broaden your horizons, I recommend a thorough study of the Osmosian Plain English compiler and integrated development environment. See here…

…and here…

…and here:

You may write me directly if you have questions or would like to take my free, email “How To Write a Plain English Compiler in Plain English” course: gerry.rzeppa@pobox.com.

Et voila!

Profile photo for Dennis J Frailey

A good computer science program gives the student a deep understanding of computers and how they work, including all the things that go along with computers such as programming languages and operating systems and on and on.

One of the best ways to learn how a computer works is to write assembly language code and perhaps to write an assembler. You have to figure out all kinds of important things in order to do it correctly. I used to teach a course in which students started with a bare bones computer (no software on it at all except a bootstrap loader) and they had to make it useful, which meant

A good computer science program gives the student a deep understanding of computers and how they work, including all the things that go along with computers such as programming languages and operating systems and on and on.

One of the best ways to learn how a computer works is to write assembly language code and perhaps to write an assembler. You have to figure out all kinds of important things in order to do it correctly. I used to teach a course in which students started with a bare bones computer (no software on it at all except a bootstrap loader) and they had to make it useful, which meant they had to develop a primitive operating system, write an assembler or compiler for it, and do a lot of other things. It was the course that students most frequently thanked me for after they had graduated.

One of the best ways to learn how programming languages and computers work is to write a compiler. You learn all kinds of important things that give you a deeper insight into all that is going on in the software, which is where most computer science students will spend most of their careers.

I wrote compilers and assemblers during my early years and I have always been thankful that I had this opportunity because I learned so much. Later I went on to write operating systems and all kinds of computer applications. My in-depth knowledge of how languages and computer work came in handy in many ways.

Profile photo for Lakshmi Narasimhan Parthasarathy
  1. Go through a compilers course. Possibly http://www.stanford.edu/class/cs143/.
  2. Get yourself the Dragon book, The Second Edition. http://dragonbook.stanford.edu/. But note that this is only intended as a reference. You can solve the exercises in the book by now.
  3. Implement one on your own, like http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours.
  4. Try dissecting the source code of python.


This is by no means complete, but will give you a good picture of compilers. You might proceed further by taking up specializations. Like:

  1. virtual machines
  2. functional languages
  3. garbage collection
  4. type syst
  1. Go through a compilers course. Possibly http://www.stanford.edu/class/cs143/.
  2. Get yourself the Dragon book, The Second Edition. http://dragonbook.stanford.edu/. But note that this is only intended as a reference. You can solve the exercises in the book by now.
  3. Implement one on your own, like http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours.
  4. Try dissecting the source code of python.


This is by no means complete, but will give you a good picture of compilers. You might proceed further by taking up specializations. Like:

  1. virtual machines
  2. functional languages
  3. garbage collection
  4. type systems


EDIT:
Learning about compilers is a very rewarding experience in itself. Read
Rich Programmer Food for a better insight as to why it is so.

Profile photo for DC Adolph

That Carnegie Mellon students are go-getters who don’t wait for the answer or the next big thing- they go out and explore, discover, and invent.

In other words, you should know a student bound for Carnegie Mellon would not ask a question like this on Quora and then sit and wait for others- most of whom will be unqualified to answer your question sufficiently.

You’re waiting for someone to give you the answers. A student of Carnegie Mellon would be finding the answers themselves.

There are plenty of online resources where you can find what you’re looking for.

Frequently Asked Questions

Things To Do

That Carnegie Mellon students are go-getters who don’t wait for the answer or the next big thing- they go out and explore, discover, and invent.

In other words, you should know a student bound for Carnegie Mellon would not ask a question like this on Quora and then sit and wait for others- most of whom will be unqualified to answer your question sufficiently.

You’re waiting for someone to give you the answers. A student of Carnegie Mellon would be finding the answers themselves.

There are plenty of online resources where you can find what you’re looking for.

Frequently Asked Questions

Things To Do In The 'Burgh

What should every freshman at your school know before they start? | Carnegie Mellon University | Page 1 | Unigo

5 Questions to Ask on a Campus Visit at Carnegie Mellon University

The Ultimate Guide to Applying to Carnegie Mellon

This Year's Carnegie Mellon Admission Requirements

Carnegie Mellon University - Wikipedia

If you intend to succeed at an extremely prestigious university, you must become an active learner, thinking outside the box and attacking problems with exceptional energy and focus. You have to go out and produce, not wait to use the product.


I know you’re probably hoping some CM alums hop on and give you insider advice, but this outsider’s advice may help:

Go find the information. It’s somewhere. Start practicing the skill. You’ll need it the next…all the years of your life.

Profile photo for Greg Morrisett

This advice applies to Harvard's CS 153, but also to other coding-intensive courses:

A key thing is to find the right partner. This class is pretty programming intensive and the projects require a lot of coding and testing. It's possible, but very difficult to do it all on your own. So having a partner that you can work with, that you trust, and that will hold up his/her end of the work is important.

Coding with your partner, as opposed to trying to divide the project into separate components, is also a good strategy. The assignments were designed with pair-programming in mind. Take turns "

This advice applies to Harvard's CS 153, but also to other coding-intensive courses:

A key thing is to find the right partner. This class is pretty programming intensive and the projects require a lot of coding and testing. It's possible, but very difficult to do it all on your own. So having a partner that you can work with, that you trust, and that will hold up his/her end of the work is important.

Coding with your partner, as opposed to trying to divide the project into separate components, is also a good strategy. The assignments were designed with pair-programming in mind. Take turns "driving". Write test cases and make sure you're exercising all of the paths through your code. Use source control (e.g., git) so that you can easily share with your partner, and back out any changes that proved to be on a bad path.

Don't worry about the efficiency of your code first. Rather, get the functionality right, and then come back and worry about using better data structures and algorithms. (Particularly for this course, since I care less about how efficient your compiler is than the quality of the code it's producing.)

In short, use good software engineering practice.

Starting the projects the day they are handed out is also a good strategy. Students will often get stuck with something, and it helps to be able to step away from the code, think about the big picture (say at a white-board with your partner), and then come back to the details later. You can't really pull this off if you start the project the night before. And most of the projects really require more than a full night's worth of coding anyway...

Ask me lots of questions in class. I tend to go too fast, and if you don't understand something, then I guarantee 10 other people don't understand it. Asking me questions is a good way to slow me down. If you're not comfortable asking me in class, come see me (or the TF) in office hours, or post a question on Piazza (after reading the other posts to make sure your question hasn't already been answered.)

-Greg

Profile photo for Steve Johnson

One of the biggest problems I have seen in the industry today is that hardware people don’t understand much about software, and vice versa. Both are very difficult disciplines, especially at the cutting edge of technology. But a computer is a system that involves both hardware and software. And the compiler is often the glue that keeps them together. For a system, most hardware must support calling a function, handling error conditions, responding to faults and I/O interrupts, do context switches, etc. And the software must understand how to do this efficiently.

Similarly, if the compiler write

One of the biggest problems I have seen in the industry today is that hardware people don’t understand much about software, and vice versa. Both are very difficult disciplines, especially at the cutting edge of technology. But a computer is a system that involves both hardware and software. And the compiler is often the glue that keeps them together. For a system, most hardware must support calling a function, handling error conditions, responding to faults and I/O interrupts, do context switches, etc. And the software must understand how to do this efficiently.

Similarly, if the compiler writer doesn’t understand what a hardware feature is expected to do, or is capable of doing, they probably won’t use it, again perhaps leading to inefficiencies and possible errors.

The ideal situation is to have the software running under simulation when the hardware comes back from fabrication. This not only makes system bringup easier but gives a way to track down any remaining bugs. That takes a lot of communication between hardware and software to pull off.

The relevance to the question asked is that writing a compiler is a good first step for a software person to start to understand what hardware can and can’t do. (The other half is an operating systems course). And with tools like yacc and lex, the grotty parts of parsing can be compiled into efficient building blocks so the hardware can become the real focus.

A compiler class is also probably of some use to a hardware person, particularly if the hardware they design can thereby be more transparent with fewer quirks and exceptions.

Profile photo for Abhinav Jangda

Yes, it is a difficult course. In fact every Systems related course be it Architecture, Compilers or Operating System or any other, are difficult. But I would suggest you to take this course. If you will be going into the field of Systems, then Compilers is a must. Each and every Systems related course are related to each other. Don't expect that you can be an expert in Operating Systems without having good knowledge of Compilers and Architecture.
Also, Compiler being a vast topic. Many problems in Compilers like Register Allocation, Data flow analysis, Global and Local Code Scheduling etc. ma

Yes, it is a difficult course. In fact every Systems related course be it Architecture, Compilers or Operating System or any other, are difficult. But I would suggest you to take this course. If you will be going into the field of Systems, then Compilers is a must. Each and every Systems related course are related to each other. Don't expect that you can be an expert in Operating Systems without having good knowledge of Compilers and Architecture.
Also, Compiler being a vast topic. Many problems in Compilers like Register Allocation, Data flow analysis, Global and Local Code Scheduling etc. make use of many complicated algorithms. Learning these algorithms will surely help you in the near future.
If you want to go in the field of Theoretical Computer Science, then you should know that Compiler is a good application of Theory of Computation. Compiler make heavy use of Grammars, Languages, Automata etc. If you are an expert in Theoretical Computer Science, then you should be good in Compilers too.
You should take this course.

Profile photo for Jose Pena

I am not a programmer by trade. But by taking a compiler class in college or at the university level, you can get academic credit for taking such a class. You could also learn to use a compiler, like the open source GNU C++ compiler or the Microsoft C# compiler, as well. Yet, it helps to have the credentials to back up your self learning.

Profile photo for Rohan Pota

Well it mainly depends upon.Its not a problem if you haven't done anything related in the past,but what matters is that you have atleast an idea what you like about CS,specifically what draws yours interest i.e do you like the idea of creating cool looking websites or do you like to create an innovative mobile apps,etc. The thing is,you need to have an inclination towards one particular field and start working from now onwards.

Besides you don’t have to worry about your peers who took up CS in school. They did not learn that much to be ahead of you too much.(There would a few who went beyond wh

Well it mainly depends upon.Its not a problem if you haven't done anything related in the past,but what matters is that you have atleast an idea what you like about CS,specifically what draws yours interest i.e do you like the idea of creating cool looking websites or do you like to create an innovative mobile apps,etc. The thing is,you need to have an inclination towards one particular field and start working from now onwards.

Besides you don’t have to worry about your peers who took up CS in school. They did not learn that much to be ahead of you too much.(There would a few who went beyond what was taught in the school but it’s highly unlikely) Most likely they only learned a language,most probably C++/Java.But you can do this in the vacation itself with the time you have got.

So what I would suggest you to do is go out take this course :-Introduction to Computer Science. It’s the best goddamn introductory course to CS. It will cover all the fundamentals of CS theory as well as practical like algorithms,data structures etc. on theory side and website development in php,mysql and other web technologies etc. on the practical side. In the end there also is a project so it will be very beneficial to you. It is an awesome course to kickstart your career in CS and more importantly it will give you fundamental understandings of all the fields in CS so after this course,you will know what you want to do next.

After completing the course you can get back to me anytime.I can advice you on any platform that you might choose to work on such web dev.,or mobile dev. since I have done it all in the bachelors and hence have a pretty good idea about courses.

PS:-Just PM me here on Quora if you want my help.

All the Best for your career! Cheers!

Profile photo for Pat Farrell

I don’t know specifically for CMU 15–411.

But in any compiler course, there are two programming languages in discussion and use. One is the target language that you are designing for. It could be a C-style language, but could be anything depending on the Department, professor and class.
The second is the languages you use to write the compiler. And the languages of the tools you use. Lexx and Yacc are classic, Bison and Flex are more modern. You can write the actual compiler in any language, but typical implementation languages are C, C++/C#, Java, Python, etc.

Profile photo for Henry Dietz

It is required? That depends on your schools curriculum. It certainly is required in most computer engineering degree programs I’m aware of (including ours here at the University of Kentucky).

The courses you mentioned are all about the runtime management of a computer system; compilers are the other half — how to specify what you want done and organize things before execution begins. Taking a compiler course should enable you to do things a computer systems person should be able to do. In particular, even if you don’t write compilers, what you learn there will help you define and implement inp

It is required? That depends on your schools curriculum. It certainly is required in most computer engineering degree programs I’m aware of (including ours here at the University of Kentucky).

The courses you mentioned are all about the runtime management of a computer system; compilers are the other half — how to specify what you want done and organize things before execution begins. Taking a compiler course should enable you to do things a computer systems person should be able to do. In particular, even if you don’t write compilers, what you learn there will help you define and implement input languages for whatever programs you write… no more trying to parse things with scanf(). ;-)

Profile photo for Ferro Alloys

A compiler does not involve “design" in any truly meaningful sense of the conventional notion of so-called “software design" (Eeeek almost all “software design” so-called “techniques”, except arguably, and then only possibly, for some forms of “safety-critical” systems in the jargon, and definitely not even then in many ways!!!). Eniway, Compilers, their component parts, and even the interrelationships between those components are, ideally (and often in practice) simply, but explicitly FORMALLY DEFINED… Even a BNF, EBNF, or even a graphical syntax-diagram grammer-based definition suffices for

A compiler does not involve “design" in any truly meaningful sense of the conventional notion of so-called “software design" (Eeeek almost all “software design” so-called “techniques”, except arguably, and then only possibly, for some forms of “safety-critical” systems in the jargon, and definitely not even then in many ways!!!). Eniway, Compilers, their component parts, and even the interrelationships between those components are, ideally (and often in practice) simply, but explicitly FORMALLY DEFINED… Even a BNF, EBNF, or even a graphical syntax-diagram grammer-based definition suffices for the simpler components, otherwise who knows EXACTLY what symbols the language to compile DOES BY DEFINITION include and so does NOT INCLUDE and which GRAMMATICAL STRUCTURES are legal or otherwise? Thus, it's not rokit cyance, but an equally interesting example of the ACTUAL ENGINEERING of software respecting the historical notion of engineering in its arguably more general sense, i.e. the use of formal notations to describe POTENTIAL PRODUCTS and the systematic development of those very products FROM THOSE FORMAL DESCRIPTIONS. Mind you, actually welding some things can only be done by skilled artisans in such a way as to be later deemed also impossible to replicate, maybe their formal “SPECIFICATIONS” only ever resided in their many years of apprenticeship (by learning the LIMITATIONS OF THE POSSIBLE WELDING-WISE)? Who knows, oh well, niffink to learn here, please just MOVE on, simples… (:-)

Rocketdyne F-1 - Wikipedia
The F-1 is a rocket engine developed by Rocketdyne . The engine uses a gas-generator cycle developed in the United States in the late 1950s and was used in the Saturn V rocket in the 1960s and early 1970s. Five F-1 engines were used in the S-IC first stage of each Saturn V, which served as the main launch vehicle of the Apollo program . The F-1 remains the most powerful single combustion chamber liquid-propellant rocket engine ever developed. [ 1 ] F-1 Country of origin United States First flight November 9, 1967 ( 1967-11-09 ) ( Apollo 4 ) Last flight May 14, 1973 ( 1973-05-14 ) ( Skylab 1 ) Designer Rocketdyne Manufacturer Rocketdyne Associated LV Saturn V , Saturn C-3 , Saturn C-4 , Saturn C-8 Liquid-fuel engine Propellant LOX / RP-1 Mixture ratio 2.27:1 (69% LOX, 31% RP-1) Cycle Gas-generator Performance Thrust, vacuum 7,770 kN (1,746,000 lbf) Thrust, sea-level 6,770 kN (1,522,000 lbf) Thrust-to-weight ratio 94.1:1 Chamber pressure 70 bar (1,015 psi; 7 MPa) Specific impulse , vacuum 304 s (2.98 km/s) Specific impulse , sea-level 263 s (2.58 km/s) Mass flow LOX : 1,789 kg/s (3,945 lb/s) RP-1 : 788 kg/s (1,738 lb/s) Burn time 150 to 163 seconds Dimensions Length 5.6 m (18.5 ft) Diameter 3.7 m (12.2 ft) Dry mass 8,400 kg (18,500 lb) Used in S-IC Wernher von Braun with the F-1 engines of the Saturn V first stage at the U.S. Space and Rocket Center Rocketdyne developed the F-1 and the E-1 to meet a 1955 U.S. Air Force requirement for a very large rocket engine. The E-1, although successfully tested in static firing, was quickly seen as a technological dead-end, and was abandoned for the larger, more powerful F-1. The Air Force eventually halted development of the F-1 because of a lack of requirement for such a large engine. However, the recently created National Aeronautics and Space Administration (NASA) appreciated the usefulness of an engine with so much power and contracted Rocketdyne to complete its development. Test firings of F-1 components had been performed as early as 1957. The first static firing of a full-stage developmental F-1 was performed in March 1959. The first F-1 was delivered to NASA MSFC in October 1963. In December 1964, the F-1 completed flight rating tests. Testing continued at least through 1965. [ 2 ] Early development tests revealed serious combustion instability problems which sometimes caused catastrophic failure . [ 3 ] Initially, progress on this problem was slow, as it was intermittent and unpredictable. Oscillations of 4 kHz with harmonics to 24 kHz were observed. Eventually, engineers developed a diagnostic technique of detonating small explosive charges (which they called "bombs") outside the combustion chamber, through a tangential tube ( RDX , C-4 or black powder were used) while the engine was firing. This allowed them to determine exactly how the running chamber responded to variations in pressure, and to determine how to nullify these oscillations. The designers could then quickly experiment with different
Profile photo for Tim Mensch

Paradoxically, I find that when I describe the benefits of compiler design class, I usually get one of two responses:

  1. Complete agreement that yes, all of this was very important. Or
  2. An insistence that none of this was really important.

And as it turns out, people in category 1 almost exclusively are people who have written compilers (in class or otherwise), and people in category 2 have not. But in case some people find this useful, I'll answer anyway.

When you write a compiler, you are forced to understand, at a deep level:

  • How the computer works (you need to output assembly language).
  • How a parser

Paradoxically, I find that when I describe the benefits of compiler design class, I usually get one of two responses:

  1. Complete agreement that yes, all of this was very important. Or
  2. An insistence that none of this was really important.

And as it turns out, people in category 1 almost exclusively are people who have written compilers (in class or otherwise), and people in category 2 have not. But in case some people find this useful, I'll answer anyway.

When you write a compiler, you are forced to understand, at a deep level:

  • How the computer works (you need to output assembly language).
  • How a parser and lexer work (related: why you never want to write one completely from scratch).
  • How optimizations work, and therefore how to write code so that it can be optimized.
  • How to write a program with real complexity.
  • How to write tests that catch obscure corner cases.

Compiler design is one of a very few software engineering classes that I felt were really, really useful over the long term.

It's true that most of these skills are not immediately useful to, say, a frontend developer, at least most of the time. But I assert that, to be really become a successful software architect, you really need this background or you'll make rookie mistakes in systems design, mistakes that can kill performance and explode your overhead.

Profile photo for Ron Widitz

A2A: There are multiple phases (6+) within a compiler and each one could be it’s own complex in-depth study. Therefore, a single-semester compiler design course is a compressed study and usually includes a coding project to build your own compiler subset. There’s a lot of material to digest and much work to accomplish so it quickly becomes a challenge to keep up plus complete a working compiler project. Prerequisite course knowledge can be quite substantial so a certain level of software engineering mastery is expected as well as some grounding in CPU internals is helpful. My personal experien

A2A: There are multiple phases (6+) within a compiler and each one could be it’s own complex in-depth study. Therefore, a single-semester compiler design course is a compressed study and usually includes a coding project to build your own compiler subset. There’s a lot of material to digest and much work to accomplish so it quickly becomes a challenge to keep up plus complete a working compiler project. Prerequisite course knowledge can be quite substantial so a certain level of software engineering mastery is expected as well as some grounding in CPU internals is helpful. My personal experience had the course professor choose an esoteric highly-academic programming language as the main tool (his pet favorite for research) which needed to be tackled on your own before attempting a compiler for another unusual source language in which one needed to define the grammar from scratch.

The course could easily be split into two semesters and still be a challenge: analysis followed by synthesis (code generation) For instance, optimization is often glossed over since months could be devoted to both global and local techniques while only scratching the surface. Most such courses target a virtual machine but if it’s for a real processor, mastering the ISA (instruction set, register usage, coprocessor extensions and addressing modes) can be it’s own challenge plus potentially the API for an operating system. If the target is a microcontroller, there are lab-related challenges with debugging and physical interfaces, etc. as well.

Profile photo for Nathan Davis

The design and implementation of a compiler is a massive engineering task. As a learner, you are best off following a textbook (‘Engineering a Compiler’ by Cooper & Torczon is a good one, but ‘Writing an Interpreter in Go’ and ‘Writing a Compiler in Go’ are also decent, if you’re using the Go language — at the end of the day, the language isn’t all that important, as long as you can implement ideas in code) or a guided curriculum (you may have one at your university, if you’re a student; otherwise, you can find one online).

  1. Make sure you have the prerequisite knowledge. Compilers are complex pi

The design and implementation of a compiler is a massive engineering task. As a learner, you are best off following a textbook (‘Engineering a Compiler’ by Cooper & Torczon is a good one, but ‘Writing an Interpreter in Go’ and ‘Writing a Compiler in Go’ are also decent, if you’re using the Go language — at the end of the day, the language isn’t all that important, as long as you can implement ideas in code) or a guided curriculum (you may have one at your university, if you’re a student; otherwise, you can find one online).

  1. Make sure you have the prerequisite knowledge. Compilers are complex pieces of software that utilise many concepts from mathematics and computer science. Know that any terms your text or course of choice mentions but glosses over is assumed to be prerequisite knowledge, so if you don’t know about it, take some time to build your prerequisite knowledge.
  2. Understand the big picture and how the parts fit together. A typical compiler architecture uses three layers — a frontend that turns the source code into an intermediate form, a middle optimiser that improves the intermediate form (usually for performance, but possibly also for space, or to minimise page faults, for instance), and a backend that takes the improved intermediate form and outputs the target language code (usually, it’s machine code, but it could be another language — some compilers may compile to C code, for instance). Each step has its own concerns, and the three work together to give you a working compiler.
  3. Learn by doing. Implement the algorithms and techniques you study. Your project need not necessarily be a full compiler; you can implement specific parts of it (e.g. a lexer and parser) to test your knowledge. Some compiler design courses in universities, though, will have you develop a full compiler.
  4. Using libraries is not cheating. Implementing a compiler, even in professional settings, will generally use a parser generator such as ANTLR or FParsec.
  5. Persist. You will have moments where the solution just seems to escape you. You will have your moments where you’ll be rereading things ten times, trying to grapple with some concepts. You will, like everyone else who’s ever coded anything, have bugs in your code. It’s easy to give up on a large project because you don’t get the psychological reward of completion, so you will need to stay motivated to do this. If anything stumps you at first, just take it as a challenge you’ve got to beat. Works for me every time.
Profile photo for Christopher F Clark

It might and it might not. A compiler design course (or even just one lecture or talk about compiler design) will teach you some things you didn’t know before. Will they be relevant to what you are building in an embedded system? No one knows.

Well, if you build a large enough embedded system, you will probably want to automate parts of it. One good way to automate tasks is to design “a little language” (a DSL—domain specific language) that describes said tasks. If you do that, you will do it better and easier if you know compiler design.

Beyond that, any knowledge is roughly a guess as to wheth

It might and it might not. A compiler design course (or even just one lecture or talk about compiler design) will teach you some things you didn’t know before. Will they be relevant to what you are building in an embedded system? No one knows.

Well, if you build a large enough embedded system, you will probably want to automate parts of it. One good way to automate tasks is to design “a little language” (a DSL—domain specific language) that describes said tasks. If you do that, you will do it better and easier if you know compiler design.

Beyond that, any knowledge is roughly a guess as to whether it will be useful or not, except for knowledge targeted specifically at the problem you want to solve. If you know that in advance, you know more than I do about most things I build.

Profile photo for Steve Johnson

Programming languages exist to provide abstract models at a higher level than the bytes in memories and the ops in CPU registers. For example, being able to define an array of data opens the door to providing operations like vector add, matrices and tensors, solving linear equations, etc. So you can program at the same level that you think about the problems you are solving.

The simplest compiler, conceptually, is one that uses compiler techniques to “understand” some inputs, but then computes and outputs results once the compiler has “understood” what the user wants. A good example of this is

Programming languages exist to provide abstract models at a higher level than the bytes in memories and the ops in CPU registers. For example, being able to define an array of data opens the door to providing operations like vector add, matrices and tensors, solving linear equations, etc. So you can program at the same level that you think about the problems you are solving.

The simplest compiler, conceptually, is one that uses compiler techniques to “understand” some inputs, but then computes and outputs results once the compiler has “understood” what the user wants. A good example of this is the Unix command grep, where one of the input strings defines a regular expression and this is parsed to build a small subprogram to recognize the pattern. The rest of the command has traditional inputs like file names and searches the files for the desired pattern.

Compiler tools like Yacc and Bison allow you to write such programs more easily than having to encode all the patterns yourself. But once the pattern recognizer is built, it’s just like any other program.

I have seen people put together such programs (at least a first draft) in an afternoon using the tools. If you are frequently confronted with inputs that need to be processed to tell the program what to do, it’s a good skill to learn and can be unexpectedly useful in future projects.

At the medium range of compiler technology are programs that read an input language and output a program that is then compiled or interpreted to perform the task. This is a harder job, and it’s good to ease into it — write a dozen programs and document what the expected output is. Test your expected output programs. Then write the compiler code, using the tools. You will probably need to store some inputs and process them (for example, constructing the data needed to run the task). For grep, this means translating the regular expression into a finite state machine that can recognize the pattern. Then you can run the constructed machine to process the data inputs.

At the high end of the spectrum are language environments. The inputs are transformed into data structures, syntax errors are caught and reported, data structures for parse trees, symbol tables, output debugging information, etc. are constructed. At the high end of difficulty are programs that attempt to change the inputs to achieve the same result by optimizing. This can provide huge benefits but also raise the complexity level of the code and provide havens for bugs to hide undetected.

To summarize, compiler technology is probably a good thing to be exposed to, enough to use the compiler tools and see how they are used. As you understand difficult problems better, you may find ways to use these tools to improve ease of programming and raise quality by providing an easier “on ramp” to the program. But the advanced techniques should be resisted until you are sure you and your users understand the new input and you can support some degree of debugging and optimization.

Profile photo for Roman Tsegelskyi

The key question really is: at what level? In general, I feel that introduction to compilers is much much simpler than most people see it. Useful things would include:

  • Good understanding of data structures: trees, linked lists, and some of the common algorithms (DFS, binary search)
  • Basic understanding of complexity theory, mainly the big O notation
  • Knowledge of basic regular expressions

To be perfectly honest, unless you get to a complicated topics associated with parallelization, staging and complex optimizations, most of mathematics are in scope of general CS.

Thanks for A2A btw

Profile photo for Greg Young

This is actually pretty easy.

So let’s look an undergrad program in Computer Science. Most schools are +- 30 credits to reach your major. This would total TEN classes to reach your degree (I know someone will bring up that it is in fact 27 or 9 classes … I was being generous but lets use this!)

OK so what NINE classes can I have you take to “understand” Computer Science from the ground up?! At least a few of these we already know … No? We need to have at least 2 “Intro type” classes we need at least 2 “Data Structures” type classes. We have … already used … HALF of our classes and not even gotte

This is actually pretty easy.

So let’s look an undergrad program in Computer Science. Most schools are +- 30 credits to reach your major. This would total TEN classes to reach your degree (I know someone will bring up that it is in fact 27 or 9 classes … I was being generous but lets use this!)

OK so what NINE classes can I have you take to “understand” Computer Science from the ground up?! At least a few of these we already know … No? We need to have at least 2 “Intro type” classes we need at least 2 “Data Structures” type classes. We have … already used … HALF of our classes and not even gotten anywhere! Certainly you are going to need a class on things like databases (heh one class on the concept of databases!!!). You need at least one on … networking and distribution?! We have not even discussed the concept of an Operating System yet?!

Taking 9 classes as a foundation in Computer Science isn’t really going to get you too far. How many hours is this in total? There are lots of things that we would like to get in here but very little time to use :)

Why has Compiler Design fallen out of this? Because something like Data Modelling was deemed to be more important as its something the students will be using regularly.

Profile photo for Quora User

To be sincere, I got in CMU SCS class 2020 and I have no idea why.

Yes... I have borderline scores (SAT 2200, GPA 3.8), but no ground-shaking ECs or awards. I also have zero experience in CS. My application was rejected by many other top schools.

I can only assume that CMU SCS (or at least the people who evaluate my application) would provide greater weight to a candidate with a well-round background -- going against the flow for the admission process in other schools.

Since CMU SCS has a perception of being nerdy and anti-social, but there is some effort in addressing this issue through the appl

To be sincere, I got in CMU SCS class 2020 and I have no idea why.

Yes... I have borderline scores (SAT 2200, GPA 3.8), but no ground-shaking ECs or awards. I also have zero experience in CS. My application was rejected by many other top schools.

I can only assume that CMU SCS (or at least the people who evaluate my application) would provide greater weight to a candidate with a well-round background -- going against the flow for the admission process in other schools.

Since CMU SCS has a perception of being nerdy and anti-social, but there is some effort in addressing this issue through the application process.

Of course, you should still consider my opinion as pure speculation...

ADDITIONAL NOTE: I read in article somewhere that CMU admissions is now very concerned about NOT accepting students with perfectionist traits and not good in handling failure. The article said that CMU admissions is now looking for kids with much better leadership skills and ability to use both "left" and "right" brain. This description seems a good fit for my qualities. However, one of my friends (who got in CMU CS as well) is very perfectionist and competitive -- so it seems not all admissions advisers got the memo. :) Or maybe, it is combination of these two factors.

About · Careers · Privacy · Terms · Contact · Languages · Your Ad Choices · Press ·
© Quora, Inc. 2025