Live data from Hacker News

Why is D3 so Verbose?

theheasman.com

41–50 of 75 posts

Re: Why is D3 so Verbose?

#43
Verbosity is readability. I'd wager some of the terser libraries take more effort picking up again after leaving them for a while.

Whereas once the D3 training wheels come off, its muscle memory is hard to shed.

Re: Why is D3 so Verbose?

#44
Love all D3 content, but I'd add that the data binding just to create svg is not the real reason - after all, you can do this declaratively using most modern frameworks by directly iterating over the data and returning a positioned element (fwiw this is how I prefer to use it today). The reason is because of the complexity within d3 selection, namely the enter/update/exit + transition capabilities: https://www.d3indepth.com/enterexit/

Another thing worth mentioning that newcomers seem to take for granted - the margin boilerplate required for correct positioning (see https://observablehq.com/@d3/margin-convention).

Re: Why is D3 so Verbose?

#45

Verbosity is readability. I'd wager some of the terser libraries take more effort picking up again after leaving them for a while. Whereas once the D3 training wheels come off, its muscle memory is hard to shed.

came to post this. verbose good (to an extent)

Re: Why is D3 so Verbose?

#46

Man, my first startup in 2010 used protovis, the charting library Mike Bostock built before deciding d3 was the better approach. It was rough to have an 8 month old startup with a core piece of tech that suddenly stopped improving. My main takeaway from so much of this is that "just a chart" is one of the biggest sources of hidden complexity in displaying useful information to people. It's right up there with "a simp…

> a core piece of tech that suddenly stopped improving.

I just had this happen to me with something I had invested considerable time into. I've finally found a workaround, and even leveraged some of the previous tech, but man it sucks to have something just become abandonned. All the more reason to choose boring tech when you can...

Re: Why is D3 so Verbose?

#47

recently i've been having a lot of success with working with d3 + solid.js. I use d3 as the data processing layer, and solid for actually rendering svgs from the data. the combination is lovely, you get all the power of d3, while the parts that usually end up verbose are written succinctly in jsx. and it's a lot less pain than doing it in react, because the mental models of solid/d3 feel much more aligned

can you elaborate a bit? how do you use d3 but not have it render svgs?

Re: Why is D3 so Verbose?

#49
post #46

Man, my first startup in 2010 used protovis, the charting library Mike Bostock built before deciding d3 was the better approach. It was rough to have an 8 month old startup with a core piece of tech that suddenly stopped improving. My main takeaway from so much of this is that "just a chart" is one of the biggest sources of hidden complexity in displaying useful information to people. It's right up there with "a simp…

> a core piece of tech that suddenly stopped improving. I just had this happen to me with something I had invested considerable time into. I've finally found a workaround, and even leveraged some of the previous tech, but man it sucks to have something just become abandonned. All the more reason to choose boring tech when you can...

No fun to have to do a panic migration!

Anyway my latest startup is trying to make AI do migrations, in no small part because of this problem 15 years ago.

Re: Why is D3 so Verbose?

#50
I could not get over the fact that 0,0 in d3 is the top left corner instead of the bottom left.

Why??

Everything in real life uses bottom left for 0,0! Probably because the first EGA/VGA accelerators worked this way to save one instruction in the most common use case and things never change....

Post reply on HN