13
shoop
68d

God I fucking hate python! God I hate AQA! God I wanna go back in time and slap whoever wrote that exam so hard they can't remember it, then go even more back in time and slap Guido Van Rossum so hard he can't get up. Argh I hate python so much. It's so so so so bad.
Why can't I use global variables in functions? Oh you think I'm declaring them locally? What are you gonna do? Shit your pants? Piss and cum?
Fucking types. Why can't I just see what gets passed to a subroutine? Why do I have to scroll through 800 lines of God awful python code to look for whatever the fuck gets passed on.

AQA. Why the fuck do they enforce Spyder on us? Why the fuck do I have to use this disabled IDE for python? There is minimal syntax highlighting, no breakpoints. An unstable kernel which doesn't support Ctrl+C to stop a program and just shits itself.
Why the fuck is the last section made of a shitty game of 800 lines without a SINGLE COMMENT? Why why why why are subroutine names 90 columns wide, it's a subroutine, not an essay. What the fuck is variable A? Where is it used? Why is it named A? How about a more descriptive name? Why the fuck did I see a function named AddThreeToGivenArgument which just returned a number equal to number plus three. Why? Who thought this was a good idea? Why is python chosen to be the language us poor students should write it? Who the fuck uses python? Why can't we use something more useful, easier to understand, efficient? There is C#, which is just as descriptive, easier to read, is STRONGLY TYPED AND IN GENERAL ISN'T SUCH AN AIDS ROLLER COASTER. Why python?
I'm so tired
Welcome to my TED Talk

Comments
  • 3
    Readability is fine.

    As you go deeper, you kind of regret why the syntax implementation sucks.

    Who needs underscores

    Who needs () just to extend a class.

    Why python does not have explicit typing.

    What arguments to be passed in a function.
    Why did they merge optional positioned arguments, nam f arguments and plain arguments.

    Code docs are important.

    Tooling is hard.

    Creating a new project? We need to install a virtual python env so that we don't want this package to be installed globally.

    Not working? Try to uninstall it.
  • 2
    Why do people piss and moan about Python so much? At least learn the language:

    https://docs.python.org/2.0/ref/...

    I get it, its not the language you prefer, but it fucking does anything you want with the appropriate import (and pip install, obviously) in 10 lines of code or less. Full disclosure: I programmed it almost exclusively for 7 years.
  • 3
    You really need to get in REAL touch with the language. What I do in java in 10 lines, in python it takes about 1 or 2. It eases your work. Also, I will mention that there are young guys here (I am 😅😅) so you need to take care of what you write. Thanks anyway hope you cool down about that and really get to know python.
  • 3
    @Demolishun i agree, but dude, it's almost 2020. please link to the python3 docs :D

    https://docs.python.org/3/...
  • 0
    @git-gud IKR, first search always brings up 2.0 version for some reason. Also, I was hoping for the docs with a selector to choose version. Instead it had old ass looking webpage.
  • 1
    @Demolishun looking at it, those are the 2.0.1 docs. literally from 2001, almost the last century.
  • 0
    @Demolishun shit gave me a syntax error. I was on an exam and had no time to deal with this.
    Also while working in python exclusively for 7 years you did not experience the breeze of writing in another, less terrible language.

    @JosiasAurel what Java or C# or whatever do in 1ms python does in 200. Also python might be OK for a small program, but something complex will not do it for you and you need something less disabled
  • 0
    @shoop as someone who does enjoy using other languages: python is way up there. better than java & C# in many ways, worse in many other ways. it all depends on what you use it for.
  • 0
    @git-gud just as I said. Good for hacking something quick and simple. Not good for writing an 800 line game of checkers
  • 0
    @shoop Been coding for 25 years. I have used lots of different languages.
  • 2
    You can use globals: Simply declare them as global at your function start.

    a = 1
    def inc():
    global a
    a += 1

    Modern libraries also give a hint of the types functions will return - it will not be enforced, but can be reliably linted. Modern editors will complain on type mismatch during coding.
  • 0
    And who forces you to use IDLE and Spyder? You university? If so, complain.
    Not saying IDLE is a good editor, but it does have breakpoints.
  • 1
    @sbiewald AQA, the examination center in my high school, enforces Spyder, not even IDLE. Multiple people have complained but in Russian we say "like peas against a wall"
  • 0
    @sbiewald "modern editors and libraries" is what is impossible to use for me because another terrible IDE is enforced. Also the example you gave me gives me a syntax error.
  • 1
    @shoop Well, being forced to use a bad editor is hardly the language's fault.

    Anyway: What did you exactly type, that my example does not work for you? I Just tried it out and it works on Python 3.7, 3.8 and 2.7.
    Additionally it is documented in a book for Python 3.1.
  • 0
    Honestly sounds like the codebase is the problem, not Python. You can write shit code in pretty much any language.

    Also like @sbiewald said, globals in functions just need to be declared as such.

    This might help:
    https://programiz.com/python-progra...
  • 0
    @shoop also an experienced pythonista. It's true that other languages may have better performances. But there's two reasons Python to consider over them.
    1. Machine time used to be more expensive than developer time. Now it's the opposite, you spend more per hour on a dev than on a machine. By being easy to write and even easier to read, Python saves a lot of dev time
    2. If Python is not fast enough, you can use Cython that compiles parts of your code. Or use the C api to link C code. People at Mercurial even started to link Rust in Python. If you know where your bottleneck is and it's the Python (80% of cases it's communication with services or dbs), you have tools to remove them
  • 0
    It's a tool, not gospel. You're essentially complaining about not being able to screw a screw with a saw.
  • 1
    @Gnonpi Well not really. Developing small or highly-dynamic projects with Python will likely be faster as it doesn't need time to compile and a lot of type checking can just be ignored. But poor autocompletion, limited type safety, and a pile of quick dynamic hacks (like __dict or *args **kwargs) take their own sweet time and slow down development on larger projects.
  • 0
    @shoop I also use java, c++ and I agree with you when it concerns performance, fast execution and low level needs but python still remains a good one 😊
Add Comment