There is a saying within eBay that the lines of codes of eBay is more than Windows and Linux combined. Well… It is not a compliment from where I stand. The less the code is, the more powerful it can be.
With OOP (Object Oriented Programing), and the right level of abstraction, code can be very simple, very concise, easy to read, but remain more flexible and powerful. I spent the last few weeks rewriting some code with one principle in mind – just to push the limit to have less code. I have successfully turned a 2000 lines code into 250 lines, and another few thousands into 250 lines. I just feel 250 lines of code is a magic number to accomplish a lot. My goal of writing PHP code is, put less than 7 lines (ideally 3 lines or 1 line) into a function, and as less function as possible, while still maintain a very high level of flexibility and functionality. I believe one day I will share some sample codes.