TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Should beginner programmers use code formatters from day one?

3 pointsby vga805over 7 years ago
I taught JavaScript awhile back and I regret not using prettier from day one. I think using a formatter lets new learners focus on the tricker parts of the language rather than the style thereof.

5 comments

maerF0x0over 7 years ago
Yes. I think all professional programmers should be using as many tools as they can from day 1. Tools like linters, filewatchers mapped to tests, IDEs (or well equipped editors). All of these tools help drive code quality and productivity and thusly should be seen as much a part of their career as knowing the nuances of their choice language, design patterns or details about any other part of their stack.
评论 #16336145 未加载
dasmothover 7 years ago
No. Without freedom to mess around and experiment with different styles, how are you supposed to learn why it matters, let alone develop your own style?<p>(Reading&#x2F;modifying nicely-written code is a good exercise to try early on, though...)<p>I&#x27;m somewhat alarmed about how ubiquitous these formatting tools have become. Seems like a step towards stamping out any trace of individuality, and making programming an assembly-line job rather than a craft.
mrkmgover 7 years ago
I think you should use a linter for sure. I look at it like spellcheck. If you allow the computer to just &quot;fix&quot; it for you, you will reinforce the incorrect spelling. I always backspace and retype the incorrect word so that I learn the correct spelling (and in turn, the correct combination of keys to press). I do the same thing with linters. I have it configured in my IDE that linting errors are underlined in red, like a syntax error. This forces me to go back and retype the correct syntax and style.
ecesenaover 7 years ago
I think the first thing to teach&#x2F;learn is to set up a linter which includes strict formatting rules.<p>Formatter, editor, etc. should remain a personal choice.
javaisfineover 7 years ago
Certainly a good idea if they&#x27;re going to work with others. As an important aid to the learning process? Probably not.