About this guide

This guide is an (informal) style guide for CSE 142 and 143 and contains a list of rules we expect you to follow when writing code.

If you are taking CSE 143 and have never taken CSE 142, we strongly suggest you read through the rules in the CSE 142 section. We will not review rules introduced in 142 in class and will assume you have already internalized them fully.

Disclaimer: Please note this guide may not be fully complete. We've done our best to be as comprehensive as possible, but it's always possible we may have missed a rule somewhere.

Note: If you are having difficulty locating a particular rule, you may want to try organizing the table of contents by category, rather then by homework assignments.

Table of Contents

Why care about style?

We care about writing clean code and following conventions because it makes collaborating easier, reduces the chances of bugs, and because it prepares you for industry, where you are expected to produce clean code.

Understanding style

Good style is not about memorizing a list of rules. Instead, focus on understanding the core principles of clean code: focus on writing code that is readable, concise, modular, and efficient. If you understand these principles, you can independently predict and derive nearly every rule in this guide.

Changelog