background preloader

The Principles of Good Programming

The Principles of Good Programming
Heron-Centric: Ruminations of a Language DesignerThe Principles of Good Programmingby Christopher DigginsJuly 24, 2011 Today's post is a lightly edited repost from my blog at The Area, a web-site dedicated to users of Autodesk media and entertainment products. I came up with this list of principles to help with a recent C# training I gave, and I thought that members of the community could appreciate these principles and have some interesting insights to share. The principles of good programming are closely related to principles of good design and engineering. The following programming principles have helped me over the years become a better programmer, and I believe can help any developer become more efficient and to produce code which is easier to maintain and that has fewer defects. DRY - Don’t repeat yourself - This is probably the single most fundamental tenet in programming is to avoid repetition. KISS (Keep it simple, stupid!)

Related:  Programming in Good Style

The Zen of Python Abstract Long time Pythoneer Tim Peters succinctly channels the BDFL's guiding principles for Python's design into 20 aphorisms, only 19 of which have been written down. The Zen of Python Beautiful is better than ugly. Explicit is better than implicit. Normal Stuff - API Design Principles English Русском One of Qt’s most reputed merits is its consistent, easy-to-learn, powerful API. This document tries to summarize the know-how we’ve accumulated on designing Qt-style APIs. Contrasting Performance : Languages, styles and VMs – Java, Scala, Python, Erlang, Clojure, Ruby, Groovy, Javascript There’s a better place to specifically look at performance comparisons across languages than this post – The computer languages benchmarks game. But this post attempts look at performance comparisons a little differently. Based on coding idioms as well. And for a much narrower range of problems (namely one). There are languages which are tightly opinionated on a particular way of doing things. And there are languages which allow you to implement a given logic in multiple ways.

Easing into SICP "The Structure and Interpretation of Computer Programs" by Abelson and Sussman ( is often recommended reading on HN and elsewhere. However, you may find it to be much denser than the breezy computer books that are typically published. To help you acclimate to the concepts in SICP, I recommend the following steps: Log message style guide Created 9 December 2002, last updated 6 February 2003 One of the fit-and-finish issues all systems developers need to address is the text of log messages. This is a log message style guide.

Normal Stuff - Personal names around the world Background People who create web forms, databases, or ontologies are often unaware how different people’s names can be in other countries. They build their forms or databases in a way that assumes too much on the part of foreign users. This article will first introduce you to some of the different styles used for personal names, and then some of the possible implications for handling those on the Web. This article doesn't provide all the answers – the best answer will vary according to the needs of the application, and in most cases, it may be difficult to find a 'perfect' solution. Harold’s Corollary to Knuth’s Law Lately I’ve found myself arguing about the proper design of unit tests. On my side I’m claiming: Unit tests should only touch the public API.

ArsDigita University Curriculum About the Curriculum The curriculum was modeled on the undergraduate CS program at MIT. Several of the courses were straightforward adoptions of MIT courses. A few were specifically designed for the program, which was roughly in line with the ACM's 2001 Model Curricula for Computing. Stringification Created 9 December 2002, last updated 6 February 2003 One of the greatest features of modern programming environments is also the most humble: ubiquitous stringification. When I first worked in Java, I didn't think much about the java.lang.Object.toString method. It seemed like a good idea, and made sense, but was sort of the low-tech sibling in the method list. It was hardly "computer science" to be able to turn an object into a string. It seemed almost like a patch over a language deficiency at first: "Why not just have a way to print objects?"

Application structure: Concepts & Features I spoke about this topic quite a bit in ALT.Net Seattle. This is mostly relating to application architecture and how you structure your application. This is the logical result of applying the Open Closed and Single Responsibility Principles. MemoryImage database · application architecture tags: When people start an enterprise application, one of the earliest questions is "how do we talk to the database". These days they may ask a slightly different question "what kind of database should we use - relational or one of these NOSQL databases?". But there's another question to consider: "should we use a database at all?"