Hacker News new | ask | show | jobs
by __blockcipher__ 2671 days ago
Am I the only one who kind of hates the "notebook" format?

Don't get me wrong, the general concept is great. Shareable, interactive code snippets are awesome. But for a demo article like this I want a single python file that I can run and immediately see the results. I don't want to have to spin up a jupyter or pylab instance (I've never used pylab so not sure if it works the same EDIT: pylab is analogous to matplotlib, not jupyter. lesson learned). I just want to run the damn code.

On a bit of a tangent here but I also hate the way Jupyter makes git diffs absolutely unusable.

Now, the above being said, the fact that sites like Github have native Jupyter functionality is awesome. It'd be a lot less painful if they'd (the author) have linked to a repo that we (I) could run.

--

For example, first I copied the initial code snippet that defines the xkcdify function. Then I ran it with python3, and realized it needed python 2 due to the urllib2 dependency (this is not a big deal since the article is from 2012). Then I ran it again with python2, and realized I don't have numpy/scipy etc installed for python2, so I pip installed those. Then I copied in the following code snippet that generates the plot. I then ran it again, and it still didn't work. Finally after a brief google search, I realized I needed to put pylab.show() at the end since I didn't have the %pylab inline or whatever that command is since I'm running it with "pure python".

Honestly, it really wasn't _that_ much effort, but I vastly would prefer to have a demo like this given as a single python file, with the dependencies clearly specified in the blog post.

1 comments

You're not the only one. Here are slides from a talk that Joel Grus gave at JupyterCon 2018 titled "I hate Jupyter Notebooks":

https://docs.google.com/presentation/d/1n2RlMdmv1p25Xy5thJUh...

Video of talk: https://www.youtube.com/watch?v=7jiPeIFXb6U

Wow, thanks so much. Great talk. I felt like I was going crazy trying to get these stupid notebooks to work with their weird out-of-order execution glitches