Live data from Hacker News

Notebooks Are McDonalds of Code

yobibyte.github.io

101–110 of 153 posts

Re: Notebooks Are McDonalds of Code

#103

It's absolutely hilarious that the author opens with an image of Socrates. Socrates, as you recall, famously argued that writing was a detriment to thinking. The parallel that notebooks are a sign of lazy thought does not go unnoticed.

That's his profile pic on all platforms, afaik

Re: Notebooks Are McDonalds of Code

#104
post #18

Earlier quoted context omitted.

You can't embed graphs in a script, and plotting is an important part of systematic research. Also, it is easier to have an obvious sequential set of experiments over months in a notebook rather than a bunch of scripts. It's the same reason scientists use lab notebooks to keep track of things rather than just a bunch of loose papers.

Yes, I have a lab notebook and I work in a lab. However I use folder structures to organize my scripts and as for graph outputs I save them as files. In my line of work I generate hundreds of graphs for data analysis verification and a notebook isn't set up to handle things like that as far as I can tell

There’s also a hybrid version that I like: Write proper scripts (which are easier to e.g. push to HPC servers or deploy later), and explore them using something like Quarto (neé RMarkdown, renamed now that it supports Python).

Then you still get a digital lab notebook that ties together scripts, plots, and documentation, but the scripts remain usable standalone.

Re: Notebooks Are McDonalds of Code

#105
post #70
post #5

Earlier quoted context omitted.

I can change parameters in a script. What's the advantage?

you would have to re-run script from the beginning - this is not productive in scientific experiments, where you need to re-run certain parts of your code and tune/change parameters, try different things. if your calculation is long running you would not be as productive as could be in notebooks

An alternative here is to make a script with `# %%` code cells, so you can send one cell at a time to a REPL while developing the script.

Re: Notebooks Are McDonalds of Code

#106

The article and comments debating best practices in notebooks remind me of the time I hosted a website from a jupyter notebook. Technically, I was using gradio to create a localhost webpage and then piping it through cloudflare. The website would only work when the notebook was running on the cmd line of EC2. Hey if it works, it works! Notebooks allowed me to do a 2 week project in 2 hours. Like most things, notebook…

> Notebooks allowed me to do a 2 week project in 2 hours.

So... your alternative framework was too enterprisey for your purposes?

Re: Notebooks Are McDonalds of Code

#107
post #13

The article should start with more context, what is a notebook ? I know what it is, but the author is particularly bad at introducing his article.

Especially given that 'notebook' is also a synonym of 'laptop' and I was like, wtf, I don't have a mainframe to be less lazy.

I dont want to nitpick here but a 'notebook' is a small book with blank or ruled pages for writing notes in.

All the greats carried one and I too carry one.

Re: Notebooks Are McDonalds of Code

#108
post #105
post #70

Earlier quoted context omitted.

you would have to re-run script from the beginning - this is not productive in scientific experiments, where you need to re-run certain parts of your code and tune/change parameters, try different things. if your calculation is long running you would not be as productive as could be in notebooks

An alternative here is to make a script with `# %%` code cells, so you can send one cell at a time to a REPL while developing the script.

I think you've just reinvented the notebook.

Re: Notebooks Are McDonalds of Code

#109
Hum... I do not use Jupyter and co BUT I have my configs and various personal stuff in org-mode/org-bable witch is a kind of notebook and my desktop boot to Emacs, who not retain state but it's still a live environment and it's flexibility and user-programmability with ease are it's strongest points.

So well... Writing in org-mode makes me waste a bit of time but produce much clearer designs because I do not design in code but in natural language and if the narrative is suboptimal is immediately clear, also it proper document the code non with comments but with complete human language. The downside it's that's very time consuming and I do loose some coding helpers that can't work much in babel blocks instead of full source files.

So well, for me such interaction is the most powerful UI we have, the best human-computer interface so far, the default go-to solution for any day-to-day work. A project could be an independent entity but still the day-to-day work born and evolve like that, so I'm not agreeing much, notebooks are not quick&dirty stuff but a tool to reason and reasoning often take much more time than directly write code, if you are disciplined. On contrary might disperse you if you are in "silicon valley mode". This is probably than main point not of the tool, but of the human using it: how many are constantly in Silicon Valley mode vs in Donald Knuth mode?

Re: Notebooks Are McDonalds of Code

#110
post #5
post #3

I think people may be misusing notebooks. They aren't there to develop software but serve as virtual versions of scientific notebooks (hence the name). They are there to conduct experiments (changing parameters and the like in your code) and to record and plot the results. You don't have to develop the software itself in the notebook.

I can change parameters in a script. What's the advantage?

Formatted markdown, embedded images, graphs, plots, etc.

Can't really do that in a script unless you're running TempleOS

Post reply on HN