I have not done many great projects that became
tremendous successes. Rather, most of what I have
started has slowed to a halt and never been put into
something which other people could use. Due to this
fact, I have built a knowledge around how not to do stuff.
I have attempted to compile these things into a big list
and then post it for everyone to see. Maybe the
information can be useful to someone else than me. I
must sadly admit, that I see these things again and
again in software projects. It is a shame, because the
things should be fairly obvious and none of them should
be counterintuitive.
Item #1: Embrace the 2nd effect
The 2nd effect is when you have built a fairly robust
version 1.0 of your software program and are aiming for
a total rebuild. Then suddenly everything should be
crammed into your program. Your discussion and analysis
sessions brainstorm on wicked things to add to
the software. And everything must be ready for a 2.0
release.
This even happens on new projects in the planning
phase. You see it all the time, where the software needs
to do a lot of stuff, has outrageously many
requirements, or where people are just keeping on adding
features while planning. Stuff to look out for:
- We need a complete LISP interpreter as a
configuration and extension language embedded into the
behemoth.
- It should have web 2.0 connectivity via XML-RPC or
SOAP and have XML-schema defined for each kind of
operation. This quickly grows out of hand, beware!
- You can't find any spot in this code where we just
need to apply the KISS (Keep it simple, stupid)
principle.
Item #2: Embrace the NIH syndrome
The NIH (Not invented here) syndrome is when you have to
build everything yourself and never base your work upon
the shoulders of other giants. This is a fairly
irritating thing not to do. You end up reinventing the
wheel for a lot of the code. And your code has had less
testing than any kind of library out there.
Further you waste your valuable time on a
decoy operation: Getting a library built. That
moves your focus from the real task at hand, namely
building a tool you need.
Item #3: Embrace every library there is because
Embracing a complete pre-configured framework stack for
instance, will tie you up in some axis. This is the main
reason for the numerous different frameworks for web
development. To name a few: RubyOnRails, Django,
Turbogears, Zope. Each of these has certain advantages
and disadvantages, so there exist more than one. There
is also the NIH syndrome at work.
Importing a lot of libraries means dependence of your
software. It might put off some people. So loading a
library for doing just part of what the library does
might be overkill.
The alert reader will have noticed the opposite
directions of Item #2 and #3. The lesson is that there
is a golden middle which you should hit. It is hard to
hit it right the first couple of times, but with
experience, you will be better and better at just
knowing when to steal code or when to build
yourself. The quality of existing libraries might be a
reason, but remember it is often far easier to submit
patches for bugs to a library than it is to reinvent it
yourself.
If the API of the library pisses you off, then you
should probably be thinking of shielding the library
from the rest of your code so you can interchange it
later on. If you create a tight intercouple between your
program and the library you risk problems later
on. However, do not see these problems as
unsolvable. Even with tightly intercoupled libraries it
is often possible to change code so you get free of said
library.
Item #4: Argue the small points
If your project group always discusses smaller fine
points in the code and never discusses the big parts,
then your project is doomed. There are many ways to do
small things and it is seldomly so that one way have a
serious advantage over the other. It is rather hard
changing the big picture later on, however. Keep this in
mind when discussing things.
Do not discuss a fine point for more than 5 minutes. If
it takes longer to convince the other party your case
might not be so good after all. I have been in one
particular project where most of the discussion took
place over the placement of a comma in the
documentation. Had the members of the project just spent
time on correcting bugs instead of arguing...
Item #5: Dismiss refactoring
Forget about refactoring. Always take your code and just
add to it what is needed. This will cripple your code
gradually until nothing can be added to the code
base. At that point, you will begin contemplate
rewriting the whole mess again in a new setting.
Refactoring is about keeping your code agile in
the sense that it welcomes change. You need to have a
proper canvas to work on when adding things. It is often
the case that clever refactoring can do wonders to your
code base. You should, however, note that it is not
about fixing code, but rather about redesigning
and reimplementing the stuff that doesn't work totally.
Item #6: Don't think about your development
environment
Forget about development environments. Forget about a CM
system like CVS, SVN, Darcs, Mercury, Git etc. Forget
about having branches of production and development code
with tags along the way. Forget about having a baseline
and working branches. And most importantly, forget about
having a test environment and work directly on the
live production system.
Item #7: Rambo your code: One-army is the way!
Forget about collaboration. Code should be written in
one-man armies! Forget about the additional kick that
can be, when more people are working together on a
project. Rather, than focus on one project with 3
people, focus on 3 projects with one man on
each. One-man army projects tend to die a slow painful
death, but what the hell...