6 ms·
Off topic, but whenever I see an animation of someone writing an import-statement in Javascript by hand I cringe a little. This stuff costs so much time, use a
by cel1ne 9y ago
Off topic, but whenever I see an animation of someone writing an import-statement in Javascript by hand I cringe a little.
This stuff costs so much time, use an IDE or some auto-import plugin for eslint.
- colinramsay 9y agoWhich plugin would you recommend? Is there editor integration, i.e. With Sublime?
- deleted 9y ago[deleted]
- cel1ne 9y agoI use eslint-plugin-auto-import and eslint-plugin-jsx-import (the latter I have hacked together for myself, it's undocumented and brittle) It get's triggered on each save in TextMate, which I use.
- colinramsay 9y agoThanks!
- coldtea 9y agoWhen I see overeliance on IDEs I cringe a lot. If the thing that slows down my programming is writing import statements by hand, then I have worse QA issues than that.
- paradite 9y agoWriting import statements actually slowed down my angular 2 development by a lot. I was trying to break down functions into tiny components and composite them together and ended up with lots of components in separate files. Modularity is good and all, but explicitly declaring each single dependent component (external libraries and other internal components) when writing new components and adding new ones as you need more dependencies is quite painful and tedious.
- coldtea 9y ago>Modularity is good and all Up to a point though -- "break[ing] down functions into tiny components" doesn't seem to be on the good side of modularity, but more like the lpad npm fiasco.
- cel1ne 9y agoReducing cognitive load by removing the need to write imports by hand means you have QA-issues? I don't follow.
- coldtea 9y agoYou didn't wrote about "reducing cognitive load". You wrote: "This stuff costs so much time". So, my reply to that comes down to: If you have so many imports that it costs you "so much time" to handle them manually, then you probably have QA issues -- like people adding tons of dependencies to your project. But it was also meant in the way that if you code so fast, that manually adding some imports is what slows you down ("takes so much time") then probably you are not thinking about what you code enough. Typically, even without automated imports, the time to handle imports would/should be a negligible amount compared to the time to write the actual functionality -- that's the difficult part, and that what takes one time to think, design and code right.
- cel1ne 9y agoWhile no-one would dispute the need of proper design, there are workflows like refactoring React/HTML-subtrees, where time is wasted having to fix imports whenever you cut something out and put it into a new file. Or having to manually write "import React from "react"" on top of every single new component. Or having to write "import _ from lodash" whenever you need to access _ for some function.
- tmat 9y agowe're talking about 3-4 seconds here.
- kukabynd 9y agoWhat do you do with all that saved time?