VirtualTam's bookmarks
48 bookmarks found
-
Obey the testing goat...
2015-05-10 - Test first! Test first!
-
Bigger than my head
2015-03-17 A friend of mine was once interviewing an engineer for a programming job and asked him a typical interview question:
- How do you know when a function or method is too big?
- Well, said the candidate, I don't like any method to be bigger than my head.
- You mean you can't keep all the details in your head?
- No, I mean I put my head up against my monitor, and the code shouldn't be bigger than my head.
~ from http://www.gigamonkeys.com/book/practical-a-simple-database.html
-
Practical Common Lisp
2015-02-13 Beware! Very cool book dealing with Lisp programming, with plenty of examples
-
Python: run specific unit tests
2015-02-13 Given your unittests are in the
tests
directory:1# run a specific test module 2python -m unittest tests.<module> 3 4# run a specific test suite 5python -m unittest tests.<module>.<class> 6 7# run a specific test 8python -m unittest tests.<module>.<class>.<test> 9 10# run tests matching a given pattern 11python -m unittest discover -s tests -p <pattern>
-
electric-indent has been activated by default in emacs 24
to disable it for Python: (add-hook 'python-mode-hook (lambda () (set (make-local-variable 'electric-indent-functions) (list (lambda (arg) 'no-indent)))))
-
TL;DR: you won't.
This website is rather a good memo regarding each language's foundations:
- what's its general purpose?
- how to write core instructions, such as functions, loops, conditional structures?
I find this kind of reminder quite useful when it comes to documentation languages (e.g. TeX, Markdown)