Live data from Hacker News

$20k bounty was claimed

prettier.io

201–210 of 345 posts

Re: $20k bounty was claimed

#201

Earlier quoted context omitted.

Like the others said, Prettier isn't foundational. That said, it brings in _much_ more value than $1.5k/mo. It has eliminated styling arguments on teams that adopt it. The amount of time saved in PRs/reduction of bikeshedding is very valuable.

Meh, most devs I've met can format code better than Prettier. Having a consistent set of rules sounds alluring at first, but the issue is that mechanical application is, well, mechanical and therefore dumb. My personal impression is that the code style bike shedding is a sign of team immaturity. In the more mature teams (composed of more mature persons), I haven't really seen formatting bike shedding.

[deleted]

Re: $20k bounty was claimed

#202
post #98

> You may not be aware but thanks to all those donations, we've been able to pay two people $1.5k/month for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job! It's incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.

Like the others said, Prettier isn't foundational. That said, it brings in _much_ more value than $1.5k/mo. It has eliminated styling arguments on teams that adopt it. The amount of time saved in PRs/reduction of bikeshedding is very valuable.

It's "foundational" in the sense that it gets 30M weekly `npm install`s which is up 500% from 4 years ago and growing. Js/Ts projects depend on it heavily.

Re: $20k bounty was claimed

#203

Earlier quoted context omitted.

Yeah, it's closer to 1.5x. Most companies budget total comp at 150% of salary.

many things are more expensive when you don't work at a company - for example the health care for a marginal employee at GE is a lot cheaper than you'll get for yourself. I always used 2x, but probably 2.5x is a sensible way to think about it in a patio11 "charge more than you think you should" mold.

Healthcare cost doesn't scale with the $200 base salary, though.

Re: $20k bounty was claimed

#204

Earlier quoted context omitted.

Like the others said, Prettier isn't foundational. That said, it brings in _much_ more value than $1.5k/mo. It has eliminated styling arguments on teams that adopt it. The amount of time saved in PRs/reduction of bikeshedding is very valuable.

Meh, most devs I've met can format code better than Prettier. Having a consistent set of rules sounds alluring at first, but the issue is that mechanical application is, well, mechanical and therefore dumb. My personal impression is that the code style bike shedding is a sign of team immaturity. In the more mature teams (composed of more mature persons), I haven't really seen formatting bike shedding.

Just because they can, doesn't mean they should; how many comments in your code reviews are about code style?

In mine, it used to be... at least half, because I was anal about code style and consistency and all we had at the time was ESLint, which only did partial code stile.

Nowadays, it's none. If you need to worry about code style in code reviews, use a tool.

Re: $20k bounty was claimed

#205
post #98

> You may not be aware but thanks to all those donations, we've been able to pay two people $1.5k/month for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job! It's incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.

I don't want to disparage prettier, but to call it a foundational piece...

I wouldn't call it foundational, but it would be one of the first things I'd set up in a new JS based project, alongside unit tests, com/transpiling and eslint.

Re: $20k bounty was claimed

#206
post #141

Earlier quoted context omitted.

Disable it! ( https://prettier.io/docs/en/ignore.html ) I do this occasionally, and especially with things like test tables. Linters/formatters are there to help in the common case, not to be some oppressive dogma.

If the fix is to disable prettier for an entire file, you're proving your parent poster point.

It doesn't have to be disabled for the whole file, you can annotate lines too as shown in the link the parent commenter shared.

Re: $20k bounty was claimed

#207

Earlier quoted context omitted.

The problem is that style matters and therefore those debates matter. Just because something isn't important to the developers that made Prettier doesn't mean that it's not important to the productivity of other developers.

The reality is that as long as your style is consistent, very few people actually care what that style is. I can imagine smaller teams/single individuals being very picky about how their code looks and there is nothing wrong with that. Once you have larger teams that becomes a waste of time since you'll likely have much larger problems to solve.

> as long as your style is consistent, very few people actually care what that style is.

This is an oft-repeated myth. There are some style rules for which that is true, but for some, there are objective, logical reasons to prefer one style over the other.

For example, mandating the optional comma after the last time in a list whose items has been split over multiple times results in more readable and logical patches: if you mandate the comma, a patch that only adds items will only have added lines, whereas if you don't, a patch adding items can have a mix of add/remove lines.

Pushing operators to the subsequent line makes it fundamentally easier to read as they all align, vs. a ragged right edge, and this is doubly important if the operators aren't the same, as it makes that far more visible. (Though this is harder in some languages with odd behavior around this, such as JavaScript.) (This also affects patch readability in many languages, and in fact, I'd say patch readability is the driver of many objective reasons behind styling choices.)

And so forth. I'd wager as many rules have logical reasons backing them as those that actually do boil down to literally just stylistic decisions.

Re: $20k bounty was claimed

#208
post #33

While it's always great to see performance gains, my largest pain point with prettier was never performance. Instead my only gripe with prettier is the "line wrapping noise" it creates, illustrated here by Anthony Fu: https://antfu.me/posts/why-not-prettier#the-line-wrapping-no... Would it be realistic to expect a solution for this issue now that "prettier needs to step up it's game"?

It's not a dichotomy though; performance is imo essential for a tool that will run on every save, every commit, every pull request. It might be fast enough, but adding all runs up adds up to a lot of unnecessary energy waste.

With regards to the whitespace issue, that's down to the line length rules used I think. It's also down to the diff viewer how to show it, not the formatter.

Re: $20k bounty was claimed

#209
post #34
post #8

> One question you are probably wondering is why would the Prettier team fund another project!? In practice, Prettier has been the dominant code formatter for JavaScript and as a result of a lack of competition, there has been little incentive to push on performance and fix various edge cases. I was indeed wondering that but the answer doesn't really answer the question for me. Why not set a bounty to improve Prettie…

There is a whole gulf of room between "we are the incumbent and there is no viable alternative in any language for JavaScript developers" and "the Rust folks have done it, there's an alternative now and it seems quite viable" I think it's about escaping local minima? You can always look at the biggest sink for performance and say "there's definitely something we can do better in there" but unless you have something o…

> I think it's about escaping local minima?

Yes. It’s also been said (not often enough) “if we don’t compete with ourselves someone else will”. Getting out of one’s own head (and repo) is gold. It shows humility and respect as well as creates innovation and resilience.

Re: $20k bounty was claimed

#210

Earlier quoted context omitted.

> A formatter is pretty essential when working in a team. I worked on a team without a formatter for more than 5 years. I'm certain many people have done the same. "Essential" is overselling.

I think at this point I would consider a formatter essential for working with a team. It helps make code style opinionated and fixed and I have no surprises when reading code. No one doing weird formatting to align random things. Any formatting tool that allows for pages upon pages of options is simply not something I want to deal with. Something like black, gofmt and prettier is vital

Bike shedding. I say this as somebody who has written a once prominent JavaScript code beautifier. Automating code beautification is a nice to have. It becomes essential when developers cannot be bothered to focus on more important things because either more important things are too challenging for the given developers or because the given developers want to feel more important than their contributions/decisions are actually worth.
Post reply on HN