[UMN logo]

CSCI 5161: Introduction to Compilers
Spring 2025, University of Minnesota
Some Comments on Coding Standards and Style


The quality of code and its readability are not dispensible aspects in this course. We will assign a substantial part of the credit to these attribute. What is more, readability and clarity will enable Chase and me to find mistakes in the code it and therefore to give you useful input towards getting your programs to work. This would allow us to give you significant credit for a program that is non-functional but could be working with a few small changes. Note also that the code you write in this course will grow gradually through the term and our finding bugs in earlier parts could help you avoid wasting time later on when such bugs could cause other more difficult parts to break unexpectedly. Life is too short for anyone to be wasting time on inscrutable code. You should not be wanting to do this and you should not expect me or Chase to do this either.

Here are some simple things to bear in mind about your programs; this is not an exhaustive list. There will be some comments specifically about ML style in the lectures and, in any case, we are expecting that you have had lessons before this course on what does and does not constitute good code.

An important point to remember as you work on the compiler: writing good code to solve complicated problems is an activity that has a mathematical character and, like any good mathematics, needs you to think about structure carefully. Resist the temptation to start slapping down code with the idea that you will figure out later how to get things to fit together and actually work. Leave this bizarre style and its advocacy to people who do not really understand what it takes to write good programs.


Page maintained by ngopalan atsign umn dot edu and joh13266 atsign umn dot edu. Last updated on Jan 20, 2025.


The views and opinions expressed in this page are strictly those of the page author(s). The contents of this page have not been reviewed or approved by the University of Minnesota.