(no title)
blobs | 6 years ago
This.
Code should live in your head. You shouldn't need intellisense to see that a property doesn't exist in an object. I hate code completion, most of the time it gets in the way of your thought process. Even if it can gain you a little speed increase, it still is better to write things down for your 'codebase memory'.
That's why I despise the current web development stack. You need Typescript, otherwise you might make a mistake with types? Never had that problem in the past. And just like typo's I make mistakes a once in a while, but that's OK because it helps me to learn the codebase better. You need a linter? Same story, it's always in the way as if it is more capable than me writing code. Prettier? It automatically formats your code, so the codebase doesn't resemble the one in your head anymore.
I know it does work for some people and I can totally imagine that for a beginner developer it can make the difference, but for me it doesn't. In the current/modern web stack I feel like having brick walls everywhere around me and my code is definitely not getting better from it, I'm just constantly struggling with all those 'handy' and 'necessary' tools while my code memory deteriorates. Even worse is that on almost any project I professionally work on requires all those tools, not using them makes me an amateur, even in the eyes of junior dev's.
I believe in writing every character of my code and testing it thoroughly, I wrote many bug free codebases with it, that's my experience.
stinos|6 years ago
So what do you do instead? Not just for intellisense but all other possible code completion solutions? Does that mean you always manually open a source file and look for the name of the function/member/whatever you need, then either copy/paste or manually type it? And try to remember all of them to avoid having to do that process again? I've done that from time to time and still do but it's just slower than intellisense and the likes, always.
danielbarla|6 years ago
white-flame|6 years ago
There's 3 different models that happen:
1. Type in the entire thing
2. Type in a unique portion and ask it to autocomplete
3. On each keystroke, evaluate if the list of auto-popped-up completions to see if the one you want is quickly available yet.
Clearly the 3rd is slowest to interact with, and does not convey useful information for familiar interfaces.
If you do not know or cannot remember what the interface looks like, it might be a bit more useful, but gives you similar information as the 2nd above when you have little to autocomplete. But the 2nd option still leaves you in control of the coding flow instead of the system constantly interrupting you to ask you if it knows what you mean yet.
pingyong|6 years ago
ryeguy|6 years ago
btschaegg|6 years ago
https://en.wikipedia.org/wiki/Poe%27s_law
throwawayjava|6 years ago
I'm entirely split between vigorous agreement and shaking my head.
At some point I just lost interest in committing various interfaces to working memory. The more trivial the more virulent my disinterest. Web stuff, especially front end? Unless it's crucial UX for something Very Important, it's just not worth the effort. Bring on the program synthesizers, even if they're limited to tab completing. I would literally rather memorize gibberish. If I wanted to memorize things I don't actually need to, I would've gone to med school.
At the same time, for code that actually matters and requires deep thought, I type every character and think about each one a lot.
Hopefully at some point program synthesis will be good enough that we don't have to make this choice. In the meantime, pretty much everyone doing something other than code-for-the-sake-of-code is writing some software where understanding every character really matters and some software that just needs to do the dumb thing right more than half the time to be worth it.
> It automatically formats your code, so the codebase doesn't resemble the one in your head anymore.
Same thing. One the one hand, your coworkers are not your psychologists. On the other hand, who is going to explain the code if you can't? And again, the resolution is: does this code being correct really matter?
TeMPOraL|6 years ago
mbeex|6 years ago
I think, this is simply not possible nowadays in any professional environment, involving multiple players.
There are way too many frameworks within which you have to find your way relatively quickly and nevertheless often only for a short time. Many with idiosyncrasies, sub-par design, the wrong smell or simply not satisfying the own taste one way or another.
With C++ almost my first language, I was using Qt for many years. It was almost the only framework fitting expectations more or less intuitively the whole time (at this moment, PyTorch fits a similar spot). This specific example hasn't to be true for everyone, of course. But there are always things on the other hand of the spectrum, for which I immediately forget syntactical peculiarities again and again. There seems some inner resistance, accelerating this for some software artefacts. I have seen this this seemingly feeble aesthetic point with many - often very good - programmers, maintaining a strong inner image of the software they are responsible for.
rbanffy|6 years ago
I use code completion for exploratory programming all the time. Questions like "can I convert this to a string" become easy. My coding is much more fluid because of it - it's a dialog with an assistant - "help me with telling what you can do" - rather than me writing overly specific orders to a machine.
raxxorrax|6 years ago
I see some other side effects though and that regards labeling. I spend much less time on thinking about fitting ones since they would be auto-completed on later use anyway. If I don't have intellisense available I spend more time on thinking about names just because I need to remember them. That makes the code much more readable in some cases.
Exploring APIs can be much more enjoyable if you have it and there is no thorough documentation available on the other hand.
Still, some projects have a lot of constants and variables, so in that case it really helps.
yonixw|6 years ago
Project size metrics needed.
kortex|6 years ago
That may be well and good for you, but not everyone's brain works like that. My brain is more GPU than CPU: I don't deal well with holding lots of disparate pieces of information in working memory, but I can quickly look at a problem and see many solutions as routes of data through black boxes, and determine what pipes need to plumb to where.
Why should I waste time and neural cycles on code "living" (e.g. interpreting state) in my head, when I have a perfectly good "head" for it right in front of me? Types? Linter? Formatting? That's wasted focus that could be going towards cybernetics, architecture, API ergonomics, and performance.
Before IDEs, I had a tight loop of write code, run it in repl, squash bugs, repeat. Productivity skyrocketed once I started using Spyder/codeblocks, then once again in Pycharm/Clion, and then once again when I started using type hints in python. I just started using TabNine and it's like finally I feel like my code can keep up with my brain.
Www.tabnine.com
luismedel|6 years ago
> [...] You need Typescript, otherwise you might make a mistake with types?
You can use your 'codebase memory' instead.
yyyyyyyyyyyy123|6 years ago
e.g I'm using type<Person> and I can just check list of its properties at current place instead of having to go to the definition
same with liberaries, despite that it may not be the smartest thing to do (you should check docs) it works fine very often
krapp|6 years ago
Prove it. You seem to be claiming to be qualitatively superior to most developers, since most developers use an IDE or tool of some sort, so let's see an example of this nontrivial bug free code you've written.
blobs|6 years ago
rbanffy|6 years ago
ryeguy|6 years ago
jcdentonunatco|6 years ago