mem test, fd test and some coding snippets