HNHacker News
TopNewBestAskShowJobs

Case_of_Mondays

23 karma · joined June 14, 2023

submissionscomments
Case_of_Mondays··on My Obsidian note-taking workflow
I'm not convinced that note taking in this much detail is worth it. I have coworkers that do it and they can't recall information any better than the people who take no notes

I think some notes are better than others, especially in a job with many context switches. If you need it to get into context: worth writing down. If you are writing just to get "completeness" it's basically pointless. Your brain is pretty good at remembering stuff

Case_of_Mondays··on How to become a pirate archivist (2022)
I often think about what digital information from the current time humans will still be able to access in 1000 years. Everyone's talking about IP law but I think future historians will be thankful for projects like this that aim to democratize knowledge and preserve it for the future
Case_of_Mondays··on Vega-Altair: Declarative Visualization in Python
Altair is so important for data science as a product.

Every data scientist endeavors to make an impact with their analysis, and ultimately that is typically tied to some kind of visualization. There needs to be a way to a) build the visualization you want and b) get it out there to people who would find it useful.

Just plotting in matplotlib means that you must either export as a PNG (ew) or provide the analysis itself to users/decision makers. PNGs are terrible because you completely lose interactivity. Providing the analysis means figuring out deployment of your python environment, which is possible but just causes another step between analysis and decision made on the analysis.

Altair and the vega-lite grammar of visualizations provides an interoperable and data centric way to build visualizations. It is extremely flexible when building visualizations and I find it very intuitive when it comes to complex plots. They can also be easily embedded into any webpage after being exported using the vega-lite spec, just include the vega-lite script in the html page. Can even be used with in dashboarding tools like Spotfire (I assume also with things like PowerBI although I haven't done it).

Imo no real reason to use matplotlib as a data scientist lest you seriously limit the future impact of your work

Case_of_Mondays··on Python GUIs
Some of the new web-oriented ones look a lot better. Streamlit, nicegui, gradio, etc.
Case_of_Mondays··on Python GUIs
I'll flip this around and ask (in earnest - not trying to be snarky), if things like streamlit, NiceGui, gradio, etc exist where you can build a web-accessible gui with only python... why would I ever use Qt?
Case_of_Mondays··on Python GUIs
I have been looking at Python GUI libraries/frameworks/services over the past > 1 year. I'll cut straight to the chase with my recommendations for what they are worth.

- NiceGUI https://nicegui.io/#features - my favorite of the bunch, essentially wraps Quasar Vue components with accessible python. Tons of features including SPA, FastAPI under the hood, TailwindCSS. Have used it on a few projects and started contributing recently.

- Streamlit https://streamlit.io/ - if your goal is to get some python code set up with a GUI and deployed ASAP this is the best option. I have gone from 0 to a full working app in like an hour for some projects. Lots of love for it. A bit limited in terms of full-scale applications and large backend databases but it actually holds up really well.

There are a lot of other ones that people regularly recommend.

- Gradio https://gradio.app/ - really popular with huggingface and ml folks. Similar to streamlit in that it sacrifices some level of depth for speed of standing up projects.

- Textual https://www.textualize.io/projects/#textual - Building text-based UIs for the console. Seems to be pretty popular on reddit... Not to be a hater, but I have never seen a good argument for why it's worth dumping a bunch of time into this versus a web-oriented framework. They say "it's useful for products that don't need the internet", "you can use it through ssh", etc... doesn't really fit with my needs, I'll just leave it at that.

- Anvil https://anvil.works/ - a "low code" option for building python GUIs. I am pretty impressed, it has integrated databasing and a lot of plugins. If you are aiming for a scalable application for a large number of users this is probably a good options. My personal gripe with it is the number of mouse clicks it takes to do stuff but that could also be my lack of experience with the tool.

- Plotly dash https://dash.plotly.com/ - not usually thought of as a full GUI library necessarily but they have options for deploying the dashboards to the web - and the overall look and feel is nice. A good option if you have a small notebook with plots that needs wider accessibility.

My use cases are typically 10 - 50 users in an enterprise setting, so accessibility/low barrier to entry (pretty much meaning web-based) are concerns of mine. I also lean toward wanting to avoid learning overly-opinionated libraries (I put Qt and tkinter into this category). Why spend 50 hours learning Qt's way of building an app when I could use something like NiceGUI which lets you build a nicer looking app and gets you familiar with web dev concepts in the process. Imo a better use of my time.