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.
  • S sandyson

    glennPattonWork wrote:

    I am going to start using Notepad++

    Visual Studio supports python since 2015

    In theory, theory agrees perfectly with practice. In practice, this is virtually never the case. "*the {VOiCE} says: The truth is analog - not digital." - jonathan HICKMAN

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

    Thanks ... I was just going to ask about this :). This makes things a lot easier. Perhaps I will give Python another try ...

    S 1 Reply Last reply
    0
    • P peterkmx

      I don't want to exaggerate, but we both probably agree that syntax is important, as it helps our brain to understand (quicker or slower :-) ) what we are doing ... So, Glenn is quite right in his remarks. But of course as you say there are qualities in Python, and I would also add that it is in top 5 in the TIOBE list "as we speak". Perhaps I will give Python another try ... :-), BR

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

      I highly recommend it (:

      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...

        W Offline
        W Offline
        Wearwolf
        wrote on last edited by
        #49

        Have you tried copying python code yet? They used tabs but you've got spaces and now there's red squiggles everywhere telling you really weird things about incomplete methods. It looks like it all lines up and you're not sure who had the tabs and who had the spaces so you're not sure what to change what to.

        1 Reply Last reply
        0
        • C CodeWraith

          Already in 1978 I allowed myself the luxury of a hex keypad and 7 segment LED displays instead of toggle switches and eight simple LEDs.

          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.

          S Offline
          S Offline
          sasadler
          wrote on last edited by
          #50

          Heh, I guess I was styling back then. I'd purchased a 16 line by 64 character display card for my S100 bus system (only card I hadn't put together myself). Connected it to an old TV. I actually can't remember how the keyboard connected to the system but the only I/O I had at the time was an RS232 interface board I'd wire wrapped so I guess that how it had to be. Even though I had a preemo display and keyboard I was still programming by the numbers.

          C J 2 Replies Last reply
          0
          • M Martijn Smitshoek

            I am not going to discuss the details because this is the Lounge. I don't like IDLE because it changes the behavior of the language; and with a few tweaks, Notepad++ does everything I want.

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

            Martijn Smitshoek wrote:

            I don't like IDLE because it changes the behavior of the language

            How exactly does it do that?

            M 1 Reply Last reply
            0
            • S sasadler

              Heh, I guess I was styling back then. I'd purchased a 16 line by 64 character display card for my S100 bus system (only card I hadn't put together myself). Connected it to an old TV. I actually can't remember how the keyboard connected to the system but the only I/O I had at the time was an RS232 interface board I'd wire wrapped so I guess that how it had to be. Even though I had a preemo display and keyboard I was still programming by the numbers.

              C Offline
              C Offline
              CodeWraith
              wrote on last edited by
              #52

              Very typical combination at that time. A character based graphics board + TV/Monitor + keyboard = serial terminal. I had one of those as well, but only the keyboard and the monitor have survived and still work.

              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.

              1 Reply Last reply
              0
              • S sasadler

                Heh, I guess I was styling back then. I'd purchased a 16 line by 64 character display card for my S100 bus system (only card I hadn't put together myself). Connected it to an old TV. I actually can't remember how the keyboard connected to the system but the only I/O I had at the time was an RS232 interface board I'd wire wrapped so I guess that how it had to be. Even though I had a preemo display and keyboard I was still programming by the numbers.

                J Offline
                J Offline
                jrdickerson
                wrote on last edited by
                #53

                Wirewrap! We didn't have no stinkin wirewrap! We had a solder gun, 18 ga wire and we liked it.

                S 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.

                  D Offline
                  D Offline
                  Daniel R Przybylski
                  wrote on last edited by
                  #54

                  Isn't RPG like that too?

                  1 Reply Last reply
                  0
                  • J jrdickerson

                    Wirewrap! We didn't have no stinkin wirewrap! We had a solder gun, 18 ga wire and we liked it.

                    S Offline
                    S Offline
                    sasadler
                    wrote on last edited by
                    #55

                    Heh, at least it was a manual wire wrap tool, no electricity involved!

                    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!

                      M Offline
                      M Offline
                      MKJCP
                      wrote on last edited by
                      #56

                      "Modern" Fortran is a bit better with so-called free-format coding. Intel Fortran even offers Visual Fortran that integrates into Visual Studio. Maybe other compiler makers do something similar. It's not as painful as it once was. Thankfully.

                      1 Reply Last reply
                      0
                      • OriginalGriffO OriginalGriff

                        Wimp! Real programmers coded with the front panel switches! :laugh: And uber-programmers coded with a compass and a small bar magnet...

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

                        S Offline
                        S Offline
                        StChasFrank
                        wrote on last edited by
                        #57

                        Take a look at a PDP-11/34 or a Heathkit / Zenith H-8 front panel. The H-8 documentation included an 8-1/2 x 11 Programmer's Reference Card with the octal version of the 8080 instruction set, as I recall, which got used to hand-assemble a few simple programs!

                        1 Reply Last reply
                        0
                        • P peterkmx

                          Thanks ... I was just going to ask about this :). This makes things a lot easier. Perhaps I will give Python another try ...

                          S Offline
                          S Offline
                          sandyson
                          wrote on last edited by
                          #58

                          Like some of the other respondents, I was introduced to programming with BASIC and FORTRAN in the '70s. Turbo Pascal was fun to use and was my introduction to functional languages. Still, for most of my career Excel was adequate for data manipulation, analysis and presentation. A few years ago, I began generating 1000 point molecular dynamics data series and Excel fell short of my needs. Some Google research led me to matplotlib and python. I know that views differ, but I am a fan. There are many great libraries, especially for scientific applications. Anaconda bundles an ample collection (including native IDEs) and is trivial to install, even without admin rights on Windows. I find the VS support for python to be pretty decent. It will auto-indent spaces or tabs cleanly use spaces < /whisper> and highlight any inconsistencies. You can choose from several python and Anaconda environments to get satisfactory Intellisense. My only real complaint is the inconsistent performance of the Navigation bar in VS 2017 Community. Frequently, the drop-down will not be populated with the objects in a module, which is annoying. Since VS 15.6, it has been better, but the second-level drop-down (e.g. for functions in a class) is still always empty for me. There is a bit of frustrated discussion about this online and MS repeatedly claims it fixed, but... Python is not the the right hammer for every nail. Nonetheless, it is a great ancillary tool to have. I hope that it gives you a good second experience. George

                          In theory, theory agrees perfectly with practice. In practice, this is virtually never the case. "*the {VOiCE} says: The truth is analog - not digital." - jonathan HICKMAN

                          1 Reply Last reply
                          0
                          • L Lost User

                            Martijn Smitshoek wrote:

                            I don't like IDLE because it changes the behavior of the language

                            How exactly does it do that?

                            M Offline
                            M Offline
                            Martijn Smitshoek
                            wrote on last edited by
                            #59

                            try in IDLE:

                            import getpass
                            getpass.getpass()

                            then type something. Not very useful.

                            L 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...

                              J Offline
                              J Offline
                              JSilvers
                              wrote on last edited by
                              #60

                              What about SNOBOL which used the space as an operator whose meaning changed depending on where it appeared in the line of code? It was invented when code was keypunched so entabbed source code was physically impossible.

                              Joan F Silverston jsilverston@cox.net nhswinc.com

                              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
                                pmauriks
                                wrote on last edited by
                                #61

                                Definitely use a python aware editor. Try Sublime editor (my personal favorite) or gvim. Sublime not only has tab space substitution - but it also has block indent and block comment which will save your mind programming python as well. And don't fret - after a while the indenting and spaces come natural, you may even start to like it.

                                1 Reply Last reply
                                0
                                • M Martijn Smitshoek

                                  try in IDLE:

                                  import getpass
                                  getpass.getpass()

                                  then type something. Not very useful.

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

                                  Quote:

                                  Warning (from warnings module): File "C:\Program Files (x86)\Python_36\lib\getpass.py", line 100 return fallback_getpass(prompt, stream) GetPassWarning: Can not control echo on the terminal. Warning: Password input may be echoed. Password:

                                  Looks reasonable to me.

                                  1 Reply Last reply
                                  0
                                  • G Greg Topham

                                    You have a twisted sense of humor.

                                    B Offline
                                    B Offline
                                    BryanFazekas
                                    wrote on last edited by
                                    #63

                                    Greg Topham wrote:

                                    You have a twisted sense of humor.

                                    At the time I was totally surprised. Maybe shocked. In later thinking about it -- the guy was an upper classman, based upon personal appearance and the size of the deck (higher level class, longer programs). Everyone was warned to take the aforementioned care of the decks, and the displays for rubber bands and felt-tipped wide markers were right next to the punch cards in the campus store. Freshman knew enough to take care ... upper classmen should know even better. It was a good warning for others.[^]

                                    1 Reply Last reply
                                    0
                                    • B Bob1000

                                      Way too many languages designed by way too many Bjarne Stroustrup wannabe's (but without the skill) We need a massive cull of languages and there should be no space for ones like Python..... Computer languages are becoming like normal language, way too many and defended on the most irrational grounds and too the death. Like welsh - its only real use is to confuse tourists and make very long road signs

                                      A Offline
                                      A Offline
                                      Andre Pereira
                                      wrote on last edited by
                                      #64

                                      What are you talking about? We need more PHPs and Javascripts. We need more Pythons, but only if they come in several incompatible versions. What's all this talk about noise, productivity, reinventing the wheel again and again, or not fighting your language or IDE? "Just shut up and learn the language" (quote in this very topic). BTW, /s of course. Long live C++ and C#.

                                      B 1 Reply Last reply
                                      0
                                      • A Andre Pereira

                                        What are you talking about? We need more PHPs and Javascripts. We need more Pythons, but only if they come in several incompatible versions. What's all this talk about noise, productivity, reinventing the wheel again and again, or not fighting your language or IDE? "Just shut up and learn the language" (quote in this very topic). BTW, /s of course. Long live C++ and C#.

                                        B Offline
                                        B Offline
                                        Bob1000
                                        wrote on last edited by
                                        #65

                                        :) Although I do feel sorry for those poor soles who use languages where you can't have the fun of locating a random memory leak, no wonder modern software engineers take up extreme sports like rubber free bungee jumping.

                                        A 1 Reply Last reply
                                        0
                                        • B Bob1000

                                          :) Although I do feel sorry for those poor soles who use languages where you can't have the fun of locating a random memory leak, no wonder modern software engineers take up extreme sports like rubber free bungee jumping.

                                          A Offline
                                          A Offline
                                          Andre Pereira
                                          wrote on last edited by
                                          #66

                                          Not on embedded devices! But for desktop stuff with C++, yeah, you have maintain discipline with your allocations and destructors.

                                          Quote:

                                          modern software engineers

                                          Those don't exist anymore. Everything is web or middle-ware, nowadays. Didn't you get the memo? Desktop software is dead, Google says so! (never-mind the fact they have a competing OS which only runs shitty web apps, or the vested interest in keeping everything on the web so they can snoop and sell data). You'll take my native software development out of my cold dying hands, even if I have to code everything myself. Thank god for UWP ease of development, I can whip out a working app in half an hour.

                                          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