News for hackers. Stuff that matters.
Re:Programmers At Work: Bill Gates (1986) by gus_massa on Wednesday February 05, 2014 @07:56PM (#7187992)
Just be sure that each one of the 30 function is doing something interesting and obvious at the same time.

For example, if your language lacks a CopyTagedMatrix then you just write one, it gets the correct size, allocates the memory if necessary, copy the elements and return the new matrix. Now you can use it without remembering the implementation details, and it’s much clearer than the 10 lines that necessary to get the bounds and the fors to iterate over the matrix.

An extreme example is the GMP bignum library. You use each function as magic, and never read the implementation details. (Unless it’s in a very tight loop in a very hot part of the most important feature of your program, but I doubt that it’s good to use GMP in that place.)

There are no comments on this comment yet.