[CentralOH] 2014-10-24 道場 Scribbles 落書/惡文?

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Wed Oct 29 02:07:39 CET 2014


Someone arrived with a local hotspot
that was so much better than Panera's wifi.
wp:OODA loop
agile techniques are fast like name suggests
TDD and pair programming

stringio
    file-like object that reads from string
    import StringIO
    https://docs.python.org/2/library/stringio.html
wp:Dia (software)
wp:YAML
wp:Don't repeat yourself
column is a collection of fields
make person who inherits code happy (might be me)
for database stuff:
for field in row: instead of for column in row:

notepad
notepad++
ultra edit
EMACS
vi
emacs versus vi
wp:FileZilla
wp:tmux
wp:screen
    screen is great, but tmux is awesome
    Use tmux if you can; use screen if tmux is not available.
    (screen is good if tmux is not available)

https://pypi.python.org/pypi/pytest
http://pytest.org/ pytest: helps you write better programs

py.test -f .
    looks for python files with functions with names that begin with
    case-insensitive 'test'

TDD is easily defined
    while true
        write a test that fails
        write some code that makes the test past
        refactor

TDD is easily defined
    while true
        write a test
        write code that makes test fail
        write some code that makes the test past
        refactor

empty tuple (,) versus ()
    python 2 versus 3? (probably not)

    jjj at cohpy:~$ python
    Python 2.7.3 (default, Feb 27 2014, 19:39:10) 
    [GCC 4.7.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> a = ()
    >>> a
    ()
    >>> type(a)
    <type 'tuple'>
    >>> a = (,)
      File "<stdin>", line 1
        a = (,)
             ^
    SyntaxError: invalid syntax
    >>> a = (1,)
    >>> a
    (1,)
    >>> a = (1)
    >>> a
    1
    >>> a = ()
    >>> a
    ()
    >>> 

cytoolz https://github.com/pytoolz/cytoolz
pytoolz

insane
    import from inside don't import things from tests
        tests make DRY less important

test help you catch regression errors

make the person who inherits the code happy

contains no surprises

wp:principle of least astonishment

wp:Answer_to_the_Ultimate_Question_of_Life,_the_Universe,_and_Everything

ipaddress standard since python 3.3


More information about the CentralOH mailing list