On patches and whitespace

We don’t write much code in assembly these days (maybe some people still do). Instead we write most of our programs in a second, third or fourth generation programming language (are there any fifth generation ones yet?). This is because we want code that is easy to write, read and maintain. Apart from choosing a nice language we must also follow some decent and consistent coding style.

When we publish changes to some program or library (normally as patches) we want them to be readable too. A patch should be as simple as possible and be very specific. Don’t rename a variable at the same time you fix a buffer overflow error and don’t add whitespace at random places. I’m not saying that you should not use whitespace within your expressions or as a way to separate statements, functions or classes. This may improve the readability of the program and is indeed a good thing. Just use it with some decency.

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s