5 ms·
I work with both D3 and Observable full time. The claim that one has to "reverse engineer the runtime" is simply absurd. The people that complain about D3 on
by j-pb 5y ago
I work with both D3 and Observable full time.
The claim that one has to "reverse engineer the runtime" is simply absurd.
The people that complain about D3 on observable always turn out to have taken neither the time to understand Observable nor D3 and are looking for a way to just copy paste something into their codebase, without understanding it, and without any willingness to really learn the tools they are using. Which would have never worked in the first place, because D3 is not a plotting library like vega or observables plot, it's a library library, building material from which you can build your own bespoke visualisations.
Observable is in essence reevaluating the entire code with each "requestAnimationFrame", no fancy diffing a la react or other magic, if it runs in observable, it will also run in your code as a static thing. Copy paste the cells out of observable, prepend them with a "const" and you're done,
not more work than removing and rewriting the boilerplate that's in every codepen.
- ronyeh 5y ago> taken neither the time to understand Observable nor D3 and are looking for a way to just copy paste something into their codebase, without understanding it, and without any willingness to really learn the tools they are using. That's how many of us learn, by dipping our toes into a new SDK by copying and pasting into our bare HTML/JS page and tweaking things to see what happens. Eventually we will get around to reading the full documentation. I have made d3 examples and played around with the toolkit since back when it was in its infancy (called protovis or something). It has definitely become more and more difficult over the years for a beginner to jump into. (Background: I have met Mike since I got my PhD from the hci/graphics lab at Stanford, but we did not overlap.)
- j-pb 5y agoYou make my point. What better environment to learn and twiddle, than a reactive, constantly reevaluating interactive notebook?
- hu3 5y agoWhatever environment each user prefers. Being softlocked into Observable is not a pro. That's like trying to force every vim user into Jetbrain IDEs (both are great, not trying to start a flamewar here). Sure an IDE will have more features (like Observable vs simple HTML file), but it's important to understand different people have different ways of doing things.
- j-pb 5y agoWe're talking about a javascript repl here, don't blow it out of proportion. The things transfer trivially between the envionments. If having a javascript repl is such a show stopper for learning D3 for you, maybe learn javascript first.
- themulticaster 5y agoBut if the example transfers trivially, why is there no convenient "download example project" button that offers an archive containing all the necessary files I need to run the example?
- duped 5y agoI guess it depends on your goal. If your goal is to learn how to code a nice reactive environment like a notebook is great. If your goal is to learn how to take a library and use it in a piece of software to release to the world, the notebook is next to useless.
- themulticaster 5y agoThis is my experience as well - when deciding whether to use a certain library or framework, I don't start reading the reference manual. Rather, I highly prefer looking at and tweaking existing examples, mostly to understand what the typical usage looks like and most importantly where the limitations lie. I feel like the last point is often overlooked by documentation authors: When evaluating whether to use a library, I'm not just interested in what it can do, but also what it can't do! That's why I really enjoy the "you should use X if you want to do Y"/"you shouldn't use X if you want to do Z" sections present in some manuals.
- sam_goody 5y agothis. I am a beginner, and have spent hours in frustration, because I couldn't figure out the examples. In every other project I would copy and paste some examples and start playing with it to understand.
- jwilber 5y agoThis. It’s literally just a matter of reordering variables, adding or removing a pair of parentheses, and removing the “return svg.node” call. People love to complain about free open-source documentation. Especially for d3 it seems. Shout out to Mike Bostock for all his awesome work.
- throwawaybutwhy 5y agoKnowing what to re-order, remove/add is non-trivial for a newbie. Relevant discussion: [0]. Let's look at the edit distance between [1] and [2]. Previous frustration at [3]. [0] https://news.ycombinator.com/item?id=27415725 https://news.ycombinator.com/item?id=27415725 [1] https://stackoverflow.com/questions/66966625/converting-observable-notebook-code-to-plain-javascript https://stackoverflow.com/questions/66966625/converting-obse... [2] https://observablehq.com/@d3/contours https://observablehq.com/@d3/contours [3] https://talk.observablehq.com/t/i-want-to-learn-d3-i-don-t-want-to-learn-observable-is-that-ok/1957/2 https://talk.observablehq.com/t/i-want-to-learn-d3-i-don-t-w...
- j-pb 5y agoA newbie could simply use the export functionality in observable, which automatically generates iframe code, or vanilla-js code or react code for you. Quoting other people that don't want to spend 5 minutes on their problem, doesn't make your not wanting to spend 5 minutes on your problem any more valid. If you want a no code solution for data viz, use Excel, if finding the export button, or reordering variable declarations in an order, where things come before the things they are used by, is already too difficult, then you're not gonna understand D3 anyways.
- slumpt_ 5y agoYour post comes off really condescending and shitty. I don’t think it’s necessarily true, either. I think a lot of newbies might just find the Observable stuff a bit overwhelming. Maybe their background isn’t JavaScript. That does not mean they aren’t gonna understand. What are you even suggesting. They aren’t capable? We must all look like ants to you, up there. As a dev with over a decade of experience in the front-end and no issues picking up d3 on my own, I still sympathize with overwhelmed newbies. Mike is trying to shove Observable down everyone’s throats in hopes of getting a good valuation and selling it some day, and I don’t blame him wanting to cash in D3 for this purpose. But let us recognize it plainly, and recognize the adverse consequences that has on a subset of the userbase. And it’s fine if he doesn’t want those people on for the ride. It may also just mean a long-term atrophy of the D3 community.