HNHacker News
TopNewBestAskShowJobs

adolgert

155 karma · joined July 16, 2009

Software for science.
submissionscomments
adolgert··on Which programming book you just couldn’t stop reading from start to end?
K&R's _C Programming Language_, because my father saw me start to write Schrodinger's equation in BASIC and said I should take a look.

Stroustrup's _The C++ Programming Language_, twice in a row, because I didn't want to be left out for not having taken Computer Science.

Butelhof's _Programming with Posix Threads_, because another book referenced its explanation of why Win32 threading had a bug because it could not, at the time, signal and wait on a mutex in an atomic way. There was something deep to find in those rowboats and bucket stories.

GoF's _Design Patterns: Elements of Reusable Object-Oriented Software_, because when I complained to a mentor that I was struggling to organize a dozen scientist programmers, he handed it to me, laughing.

John Robbins, _Debugging Applications_, first edition, because it was the first time for me that code didn't have the disclaimer, "of course you should insert error-handling code here." Basic x86 assembly in one chapter!

adolgert··on How to write cross-platform code
An #ifdef _WIN32 is a platform ifdef. Especially to cross-compile Unix flavors, it can help to use capability ifdefs, such as #ifdef HAVE_VSNPRINTF. This approach replaces if-then-else logic on platforms in the source with tests in the configure (or CMake) script.

Nice article. Is the GoF Abstract Factory pattern not popular for #5, "developing cross-platform base libraries?"

← PreviousPage 3 of 3