I think some of these issues are double-edged swords: - Hidden states are bad and lead to bugs, but being able to access and explore the execution state is really helpful for debugging and to avoid re-executions. Of course you can use post-mortem debuggers to access the final state of script, but it is not the default execution flow. You can cache partial results to avoid re-executions, but it involves an extra effort that may not be worth it, since some objects are hard to serialize in Python. - Notebooks have less powerful tooltips in code that can be statically inferred by IDEs, but it has a much more powerful approach for tooltips when you use dynamic features of Python, such as meta classes, or __dir__ + __getattr__ attributes. The same thing is also valid accessing the documentation of dynamic methods and attributes.
My experience of using notebooks for teaching is a bit limited to coding dojo sessions. It works great, since it let us use a cell for the code and a cell for the tests, and just alternate between these two. It seems to be easier for new people to follow this way than having a separate script for tests and a separate script for the code. It also seems to be clearer than having a single script with both the tests and the code, due to the cell division. In less practical (and non-shared) environments, I agree that a notebook may not be the ideal tool for teaching. It is not uncommon to start explaining something, deviate from the original planning, and start writing code that is not in sync with the notebook other people have access to. I also agree that it encourages bad habits (bad naming, lack of modularity) and that it has some limitations on copying and pasting between different media. João Felipe Em sáb, 25 de ago de 2018 às 02:21, adam steer via discuss < [email protected]> escreveu: > Hi all > > Interesting views in there! > > …as not a python guru (think dangerous scientific programmer, not software > engineer), I really like notebooks and use them all the time. It’s easy to > see how things run and kinda friendly. > > I do have some process around graduating real code - ie notebooks are for > assembling a system with quick feedback - and iterating toward code > niceness (modules and things) before graduating to Vcode and version > control. > > My python life started in sypder, but I’ve all but abandoned it in favour > of notebooks (build/prototype) + VScode (deploy). I think prettiness and > some form of sequential order to ‘build’ a process up trumps proper > codeworthiness in terms of getting people started. They’re also super > useful for showing how things work to non-technical folks. > > It’s OK to not like notebooks; and it’s OK to use them where they fit > really well. Perhaps teaching software engineering isn’t that place. > > ?? > Cheers > > Adam > > > > > > On Sat, 25 Aug 2018 at 07:43, Luis Pedro Coelho <[email protected]> > wrote: > >> I like the idea of notebooks more than I like actual notebooks. I tried >> to use them in my analyses for a long time, but eventually gave up as there >> are too many small annoyances (some that the talk goes over, others that it >> does not, such as the fact that they do not integrate well with git). >> >> For teaching, I still think they work well, especially in a short setting >> like a carpentries course (as opposed to a semester-long course). However, >> it requires a lot of time to make a good tutorial in Jupyter, more than >> what I used before, which was a mix of slides and interactive typing on >> ipython. >> >> My feeling (and I may be wrong) is that Jupyter notebooks are seen as a >> best-practice and people are very happy when I tell them my tutorial will >> be a jupyter notebook (which just incentives me to keep using jupyter >> notebooks in tutorials). I may be interpreting the feeling wrong or that >> people are wrong for congratulating me on using jupyter. >> >> Just my 2 cents, >> Luis >> >> >> On Fri, 24 Aug 2018, at 10:47 PM, Konrad Förstner wrote: >> > Dear all, >> > >> > these are the slide of Joel Grus' Jupyter Con talk "I Don't Like >> > Notebooks": >> > >> > >> https://docs.google.com/presentation/d/1n2RlMdmv1p25Xy5thJUhkKGvjtV-dkAIsUXP-AL4ffI/edit#slide=id.g362da58057_0_1 >> > >> > Beside the fact that this talk is it really funny, it raises a lot of >> > issues that I can confirm from my experience: >> > >> > - hidden states >> > - encouraging bad habits and discouraging good habits >> > - less powerful help tooltip than in a proper IDEs >> > - copy and paste between different media is hard >> > >> > I personally really like Jupyter Notebooks for teaching (while it >> > never made into my data analysis tool box) but this talked motivated >> > me to rethink its usage and maybe I will try to jump earlier than >> > before into a proper IDE when I am teaching Python. Anaconda comes >> > with Spyder so there is a good alternative already at hand. >> > >> > I would be interested in hearing your thoughts regarding this. >> > >> > Best wishes >> > >> > Konrad >> > >> > >> > ------------------------------------------ >> > The Carpentries: discuss >> > Permalink: >> > >> https://carpentries.topicbox.com/groups/discuss/T1505f74d7f6e32f8-M84f62eac740739ea0a0f32af >> > Delivery options: >> > https://carpentries.topicbox.com/groups/discuss/subscription >> >> ------------------------------------------ >> The Carpentries: discuss >> Permalink: >> https://carpentries.topicbox.com/groups/discuss/T1505f74d7f6e32f8-M32178a81ac946fc18adba348 >> Delivery options: >> https://carpentries.topicbox.com/groups/discuss/subscription >> > > > -- > Adam Steer > https://www.researchgate.net/profile/Adam_Steer > http://au.linkedin.com/in/adamsteer > http://orcid.org/0000-0003-0046-7236 > +61 427 091 712 > skype: adam.d.steer > tweet: @adamdsteer > *The Carpentries <https://carpentries.topicbox.com/latest>* / discuss / > see discussions <https://carpentries.topicbox.com/groups/discuss> + > participants <https://carpentries.topicbox.com/groups/discuss/members> + > delivery > options <https://carpentries.topicbox.com/groups/discuss/subscription> > Permalink > <https://carpentries.topicbox.com/groups/discuss/T1505f74d7f6e32f8-Mb52b9e57368eec5ccfcaf7a1> > ------------------------------------------ The Carpentries: discuss Permalink: https://carpentries.topicbox.com/groups/discuss/T1505f74d7f6e32f8-Mec72cecf5181fdd27bc995a4 Delivery options: https://carpentries.topicbox.com/groups/discuss/subscription
