Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Python is EVIL....

Python is EVIL....

Scheduled Pinned Locked Moved The Lounge
python
67 Posts 37 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C CodeWraith

    Try machine code. The style guide/syntax rules contain only one word: hexadecimal.

    I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

    G Offline
    G Offline
    glennPattonWork3
    wrote on last edited by
    #12

    done that! no fancy spaces needed! :)

    1 Reply Last reply
    0
    • M MarkTJohnson

      You don't remember COBOL? It had positional stuff too. Didn't it? That was one class a LONG time ago. Also remember WHY it's called Python. Some of their stuff was extremely silly.

      G Offline
      G Offline
      glennPattonWork3
      wrote on last edited by
      #13

      Yeah but a programming language that makes you say 'Neeh' ? :rolleyes:

      1 Reply Last reply
      0
      • L Lost User

        glennPattonWork wrote:

        I am going to start using Notepad++

        Use IDLE (the Python IDE) and its associated editor, it does all the spacing for you.

        G Offline
        G Offline
        glennPattonWork3
        wrote on last edited by
        #14

        Tried that, is there a switch I missed I couldn't get it to indent properly...

        L 1 Reply Last reply
        0
        • R Rick York

          I have a lot of horrible memories of large FORTRAN projects. Thankfully, none were in this century so the memories are a bit faded now but not gone entirely.

          W Offline
          W Offline
          W Balboos GHB
          wrote on last edited by
          #15

          FORTRAN only had one real rule: statements start in column seven The early stuff, and a couple on the end, were for statement numbers and comment marks and things like that. But really, only one column location - so just line-em-up.

          Ravings en masse^

          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

          "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

          OriginalGriffO 1 Reply Last reply
          0
          • W W Balboos GHB

            FORTRAN only had one real rule: statements start in column seven The early stuff, and a couple on the end, were for statement numbers and comment marks and things like that. But really, only one column location - so just line-em-up.

            Ravings en masse^

            "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

            "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #16

            Except for labels - and you needed them for every flow-of-control statement: DO, GOTO, IF, ...

            Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            W 1 Reply Last reply
            0
            • G glennPattonWork3

              Hi All Winge mode on. I have spent more time than I like to admit fighting with Python today who on good earth though white spaces should be syntax! OK, I came from a C/Assembly background curly braces win not spaces... It's odd plain odd! :wtf: I am going to start using Notepad++ as I at least have a chance of keeping tabs and or spaces in line. I don't like it it might be different if you are introduced from the word go, but I can see People being taught with it being very picky and it making you layout code better but...

              M Offline
              M Offline
              Marc Clifton
              wrote on last edited by
              #17

              Life would be boring without a little evil. ;)

              Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

              1 Reply Last reply
              0
              • R Rick York

                I have a lot of horrible memories of large FORTRAN projects. Thankfully, none were in this century so the memories are a bit faded now but not gone entirely.

                OriginalGriffO Offline
                OriginalGriffO Offline
                OriginalGriff
                wrote on last edited by
                #18

                Likewise: but mine was even worse, because it used a preprocessor (it was the source for the preprocessor) to provide a "structured programming" approach to FORTRAN called ROOTS[^] - I worked for Rob for six months back in the day as part of my university industrial training. And I still use the flowcharting methods for software design ... :laugh:

                Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                W R 2 Replies Last reply
                0
                • OriginalGriffO OriginalGriff

                  Except for labels - and you needed them for every flow-of-control statement: DO, GOTO, IF, ...

                  Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                  W Offline
                  W Offline
                  W Balboos GHB
                  wrote on last edited by
                  #19

                  OriginalGriff wrote:

                  Except for labels

                  Yeah - that's what I meant by statement numbers, but that's quite the wrong term. Brings back memories - I could code FORTRAN faster than I could do Lotus 1-2-3 . So long ago. Dark Hair. 11/2" taller. Mrs. Wife looking hot enough to stop traffic . . . sigh.

                  Ravings en masse^

                  "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                  "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                  1 Reply Last reply
                  0
                  • OriginalGriffO OriginalGriff

                    Likewise: but mine was even worse, because it used a preprocessor (it was the source for the preprocessor) to provide a "structured programming" approach to FORTRAN called ROOTS[^] - I worked for Rob for six months back in the day as part of my university industrial training. And I still use the flowcharting methods for software design ... :laugh:

                    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                    W Offline
                    W Offline
                    W Balboos GHB
                    wrote on last edited by
                    #20

                    OriginalGriff wrote:

                    And I still use the flowcharting methods for software design ...

                    I remember always seeing that stuff. Somehow, it never seemed to catch on with me - just make it up as I go along*. *An invisible map in my head, I suppose.

                    Ravings en masse^

                    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                    "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                    1 Reply Last reply
                    0
                    • G glennPattonWork3

                      Tried that, is there a switch I missed I couldn't get it to indent properly...

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #21

                      Worked right out of the box for me ... I trust you remembered to add the colon at the end of your if, else, elif, while, etc. statements.

                      1 Reply Last reply
                      0
                      • G glennPattonWork3

                        Hi All Winge mode on. I have spent more time than I like to admit fighting with Python today who on good earth though white spaces should be syntax! OK, I came from a C/Assembly background curly braces win not spaces... It's odd plain odd! :wtf: I am going to start using Notepad++ as I at least have a chance of keeping tabs and or spaces in line. I don't like it it might be different if you are introduced from the word go, but I can see People being taught with it being very picky and it making you layout code better but...

                        S Offline
                        S Offline
                        Scott Serl
                        wrote on last edited by
                        #22

                        It's very important to set your editor for "convert tabs to spaces" or whatever the setting is for your editor so you don't accidentally mix the two.

                        1 Reply Last reply
                        0
                        • OriginalGriffO OriginalGriff

                          Sort of: it was intended for punch cards, so in the early days specific columns had specific meanings. This explains it well: fortran - Why does COBOL have to be indented? - Stack Overflow[^] FORTRAN had similar: Column 1 indicated a comment if it held a C or a *, columns 1-5 were labels, 6 allowed a line to continue from the previous one. But ... it removed all whitespace outside strings before compilation. And since it didn't require variable declaration (the type of a variable depended on the first letter in its name):

                          DO 100 i = 1, 10

                          Was VERY different from

                          DO 100 X = 1. 10

                          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                          L Offline
                          L Offline
                          Leng Vang
                          wrote on last edited by
                          #23

                          FORTRAN and COBOL, I can forgive. They were beginning to shape the programming world. Python on the other hand I can not forgive. This is the information age, it supposes to shake off those silliness. Admittedly no language is perfect. But when I look at some languages I had to scratch me head in disbelieve "What the heck?" Those times it always bring back memory of past Minnesota Governor Jesse Vantura's comments about St. Paul road system "They must've been designed by drunken Irish."

                          1 Reply Last reply
                          0
                          • G glennPattonWork3

                            Hi All Winge mode on. I have spent more time than I like to admit fighting with Python today who on good earth though white spaces should be syntax! OK, I came from a C/Assembly background curly braces win not spaces... It's odd plain odd! :wtf: I am going to start using Notepad++ as I at least have a chance of keeping tabs and or spaces in line. I don't like it it might be different if you are introduced from the word go, but I can see People being taught with it being very picky and it making you layout code better but...

                            M Offline
                            M Offline
                            megaadam
                            wrote on last edited by
                            #24

                            Yeah! Who cares about whitespace and labels in Assembly!

                            ... such stuff as dreams are made on

                            Kornfeld Eliyahu PeterK 1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              Likewise: but mine was even worse, because it used a preprocessor (it was the source for the preprocessor) to provide a "structured programming" approach to FORTRAN called ROOTS[^] - I worked for Rob for six months back in the day as part of my university industrial training. And I still use the flowcharting methods for software design ... :laugh:

                              Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                              R Offline
                              R Offline
                              Rick York
                              wrote on last edited by
                              #25

                              Darn - just when those memories had nearly vanished, I saw that stuff and it brought back a flood of nastiness. :wtf:

                              1 Reply Last reply
                              0
                              • G glennPattonWork3

                                Hi All Winge mode on. I have spent more time than I like to admit fighting with Python today who on good earth though white spaces should be syntax! OK, I came from a C/Assembly background curly braces win not spaces... It's odd plain odd! :wtf: I am going to start using Notepad++ as I at least have a chance of keeping tabs and or spaces in line. I don't like it it might be different if you are introduced from the word go, but I can see People being taught with it being very picky and it making you layout code better but...

                                P Offline
                                P Offline
                                peterkmx
                                wrote on last edited by
                                #26

                                Thanks for bringing this up ... my impression was exactly the same a few years ago when I tried to learn Python "for fun" (having C++/C# background). Luckily I did not need it for a project so I comfortably :) have given up ... Perhaps Python is meant for people without programming background ... :confused:

                                D 1 Reply Last reply
                                0
                                • M MarkTJohnson

                                  You don't remember COBOL? It had positional stuff too. Didn't it? That was one class a LONG time ago. Also remember WHY it's called Python. Some of their stuff was extremely silly.

                                  Kornfeld Eliyahu PeterK Offline
                                  Kornfeld Eliyahu PeterK Offline
                                  Kornfeld Eliyahu Peter
                                  wrote on last edited by
                                  #27

                                  COBOL is pure beauty... Coding challenge: is a point in a polygon?[^]

                                  "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                                  "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                                  1 Reply Last reply
                                  0
                                  • M megaadam

                                    Yeah! Who cares about whitespace and labels in Assembly!

                                    ... such stuff as dreams are made on

                                    Kornfeld Eliyahu PeterK Offline
                                    Kornfeld Eliyahu PeterK Offline
                                    Kornfeld Eliyahu Peter
                                    wrote on last edited by
                                    #28

                                    It is beutyful in any way you look at... Code challenge: greatest common denominator[^]

                                    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                                    "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                                    1 Reply Last reply
                                    0
                                    • G glennPattonWork3

                                      Hi All Winge mode on. I have spent more time than I like to admit fighting with Python today who on good earth though white spaces should be syntax! OK, I came from a C/Assembly background curly braces win not spaces... It's odd plain odd! :wtf: I am going to start using Notepad++ as I at least have a chance of keeping tabs and or spaces in line. I don't like it it might be different if you are introduced from the word go, but I can see People being taught with it being very picky and it making you layout code better but...

                                      D Offline
                                      D Offline
                                      DJ van Wyk
                                      wrote on last edited by
                                      #29

                                      glennPattonWork wrote:

                                      Winge mode on.

                                      You forgot to turn winge mode off again...

                                      My plan is to live forever ... so far so good

                                      G 1 Reply Last reply
                                      0
                                      • P peterkmx

                                        Thanks for bringing this up ... my impression was exactly the same a few years ago when I tried to learn Python "for fun" (having C++/C# background). Luckily I did not need it for a project so I comfortably :) have given up ... Perhaps Python is meant for people without programming background ... :confused:

                                        D Offline
                                        D Offline
                                        Davyd McColl
                                        wrote on last edited by
                                        #30

                                        No, Python is meant for people who want to get stuff done without having to debate brace layout and other trivialities. It's quicker to get simple stuff done than C/C++ (for one, you don't have to recompile). It can be extended with C/C++ if you think you have a performance need. If you think Python is for non-programmers, you may be disappointed to find that it's exactly for you.

                                        P 1 Reply Last reply
                                        0
                                        • G glennPattonWork3

                                          Hi All Winge mode on. I have spent more time than I like to admit fighting with Python today who on good earth though white spaces should be syntax! OK, I came from a C/Assembly background curly braces win not spaces... It's odd plain odd! :wtf: I am going to start using Notepad++ as I at least have a chance of keeping tabs and or spaces in line. I don't like it it might be different if you are introduced from the word go, but I can see People being taught with it being very picky and it making you layout code better but...

                                          D Offline
                                          D Offline
                                          Davyd McColl
                                          wrote on last edited by
                                          #31

                                          It takes a bit of getting used to. Then after a while, it's like your eyes are opened -- if whitespace is the block delimiter, there can no longer be wars about where to put those braces. There can no longer be wars about indentation levels. All code in a codebase becomes slightly more unified and people can focus on solving problems -- which Python does extremely well -- instead of trying to assert some rule they had hammered into them at some previous point in their life. As an exercise, try open up other people's Python. Go have a look at software written in Python which is installed on, say, many Linux boxes. Go learn the "Pythonic" way to do things (there are language features which make the structure easier to conform to and which help to unify the flow of process). Now, with your eyes opened, go back to C++, Javascript, C#, wherever. And recognise the burden that Python took from you. I'm not pulling this out of my ass. Python is only one of about 20 languages I've coded in, with varying degrees of proficiency and utility. But I still recommend Python as the ideal learner language because: - it reads well (easy to understand what you or someone else wrote) - the language enforces a reasonable style - it's easy to get simple things done - it doesn't run out of steam when you no longer wish to just get simple things done (it's powerful in itself and there are myriad free libraries out there which are easy to install and consume) - it runs just about everywhere - there are a mad number of good, free (and non-free) editors / IDEs for it (check out PyCharm Edu if you want a good editor and a tutor) - SNAKE!

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups