Live data from Hacker News

Why is Prettier rock solid?

mrmr.io

31–40 of 163 posts

Re: Why is Prettier rock solid?

#32

Off topic but every once and a while I'm made aware of the impact prettier has had on my typing. It's so hard to write code without a tool like prettier because formatting related keystrokes have largely been removed from my muscle memory. You basically end up writing a sort of shorthand.

I think I probably suffer from the same thing. On top of that, I added a VS macro that adds missing imports, cleans up unused ones, and re-orders them in a single keystroke. I've never been lazier.

Re: Why is Prettier rock solid?

#33

Off topic but every once and a while I'm made aware of the impact prettier has had on my typing. It's so hard to write code without a tool like prettier because formatting related keystrokes have largely been removed from my muscle memory. You basically end up writing a sort of shorthand.

Yeah it’s true. Its not simply that you don’t have to manually format things a certain way. You simply don’t format things at all. You can avoid writing lots of spaces, newlines, semi colons, etc. it’s absolute garbage, then you save it, then it’s fine.

Re: Why is Prettier rock solid?

#35

I picked up standard[1] a while back for this reason, I don't want to have to think about it. It works fine, I have no complaints (took me a while to get used to not using semi-colons but now I prefer it) Same reason I use `cargo fmt` as well. [1] https://standardjs.com/

The hubris of naming it “standard” when it is not is a bit of a turn off.

Re: Why is Prettier rock solid?

#37

I picked up standard[1] a while back for this reason, I don't want to have to think about it. It works fine, I have no complaints (took me a while to get used to not using semi-colons but now I prefer it) Same reason I use `cargo fmt` as well. [1] https://standardjs.com/

I switched to Python Black and isort for the exact same reason. It just takes all of the thinking out of it. Even better, these tools mean I don't have to teach (and police) code style. I let a pre-commit hook handle that.

Re: Why is Prettier rock solid?

#38

I'm not sure I got an answer to the question in the title. Prettier is rock solid because it was based on a paper by someone who designed Haskell? That's a cool link, but I'm not sure what the insight is, is this evidence that functional programming-style algorithms lead to a more stable codebase?

I think prettier's initial author answered the question quite concisely in the article's first link. Title and excerpt copied below: > Dig into past research. > If you're excited about an idea, it's super tempting to sit down an immediately get going. But you shouldn't do that until you've done some cursory research about how people have solved it before. Spending a few days researching the topic always completely ch…

I can't agree more, and I can't disagree more. There's a great deal to be learned by experimenting yourself.

My workflow is:

* Learn the concept

* Implement it

* Research prior art

* Throw away my first implementation and rewrite it properly

(Edit: formatting)

Re: Why is Prettier rock solid?

#40

Off topic but every once and a while I'm made aware of the impact prettier has had on my typing. It's so hard to write code without a tool like prettier because formatting related keystrokes have largely been removed from my muscle memory. You basically end up writing a sort of shorthand.

But I am quite happy with it I don’t have to waste my time typing. I don’t have to waste my time improving my raw typing speed.

I do solid touch typing 60WPM writing plain text. With code completion and linting it easily goes twice as fast writing code.

Post reply on HN