Live data from Hacker News

Notebooks Are McDonalds of Code

yobibyte.github.io

121–130 of 153 posts

Re: Notebooks Are McDonalds of Code

#121
Seriously, is this even a real problem?

I'm not even a programmer, I'm a data scientist 1 year out of college, and I still know that notebooks should never ever be deployed to production!

The right way to view notebooks is as.. notebooks. Text and visualizations that can run online code. They are for presenting!

You would need a tremendous amount of incompetence and a lack of any code reviews or tech leadership at all to end up deploying a notebook to production.

Re: Notebooks Are McDonalds of Code

#122
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.

Academia is also usually a single person trying to get stuff working so they can publish a paper to get tenure/a job.

Good SWE practices are 100% not taught in school.

Re: Notebooks Are McDonalds of Code

#123
I get that the gentle snark is the point, but I feel like a tiny shift in perspective would universally improve "take" posts like this.

Add a "why I might be wrong" section, or "why this might not apply to you". Just show me that you've thought from more than one side of the issue and I'll be more receptive to your side.

Re: Notebooks Are McDonalds of Code

#124
A notebook is just an IDE for writing scripts. There's software you can use (like Databricks and Azure Data Factory) to orchestrate them. But obviously if you are building an application they can't be the only IDE you use. A lot of the confusion in this article comes from trying to use them in a way that they're not designed to be used.

Re: Notebooks Are McDonalds of Code

#125
As a web developer who now is increasingly coding in python.. I sympathize with this but frankly google colab is way more accessible to me than other options. Jupyter notebook is good because it provides a quick feedback loop. Google colab is needed by a beginner like me because they have taken care of all the pytorch / cuda set up. The tutorials I access online use it so it's not easy to find a different way. All the quick and easy tutorials only demonstrate using google colab (or some other similar alternative).

I messed around with paperspace for a while, but I could not get detectron2 working in it so I went back to google colab. And my ML projects, that I have ambitions to become production apps, are still toys so for now the quick and dirty notebook will have to do. But yes, I prefer to be in my element in a traditional IDE, pushing to git, tabbing between files. I certainly have > 10 years of experience doing that, but not really for ML projects if that makes sense.

Re: Notebooks Are McDonalds of Code

#126

Recently, since coming across FastAI and nbdev[0], I've been moving increasingly to a more notebook-centric flow. So far it's been better particularly for the exploration aspect where I've primarily used ptpython in the past (and this isn't anywhere ML-related). I think the idea behind nbdev is pretty neat, but it pushes some practices that I'm not a fan of at all. I want to get to the point where I have a mostly com…

I remember Jeremy from fast ai was an advocate for notebook centric flows. But I have to respectfully disagree that he is a good authority on maintainable / scalable coding practices like this. And though I may be wrong, I feel like the fast ai lib itself is a not too useful wrapper around pytorch and people would be better served just learning pytorch itself. I say this as someone who watched a year of the fast ai videos, and got really excited about ai because of the fast ai course, which I am still grateful for. But this is my current take.

Re: Notebooks Are McDonalds of Code

#127
post #122
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.

Academia is also usually a single person trying to get stuff working so they can publish a paper to get tenure/a job. Good SWE practices are 100% not taught in school.

I still rely heavily on principles acquired from courses on Software Architecture and PL studies as a part of my CS degree - and I can definitely see a difference in how people organise their code with same tenure but no schooling.

Re: Notebooks Are McDonalds of Code

#128
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.

I still have no idea. I assumed it was a paper notebook, but then Excel is brought in, so now I think it's an Excel feature. In either case I have no idea what their are on about.

Re: Notebooks Are McDonalds of Code

#129
post #29
post #5

Earlier quoted context omitted.

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

Another advantage is when you have very slow code, you can use cells as caches, essentially without having to worry about serialization to disk. This often makes it much easier to interactively explore/develop downstream methods without needing to re-run earlier upstream dependencies. This is especially useful with large datasets. Even if serialization is straightforward, if you have enough data (or the data is remot…

This.

It's also useful when one of your cells goes and queries a slow API for a bunch of data — I do this all the time with Datadog.

Re: Notebooks Are McDonalds of Code

#130
post #122

Earlier quoted context omitted.

Academia is also usually a single person trying to get stuff working so they can publish a paper to get tenure/a job. Good SWE practices are 100% not taught in school.

I still rely heavily on principles acquired from courses on Software Architecture and PL studies as a part of my CS degree - and I can definitely see a difference in how people organise their code with same tenure but no schooling.

What are the most common principles you use?
Post reply on HN