13
AleCx04
4y

Man....I keep up with this strange love hate relationship I have with Python....

Last night it was python that literally wrote my homework: define all possible equivalent partition tables with cause and effect analysis and boundary value checks for a program. The whole thing wrote itself and all I had to do was verify the inputs. Something that I was able to do using jupyter with pandas and numpy. On one hand, I despise the lack of static typing and use of whitespace as a block delimiter. On the other I cannot but help feeling a high level of gratitude over the language and its high availability and ease of use for this.

Sure, I could have used other tools, but this language has dominated hardcore in this regard enough to the point of not considering it being a crime against humanity.

Comments
  • 4
    You used the best tool for the job imo. Jupyter notebooks are amazing, I wish more people would get up and running on them. I see a future where all systems could be naturally documented in them.

    You probably already know this, but PEP 484 provides some marginal typing, roughly on the level of typescript. Not perfect, but better than nothing for catching things at design time :)

    https://pythonsheets.com/notes/...
  • 1
    @SortOfTested thank you for the link! I will make sure to check it out in detail.

    As a whole I can't but appreciate how easy to use and comfortable the language is. It has been my defacto goto language for a number of years even though I continue this internal struggle, there is just something about the language that I am just not crazy about. Some days I love it, some days I don't, but for sure it is powerful and versatile.
  • 2
    Python is arguably good for what it's intended: programming prototypes swiftly and disposable.

    The problem with static code in the prototype phase is (I think) that early on, design is very much a process rather than a product, and the problems and criteria aren't well defined early on. During prototyping you're still defining the 'problem' whatever it happens to be.

    And when you're exploring a space, be it the best algorithm to solve an issue, or the user requirements, and static type checking bites you in the ass, you end up being quickly diverted to thinking about a lower level problem, how to structure and represent your data based on types, when you're not even sure the data will be that type between prototypes because of the more abstract problem of exploring the design and solution space through prototyping.

    Basically worrying about typing during prototyping is doing optimization too early, and we pay for it in lost productivity.

    Maybe I'm wrong though.
Add Comment