Programs Are Hard, Libraries Are Easy
Programs Are Hard, Libraries Are Easy
●
The smaller the piece, the better.
●
The more flexible the piece, the better.
●
The more hooks into the guts, the better.
▶
Libraries of functions can have small, flexible pieces.
▶
Programs are, by definition, monolithic.
●
Extract pieces out of your program and put it into a library
▶
Then test the library
▶
Side-benefit, you'll have improved your code
●
Take the FTP, XML parsing and HTML generation code out of
the program.