This week in review: testing and debugging across the stack, early and late binding, GNU Parallel!

Mon, 18 Nov 2019

vstest.console.exe is a great tool to run tests from the command line. I have been using this to automate some of my workflows. The command line arguments are a little cumbersome. One option that I found useful was /TestCaseFilter1. This option can be used to run specific tests by substring search and filter. For example,

vstest.console.exe bin\Release\MyTests.dll /TestCaseFilter:"(FullyQualifiedName~ProdTest)|(FullyQualifiedName~DevTest.SALT)"

More information about the options and usage can be found at 1 and 2.

Debugging on Linux3 4 5

ldd is short for list dynamic dependencies which does exactly that, it lists all the dynamic libraries that your program/library depends on. It is useful to debug symbol not found errors. Also check LD_LIBRARY_PATH if you get this type of errors.

strace lists all system calls a program makes till it stops

ltrace lists all library calls a program makes till it stops

nm lists symbols from object files

Real world applications that use popular algorithms6

Tue, 19 Nov 2019

Tia Newhall’s7 CS and Unix Links page contains a lot of useful resources for working with the Unix OS.

Early binding vs Late Binding

Binding is the process of converting identifiers8 into addresses. Binding for functions occurs either during compile time or runtime.

Early binding or compile time polymorphism is when the function call is resolved during compile time. This is done using overloading of functions or operators.

Late binding or runtime polymorphism is when the function call is resolved at runtime of the program. This is done using virtual functions.

Wed, 20 Nov 2019

GNU Parallel

find . -name '*.dat' | parallel -j8 python ./process_dat.py {} \;