Learning Python: IDE or Not for Scientific Computing?

In summary, In summary, the main reason the author discourages the use of an IDE is to prevent you from becoming dependent on it. However, if you're comfortable working without one, that's okay.
  • #1
MexChemE
237
55
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!
 
Technology news on Phys.org
  • #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.
 
  • Like
Likes madsmh
  • #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.
 
  • #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.
 
  • #5
IDE's are indispensable 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.
 
  • #6
Jaeusm said:
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.
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.
jedishrfu said:
IDE's are indispensable 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.
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.
jedishrfu said:
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.
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.
 
  • #7
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).
 
  • #8
learn vim... vim is everywhere you want to be...
 
  • Like
Likes MexChemE and cpscdave
  • #9
jedishrfu said:
learn vim... vim is everywhere you want to be...

QFTI 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.
 
  • #10
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.
 
  • #11
I'll listen to you guys' good advice and learn how to use Vim. I now see its usefulness after some browsing.
fluidistic said:
I think "Dive into Python" was one of them but there were several others.
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.
 
  • #12
fluidistic said:
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.

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:
  • Like
Likes MexChemE
  • #13
MarneMath said:
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.
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.
 
  • #14
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.
 

What is Python?

Python is a high-level, interpreted programming language that is widely used in scientific computing. It is known for its simple syntax, versatility, and large collection of libraries and packages.

Do I need an IDE to use Python for scientific computing?

No, an Integrated Development Environment (IDE) is not necessary to use Python for scientific computing. Python can be run from a command line interface or through a text editor. However, an IDE can provide helpful features such as code completion and debugging tools.

What are the benefits of using an IDE for scientific computing in Python?

An IDE can provide a more efficient and user-friendly environment for coding in Python. It can also offer useful features such as auto-completion, debugging tools, and integration with version control systems. Additionally, some IDEs have built-in support for scientific computing libraries and packages.

Which IDE is best for scientific computing in Python?

There is no one "best" IDE for scientific computing in Python, as it ultimately depends on personal preference and the specific needs of the user. Some popular options include PyCharm, Visual Studio Code, and Spyder.

Are there any alternatives to using an IDE for scientific computing in Python?

Yes, there are alternative tools for scientific computing in Python, such as Jupyter Notebook and Google Colab. These tools offer a more interactive and visual approach to coding and data analysis, making them popular among researchers and data scientists.

Similar threads

  • Programming and Computer Science
2
Replies
56
Views
8K
  • Programming and Computer Science
Replies
7
Views
500
  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
5
Views
858
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
1
Views
733
Back
Top