First impressions of the IPython Notebook
pgbovine.net
pgbovine.net
'''...after prototyping in the notebook, I usually refactor some of my code into individual Python files so that I can edit more comfortably using my preferred text editor. I then import those modules [back] in the...notebook.'''
I found this to be quite a headache myself, going between the iPython notebook and vim, until I discovered this great Firefox addon called "It's all text" [not affiliated] -- for those unaware, it lets you pop open a gui editor of your choice, whereupon you can send the text entered from that back down into the iPython notebook. Doing it this way you get the best of both worlds.
We also plan to have a simple text file editor so that you can work on a module in the same environment. We're not going to try to build an entire web-based IDE, though.
One small caveat: i use macvim, it opens a new window in macvim, i close/sync it with :wq. Any idea how I can have it so it jumps back to the firefox window instead another macvim window?
mvim -f --nomru -c "au VimLeave * !open -a Terminal"'
for refocusing the terminal after editing a commit message. Think it'll work fine if you change Terminal to Firefox.
The --nomru is to make sure the file isn't added to the recently edited files list, which is also helpful.set editor='mvim --nomru -f +<line> +"sil! call cursor(0, <column>)" <file> -c "au VimLeave * !open -a Firefox"'
Personally I like IPython qtconsole. It is basically a terminal with all the graphics turned on. Not as feature rich as the IPython notebook but it is faster and cleaner for what I use it for.
I also had a bad experience with Enthought EPD which resulted in a weirdly broken system python.
http://nbviewer.ipython.org/url/jdj.mit.edu/~stevenj/IJulia%...
(the IPython Notebook is utterly, utterly wonderful. It's the first digital lab notebook worth a damn for data scientists.)
I often need to do calculations involving many parameters, and there are three important considerations I usually have to deal with:
1. I'm probably going to want to tweak the parameters.
2. The calculation is going to be difficult to express as a succinct equation.
3. I may want to look back over the result later.
Using an ordinary calculator is cumbersome because of 1 and 2, and doesn't satisfy 3. AN alternative is to use an ordinary interactive shell to put everything together, which helps with 2, but still makes for a lot of work on 1 and doesn't fix 3.
Writing a whole program to do the calculation is an improvement because it fixes 1 and 2, and it helps with 3 because I can leave myself lots of comments. I've found literate CoffeeScript to be very effective here (you can even turn it into a nice webpage to share your math with others), but there are still some drawbacks. The results are not interleaved with the code, so when I look back over it, it's not easy to check my work and debug. The workflow also leaves a bit to be desired. You can't, for example, quickly play with a small snippet as you're working through your thoughts.
A notebook, on the other hand, elegantly handles all of these considerations. I can use markdown to create a nice article for my future self explaining all of my calculations, have comments, code, and results all next to each other, and tweak parameters on the fly.
Yet I still find myself using literate CoffeeScript instead. And the main reason for that is that whenever I use Python, I constantly wish that I was using CoffeeScript instead.
I've had several conversations with R folks who insist that RStudio + Knitr does everything the IPython notebook does, and I feel like I've had a hard time conveying why I like the notebook for data exploration, prototyping, and demoing.
E.g., the R notebook linked to below looks neat, but it's still just markdown compiled to a static document. That's a different workflow--not a better or worse one; but certainly different.
Personally, I find it more interesting to mix languages in a single notebook - we have a %%R cell magic which allows you to have R cells in amongst your Python code, passing data between the two. An R kernel would only run R code.