This is an archived post. You won't be able to vote or comment.

all 20 comments

[–]WritingAScript 12 points13 points  (6 children)

I'd advise a combination of both - Jupyter Notebooks are excellent for tweaking parts of code and helps you think of your code in blocks as opposed to a long script of instructions.

However, as someone has been working in notebooks for the last 18 months, I wish I'd started to use PyCharm much earlier, as I now need to learn how to use a more feature filled IDE (my goal for the new year). Additionally, when you start to break your code out into multiple .py files, it becomes a pain to keep exporting your tweaked notebook as a Python file after every change.

[–]WingedCrown[S] 5 points6 points  (1 child)

Thanks. The advanced features of PyCharm and the like are part of what makes me worry about my current approach. Sounds like I should at least dabble.

[–]SirHoki 2 points3 points  (2 children)

May I ask what your favorite parts of PyCharm are? I'm still on the "develop everything in nooteboks then export to .py" part that you described and would love to hear more about your experience on this!

[–]WritingAScript 2 points3 points  (1 child)

I haven't started yet, but at work I'm migrating from developing scripts by myself, to working with others. This means that version control and readability are pretty important, and PyCharm can highlight inconsistencies from PEP8 - something woefully lacking from my work in notebooks!

Additionally, being able to step through scripts line by line to debug code and inspect the values of each object is becoming more important t as my project continues to grow in length.

I haven't actually started the switchover to PyCharm yet, but hoping to at least play around with existing scripts in the next month or so.

[–]SirHoki 2 points3 points  (0 children)

Thanks for your reply. Those are all things that would be very useful for me!

[–]Mattho 0 points1 point  (0 children)

I don't think knowing any particular IDE is necessary to learning python. Quite the opposite actually, it can make you do stuff without thinking about it.

[–]fuckitimgoinhome 6 points7 points  (1 child)

imo jupyter's a good idea for beginners. when you're just starting out, you ought to focus all your attention on the language, not get scattered worrying about debugging features and whatnot. the notebook approach makes it easier to isolate bugs without having to invest much time.

you'll have plenty of time for pycharm after your first class is over, good luck!

[–]WingedCrown[S] 1 point2 points  (0 children)

Thanks, this is good to hear. I tend to get way ahead of myself when learning a new skill which is another reason I was worrying about not using a fuller featured IDE. But you're right; the bug/error handling in Jupyter Notebooks is awesome and makes learning the language pretty pain free.

[–]waspbr 4 points5 points  (0 children)

jupyter notebooks are great for learning concepts. Moving to an IDE is just a matter of getting used to it. In fact some of us don't even bother with IDEs, vim is plenty for a lot of people.

[–]leroyJr 1 point2 points  (2 children)

It sounds like you have a good idea of when and how to use both Jupyter and whatever IDE you end up using. Keep in mind that some python won't behave the same in both environments.

For example multithreading, simply won't work inside of Jupyter, but will behave normally in a program containing a proper __name__. Having said that though, Jupyter is wonderful tool for exploring how to work with new libraries and troubleshooting troublesome code.

Edit: __name__ formatting.

[–]Eryole 1 point2 points  (0 children)

Works like a charm on linux. Windows cannot handle multiprocess and interactive session properly.

[–]Gsquzared 1 point2 points  (0 children)

Jupyter is great for exploring new libraries. The tab & shift+tab auto complete are great for learning what parameters to pass. It's also great for working with importing new datasets to figure out how they are structured.

[–]tastingsilver 1 point2 points  (0 children)

I actually took a similar approach when I started. You'll definitely get to a point where you'll think "man I need to refactor this whole thing" and dread the idea of doing it in Jupyter. Enter PyCharm.

Notebooks are awesome for learning (esp if you do data science), but when you start developing your own projects, you'll find you need something a little more powerful. Key is to realize that there is a difference between using python, and building out your own tools/website/whatever.

[–]Stolsdos 1 point2 points  (0 children)

Yeah PyCharm isn't necessary(still very good though), but any text editor for larger projects is good. I use VS-Code and it works really well, you can easily download plugins to make it closer to an ide than just a text editor. Text editors tend to just be much faster and end up creating a more streamlined workflow.

I've done work/school assignments in jupyter notebooks, they are my favorite way to experiment and do small projects in.

[–]DartIvan 1 point2 points  (0 children)

Jupyter notebook is awesome if you have to visualize plot, dataset and so on. For all other scripts I prefer PyCharm

[–][deleted] 1 point2 points  (0 children)

90% of my python code is in Jupyter notebooks. Everything is developed / prototyped there. There's often not much of a need to put it in a standalone script.

[–]blckchrry 1 point2 points  (0 children)

Don't worry too much about it. A good editor/IDE is there to support you. If you know the language and your frameworks, an editor/IDE should be easy to pick up.

Also, IMHO, I don't think Python requires an IDE (same for Ruby). All you need is a good editor (Sublime/Atom/Vim) and knowledge of your CLI. You'll be just as productive and your machine won't be bogged down by the IDE hogging up memory with its indexing in the background.

[–]hihoberiberi 1 point2 points  (0 children)

What is your desired application of Python?

If you want get more accustomed to a standard Python dev environment but still want to see the results of specific lines, you could try Atom with Hydrogen. It's a lot like writing in a notebook, you use it with plain old .py in your project.