119 points · by philonoist · 5y ago · 116 comments
They may only be common among experienced developers
They may be used at innovative startups
They may even be used at FAANGs
They need not cater to web developers only
They may help amazingly to learn coding
They may useful for a new programmer
The criteria is anything that has helped you from all diverse sectors of the industry.
I will hit ctrl+s after every few lines of code or so, allowing my "coding wingman" to tidy things up as I go. It releases me from caring, in the slightest, about formatting, so I'm focused entirely on writing syntactically valid code, and letting the formatter worry about the deterministic minutiae that is formatting.
The reason I like doing this in real-time rather than some `run formatting before committing` workflow is that I benefit instantly from tidy code as I'm writing it.
If you are _ever_ thinking about formatting and you spend time manipulating proper spacing and layout, semicolons, or other language-specific quirks yourself, you may be wasting time that could be spent on the non-trivial parts of writing code. Consider trying it!
Every so often I don't notice red underline and I begin wondering why my autoformatter and autocomplete aren't working anymore.
Maybe a red border or something any time a file's syntax is invalid.
It still amazes me that C# doesn't have good opinionated formatter. It has lot of non-opinionated formatters, but I found one: Csharpier [1], check it out. It's slow, but at least the author is trying.
CSharpier started as a prettier plugin, and it was definitely slow then. ~30 minutes for a project with around 10k files if I remember correctly and the formatting was just barely implemented. At this point it is ~40s without --fast, or ~27s with it. CSharpier is stable enough that I should make --fast the default option.
Individual file formatting is a bit slow which is the overhead of starting up a new .Net console app every time. NativeAOT is a potential solution, but probably not until .net7. Building plugins that keep csharpier running in the background and piping files to it is the other option. That is one of the next things on my list.
Install the plugin and add this config:
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}TypeScript, JavaScript, JSON: Prettier
HTML: Built-in
Rust: rust-analyzer + whatever the formatter is built in to Rust's toolchain.
XML: XML Tools
They all operate using the same API, I think, so setting up `formatOnSave: true` is all I have to do for most of them.
Helps keep the entire code base formatted consistently.
Prettier - Code formatter https://marketplace.visualstudio.com/items?itemName=esbenp.p...
Not caring about this saves me so much mental capacity, I would recommend it
For JS formatting, I either use Rome or ESLint.
- The Prettier team has decided that they will not be adding new options. Since they explicitly bill themselves as an opinionated formatter, that seems reasonable to me.
- There is a fork of Prettier that supports breakBeforeElse, and this fork was suggested by a member of the Prettier team as a way for the requester to get this option
Other than that, the kubernetes extension is something that I use often enough although others say the Lens IDE is better for this purpose.
I think it's more about comfort levels. So if you're already comfortable doing this in IDEA, you don't stand to gain anything. Also, for Jvm languages, idea is still a better choice than vscode
2. If you CI you dev-container and publish to a private registry, only one computer is spending the time installing and setting up dependencies. Everyone else simply bases their local image off of that one (and saving productive working time).
3. If you mess up the dev environment with some failed experiment, simply recreate the container and carry on.
4. The dockerfile is a form of documentation: what is needed for this thing to run.
5. If you use Github, you can run your environment in a browser if you are in a pinch. I've only done this once, but it was hella useful.
- "Bookmarks", to persistently mark some lines and easily find them later (there's even an explorer pane with the bookmarks by file). It's must have when navigating a big code base
- "Todo Tree", to list all the TODOs and FIXMEs from the codebase in a panel
https://marketplace.visualstudio.com/items?itemName=bobmagic...
Being paranoid, I want to install some extensions (and their updates, etc.), but I am afraid of originally malicious extensions, and of malicious-takeovers (as was very common, and still happens, for Chrome and Firefox extensions).
Developers and their machines are, in general, more lucrative targets for bad actors than your average Web person.
How do you protect your setup with minimal cost to usefulness and productivity?
[1]: https://marketplace.visualstudio.com/items?itemName=GrapeCit...
[2]: https://marketplace.visualstudio.com/items?itemName=mechatro...
I needed cells in Excel to be translated into a list that SQL would like. I copied rows from Excel into VSCode, and would run a series of regex commands to format it into a valid SQL list. I got tired of running this manually, and turned it into an extension.
https://marketplace.visualstudio.com/items?itemName=reZach.l...
Disclaimer: I'm the creator of Dendron. We recently did a Launch HN post where you can find more details on what we're building: https://news.ycombinator.com/item?id=29176158
I really prefer Markdown, but have been using OneNote simply because of the mobile accessibility. Do you have a mobile app that you like using with Markdown? I’m on iOS, if that matters.
2. And occasionally skimming through https://marketplace.visualstudio.com/search?target=VSCode&ca...
https://marketplace.visualstudio.com/items?itemName=RomanPes...
https://marketplace.visualstudio.com/items?itemName=yzhang.m...
https://github.com/jwalton/environment/blob/master/vscode-ex...
If you're after some snippets, this is my modest collection:
https://github.com/jwalton/environment/tree/master/vscode/pr...
Mostly I add snippets like `rrrfn` to create a new react function component (it starts with `rrr` so it won't show up in suggestions unless I explicitly want it), or "jestfile" to scaffold out a test case.
2. Conventional Commits
3. Git Graph
4. IntelliJ IDEA Keybindings (as someone who uses both it's a blessing)
5. Path Intellisense
6. Peacock (changes color of vscode instance when it's in the background, usefull when multiple are open)
1. I already used VSCode as my daily driver. 2. Backend team all used IDEA for their Java codebase/had some workflows designed with it in mind. 3. I familiarized myself with IDEA for working on the backend, but used VSCode for the rest of the codebase.
I think "project specific" stuff is all I actually need and would recommend to someone else, including a language appropriate auto formatter. For me currently that‘s Prettier, ESLint and Apollo GraphQL.
Because I am the kind of nerd that has on old copy of the Apple Human Interface Guidelines on their bookshelf and VS Code is leagues above any well designed editor for TS.
You can use VSCode to edit your SQL queries, and run them without pasting into PGAdmin or whatever.
For web dev I like: Error Lens, Version Lens, Tailwind CSS IntelliSense & Highlight Matching Tag
An interesting case of the team watching the extensions ecosystem for ideas to make the core product better.
Is it good enough without any quirks or are there several VIM extensions?
It's a huge improvement compared to using VS Code without it.
"ES7 React/Redux/GraphQL/React-Native snippets"
Vim
https://marketplace.visualstudio.com/items?itemName=yandeu.f...
Why would this matter?
Working for the MMAAAN...
...you gotta use these fancy VS Code extensions
https://marketplace.visualstudio.com/items?itemName=Gruntfug...
https://marketplace.visualstudio.com/items?itemName=alefragn...
https://marketplace.visualstudio.com/items?itemName=EdgardMe...
https://marketplace.visualstudio.com/items?itemName=fabiospa...
https://marketplace.visualstudio.com/items?itemName=geeebe.d...
https://marketplace.visualstudio.com/items?itemName=letrieu....
https://marketplace.visualstudio.com/items?itemName=plrenaud...
https://marketplace.visualstudio.com/items?itemName=vincaslt...
https://marketplace.visualstudio.com/items?itemName=gazugafa...
https://marketplace.visualstudio.com/items?itemName=ms-vscod...
https://marketplace.visualstudio.com/items?itemName=yatki.vs...
https://marketplace.visualstudio.com/items?itemName=fabiospa...
https://marketplace.visualstudio.com/items?itemName=formulah...
https://marketplace.visualstudio.com/items?itemName=eamodio....
https://marketplace.visualstudio.com/items?itemName=mklouber...
https://marketplace.visualstudio.com/items?itemName=xyz.loca...
https://marketplace.visualstudio.com/items?itemName=kruemelk...
https://marketplace.visualstudio.com/items?itemName=Gruntfug...
I find myself in a job with 30ish coupled microservices, because they are coupled flipping between them is not unusual... But trying to set up a project that has all of them as parallel sub-projects, (a) gives me no way to impose a folder hierarchy and (b) it seems like I have to set up Cloud Code and each individual subproject separately.
So I am using VS Code for java dev despite its shortcomings (in particular in the same setup it does not work well with a monorepo hosting those other repos as git submodules, so you want to just load up a plain folder with the microservices in subfolders, but then the Java plugins do not recognize that you have loaded a Java project...) and like it's ok but I did prefer the testing of IntelliJ and some other features... But is there anyway to take these things that take 5 minutes or less to configure on a single microservice/subproject, and apply them to everything with 10 minutes of effort, rather than hours of doing it by hand?
Look into
Alt+1 → Scratches and consoles → Extensions
And here's a random "blog post" with some additional examples:
There is in NetBeans so I guess there is one for IntelliJ as well.