Skip to content

Instantly share code, notes, and snippets.

General TTD Advice

  • If you can't test the code efficiently, refactor the code.
  • Don't hardcode URLs in views, templates and tests. (Use revert instead?)
  • Use named views and reverse URL resolution, instead.
  • Never refactor against failing UNIT tests.
  • Don't forget the REFACTOR on 'Red, Green, Refactor'.
  • Tests makes possible using the application state as a save-points for refactors. Once you get to them again, you'll know your refactoring is done.
  • Every single FT doesn't need to test every single part of your application, but use caution when de-duplicating your FTs. (FTs exist to catch unpredictable interactions between different parts of your application, after all)
  • Use loggers named after the module you're in. Follow the logging.getLogger(__filename__) pattern to get a logger that's unique to your module, but that inherits from a top-level configuration you control.
@tilacog
tilacog / Lambda PS1
Last active September 7, 2015 16:50
\[\033[38;5;10m\]\u@\h:\[(B\]\[\033[38;5;6m\]\w\[(B\]\[\033[38;5;15m\]\n\[\]\[(B\]\[\033[38;5;190m\]λ\[(B\]\[(B\]\[\033[38;5;15m\] \[(B\]
@tilacog
tilacog / terminator-config
Last active September 7, 2015 16:49
save this file to ~/.config/terminator/config
[global_config]
title_hide_sizetext = True
title_transmit_bg_color = "#3686d9"
tab_position = bottom
[keybindings]
[profiles]
[[default]]
scrollbar_position = hidden
palette = "#2d2d2d:#f2777a:#99cc99:#ffcc66:#6699cc:#cc99cc:#66cccc:#d3d0c8:#747369:#f2777a:#99cc99:#ffcc66:#6699cc:#cc99cc:#66cccc:#f2f0ec"
background_image = None