4 ms·
whenever you want or need to do something more than shuffling bits between buckets with different names, do some research. most likely someone already did it an
by baq 8y ago
whenever you want or need to do something more than shuffling bits between buckets with different names, do some research. most likely someone already did it and published a library for it.
test third-party libraries. it's uncommon to find bugs, but it's not so rare that it happens only to others.
don't forget to leave comments. a lot of my code review questions could be answered (hence could be not asked in the first place) by a well placed comment.
sometimes people say that code is documentation or code should read like documentation. this is false. code can explain (usually poorly) what it does but it can't give a rationale why it does it the way it's been written, can't say what it doesn't do, etc. always write some documentation - comments and commit messages at least. this should be enforced in code review.
i'd say engineering is about not writing code unless absolutely necessary. code is an asset, but it's also a liability. you really don't want more than you need.