From 82c2c085f877f6dca63d847bd2599abeebf76933 Mon Sep 17 00:00:00 2001 From: mjfernez Date: Sun, 20 Feb 2022 14:17:11 -0500 Subject: Add txt files --- thoughts/syntax/random-python-idiosyncrasies.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'thoughts/syntax') diff --git a/thoughts/syntax/random-python-idiosyncrasies.html b/thoughts/syntax/random-python-idiosyncrasies.html index ba88071..fd2336d 100644 --- a/thoughts/syntax/random-python-idiosyncrasies.html +++ b/thoughts/syntax/random-python-idiosyncrasies.html @@ -87,6 +87,7 @@
  • 3) Tabs are four spaces and spaces are ALWAYS preferred to tabs
  • 4) Always add spaces between arithmetic, but never for brackets
  • 5) EVERYTHING should be snake_case
  • +
  • 6) If it's over 100 lines, you probably need a new file (and a class)
  • @@ -149,5 +150,10 @@
    # this doesn't actually work, but you get the idea
     r = requests.get("www.debian.org")
     pageSize = r.json()['pageSize'] # camel case ok
    +

    6) If it's over 100 lines, you probably need a new file (and a class)

    +

    This is more of a general coding thing, but I've encountered so many 1000 line monster out there, I need to reiterate it. I understand how these things come to be, having made a few myself in the beginning. You get an idea and want to see it through in full. Like On the Road it comes out as a scroll Merlin himself would be proud of.

    +

    But coming back to the scroll in a week half-drunk and half-tired is not a situation you want to be caught in. You can always import any python code you write with a simple:

    +
    import filename
    +

    As long as it's in the same directory.

    -- cgit v1.2.3