The best text I've found to date is 'Matrix Structural Analysis' by W. McGuire and R.H. Gallagher, J Wiley and Sons, 1979.
The complete element stiffness matrix is developed with many examples throughout the text which demonstrate the use of stiffness matrix methods.
As far as a stiffness matrix computer program goes, most universities that have civil and structural engineering programs also have simple matrix analysis programs which are used as teaching tools.
As I recall, UC Davis uses a teaching program called BIGSOV, and UC Berkeley uses Ed Wilson's program and teaching text for FEA analysis. Other universities have their own computer matrix programs developed for instructional purposes.
These programs used to be written in FORTRAN, but I believe most have been converted to C and C++.
A company by the name of MUDD Engineering Company used to license software by the name 'MECStress'. For an additional fee they would also provide the program code so that pre-processor and post-processor code could be written. The program was written in C. It was a DOS-based program. The cost of the program was about $500 in the late 80's and the additional source-code license was about $1,000.