Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Python To IDE or not to IDE

  1. Jul 25, 2016 #1
    Hello, PF! I've recently begun learning Python the hard way (you know, the online lessons by Zed Shaw), and so far I'm doing great. He does talk down to you at some times, but I don't mind that at all, and he encourages memorizing absurd things, but I like his minimalistic approach at programming. I did some programming in Java in high school but I don't remember any of it, just the basic logic of coding. And my freshman year programming course in university was a joke, so this is my first serious attempt at programming.

    My goal in learning Python is to automate day-to-day (and not so day-to-day, too) stuff, and to do numerical computing as a substitute for MATLAB. I'm currently learning to code with a very simple setup (Python 2, Notepad++ and PowerShell), my lessons discourage the use of an IDE, and I'm okay with that.

    I know there are IDEs like Spyder, which are dedicated to use Python for scientific computing, but I'd prefer not having to use an IDE. My question is, assuming my skill level is not an issue, will my use of Python for scientific computing be limited if I decide not to use any IDE at all?

    Thanks in advance for any input!
     
  2. jcsd
  3. Jul 25, 2016 #2
    I honestly don't understand the point of not using an IDE. If there's something out there that makes your job of programming something easier, and you can use it, why not use it? That's like trying to do a physics problem with a pen. Is it possible? Absolutely. But it is less convenient than a pencil.
     
  4. Jul 25, 2016 #3
    Well, two reasons so far. The course I'm taking encourages the use of Notepad++ only, and I haven't had any inconvenience with it. Besides, the console already tells me if and where my code has errors. Secondly, I prefer to keep it simple, stupid.

    I just haven't found any motivation to use an IDE, and if not using one won't affect me at all, I rather keep it that way. I also like installing libraries manually as needed, that way it is easier to know the tools I can count on at the moment.
     
  5. Jul 25, 2016 #4
    The primary reason your tutorials discourage the use of an IDE is to prevent you from becoming dependent on it. For academic work, that's fine. In fact, I did the same thing when I was in school. I liked fully understanding the things that IDEs automate and manage. However, after more than a decade of working as a software engineer on very large projects, the IDE is indispensable.
     
  6. Jul 25, 2016 #5

    jedishrfu

    Staff: Mentor

    IDE's are indispensible especially when working in the Java environment. The biggest feature among many great features is the auto-completion that shows you what methods are available by simply typing a . following the variable name. Other key features are the code refactoring functions, step debugger with watchpoints, fixing code imports and I'm sure I've missed some that I use regularly.

    In any event, you should also get familiar with VIM and/or Atom for more general purpose editing or for when you don't have an IDE available.

    For python, the Anaconda distribution provides a packaged set of numerical python modules and the browser-based Notebook IDE which a lot of folks use for simulation work.
     
  7. Jul 25, 2016 #6
    Yes, this seems like the most viable option. Keep working as I have been for my learning lessons and school related applications, and then switch to an IDE for heavier stuff, if I ever even need to. I'm not planning to do programming for a living, but you never know.
    My editor can handle highlighting and auto-completion. I'm not sure about debugging, though. However, I guess manual debugging is good practice for a beginner. But I won't be stubborn, I will switch to an IDE once I get the need to.
    Thanks for the recommendation! Apparently, it does contain all the useful libraries such as NumPy, SciPy and matplotlib, so I will keep that in mind when considering switching to an IDE.
     
  8. Jul 26, 2016 #7

    MarneMath

    User Avatar
    Education Advisor

    I don't see a very heavy IDE for python. I actually just use VIM or E-MACs. I occasionally use Sublime when I need to write in a more OOP fashion. However, if you plan to use python mainly for scripting, data analysis, or building models, I highly suggest using ipyhton notebook (which comes with the previously mentioned Anaconda package.) Lastly, if you ever find yourself developing code on a server with no rights to install anything, you may find that all you really have is vim. Learn to love vim :).

    Also, with regards to Learning Python the Hard Way. I wouldn't call anything he ask you to memorize to be absurd. I used to ask questions from there to potential interns. For example, memorizing that join is a stupidly written function is important. (It isn't join(" ", stuff), it's ' '.join(stuff).
     
  9. Jul 26, 2016 #8

    jedishrfu

    Staff: Mentor

    learn vim... vim is everywhere you want to be...
     
  10. Jul 26, 2016 #9
    QFT


    I can see the benefit of not using and IDE to start out. When I learned to program the closest we got to an IDE was emacs and syntax highlighting.
    Yes its great that IDE's will point out obvious errors. But its a good skill to learn to read what the compiler/interpreter outputs as an error and then find it in your code.
     
  11. Jul 26, 2016 #10

    fluidistic

    User Avatar
    Gold Member

    As a sidenote I remember having read a thread on reddit about "Learn Python the hard way" and how it is a bad book. The critics pointed out about 15 reasons why not to use the book (I can't find the thread now) and so it's been removed from the suggested books to learn Python over reddit. Apparently the book not only criticizes Python 3 without strong arguments but also teaches bad coding habits which is terrible.
    The reddit thread then gave a lot of alternatives to that book. I think "Dive into Python" was one of them but there were several others. Too bad I'm unable to find the thread.
     
  12. Jul 26, 2016 #11
    I'll listen to you guys' good advice and learn how to use Vim. I now see its usefulness after some browsing.
    I just took a look at it since it is available for free, and I didn't like it. It's not bad, it's just too advanced for me.
     
  13. Jul 26, 2016 #12

    MarneMath

    User Avatar
    Education Advisor

    I've read many threads like that. While given that the authors reluctance towards Python 3 is odd, most of the criticism seems focused on the fact that "this isn't how you would really do it." Sure I wouldn't use an IO reader to process a file. And sure his take on Truth Tables is lame, but that doesn't really make the book terrible. The real gem in the book is that by being so vague and half hearted is that it makes you look up nearly everything in the documentation. That's probably the reason why I enjoyed it. (Although when I worked through it, I already knew Python and the whole thing took me like 4 hours.) I would argue that learning to read python's documentation page is infinitely more useful in learning python than most books out there. Because, after all, any style of writing you do for a class is probably not going to be similar to how one does it in a real world, but that's not the point of a class. The point of the a class/intro book is to teach you from a first principle so you could expand your scope.
     
    Last edited: Jul 26, 2016
  14. Jul 26, 2016 #13

    fluidistic

    User Avatar
    Gold Member

    I still can't find the thread I had read. Now I wonder whether it was on reddit or some stack exchange website. The closer critics I could find is https://www.reddit.com/r/learnprogr...our_thoughts_on_learn_python_the_hard/cwyz9tk.
    But the one I had read pinpointed about 15 terrible things of the books, claiming not to bother with python 3 just being number 1 if I remember well. So it's far from being the only critics.
     
  15. Jul 26, 2016 #14

    MarneMath

    User Avatar
    Education Advisor

    His reason for using Python 2 over Python 3 isn't exactly unreasonable. He is right that odds are you will probably not find a python programmer whose production code is entirely in Python 3. Heck, I'll be surprised if the majority of their python code would be in python 3. There's also something things that are just easier in python 2 (i.e. getting a dictionary value by index, it's annoying in python 3).

    I've read the link you shared and it stems around the simple fact of "that's not how you'll do it in real life" or the author is not rigorous enough. He's right, the book is not a rigorous way to become a professional python programmer. You're not going to write extremely complicated code after you read Zed's book. But what will you be able to do? Write functional python code that accomplishes what you want and for most people that's enough.

    IF you want a programming book to teach you solid computer science and programming at the same time, there are better choices, no doubt. However, for someone trying to learn how to read a csv and generate counts from said file, Zed's book is condense and easy way to get into the groove of writing python code.

    Anyway, I mention all this because it's rather extreme to say a book is terrible simply because it doesn't suite your needs. Everyone has different goals, so a different level of context is generally acceptable.

    Edit: I forgot to add I am a fan of the book shared (Computer scientist one). It's pretty nifty, and it'll teach you a lot. However, I've also been in situation where at times, I don't particularly care for best practice and just need my code to work right now so don't make me read 1000 pages about interfaces just to learn that I can't do xyz I have to abc instead.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: To IDE or not to IDE
  1. IDE's for MPI on a mac (Replies: 3)

  2. FILE I/O in an IDE (Replies: 1)

  3. Decent IDE for C (Replies: 8)

Loading...