[CentralOH] 2016-12-02 道場 Scribbles 落書/惡文? advent of code: Pretty and Ugly; duck typing; Counter; __missing__; .casefold(); kivy; loose table legs

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Sun Dec 4 12:14:23 EST 2016

six folks tonight

Which cell is more readable for you? Cell #1, #2, or #5?
What makes the other cells less readable?
First focuses on readability, then descends into obfuscation.
There is some deliciously nasty stuff in there.

inspired by:

desert challenge

wp:manhattan distance
wp:cardinal direction

airplane names

wp: prefix means Wikipedia
To get good answers, consider following the advice in the links below.

new version of Learning Python updated 2016-10-14.

Duck typing according to Raymond

    Never use the tests isinstance() and issubclass().
    Don't do type checks.

    Everywhere you did type checks,
    it precluded you from the ability to do duck typing.

    Anybody who puts in type checks is defeating duck typing.

    In my first six months of doing Python, I put type checks everywhere.

    My next six months were taking them all back out.

    The maturing of a Python programmer is to not use isinstance() anywhere.



    is just a dictionary, can put anything in it
        floats, Decimals, 'kitchen sinks'

Raymond loves __missing__ method.

Python Lex & Yacc
wp:Lex (software)

.casefold() is the new .lower()

django szNJ6DqrqoA

found long lost brand new 32 GB USB flash drive Cruzer Fit in book bag
was lost about 3.5 years

gave up on kivy

someone else
showed "hello" touch screen app made with kivy

forgot to bring wrenches and nail polish to tighten loose table legs
    1/2?, 9/16?, 5/8?
    3/8 drive ratchet and sockets
    just wrenches

More information about the CentralOH mailing list