Copy and Paste!

(a dumping ground for lessons & quotes from people in the software development industry!)

the lessons / “why this presentation?”

  • what are the lessons?
  • how can we learn the lessons faster?
  • I have no opinions, where can I get some?
  • which lessons are the most important to learn?
copy and paste!

Worse is better!

Simplicity

The design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface.

Simplicity is the most important consideration in a design.

Correctness

The design should be correct in all observable aspects, but It is slightly better to be simple than correct.

Consistency

The design must not be overly inconsistent.

Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either complexity or inconsistency in the implementation.

Completeness

The design must cover as many important situations as is practical.

All reasonably expected cases should be covered.

Completeness can be sacrificed in favor of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardized.

Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface.

Once it has spread, there will be pressure to improve its functionality, but users have already been conditioned to accept “worse” rather than the “right thing”.

Therefore, the worse-is-better software:

  1. will gain acceptance
  2. will condition its users to expect less
  3. will be improved to a point that is almost the right thing.

acronyms

  • KISS - Keep it simple stupid
  • YAGNI - Ya ain’t gonna need it
  • DRY - don’t repeat yourself
  • TDA - Tell don’t ask (OOP)
  • BDUF - Big design up front (don’t do it!)
  • SoC - Separation of Concerns (the S in SOLID)

SOLID

Single responsibility

  • do one thing, and do it well (UNIX philosophy, but at the class and function level!)

Open / Closed

Open for extension, closed for modification

Liskov substitution principle

graph BT; A -.-> I; B -.-> I;

Interface segregation

Dependency inversion

  • Program to an interface, not to an implementation

bad

graph BT; A --> B;

good

graph BT; A --> genericB; B -.-> |implements| genericB;

Cathedral and the Bazaar

lessons for a successful (open source) software project

Every good work of software starts by scratching a developer’s personal itch.

Good programmers know what to write. Great ones know what to rewrite (and reuse).

Plan to throw one [version] away; you will, anyhow. (Copied from Frederick Brooks’ The Mythical Man-Month)

If you have the right attitude, interesting problems will find you.

When you lose interest in a program, your last duty to it is to hand it off to a competent successor.

Treating your users as co-developers is your least-hassle route to rapid code improvement and effective debugging.

Release early. Release often. And listen to your customers.

Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.

Smart data structures and dumb code works a lot better than the other way around.

If you treat your beta-testers as if they’re your most valuable resource, they will respond by becoming your most valuable resource.

The next best thing to having good ideas is recognizing good ideas from your users. Sometimes the latter is better.

Often, the most striking and innovative solutions come from realizing that your concept of the problem was wrong.

Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away. (Attributed to Antoine de Saint-Exupéry)

Any tool should be useful in the expected way, but a truly great tool lends itself to uses you never expected.

When writing gateway software of any kind, take pains to disturb the data stream as little as possible—and never throw away information unless the recipient forces you to!

When your language is nowhere near Turing-complete, syntactic sugar can be your friend.

A security system is only as secure as its secret. Beware of pseudo-secrets.

To solve an interesting problem, start by finding a problem that is interesting to you.

Provided the development coordinator has a communications medium at least as good as the Internet, and knows how to lead without coercion, many heads are inevitably better than one.

Quotes

Programmers don’t burn out on hard work, they burn out on change-with-the-wind directives and not ‘shipping’. -Mark Berry

Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debugging Monday’s code. —Christopher Thompson

The best way to get a project done faster is to start sooner. -Jim Highsmith

It’s OK to figure out murder mysteries, but you shouldn’t need to figure out code. You should be able to read it. -Steve McConnel