41

define every function like this:

def function ( arg ) :

instead of

def function(arg):

bit of a nitpick I know. but when I asked her about it she said "convention" and when I asked which convention she replied with "the only one in existence"

so I was triggered by that for sure

Comments
  • 4
    I would have been triggerer as well since that is a cunt ass response.
  • 2
    @AleCx04 I could tell she just wanted me to fuck off but c'mon
  • 0
    @spoiledgoods I mean, she must have a reason but yeah. She could have been cool about it.
  • 4
    Spaces with {}
    No spaces with [] ()
  • 2
    @AleCx04 could've just said "I like going it that way" but instead she lied and was a dick
  • 0
    @FrodoSwaggins you sure?
  • 0
    @d4ng3r0u5 I don't understand
  • 1
    @FrodoSwaggins I mean show me the convention that gives that as a style example, I've yet to see it so far. PEP8 style is my way and 95% of the coders I've checked out do it that way.
  • 2
    If it was hard to write it should be hard to read
  • 4
    type function (type arg1, type arg2){
    }

    (I hate people that put the open bracket in new line)
  • 1
    @LuxARTS no spaces between parentheses and no new line before the bracket, you're really trying to trigger @FrodoSwaggins ain't you?
  • 1
    @FrodoSwaggins you're wrong then. convention > personal opinion

    sorry buds
  • 0
    @LuxARTS I was talking python yo
  • 1
    @FrodoSwaggins he is going by convention. PEP8 does define function syntax to follow the convention of:

    def cometela(tragate, miriata):

    As the convention to be followed.

    I see nothing wrong with that. Neither do I see an issue with having a space around it like

    def comete( mi_paja) although I do have prefference for the other one.
  • 0
    To be fair, many years ago one of my professors was using the

    void name(int s1, int s2){

    ....

    }

    style, so I got used to it and it seems the most natural to me.

    BUT!

    Now I just don't give a fuck, I let prettier take care of code formatting for me. It's heavily opinionated and not really configurable, but after a day or two I got used to it and now I don't waste time on stupid things.

    Formatting code is a computer's job after all :)
  • 0
    @ObiSwagKenobi Formatting code let you understand the algorythm faster. Maybe you are wasting time the first time you write the code but it will save time later when you have to edit or fix something.
  • 1
    @AleCx04 Nice function name, lol
  • 1
    @LuxARTS eas waiting for someone to see it lol
  • 1
    @AleCx04 No hay mucha gente que hable español, ese es el problema
  • 0
    @LuxARTS y menos gente que entienda los regionalismos de cada pais :P pero es divertido trollearlos asi de vez en cuando.
  • 1
    @FrodoSwaggins lol so you just deny reality if you don't agree with it. don't get me started on the earth being round either! then it's just opinion vs opinion right?
  • 0
    @AleCx04 @luxARTS jajajajajajajajajajajaja
  • 0
    @LuxARTS haha yup I know why formatting code is important.

    What I don't know is why anyone would want to format code by hand in 2018.

    Take a minute or two, setup prettier (or any other code formatter for that matter) and you're good to go. Auto format on every save and everyone's happy.
  • 0
    @ObiSwagKenobi I format by hand because mostly IDEs I use haven't got an auto-formatter. Also, formatting by hand is a good practice when you have to write code fast and you haven't your machine with your tools.
  • 0
    @LuxARTS you should probably change your IDE then :p

    Having the IDE format your code isn't about speed. It's about having less stuff to worry about when dealing with a problem.

    In other words, let the IDE handle code formatting so you can stay focused on the code itself.
  • 0
    @ObiSwagKenobi Can't change the IDE when develop for specific microcontrollers. I know your point, auto-formatter make the life easier when you start to learn but when you get experience you type the code already formatted, so no need to format later. By the way, we forgot to mention the auto-complete feature, that is a must have feature.
  • 1
    Sorry not sorry;

    pub fn name<T>(
    thing: i8
    ) -> T
    where
    T: Something else
    {
    panic!();
    }
  • 0
    Only place I saw function( arg ) is in Wordpress and thankfully wordpress development doesn't get to set any conventions (at least not in my book), since they "did so much" for the development already, so nope... I would stick with function(arg) thank you. :)
Add Comment