Being a person with very small attention span I am very much unsuitable to any activity that requires a lot of consistency. I try to overcome this flaw by trying to build some discipline in my life and secondly by making use of the synergy. For example if I am writing code for one project I will try to take up a couple of more project very similar to the first one and then just shuttle between them. I try to keep their intersection set as large as possible.
What works for code has worked for many other things in life as well. Shoes that go well with both formal and casuals. Covering multiple meetings in one travel and so on.
Now a days you don’t have to really write a lot of code. You will get open source libraries for almost everything. Most of the time goes into integration. For example in last few months we have faced a very large problem of integrating a Joomla instance with Moodle and WordPress. Even though all these three software are well written , the depth of features make it impossible to integrate them.
But one framework that I have really liked is CodeIgniter. It just gives you a skeleton and you have to build everything on your own. The advantage is you can use it as a clay and mold it in whatever shape you want. While it is much faster than starting from scratch, it also gives you unlimited flexibility.
I feel we need more such lightweight libraries for many other things. I have built one for Bit.ly, couchDB, one for Facebook and a Twitter API is in progress. It lets you do many things very quickly but if you want something very specific to your needs be added, you can add it yourself very quickly with near zero learning curve.